summaryrefslogtreecommitdiffstats
path: root/Lib/profile.doc
Commit message (Expand)AuthorAgeFilesLines
* Merge alpha100 branch back to main trunkGuido van Rossum1994-08-011-74/+702
* Initial revisionGuido van Rossum1992-04-211-0/+74
tr>authorJoão Abecasis <joao.abecasis@nokia.com>2010-11-23 11:26:54 (GMT) committerJoão Abecasis <joao.abecasis@nokia.com>2010-11-23 11:26:54 (GMT) commit802498fcd43558a10bb7477d3957cdd27fd8ec09 (patch) treec40ddd859b032ffa7ed9c6df1173312c0bb1947d parent901fee7e610ec53f744416aeeca89c4605923120 (diff)parent538e7b8ddf45936bb274ed3230b591b3459edfa7 (diff)downloadQt-802498fcd43558a10bb7477d3957cdd27fd8ec09.zip
Qt-802498fcd43558a10bb7477d3957cdd27fd8ec09.tar.gz
Qt-802498fcd43558a10bb7477d3957cdd27fd8ec09.tar.bz2
Merge remote branch 'qt/master' into file-engine-refactor
Conflicts: demos/declarative/minehunt/minehunt.pro src/corelib/io/io.pri src/corelib/io/qfsfileengine.cpp src/corelib/io/qfsfileengine_unix.cpp src/corelib/io/qfsfileengine_win.cpp src/s60installs/bwins/QtCoreu.def src/s60installs/bwins/QtDeclarativeu.def src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtCoreu.def src/s60installs/eabi/QtDeclarativeu.def src/s60installs/eabi/QtGuiu.def tests/auto/qapplication/test/test.pro tests/auto/qaudioinput/qaudioinput.pro tests/auto/qaudiooutput/qaudiooutput.pro tests/auto/qchar/qchar.pro tests/auto/qdiriterator/qdiriterator.pro tests/auto/qsound/qsound.pro
Diffstat
-rw-r--r--.commit-template2
-rw-r--r--.gitignore1
-rwxr-xr-xbin/createpackage.pl13
-rwxr-xr-xbin/elf2e32_qtwrapper148
-rw-r--r--bin/elf2e32_qtwrapper.bat3
-rwxr-xr-xbin/elf2e32_qtwrapper.pl225
-rwxr-xr-xbin/patch_capabilities.pl3
-rwxr-xr-xbin/syncqt14
-rw-r--r--config.tests/mac/coreservices/coreservices.mm48
-rw-r--r--config.tests/mac/coreservices/coreservices.pro3
-rw-r--r--config.tests/mac/corewlan/corewlan.pro2
-rw-r--r--config.tests/symbian/audio/audio.pro1
-rw-r--r--config.tests/symbian/simple/simple.pro1
-rw-r--r--config.tests/unix/doubleformat/doubleformattest.cpp4
-rw-r--r--config.tests/unix/opengldesktop/opengldesktop.cpp52
-rw-r--r--config.tests/unix/opengldesktop/opengldesktop.pro9
-rwxr-xr-xconfigure536
-rw-r--r--demos/books/books.pro4
-rw-r--r--demos/chip/view.cpp54
-rw-r--r--demos/chip/view.h32
-rw-r--r--demos/declarative/minehunt/minehunt.cpp4
-rw-r--r--demos/declarative/minehunt/minehunt.pro5
-rw-r--r--demos/declarative/samegame/SamegameCore/Button.qml4
-rwxr-xr-xdemos/declarative/samegame/SamegameCore/samegame.js198
-rw-r--r--demos/declarative/samegame/samegame.qml7
-rw-r--r--demos/declarative/snake/content/pics/pause.pngbin0 -> 4327 bytes
-rw-r--r--demos/declarative/snake/content/snake.js4
-rw-r--r--demos/declarative/snake/snake.qml13
-rw-r--r--demos/declarative/twitter/twitter.qml2
-rw-r--r--demos/demos.pro2
-rw-r--r--demos/embedded/desktopservices/desktopservices.pro4
-rw-r--r--demos/embedded/fluidlauncher/fluidlauncher.pro80
-rw-r--r--demos/embedded/qmlcalculator/deployment.pri2
-rw-r--r--demos/embedded/qmlclocks/deployment.pri2
-rw-r--r--demos/embedded/qmldialcontrol/deployment.pri2
-rw-r--r--demos/embedded/qmleasing/deployment.pri2
-rw-r--r--demos/embedded/qmlflickr/deployment.pri2
-rw-r--r--demos/embedded/qmlphotoviewer/deployment.pri2
-rw-r--r--demos/embedded/qmltwitter/deployment.pri2
-rw-r--r--demos/qmediaplayer/main.cpp52
-rw-r--r--demos/qmediaplayer/mediaplayer.cpp24
-rw-r--r--demos/qmediaplayer/mediaplayer.h7
-rw-r--r--demos/qmediaplayer/qmediaplayer.pro2
-rw-r--r--demos/qtdemo/itemcircleanimation.h2
-rw-r--r--demos/qtdemo/mainwindow.cpp2
-rw-r--r--demos/qtdemo/mainwindow.h2
-rw-r--r--demos/qtdemo/qmlShell.qml2
-rw-r--r--demos/qtdemo/textbutton.h2
-rw-r--r--demos/qtdemo/xml/examples.xml1
-rw-r--r--demos/spectrum/3rdparty/fftreal/fftreal.pro2
-rw-r--r--demos/spectrum/app/app.pro13
-rw-r--r--demos/spectrum/app/engine.cpp333
-rw-r--r--demos/spectrum/app/engine.h59
-rw-r--r--demos/spectrum/app/levelmeter.h2
-rw-r--r--demos/spectrum/app/main.cpp2
-rw-r--r--demos/spectrum/app/mainwidget.cpp67
-rw-r--r--demos/spectrum/app/mainwidget.h10
-rw-r--r--demos/spectrum/app/progressbar.cpp26
-rw-r--r--demos/spectrum/app/progressbar.h4
-rw-r--r--demos/spectrum/app/spectrograph.h2
-rw-r--r--demos/spectrum/app/spectrumanalyser.cpp4
-rw-r--r--demos/spectrum/app/utils.cpp4
-rw-r--r--demos/spectrum/app/waveform.cpp120
-rw-r--r--demos/spectrum/app/waveform.h14
-rw-r--r--demos/spectrum/app/wavfile.cpp199
-rw-r--r--demos/spectrum/app/wavfile.h35
-rw-r--r--demos/spectrum/spectrum.pri12
-rw-r--r--demos/spreadsheet/spreadsheet.cpp2
-rw-r--r--demos/symbianpkgrules.pri4
-rw-r--r--demos/textedit/textedit.qdoc10
-rw-r--r--dist/changes-4.6.44
-rw-r--r--dist/changes-4.7.1328
-rw-r--r--dist/changes-4.7.2158
-rw-r--r--dist/changes-4.8.02
-rw-r--r--doc/src/bughowto.qdoc14
-rw-r--r--doc/src/classes.qdoc10
-rw-r--r--doc/src/classes/exportedfunctions.qdoc10
-rw-r--r--doc/src/classes/phonon-api.qdoc123
-rw-r--r--doc/src/classes/phonon-namespace.qdoc10
-rw-r--r--doc/src/credits.qdoc10
-rw-r--r--doc/src/declarative/advtutorial.qdoc10
-rw-r--r--doc/src/declarative/anchor-layout.qdoc10
-rw-r--r--doc/src/declarative/animation.qdoc10
-rw-r--r--doc/src/declarative/basictypes.qdoc97
-rw-r--r--doc/src/declarative/codingconventions.qdoc10
-rw-r--r--doc/src/declarative/declarativeui.qdoc10
-rw-r--r--doc/src/declarative/dynamicobjects.qdoc16
-rw-r--r--doc/src/declarative/elements.qdoc116
-rw-r--r--doc/src/declarative/example-slideswitch.qdoc10
-rw-r--r--doc/src/declarative/examples.qdoc10
-rw-r--r--doc/src/declarative/extending-tutorial.qdoc44
-rw-r--r--doc/src/declarative/extending.qdoc38
-rw-r--r--doc/src/declarative/focus.qdoc10
-rw-r--r--doc/src/declarative/globalobject.qdoc10
-rw-r--r--doc/src/declarative/integrating.qdoc12
-rw-r--r--doc/src/declarative/javascriptblocks.qdoc10
-rw-r--r--doc/src/declarative/modules.qdoc10
-rw-r--r--doc/src/declarative/network.qdoc10
-rw-r--r--doc/src/declarative/positioners.qdoc10
-rw-r--r--doc/src/declarative/propertybinding.qdoc10
-rw-r--r--doc/src/declarative/qdeclarativedebugging.qdoc10
-rw-r--r--doc/src/declarative/qdeclarativedocument.qdoc10
-rw-r--r--doc/src/declarative/qdeclarativei18n.qdoc10
-rw-r--r--doc/src/declarative/qdeclarativeintro.qdoc16
-rw-r--r--doc/src/declarative/qdeclarativemodels.qdoc10
-rw-r--r--doc/src/declarative/qdeclarativeperformance.qdoc10
-rw-r--r--doc/src/declarative/qdeclarativereference.qdoc10
-rw-r--r--doc/src/declarative/qdeclarativesecurity.qdoc10
-rw-r--r--doc/src/declarative/qdeclarativestates.qdoc10
-rw-r--r--doc/src/declarative/qml-intro.qdoc10
-rw-r--r--doc/src/declarative/qmlruntime.qdoc10
-rw-r--r--doc/src/declarative/qmlviewer.qdoc10
-rw-r--r--doc/src/declarative/qtbinding.qdoc641
-rw-r--r--doc/src/declarative/qtdeclarative.qdoc10
-rw-r--r--doc/src/declarative/qtprogrammers.qdoc10
-rw-r--r--doc/src/declarative/scope.qdoc10
-rw-r--r--doc/src/declarative/tutorial.qdoc10
-rw-r--r--doc/src/declarative/whatsnew.qdoc10
-rw-r--r--doc/src/demos/affine.qdoc10
-rw-r--r--doc/src/demos/anomaly.qdoc10
-rw-r--r--doc/src/demos/arthurplugin.qdoc10
-rw-r--r--doc/src/demos/books.qdoc10
-rw-r--r--doc/src/demos/boxes.qdoc10
-rw-r--r--doc/src/demos/browser.qdoc10
-rw-r--r--doc/src/demos/chip.qdoc10
-rw-r--r--doc/src/demos/composition.qdoc10
-rw-r--r--doc/src/demos/deform.qdoc10
-rw-r--r--doc/src/demos/desktopservices.qdoc10
-rw-r--r--doc/src/demos/digiflip.qdoc10
-rw-r--r--doc/src/demos/embeddeddialogs.qdoc10
-rw-r--r--doc/src/demos/embeddedsvgviewer.qdoc10
-rw-r--r--doc/src/demos/flickable.qdoc10
-rw-r--r--doc/src/demos/flightinfo.qdoc10
-rw-r--r--doc/src/demos/fluidlauncher.qdoc10
-rw-r--r--doc/src/demos/gradients.qdoc10
-rw-r--r--doc/src/demos/interview.qdoc10
-rw-r--r--doc/src/demos/lightmaps.qdoc10
-rw-r--r--doc/src/demos/macmainwindow.qdoc10
-rw-r--r--doc/src/demos/mainwindow.qdoc10
-rw-r--r--doc/src/demos/mediaplayer.qdoc10
-rw-r--r--doc/src/demos/pathstroke.qdoc10
-rw-r--r--doc/src/demos/qtdemo.qdoc10
-rw-r--r--doc/src/demos/raycasting.qdoc10
-rw-r--r--doc/src/demos/spectrum.qdoc10
-rw-r--r--doc/src/demos/spreadsheet.qdoc10
-rw-r--r--doc/src/demos/sqlbrowser.qdoc10
-rw-r--r--doc/src/demos/styledemo.qdoc10
-rw-r--r--doc/src/demos/sub-attaq.qdoc10
-rw-r--r--doc/src/demos/textedit.qdoc10
-rw-r--r--doc/src/demos/undo.qdoc10
-rw-r--r--doc/src/demos/weatherinfo.qdoc10
-rw-r--r--doc/src/deployment/deployment-plugins.qdoc10
-rw-r--r--doc/src/deployment/deployment.qdoc11
-rw-r--r--doc/src/deployment/qt-conf.qdoc10
-rw-r--r--doc/src/deployment/qtconfig.qdoc10
-rw-r--r--doc/src/development/activeqt-dumpcpp.qdoc10
-rw-r--r--doc/src/development/activeqt-dumpdoc.qdoc10
-rw-r--r--doc/src/development/activeqt-idc.qdoc10
-rw-r--r--doc/src/development/activeqt-testcon.qdoc10
-rw-r--r--doc/src/development/assistant-manual.qdoc10
-rw-r--r--doc/src/development/debug.qdoc10
-rw-r--r--doc/src/development/designer-manual.qdoc166
-rw-r--r--doc/src/development/developing-on-mac.qdoc10
-rw-r--r--doc/src/development/developing-with-qt.qdoc16
-rw-r--r--doc/src/development/moc.qdoc10
-rw-r--r--doc/src/development/qmake-manual.qdoc37
-rw-r--r--doc/src/development/qmsdev.qdoc10
-rw-r--r--doc/src/development/qtestlib.qdoc44
-rw-r--r--doc/src/development/rcc.qdoc10
-rw-r--r--doc/src/development/tools-list.qdoc10
-rw-r--r--doc/src/development/uic.qdoc10
-rw-r--r--doc/src/examples/2dpainting.qdoc10
-rw-r--r--doc/src/examples/activeqt/comapp.qdoc10
-rw-r--r--doc/src/examples/activeqt/dotnet.qdoc10
-rw-r--r--doc/src/examples/activeqt/hierarchy.qdoc10
-rw-r--r--doc/src/examples/activeqt/menus.qdoc10
-rw-r--r--doc/src/examples/activeqt/multiple.qdoc10
-rw-r--r--doc/src/examples/activeqt/opengl.qdoc10
-rw-r--r--doc/src/examples/activeqt/qutlook.qdoc10
-rw-r--r--doc/src/examples/activeqt/simple.qdoc10
-rw-r--r--doc/src/examples/activeqt/webbrowser.qdoc10
-rw-r--r--doc/src/examples/activeqt/wrapper.qdoc10
-rw-r--r--doc/src/examples/addressbook.qdoc10
-rw-r--r--doc/src/examples/analogclock.qdoc10
-rw-r--r--doc/src/examples/animatedtiles.qdoc10
-rw-r--r--doc/src/examples/appchooser.qdoc10
-rw-r--r--doc/src/examples/application.qdoc10
-rw-r--r--doc/src/examples/arrowpad.qdoc10
-rw-r--r--doc/src/examples/audiodevices.qdoc10
-rw-r--r--doc/src/examples/audioinput.qdoc10
-rw-r--r--doc/src/examples/audiooutput.qdoc10
-rw-r--r--doc/src/examples/basicdrawing.qdoc10
-rw-r--r--doc/src/examples/basicgraphicslayouts.qdoc10
-rw-r--r--doc/src/examples/basiclayouts.qdoc12
-rw-r--r--doc/src/examples/basicsortfiltermodel.qdoc10
-rw-r--r--doc/src/examples/bearercloud.qdoc10
-rw-r--r--doc/src/examples/bearermonitor.qdoc10
-rw-r--r--doc/src/examples/blockingfortuneclient.qdoc10
-rw-r--r--doc/src/examples/blurpicker.qdoc10
-rw-r--r--doc/src/examples/borderlayout.qdoc10
-rw-r--r--doc/src/examples/broadcastreceiver.qdoc10
-rw-r--r--doc/src/examples/broadcastsender.qdoc10
-rw-r--r--doc/src/examples/cachedtable.qdoc10
-rw-r--r--doc/src/examples/calculator.qdoc10
-rw-r--r--doc/src/examples/calculatorbuilder.qdoc10
-rw-r--r--doc/src/examples/calculatorform.qdoc10
-rw-r--r--doc/src/examples/calendar.qdoc10
-rw-r--r--doc/src/examples/calendarwidget.qdoc10
-rw-r--r--doc/src/examples/capabilitiesexample.qdoc10
-rw-r--r--doc/src/examples/charactermap.qdoc10
-rw-r--r--doc/src/examples/chart.qdoc10
-rw-r--r--doc/src/examples/classwizard.qdoc10
-rw-r--r--doc/src/examples/codecs.qdoc10
-rw-r--r--doc/src/examples/codeeditor.qdoc10
-rw-r--r--doc/src/examples/collidingmice-example.qdoc10
-rw-r--r--doc/src/examples/coloreditorfactory.qdoc10
-rw-r--r--doc/src/examples/combowidgetmapper.qdoc10
-rw-r--r--doc/src/examples/completer.qdoc10
-rw-r--r--doc/src/examples/complexpingpong.qdoc10
-rw-r--r--doc/src/examples/concentriccircles.qdoc10
-rw-r--r--doc/src/examples/configdialog.qdoc10
-rw-r--r--doc/src/examples/containerextension.qdoc10
-rw-r--r--doc/src/examples/context2d.qdoc10
-rw-r--r--doc/src/examples/contextsensitivehelp.qdoc10
-rw-r--r--doc/src/examples/contiguouscache.qdoc10
-rw-r--r--doc/src/examples/customcompleter.qdoc10
-rw-r--r--doc/src/examples/customsortfiltermodel.qdoc10
-rw-r--r--doc/src/examples/customtype.qdoc10
-rw-r--r--doc/src/examples/customtypesending.qdoc27
-rw-r--r--doc/src/examples/customwidgetplugin.qdoc10
-rw-r--r--doc/src/examples/dbscreen.qdoc10
-rw-r--r--doc/src/examples/dbus-chat.qdoc10
-rw-r--r--doc/src/examples/dbus-listnames.qdoc10
-rw-r--r--doc/src/examples/dbus-pingpong.qdoc10
-rw-r--r--doc/src/examples/dbus-remotecontrolledcar.qdoc10
-rw-r--r--doc/src/examples/defaultprototypes.qdoc10
-rw-r--r--doc/src/examples/delayedencoding.qdoc10
-rw-r--r--doc/src/examples/diagramscene.qdoc10
-rw-r--r--doc/src/examples/digitalclock.qdoc10
-rw-r--r--doc/src/examples/dirview.qdoc10
-rw-r--r--doc/src/examples/dockwidgets.qdoc10
-rw-r--r--doc/src/examples/dombookmarks.qdoc10
-rw-r--r--doc/src/examples/domtraversal.qdoc10
-rw-r--r--doc/src/examples/draganddroppuzzle.qdoc10
-rw-r--r--doc/src/examples/dragdroprobot.qdoc10
-rw-r--r--doc/src/examples/draggableicons.qdoc10
-rw-r--r--doc/src/examples/draggabletext.qdoc10
-rw-r--r--doc/src/examples/drilldown.qdoc10
-rw-r--r--doc/src/examples/dropsite.qdoc10
-rw-r--r--doc/src/examples/dynamiclayouts.qdoc10
-rw-r--r--doc/src/examples/easing.qdoc10
-rw-r--r--doc/src/examples/echoplugin.qdoc10
-rw-r--r--doc/src/examples/editabletreemodel.qdoc10
-rw-r--r--doc/src/examples/elasticnodes.qdoc10
-rw-r--r--doc/src/examples/eventtransitions.qdoc10
-rw-r--r--doc/src/examples/extension.qdoc10
-rw-r--r--doc/src/examples/factorial.qdoc10
-rw-r--r--doc/src/examples/fademessage.qdoc10
-rw-r--r--doc/src/examples/fancybrowser.qdoc10
-rw-r--r--doc/src/examples/fetchmore.qdoc10
-rw-r--r--doc/src/examples/filetree.qdoc10
-rw-r--r--doc/src/examples/findfiles.qdoc10
-rw-r--r--doc/src/examples/fingerpaint.qdoc10
-rw-r--r--doc/src/examples/flowlayout.qdoc10
-rw-r--r--doc/src/examples/fontsampler.qdoc10
-rw-r--r--doc/src/examples/formextractor.qdoc10
-rw-r--r--doc/src/examples/fortuneclient.qdoc10
-rw-r--r--doc/src/examples/fortuneserver.qdoc10
-rw-r--r--doc/src/examples/framebufferobject.qdoc10
-rw-r--r--doc/src/examples/framebufferobject2.qdoc10
-rw-r--r--doc/src/examples/fridgemagnets.qdoc10
-rw-r--r--doc/src/examples/frozencolumn.qdoc10
-rw-r--r--doc/src/examples/ftp.qdoc10
-rw-r--r--doc/src/examples/globalVariables.qdoc10
-rw-r--r--doc/src/examples/googlechat.qdoc10
-rw-r--r--doc/src/examples/googlesuggest.qdoc10
-rw-r--r--doc/src/examples/grabber.qdoc10
-rw-r--r--doc/src/examples/graphicsview-anchorlayout.qdoc10
-rw-r--r--doc/src/examples/graphicsview-flowlayout.qdoc10
-rw-r--r--doc/src/examples/graphicsview-simpleanchorlayout.qdoc10
-rw-r--r--doc/src/examples/graphicsview-weatheranchorlayout.qdoc10
-rw-r--r--doc/src/examples/groupbox.qdoc10
-rw-r--r--doc/src/examples/hellogl.qdoc10
-rw-r--r--doc/src/examples/hellogl_es.qdoc10
-rw-r--r--doc/src/examples/helloscript.qdoc10
-rw-r--r--doc/src/examples/hellotr.qdoc10
-rw-r--r--doc/src/examples/htmlinfo.qdoc10
-rw-r--r--doc/src/examples/http.qdoc10
-rw-r--r--doc/src/examples/i18n.qdoc10
-rw-r--r--doc/src/examples/icons.qdoc10
-rw-r--r--doc/src/examples/imagecomposition.qdoc10
-rw-r--r--doc/src/examples/imagegestures.qdoc10
-rw-r--r--doc/src/examples/imageviewer.qdoc10
-rw-r--r--doc/src/examples/inputpanel.qdoc10
-rw-r--r--doc/src/examples/itemviewspuzzle.qdoc10
-rw-r--r--doc/src/examples/licensewizard.qdoc10
-rw-r--r--doc/src/examples/lighting.qdoc10
-rw-r--r--doc/src/examples/lineedits.qdoc10
-rw-r--r--doc/src/examples/localfortuneclient.qdoc10
-rw-r--r--doc/src/examples/localfortuneserver.qdoc10
-rw-r--r--doc/src/examples/loopback.qdoc10
-rw-r--r--doc/src/examples/mandelbrot.qdoc10
-rw-r--r--doc/src/examples/masterdetail.qdoc10
-rw-r--r--doc/src/examples/mdi.qdoc10
-rw-r--r--doc/src/examples/menus.qdoc10
-rw-r--r--doc/src/examples/mousecalibration.qdoc10
-rw-r--r--doc/src/examples/moveblocks.qdoc10
-rw-r--r--doc/src/examples/movie.qdoc10
-rw-r--r--doc/src/examples/multipleinheritance.qdoc10
-rw-r--r--doc/src/examples/musicplayerexample.qdoc10
-rw-r--r--doc/src/examples/network-chat.qdoc10
-rw-r--r--doc/src/examples/network-download.qdoc10
-rw-r--r--doc/src/examples/network-downloadmanager.qdoc10
-rw-r--r--doc/src/examples/openvg-star.qdoc10
-rw-r--r--doc/src/examples/orderform.qdoc10
-rw-r--r--doc/src/examples/overpainting.qdoc10
-rw-r--r--doc/src/examples/padnavigator.qdoc10
-rw-r--r--doc/src/examples/painterpaths.qdoc10
-rw-r--r--doc/src/examples/pbuffers.qdoc10
-rw-r--r--doc/src/examples/pbuffers2.qdoc10
-rw-r--r--doc/src/examples/pinchzoom.qdoc10
-rw-r--r--doc/src/examples/pingpong.qdoc10
-rw-r--r--doc/src/examples/pixelator.qdoc10
-rw-r--r--doc/src/examples/plugandpaint.qdoc10
-rw-r--r--doc/src/examples/portedasteroids.qdoc10
-rw-r--r--doc/src/examples/portedcanvas.qdoc10
-rw-r--r--doc/src/examples/previewer.qdoc10
-rw-r--r--doc/src/examples/qml-calculator.qdoc10
-rw-r--r--doc/src/examples/qml-examples.qdoc41
-rw-r--r--doc/src/examples/qml-extending.qdoc10
-rw-r--r--doc/src/examples/qml-flickr.qdoc10
-rw-r--r--doc/src/examples/qml-folderlistmodel.qdoc10
-rw-r--r--doc/src/examples/qml-minehunt.qdoc10
-rw-r--r--doc/src/examples/qml-photoviewer.qdoc10
-rw-r--r--doc/src/examples/qml-rssnews.qdoc10
-rw-r--r--doc/src/examples/qml-samegame.qdoc10
-rw-r--r--doc/src/examples/qml-snake.qdoc10
-rw-r--r--doc/src/examples/qml-twitter.qdoc10
-rw-r--r--doc/src/examples/qml-webbrowser.qdoc10
-rw-r--r--doc/src/examples/qobjectxmlmodel.qdoc10
-rw-r--r--doc/src/examples/qtconcurrent-imagescaling.qdoc10
-rw-r--r--doc/src/examples/qtconcurrent-map.qdoc10
-rw-r--r--doc/src/examples/qtconcurrent-progressdialog.qdoc10
-rw-r--r--doc/src/examples/qtconcurrent-runfunction.qdoc10
-rw-r--r--doc/src/examples/qtconcurrent-wordcount.qdoc10
-rw-r--r--doc/src/examples/qtscriptcalculator.qdoc10
-rw-r--r--doc/src/examples/qtscriptcustomclass.qdoc10
-rw-r--r--doc/src/examples/qtscripttetrix.qdoc10
-rw-r--r--doc/src/examples/querymodel.qdoc10
-rw-r--r--doc/src/examples/queuedcustomtype.qdoc10
-rw-r--r--doc/src/examples/qxmlstreambookmarks.qdoc10
-rw-r--r--doc/src/examples/recentfiles.qdoc10
-rw-r--r--doc/src/examples/recipes.qdoc10
-rw-r--r--doc/src/examples/regexp.qdoc10
-rw-r--r--doc/src/examples/relationaltablemodel.qdoc10
-rw-r--r--doc/src/examples/remotecontrol.qdoc10
-rw-r--r--doc/src/examples/rogue.qdoc10
-rw-r--r--doc/src/examples/rsslisting.qdoc10
-rw-r--r--doc/src/examples/samplebuffers.qdoc10
-rw-r--r--doc/src/examples/saxbookmarks.qdoc10
-rw-r--r--doc/src/examples/schema.qdoc10
-rw-r--r--doc/src/examples/screenshot.qdoc10
-rw-r--r--doc/src/examples/scribble.qdoc10
-rw-r--r--doc/src/examples/script-marshal.qdoc10
-rw-r--r--doc/src/examples/script-qscript.qdoc10
-rw-r--r--doc/src/examples/script-qsdbg.qdoc10
-rw-r--r--doc/src/examples/sdi.qdoc10
-rw-r--r--doc/src/examples/securesocketclient.qdoc10
-rw-r--r--doc/src/examples/semaphores.qdoc10
-rw-r--r--doc/src/examples/settingseditor.qdoc10
-rw-r--r--doc/src/examples/shapedclock.qdoc10
-rw-r--r--doc/src/examples/sharedmemory.qdoc10
-rw-r--r--doc/src/examples/simpledecoration.qdoc10
-rw-r--r--doc/src/examples/simpledommodel.qdoc10
-rw-r--r--doc/src/examples/simpleselector.qdoc10
-rw-r--r--doc/src/examples/simpletextviewer.qdoc10
-rw-r--r--doc/src/examples/simpletreemodel.qdoc10
-rw-r--r--doc/src/examples/simplewidgetmapper.qdoc10
-rw-r--r--doc/src/examples/sipdialog.qdoc10
-rw-r--r--doc/src/examples/sliders.qdoc10
-rw-r--r--doc/src/examples/spinboxdelegate.qdoc10
-rw-r--r--doc/src/examples/spinboxes.qdoc10
-rw-r--r--doc/src/examples/sqlwidgetmapper.qdoc10
-rw-r--r--doc/src/examples/standarddialogs.qdoc10
-rw-r--r--doc/src/examples/stardelegate.qdoc10
-rw-r--r--doc/src/examples/states.qdoc10
-rw-r--r--doc/src/examples/stickman.qdoc10
-rw-r--r--doc/src/examples/styleplugin.qdoc10
-rw-r--r--doc/src/examples/styles.qdoc10
-rw-r--r--doc/src/examples/stylesheet.qdoc10
-rw-r--r--doc/src/examples/svgalib.qdoc10
-rw-r--r--doc/src/examples/svggenerator.qdoc10
-rw-r--r--doc/src/examples/svgviewer.qdoc10
-rw-r--r--doc/src/examples/syntaxhighlighter.qdoc10
-rw-r--r--doc/src/examples/systray.qdoc10
-rw-r--r--doc/src/examples/tabdialog.qdoc10
-rw-r--r--doc/src/examples/tablemodel.qdoc10
-rw-r--r--doc/src/examples/tablet.qdoc10
-rw-r--r--doc/src/examples/taskmenuextension.qdoc10
-rw-r--r--doc/src/examples/tetrix.qdoc10
-rw-r--r--doc/src/examples/textfinder.qdoc10
-rw-r--r--doc/src/examples/textobject.qdoc10
-rw-r--r--doc/src/examples/textures.qdoc10
-rw-r--r--doc/src/examples/threadedfortuneserver.qdoc10
-rw-r--r--doc/src/examples/tooltips.qdoc10
-rw-r--r--doc/src/examples/torrent.qdoc10
-rw-r--r--doc/src/examples/touch-dials.qdoc10
-rw-r--r--doc/src/examples/touch-knobs.qdoc10
-rw-r--r--doc/src/examples/trafficinfo.qdoc10
-rw-r--r--doc/src/examples/trafficlight.qdoc10
-rw-r--r--doc/src/examples/transformations.qdoc10
-rw-r--r--doc/src/examples/treemodelcompleter.qdoc10
-rw-r--r--doc/src/examples/trivialwizard.qdoc10
-rw-r--r--doc/src/examples/trollprint.qdoc10
-rw-r--r--doc/src/examples/twowaybutton.qdoc10
-rw-r--r--doc/src/examples/undoframework.qdoc10
-rw-r--r--doc/src/examples/videographicsitem.qdoc10
-rw-r--r--doc/src/examples/videowidget.qdoc10
-rw-r--r--doc/src/examples/waitconditions.qdoc10
-rw-r--r--doc/src/examples/webkit-bridge-imageanalyzer.qdoc160
-rw-r--r--doc/src/examples/webkit-framecapture.qdoc10
-rw-r--r--doc/src/examples/widgets-softkeys.qdoc10
-rw-r--r--doc/src/examples/widgets-validators.qdoc10
-rw-r--r--doc/src/examples/wiggly.qdoc10
-rw-r--r--doc/src/examples/windowflags.qdoc10
-rw-r--r--doc/src/examples/worldtimeclockbuilder.qdoc10
-rw-r--r--doc/src/examples/worldtimeclockplugin.qdoc10
-rw-r--r--doc/src/examples/xmlstreamlint.qdoc10
-rw-r--r--doc/src/external-resources.qdoc17
-rw-r--r--doc/src/files-and-resources/datastreamformat.qdoc10
-rw-r--r--doc/src/files-and-resources/resources.qdoc10
-rw-r--r--doc/src/frameworks-technologies/accessible.qdoc10
-rw-r--r--doc/src/frameworks-technologies/activeqt-container.qdoc10
-rw-r--r--doc/src/frameworks-technologies/activeqt-server.qdoc10
-rw-r--r--doc/src/frameworks-technologies/activeqt.qdoc10
-rw-r--r--doc/src/frameworks-technologies/animation.qdoc10
-rw-r--r--doc/src/frameworks-technologies/containers.qdoc10
-rw-r--r--doc/src/frameworks-technologies/dbus-adaptors.qdoc10
-rw-r--r--doc/src/frameworks-technologies/dbus-intro.qdoc10
-rw-r--r--doc/src/frameworks-technologies/desktop-integration.qdoc10
-rw-r--r--doc/src/frameworks-technologies/dnd.qdoc12
-rw-r--r--doc/src/frameworks-technologies/eventsandfilters.qdoc10
-rw-r--r--doc/src/frameworks-technologies/gestures.qdoc10
-rw-r--r--doc/src/frameworks-technologies/graphicsview.qdoc10
-rw-r--r--doc/src/frameworks-technologies/implicit-sharing.qdoc10
-rw-r--r--doc/src/frameworks-technologies/ipc.qdoc10
-rw-r--r--doc/src/frameworks-technologies/model-view-programming.qdoc22
-rw-r--r--doc/src/frameworks-technologies/phonon.qdoc29
-rw-r--r--doc/src/frameworks-technologies/plugins-howto.qdoc10
-rw-r--r--doc/src/frameworks-technologies/qthelp.qdoc10
-rw-r--r--doc/src/frameworks-technologies/qundo.qdoc10
-rw-r--r--doc/src/frameworks-technologies/richtext.qdoc10
-rw-r--r--doc/src/frameworks-technologies/statemachine.qdoc10
-rw-r--r--doc/src/frameworks-technologies/templates.qdoc10
-rw-r--r--doc/src/frameworks-technologies/threads.qdoc14
-rw-r--r--doc/src/frameworks-technologies/unicode.qdoc10
-rw-r--r--doc/src/getting-started/demos.qdoc10
-rw-r--r--doc/src/getting-started/examples.qdoc22
-rw-r--r--doc/src/getting-started/gettingstarted.qdoc10
-rw-r--r--doc/src/getting-started/gettingstartedqml.qdoc115
-rw-r--r--doc/src/getting-started/gettingstartedqt.qdoc10
-rw-r--r--doc/src/getting-started/how-to-learn-qt.qdoc10
-rw-r--r--doc/src/getting-started/installation.qdoc297
-rw-r--r--doc/src/getting-started/known-issues.qdoc10
-rw-r--r--doc/src/getting-started/tutorials.qdoc10
-rw-r--r--doc/src/howtos/HWacceleration.qdoc10
-rw-r--r--doc/src/howtos/accelerators.qdoc10
-rw-r--r--doc/src/howtos/appicon.qdoc10
-rw-r--r--doc/src/howtos/custom-types.qdoc10
-rw-r--r--doc/src/howtos/exceptionsafety.qdoc10
-rw-r--r--doc/src/howtos/guibooks.qdoc10
-rw-r--r--doc/src/howtos/openvg.qdoc10
-rw-r--r--doc/src/howtos/qtdesigner.qdoc10
-rw-r--r--doc/src/howtos/restoring-geometry.qdoc10
-rw-r--r--doc/src/howtos/session.qdoc10
-rw-r--r--doc/src/howtos/sharedlibrary.qdoc10
-rw-r--r--doc/src/howtos/timers.qdoc10
-rw-r--r--doc/src/howtos/unix-signal-handlers.qdoc12
-rw-r--r--doc/src/images/webkit-imageanalyzer-complete.pngbin0 -> 10257 bytes
-rw-r--r--doc/src/images/webkit-imageanalyzer-progress.pngbin0 -> 18240 bytes
-rw-r--r--doc/src/images/webkit-imageanalyzer-screenshot.pngbin0 -> 56053 bytes
-rw-r--r--doc/src/index.qdoc12
-rw-r--r--doc/src/internationalization/i18n.qdoc10
-rw-r--r--doc/src/internationalization/linguist-manual.qdoc10
-rw-r--r--doc/src/ja_JP/development/designer-manual.qdoc10
-rw-r--r--doc/src/ja_JP/development/qmake-manual.qdoc10
-rw-r--r--doc/src/ja_JP/development/qtestlib.qdoc10
-rw-r--r--doc/src/ja_JP/examples/arrowpad.qdoc10
-rw-r--r--doc/src/ja_JP/examples/hellotr.qdoc10
-rw-r--r--doc/src/ja_JP/examples/trollprint.qdoc10
-rw-r--r--doc/src/ja_JP/getting-started/tutorials.qdoc10
-rw-r--r--doc/src/ja_JP/tutorials/addressbook.qdoc10
-rw-r--r--doc/src/ja_JP/tutorials/widgets-tutorial.qdoc10
-rw-r--r--doc/src/legal/3rdparty.qdoc10
-rw-r--r--doc/src/legal/commercialeditions.qdoc10
-rw-r--r--doc/src/legal/editions.qdoc10
-rw-r--r--doc/src/legal/gpl.qdoc10
-rw-r--r--doc/src/legal/licenses.qdoc10
-rw-r--r--doc/src/legal/opensourceedition.qdoc12
-rw-r--r--doc/src/legal/trademarks.qdoc22
-rw-r--r--doc/src/modules.qdoc14
-rw-r--r--doc/src/network-programming/bearermanagement.qdoc10
-rw-r--r--doc/src/network-programming/qtnetwork.qdoc10
-rw-r--r--doc/src/network-programming/ssl.qdoc10
-rw-r--r--doc/src/objectmodel/metaobjects.qdoc10
-rw-r--r--doc/src/objectmodel/object.qdoc10
-rw-r--r--doc/src/objectmodel/objecttrees.qdoc10
-rw-r--r--doc/src/objectmodel/properties.qdoc10
-rw-r--r--doc/src/objectmodel/signalsandslots.qdoc10
-rw-r--r--doc/src/overviews.qdoc12
-rw-r--r--doc/src/painting-and-printing/coordsys.qdoc10
-rw-r--r--doc/src/painting-and-printing/paintsystem.qdoc10
-rw-r--r--doc/src/painting-and-printing/printing.qdoc10
-rw-r--r--doc/src/platforms/atomic-operations.qdoc10
-rw-r--r--doc/src/platforms/compiler-notes.qdoc279
-rw-r--r--doc/src/platforms/emb-HwAcc-LinuxEmbedded.qdoc10
-rw-r--r--doc/src/platforms/emb-HwAcc-WinCE.qdoc10
-rw-r--r--doc/src/platforms/emb-accel.qdoc10
-rw-r--r--doc/src/platforms/emb-architecture.qdoc10
-rw-r--r--doc/src/platforms/emb-charinput.qdoc10
-rw-r--r--doc/src/platforms/emb-crosscompiling.qdoc10
-rw-r--r--doc/src/platforms/emb-deployment.qdoc12
-rw-r--r--doc/src/platforms/emb-differences.qdoc10
-rw-r--r--doc/src/platforms/emb-directfb-EmbLinux.qdoc10
-rw-r--r--doc/src/platforms/emb-displaymanagement.qdoc10
-rw-r--r--doc/src/platforms/emb-envvars.qdoc10
-rw-r--r--doc/src/platforms/emb-features.qdoc10
-rw-r--r--doc/src/platforms/emb-fonts.qdoc10
-rw-r--r--doc/src/platforms/emb-framebuffer-howto.qdoc10
-rw-r--r--doc/src/platforms/emb-hardwareacceleration.qdocinc280
-rw-r--r--doc/src/platforms/emb-install.qdoc16
-rw-r--r--doc/src/platforms/emb-kmap2qmap.qdoc10
-rw-r--r--doc/src/platforms/emb-makeqpf.qdoc10
-rw-r--r--doc/src/platforms/emb-opengl-EmbLinux.qdoc10
-rw-r--r--doc/src/platforms/emb-openvg-EmbLinux.qdoc10
-rw-r--r--doc/src/platforms/emb-performance.qdoc10
-rw-r--r--doc/src/platforms/emb-pointer.qdoc17
-rw-r--r--doc/src/platforms/emb-porting.qdoc10
-rw-r--r--doc/src/platforms/emb-qvfb.qdoc14
-rw-r--r--doc/src/platforms/emb-running.qdoc12
-rw-r--r--doc/src/platforms/emb-vnc.qdoc10
-rw-r--r--doc/src/platforms/mac-differences.qdoc12
-rw-r--r--doc/src/platforms/platform-notes-rtos.qdoc18
-rw-r--r--doc/src/platforms/platform-notes.qdoc359
-rw-r--r--doc/src/platforms/qt-embedded-linux.qdoc12
-rw-r--r--doc/src/platforms/qt-embedded.qdoc10
-rw-r--r--doc/src/platforms/qtmac-as-native.qdoc10
-rw-r--r--doc/src/platforms/supported-platforms.qdoc21
-rw-r--r--doc/src/platforms/symbian-exceptionsafety.qdoc10
-rw-r--r--doc/src/platforms/symbian-introduction.qdoc22
-rw-r--r--doc/src/platforms/wince-customization.qdoc12
-rw-r--r--doc/src/platforms/wince-introduction.qdoc16
-rw-r--r--doc/src/platforms/wince-opengl.qdoc10
-rw-r--r--doc/src/platforms/wince-openvg.qdoc10
-rw-r--r--doc/src/platforms/wince-signing.qdoc10
-rw-r--r--doc/src/platforms/winsystem.qdoc14
-rw-r--r--doc/src/platforms/x11overlays.qdoc10
-rw-r--r--doc/src/porting/porting-qsa.qdoc10
-rw-r--r--doc/src/porting/porting4-canvas.qdoc10
-rw-r--r--doc/src/porting/porting4-designer.qdoc10
-rw-r--r--doc/src/porting/porting4-dnd.qdoc10
-rw-r--r--doc/src/porting/porting4-overview.qdoc10
-rw-r--r--doc/src/porting/porting4.qdoc10
-rw-r--r--doc/src/porting/qt3to4.qdoc10
-rw-r--r--doc/src/porting/qt4-accessibility.qdoc10
-rw-r--r--doc/src/porting/qt4-arthur.qdoc10
-rw-r--r--doc/src/porting/qt4-designer.qdoc28
-rw-r--r--doc/src/porting/qt4-interview.qdoc10
-rw-r--r--doc/src/porting/qt4-mainwindow.qdoc10
-rw-r--r--doc/src/porting/qt4-network.qdoc10
-rw-r--r--doc/src/porting/qt4-scribe.qdoc10
-rw-r--r--doc/src/porting/qt4-sql.qdoc10
-rw-r--r--doc/src/porting/qt4-styles.qdoc10
-rw-r--r--doc/src/porting/qt4-threads.qdoc10
-rw-r--r--doc/src/porting/qt4-tulip.qdoc10
-rw-r--r--doc/src/qt-resources.qdoc10
-rw-r--r--doc/src/qt-webpages.qdoc14
-rw-r--r--doc/src/qt4-intro.qdoc12
-rw-r--r--doc/src/scripting/ecmascript.qdoc10
-rw-r--r--doc/src/scripting/qtscriptdebugger-manual.qdoc10
-rw-r--r--doc/src/scripting/qtscriptextensions.qdoc10
-rw-r--r--doc/src/scripting/scripting.qdoc10
-rw-r--r--doc/src/snippets/code/doc_src_emb-pointer.qdoc4
-rw-r--r--doc/src/snippets/code/doc_src_fdl.qdoc10
-rw-r--r--doc/src/snippets/code/doc_src_installation.qdoc17
-rw-r--r--doc/src/snippets/code/doc_src_linguist-manual.qdoc10
-rw-r--r--doc/src/snippets/code/doc_src_qmake-manual.qdoc18
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp35
-rw-r--r--doc/src/snippets/code/src_qtestlib_qtestcase.cpp18
-rw-r--r--doc/src/snippets/declarative/borderimage/borderimage-defaults.qml55
-rw-r--r--doc/src/snippets/declarative/flipable/flipable.qml17
-rw-r--r--doc/src/snippets/declarative/keys/keys-handler.qml60
-rw-r--r--doc/src/snippets/declarative/keys/keys-pressed.qml65
-rw-r--r--doc/src/snippets/declarative/loader/sizeitem.qml62
-rw-r--r--doc/src/snippets/declarative/loader/sizeloader.qml62
-rw-r--r--doc/src/snippets/declarative/qtbinding/context-advanced/MyItem.qml46
-rw-r--r--doc/src/snippets/declarative/qtbinding/context-advanced/applicationdata.h52
-rw-r--r--doc/src/snippets/declarative/qtbinding/context-advanced/connections.qml52
-rw-r--r--doc/src/snippets/declarative/qtbinding/context-advanced/context-advanced.pro3
-rw-r--r--doc/src/snippets/declarative/qtbinding/context-advanced/main.cpp60
-rw-r--r--doc/src/snippets/declarative/qtbinding/context/MyItem.qml45
-rw-r--r--doc/src/snippets/declarative/qtbinding/context/context.pro (renamed from doc/src/snippets/declarative/qtbinding/contextproperties/contextproperties.pro)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/context/main.cpp56
-rw-r--r--doc/src/snippets/declarative/qtbinding/contextproperties/main.cpp78
-rw-r--r--doc/src/snippets/declarative/qtbinding/contextproperties/main.qml55
-rw-r--r--doc/src/snippets/declarative/qtbinding/custompalette/custompalette.h79
-rw-r--r--doc/src/snippets/declarative/qtbinding/custompalette/custompalette.pro3
-rw-r--r--doc/src/snippets/declarative/qtbinding/custompalette/main.cpp61
-rw-r--r--doc/src/snippets/declarative/qtbinding/custompalette/main.qml62
-rw-r--r--doc/src/snippets/declarative/qtbinding/enums/enums.pro3
-rw-r--r--doc/src/snippets/declarative/qtbinding/enums/imageviewer.h68
-rw-r--r--doc/src/snippets/declarative/qtbinding/enums/main.cpp73
-rw-r--r--doc/src/snippets/declarative/qtbinding/enums/standalone.qml49
-rw-r--r--doc/src/snippets/declarative/qtbinding/functions-cpp/MyItem.qml55
-rw-r--r--doc/src/snippets/declarative/qtbinding/functions-cpp/functions-qml.pro3
-rw-r--r--doc/src/snippets/declarative/qtbinding/functions-cpp/main.cpp59
-rw-r--r--doc/src/snippets/declarative/qtbinding/functions-cpp/myclass.h57
-rw-r--r--doc/src/snippets/declarative/qtbinding/functions-qml/MyItem.qml50
-rw-r--r--doc/src/snippets/declarative/qtbinding/functions-qml/functions-qml.pro2
-rw-r--r--doc/src/snippets/declarative/qtbinding/functions-qml/main.cpp63
-rw-r--r--doc/src/snippets/declarative/qtbinding/loading/MyItem.qml56
-rw-r--r--doc/src/snippets/declarative/qtbinding/loading/loading.pro2
-rw-r--r--doc/src/snippets/declarative/qtbinding/loading/main.cpp90
-rw-r--r--doc/src/snippets/declarative/qtbinding/newelements/imageviewer.h56
-rw-r--r--doc/src/snippets/declarative/qtbinding/newelements/main.cpp62
-rw-r--r--doc/src/snippets/declarative/qtbinding/newelements/newelements.pro3
-rw-r--r--doc/src/snippets/declarative/qtbinding/newelements/standalone.qml44
-rw-r--r--doc/src/snippets/declarative/qtbinding/properties-cpp/MyItem.qml54
-rw-r--r--doc/src/snippets/declarative/qtbinding/properties-cpp/applicationdata.h71
-rw-r--r--doc/src/snippets/declarative/qtbinding/properties-cpp/main.cpp58
-rw-r--r--doc/src/snippets/declarative/qtbinding/properties-cpp/properties-cpp.pro3
-rw-r--r--doc/src/snippets/declarative/qtbinding/properties-qml/MyItem.qml47
-rw-r--r--doc/src/snippets/declarative/qtbinding/properties-qml/main.cpp61
-rw-r--r--doc/src/snippets/declarative/qtbinding/properties-qml/properties-qml.pro2
-rw-r--r--doc/src/snippets/declarative/qtbinding/resources/main.qml5
-rw-r--r--doc/src/snippets/declarative/qtbinding/signals-cpp/MyItem.qml50
-rw-r--r--doc/src/snippets/declarative/qtbinding/signals-cpp/imageviewer.h64
-rw-r--r--doc/src/snippets/declarative/qtbinding/signals-cpp/main.cpp81
-rw-r--r--doc/src/snippets/declarative/qtbinding/signals-cpp/signals-cpp.pro3
-rw-r--r--doc/src/snippets/declarative/qtbinding/signals-cpp/standalone.qml48
-rw-r--r--doc/src/snippets/declarative/qtbinding/signals-qml/MyItem.qml55
-rw-r--r--doc/src/snippets/declarative/qtbinding/signals-qml/main.cpp59
-rw-r--r--doc/src/snippets/declarative/qtbinding/signals-qml/myclass.h51
-rw-r--r--doc/src/snippets/declarative/qtbinding/signals-qml/signals-qml.pro3
-rw-r--r--doc/src/snippets/declarative/qtbinding/stopwatch/main.cpp62
-rw-r--r--doc/src/snippets/declarative/qtbinding/stopwatch/main.qml58
-rw-r--r--doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.cpp62
-rw-r--r--doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.h61
-rw-r--r--doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.pro3
-rw-r--r--doc/src/snippets/sqldatabase/sqldatabase.cpp2
-rw-r--r--doc/src/sql-programming/qsqldatatype-table.qdoc10
-rw-r--r--doc/src/sql-programming/sql-driver.qdoc18
-rw-r--r--doc/src/sql-programming/sql-programming.qdoc10
-rwxr-xr-xdoc/src/template/scripts/functions.js6
-rw-r--r--doc/src/template/style/narrow.css1
-rwxr-xr-xdoc/src/template/style/style.css96
-rw-r--r--doc/src/tutorials/addressbook-fr.qdoc10
-rw-r--r--doc/src/tutorials/addressbook.qdoc10
-rw-r--r--doc/src/tutorials/modelview.qdoc10
-rw-r--r--doc/src/tutorials/widgets-tutorial.qdoc10
-rw-r--r--doc/src/widgets-and-layouts/focus.qdoc10
-rw-r--r--doc/src/widgets-and-layouts/gallery-cde.qdoc10
-rw-r--r--doc/src/widgets-and-layouts/gallery-cleanlooks.qdoc10
-rw-r--r--doc/src/widgets-and-layouts/gallery-gtk.qdoc10
-rw-r--r--doc/src/widgets-and-layouts/gallery-macintosh.qdoc10
-rw-r--r--doc/src/widgets-and-layouts/gallery-motif.qdoc10
-rw-r--r--doc/src/widgets-and-layouts/gallery-plastique.qdoc10
-rw-r--r--doc/src/widgets-and-layouts/gallery-windows.qdoc10
-rw-r--r--doc/src/widgets-and-layouts/gallery-windowsvista.qdoc10
-rw-r--r--doc/src/widgets-and-layouts/gallery-windowsxp.qdoc10
-rw-r--r--doc/src/widgets-and-layouts/gallery.qdoc10
-rw-r--r--doc/src/widgets-and-layouts/layout.qdoc10
-rw-r--r--doc/src/widgets-and-layouts/styles.qdoc10
-rw-r--r--doc/src/widgets-and-layouts/stylesheet.qdoc10
-rw-r--r--doc/src/widgets-and-layouts/widgets.qdoc10
-rw-r--r--doc/src/windows-and-dialogs/dialogs.qdoc10
-rw-r--r--doc/src/windows-and-dialogs/mainwindow.qdoc10
-rw-r--r--doc/src/xml-processing/xml-patterns.qdoc10
-rw-r--r--doc/src/xml-processing/xml-processing.qdoc10
-rw-r--r--doc/src/xml-processing/xquery-introduction.qdoc10
-rw-r--r--doc/src/zh_CN/bughowto.qdoc10
-rw-r--r--doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc10
-rw-r--r--doc/src/zh_CN/getting-started/tutorials.qdoc10
-rw-r--r--doc/src/zh_CN/tutorials/addressbook.qdoc10
-rw-r--r--doc/src/zh_CN/tutorials/widgets-tutorial.qdoc10
-rw-r--r--examples/declarative/animation/behaviors/wigglytext.qml108
-rw-r--r--examples/declarative/cppextensions/imageprovider/imageprovider.pro2
-rw-r--r--examples/declarative/cppextensions/plugins/README2
-rw-r--r--examples/declarative/cppextensions/qwidgets/qwidgets.pro2
-rw-r--r--examples/declarative/i18n/i18n.qml3
-rw-r--r--examples/declarative/modelviews/listview/highlightranges.qml20
-rw-r--r--examples/declarative/positioners/positioners.qmlproject.user41
-rw-r--r--examples/declarative/toys/tic-tac-toe/tic-tac-toe.qml34
-rwxr-xr-xexamples/declarative/tutorials/samegame/samegame4/content/samegame.js2
-rw-r--r--examples/desktop/systray/systray.pro4
-rw-r--r--examples/draganddrop/puzzle/puzzle.pro4
-rw-r--r--examples/multimedia/audiodevices/audiodevices.h4
-rw-r--r--examples/multimedia/audioinput/audioinput.h5
-rw-r--r--examples/multimedia/audiooutput/audiooutput.h5
-rw-r--r--examples/network/bearermonitor/bearermonitor.cpp22
-rw-r--r--examples/network/bearermonitor/bearermonitor.h4
-rw-r--r--examples/network/bearermonitor/bearermonitor.pro7
-rw-r--r--examples/network/bearermonitor/bearermonitor_maemo.ui601
-rw-r--r--examples/network/bearermonitor/main.cpp9
-rw-r--r--examples/network/bearermonitor/sessionwidget.cpp4
-rw-r--r--examples/network/bearermonitor/sessionwidget.h5
-rw-r--r--examples/painting/svgviewer/svgviewer.pro4
-rw-r--r--examples/richtext/syntaxhighlighter/syntaxhighlighter.pro2
-rw-r--r--examples/richtext/textobject/textobject.pro2
-rw-r--r--examples/script/context2d/context2d.pro2
-rw-r--r--examples/symbianpkgrules.pri5
-rw-r--r--examples/tools/undoframework/mainwindow.cpp2
-rw-r--r--examples/tutorials/gettingStarted/gsQml/filedialog/filedialog.pro (renamed from examples/tutorials/gettingStarted/gsQml/filedialog/cppPlugins.pro)0
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part0/Button.qml55
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part1/Button.qml97
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part1/EditMenu.qml76
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part1/FileMenu.qml91
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part1/SimpleButton.qml73
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_button.pngbin0 -> 1670 bytes
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_editmenu.pngbin0 -> 6177 bytes
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_filemenu.pngbin0 -> 6062 bytes
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_simplebutton.pngbin0 -> 1055 bytes
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part1/qml-texteditor.qmlproject16
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part2/Button.qml99
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part2/EditMenu.qml77
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part2/FileMenu.qml92
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part2/MenuBar.qml140
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part2/pics/qml-texteditor2_menubar.pngbin0 -> 6079 bytes
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part2/qml-texteditor2.qmlproject16
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part3/Button.qml99
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part3/EditMenu.qml77
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part3/FileMenu.qml92
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part3/MenuBar.qml140
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part3/TextArea.qml80
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part3/TextEditor.qml68
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part3/images/arrow.pngbin0 -> 583 bytes
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part3/pics/qml-texteditor3_texteditor.pngbin0 -> 59345 bytes
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part3/qml-texteditor3.qmlproject16
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part4/Button.qml109
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part4/EditMenu.qml81
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part4/FileMenu.qml96
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part4/MenuBar.qml146
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part4/SimpleButton.qml59
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part4/TextArea.qml80
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part4/TextEditor.qml146
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part4/images/arrow.pngbin0 -> 583 bytes
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part4/pics/qml-texteditor4_texteditor.pngbin0 -> 63629 bytes
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part4/qml-texteditor4.qmlproject16
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part5/TextEditor.qml127
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part5/core/Button.qml109
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part5/core/EditMenu.qml110
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part5/core/FileDialog.qml170
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part5/core/FileMenu.qml232
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part5/core/MenuBar.qml148
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part5/core/TextArea.qml86
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part5/core/qmldir13
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.cpp57
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.h57
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/directory.cpp219
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/directory.h108
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/file.cpp56
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/file.h67
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/filedialog.pro17
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/qmldir1
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part5/images/arrow.pngbin0 -> 583 bytes
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_editmenu.pngbin0 -> 65123 bytes
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_filemenu.pngbin0 -> 21367 bytes
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_newfile.pngbin0 -> 76693 bytes
-rw-r--r--examples/tutorials/gettingStarted/gsQml/parts/part5/qml-texteditor5.qmlproject18
-rw-r--r--examples/tutorials/gettingStarted/gsQml/texteditor.pro4
-rw-r--r--examples/webkit/imageanalyzer/README20
-rw-r--r--examples/webkit/imageanalyzer/imageanalyzer.cpp222
-rw-r--r--examples/webkit/imageanalyzer/imageanalyzer.h103
-rw-r--r--examples/webkit/imageanalyzer/imageanalyzer.pro14
-rw-r--r--examples/webkit/imageanalyzer/main.cpp53
-rw-r--r--examples/webkit/imageanalyzer/mainwindow.cpp80
-rw-r--r--examples/webkit/imageanalyzer/mainwindow.h68
-rw-r--r--examples/webkit/imageanalyzer/resources/imageanalyzer.qrc10
-rw-r--r--examples/webkit/imageanalyzer/resources/images/README2
-rw-r--r--examples/webkit/imageanalyzer/resources/images/bellaCoola.jpgbin0 -> 129886 bytes
-rw-r--r--examples/webkit/imageanalyzer/resources/images/flower.jpgbin0 -> 67126 bytes
-rw-r--r--examples/webkit/imageanalyzer/resources/images/mtRainier.jpgbin0 -> 104090 bytes
-rw-r--r--examples/webkit/imageanalyzer/resources/images/seaShell.jpgbin0 -> 82690 bytes
-rw-r--r--examples/webkit/imageanalyzer/resources/images/trees.jpgbin0 -> 98630 bytes
-rw-r--r--examples/webkit/imageanalyzer/resources/index.html133
-rw-r--r--examples/webkit/webkit.pro1
-rw-r--r--examples/widgets/icons/icons.pro2
-rw-r--r--examples/widgets/movie/movie.pro2
-rw-r--r--examples/xml/dombookmarks/dombookmarks.pro2
-rw-r--r--examples/xml/htmlinfo/htmlinfo.pro2
-rw-r--r--examples/xml/saxbookmarks/saxbookmarks.pro4
-rw-r--r--header.FDL10
-rw-r--r--lib/fonts/dejavu_sans_11_50.qpf2bin0 -> 405944 bytes
-rw-r--r--mkspecs/common/clang.conf17
-rw-r--r--mkspecs/common/g++-base.conf30
-rw-r--r--mkspecs/common/g++-macx.conf32
-rw-r--r--mkspecs/common/g++-unix.conf14
-rw-r--r--mkspecs/common/g++.conf58
-rw-r--r--mkspecs/common/gcc-base-macx.conf43
-rw-r--r--mkspecs/common/gcc-base-unix.conf21
-rw-r--r--mkspecs/common/gcc-base.conf60
-rw-r--r--mkspecs/common/llvm.conf53
-rw-r--r--mkspecs/common/mac-g++.conf81
-rw-r--r--mkspecs/common/mac-llvm.conf76
-rw-r--r--mkspecs/common/mac/qplatformdefs.h97
-rw-r--r--mkspecs/common/qws.conf2
-rw-r--r--mkspecs/common/symbian/symbian-makefile.conf4
-rw-r--r--mkspecs/common/symbian/symbian-mmp.conf10
-rw-r--r--mkspecs/common/symbian/symbian.conf19
-rw-r--r--mkspecs/features/link_pkgconfig.prf7
-rw-r--r--mkspecs/features/mac/objective_c.prf25
-rw-r--r--mkspecs/features/qt.prf4
-rw-r--r--mkspecs/features/qt_functions.prf8
-rw-r--r--mkspecs/features/qttest_p4.prf3
-rw-r--r--mkspecs/features/symbian/application_icon.prf18
-rw-r--r--mkspecs/features/symbian/data_caging_paths.prf4
-rw-r--r--mkspecs/features/symbian/def_files.prf18
-rw-r--r--mkspecs/features/symbian/default_post.prf19
-rw-r--r--mkspecs/features/symbian/do_not_build_as_thumb.prf2
-rw-r--r--mkspecs/features/symbian/qt_config.prf2
-rw-r--r--mkspecs/features/symbian/run_on_phone.prf3
-rw-r--r--mkspecs/features/symbian/sis_targets.prf3
-rw-r--r--mkspecs/features/symbian/symbian_building.prf90
-rw-r--r--mkspecs/freebsd-g++/qmake.conf3
-rw-r--r--mkspecs/linux-g++-32/qmake.conf3
-rw-r--r--mkspecs/linux-g++-64/qmake.conf4
-rw-r--r--mkspecs/linux-g++-maemo/qmake.conf10
-rw-r--r--mkspecs/linux-g++/qmake.conf3
-rw-r--r--mkspecs/linux-llvm/qmake.conf3
-rw-r--r--mkspecs/macx-g++/qmake.conf8
-rw-r--r--mkspecs/macx-g++/qplatformdefs.h56
-rw-r--r--mkspecs/macx-g++40/qmake.conf9
-rw-r--r--mkspecs/macx-g++40/qplatformdefs.h56
-rw-r--r--mkspecs/macx-g++42/qmake.conf9
-rw-r--r--mkspecs/macx-g++42/qplatformdefs.h56
-rw-r--r--mkspecs/macx-icc/qplatformdefs.h2
-rw-r--r--mkspecs/macx-llvm/qmake.conf9
-rw-r--r--mkspecs/macx-llvm/qplatformdefs.h56
-rwxr-xr-xmkspecs/macx-xcode/qmake.conf12
-rw-r--r--mkspecs/macx-xcode/qplatformdefs.h56
-rw-r--r--mkspecs/qws/linux-arm-g++/qmake.conf3
-rw-r--r--mkspecs/qws/linux-arm-gnueabi-g++/qmake.conf3
-rw-r--r--mkspecs/qws/linux-armv6-g++/qmake.conf3
-rw-r--r--mkspecs/qws/linux-avr32-g++/qmake.conf3
-rw-r--r--mkspecs/qws/linux-cellon-g++/qmake.conf3
-rw-r--r--mkspecs/qws/linux-dm7000-g++/qmake.conf3
-rw-r--r--mkspecs/qws/linux-dm800-g++/qmake.conf3
-rw-r--r--mkspecs/qws/linux-generic-g++-32/qmake.conf3
-rw-r--r--mkspecs/qws/linux-generic-g++/qmake.conf3
-rw-r--r--mkspecs/qws/linux-ipaq-g++/qmake.conf3
-rw-r--r--mkspecs/qws/linux-lsb-g++/qmake.conf4
-rw-r--r--mkspecs/qws/linux-mips-g++/qmake.conf3
-rw-r--r--mkspecs/qws/linux-nacl-g++/qmake.conf74
-rw-r--r--mkspecs/qws/linux-nacl-g++/qplatformdefs.h175
-rw-r--r--mkspecs/qws/linux-powerpc-g++/qmake.conf3
-rw-r--r--mkspecs/qws/linux-sh-g++/qmake.conf3
-rw-r--r--mkspecs/qws/linux-sh4al-g++/qmake.conf3
-rw-r--r--mkspecs/qws/linux-sharp-g++/qmake.conf3
-rw-r--r--mkspecs/qws/linux-x86-g++/qmake.conf3
-rw-r--r--mkspecs/qws/linux-x86_64-g++/qmake.conf3
-rw-r--r--mkspecs/qws/linux-zylonite-g++/qmake.conf3
-rw-r--r--mkspecs/qws/macx-generic-g++/qmake.conf8
-rw-r--r--mkspecs/qws/macx-nacl-g++/qmake.conf95
-rw-r--r--mkspecs/qws/macx-nacl-g++/qplatformdefs.h175
-rw-r--r--mkspecs/symbian-armcc/features/default_post.prf (renamed from mkspecs/symbian/linux-gcce/features/default_post.prf)0
-rw-r--r--mkspecs/symbian-armcc/qmake.conf62
-rw-r--r--mkspecs/symbian-armcc/qplatformdefs.h42
-rw-r--r--mkspecs/symbian-gcce/features/default_post.prf (renamed from mkspecs/symbian/linux-armcc/features/default_post.prf)0
-rw-r--r--mkspecs/symbian-gcce/qmake.conf93
-rw-r--r--mkspecs/symbian-gcce/qplatformdefs.h43
-rw-r--r--mkspecs/symbian-sbsv2/flm/qt/qmake_emulator_deployment.flm2
-rw-r--r--mkspecs/symbian-sbsv2/flm/qt/qmake_extra_pre_targetdep.flm4
-rw-r--r--mkspecs/symbian/linux-armcc/qmake.conf62
-rw-r--r--mkspecs/symbian/linux-armcc/qplatformdefs.h42
-rw-r--r--mkspecs/symbian/linux-gcce/qmake.conf95
-rw-r--r--mkspecs/symbian/linux-gcce/qplatformdefs.h43
-rw-r--r--mkspecs/unsupported/linux-clang/qmake.conf19
-rw-r--r--mkspecs/unsupported/linux-clang/qplatformdefs.h102
-rw-r--r--mkspecs/unsupported/linux-scratchbox2-g++/qmake.conf3
-rw-r--r--mkspecs/unsupported/macx-clang/Info.plist.app20
-rw-r--r--mkspecs/unsupported/macx-clang/Info.plist.lib18
-rw-r--r--mkspecs/unsupported/macx-clang/qmake.conf21
-rw-r--r--mkspecs/unsupported/macx-clang/qplatformdefs.h97
-rw-r--r--mkspecs/unsupported/qnx-g++/qmake.conf3
-rw-r--r--mkspecs/unsupported/qws/linux-x86-openkode-g++/qmake.conf23
-rw-r--r--mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h42
-rw-r--r--mkspecs/unsupported/qws/qnx-generic-g++/qmake.conf1
-rw-r--r--mkspecs/unsupported/vxworks-ppc-g++/qmake.conf3
-rw-r--r--mkspecs/unsupported/vxworks-simpentium-g++/qmake.conf3
-rw-r--r--mkspecs/win32-msvc2003/qmake.conf2
-rw-r--r--mkspecs/win32-msvc2005/qmake.conf2
-rw-r--r--mkspecs/win32-msvc2008/qmake.conf2
-rw-r--r--mkspecs/win32-msvc2010/qmake.conf2
-rw-r--r--qmake/generators/mac/pbuilder_pbx.cpp1
-rw-r--r--qmake/generators/metamakefile.cpp1
-rw-r--r--qmake/generators/symbian/initprojectdeploy_symbian.cpp10
-rw-r--r--qmake/generators/symbian/symbian_makefile.h4
-rw-r--r--qmake/generators/symbian/symbiancommon.cpp4
-rw-r--r--qmake/generators/symbian/symmake.cpp4
-rw-r--r--qmake/generators/symbian/symmake_abld.cpp20
-rw-r--r--qmake/generators/symbian/symmake_sbsv2.cpp2
-rw-r--r--qmake/generators/unix/unixmake.cpp45
-rw-r--r--qmake/generators/unix/unixmake2.cpp28
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp2
-rw-r--r--qmake/generators/win32/msvc_objectmodel.cpp2
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp12
-rw-r--r--qmake/generators/win32/winmakefile.cpp2
-rw-r--r--qmake/project.cpp22
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-buffer.h8
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-gdef-private.h9
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-gdef.h8
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-global.h4
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h8
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-gsub-private.h8
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-gsub.h9
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp25
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-open.h8
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-shaper.h8
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-stream.h8
-rw-r--r--src/3rdparty/harfbuzz/tests/shaping/main.cpp29
-rw-r--r--src/3rdparty/md5/md5.cpp1
-rw-r--r--src/3rdparty/phonon/gstreamer/devicemanager.cpp4
-rw-r--r--src/3rdparty/phonon/gstreamer/videowidget.cpp4
-rw-r--r--src/3rdparty/phonon/gstreamer/x11renderer.h4
-rw-r--r--src/3rdparty/phonon/mmf/abstractvideooutput.cpp14
-rw-r--r--src/3rdparty/phonon/mmf/videowidget.cpp2
-rw-r--r--src/3rdparty/phonon/phonon/objectdescriptionmodel.h3
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pro7
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSDOMBinding.h2
-rw-r--r--src/activeqt/container/qaxwidget.cpp2
-rw-r--r--src/activeqt/shared/qaxtypes.cpp2
-rw-r--r--src/corelib/animation/qabstractanimation.cpp146
-rw-r--r--src/corelib/animation/qabstractanimation.h31
-rw-r--r--src/corelib/animation/qabstractanimation_p.h52
-rw-r--r--src/corelib/arch/qatomic_arch.h2
-rw-r--r--src/corelib/arch/qatomic_arm.h2
-rw-r--r--src/corelib/arch/symbian/heap_hybrid.cpp8
-rw-r--r--src/corelib/arch/symbian/qatomic_generic_armv6.cpp2
-rw-r--r--src/corelib/codecs/codecs.qdoc10
-rw-r--r--src/corelib/codecs/qutfcodec.cpp2
-rw-r--r--src/corelib/concurrent/qtconcurrentrunbase.h25
-rw-r--r--src/corelib/corelib.pro16
-rw-r--r--src/corelib/global/global.pri6
-rw-r--r--src/corelib/global/qconfig-minimal-system-dependencies.h371
-rw-r--r--src/corelib/global/qendian.qdoc10
-rw-r--r--src/corelib/global/qfeatures.h10
-rw-r--r--src/corelib/global/qfeatures.txt2
-rw-r--r--src/corelib/global/qglobal.cpp26
-rw-r--r--src/corelib/global/qglobal.h45
-rw-r--r--src/corelib/global/qmalloc.cpp16
-rw-r--r--src/corelib/global/qnaclunimplemented.cpp156
-rw-r--r--src/corelib/global/qnaclunimplemented.h95
-rw-r--r--src/corelib/global/qnamespace.h2
-rw-r--r--src/corelib/global/qnamespace.qdoc34
-rw-r--r--src/corelib/io/io.pri10
-rw-r--r--src/corelib/io/qfilesystemwatcher_fsevents.cpp3
-rw-r--r--src/corelib/io/qfilesystemwatcher_fsevents_p.h4
-rw-r--r--src/corelib/io/qfilesystemwatcher_inotify.cpp16
-rw-r--r--src/corelib/io/qfilesystemwatcher_kqueue.cpp4
-rw-r--r--src/corelib/io/qfilesystemwatcher_kqueue_p.h2
-rw-r--r--src/corelib/io/qiodevice_p.h2
-rw-r--r--src/corelib/io/qresource.cpp4
-rw-r--r--src/corelib/io/qsettings.cpp41
-rw-r--r--src/corelib/io/qsettings_p.h2
-rw-r--r--src/corelib/io/qurl.cpp8
-rw-r--r--src/corelib/io/qurl.h2
-rw-r--r--src/corelib/kernel/kernel.pri4
-rw-r--r--src/corelib/kernel/qabstractitemmodel.cpp23
-rw-r--r--src/corelib/kernel/qcore_mac_p.h8
-rw-r--r--src/corelib/kernel/qcore_unix.cpp3
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp9
-rw-r--r--src/corelib/kernel/qcoreevent.h1
-rw-r--r--src/corelib/kernel/qeventdispatcher_glib.cpp9
-rw-r--r--src/corelib/kernel/qeventdispatcher_symbian.cpp9
-rw-r--r--src/corelib/kernel/qeventdispatcher_symbian_p.h4
-rw-r--r--src/corelib/kernel/qeventdispatcher_unix.cpp14
-rw-r--r--src/corelib/kernel/qeventdispatcher_unix_p.h2
-rw-r--r--src/corelib/kernel/qeventdispatcher_win.cpp20
-rw-r--r--src/corelib/kernel/qmath.qdoc10
-rw-r--r--src/corelib/kernel/qmimedata.cpp2
-rw-r--r--src/corelib/kernel/qobject.cpp10
-rw-r--r--src/corelib/kernel/qobject_p.h1
-rw-r--r--src/corelib/kernel/qsharedmemory.cpp5
-rw-r--r--src/corelib/kernel/qvariant.cpp8
-rw-r--r--src/corelib/kernel/qvariant.h2
-rw-r--r--src/corelib/plugin/qelfparser_p.cpp10
-rw-r--r--src/corelib/plugin/qelfparser_p.h5
-rw-r--r--src/corelib/plugin/qlibrary.cpp3
-rw-r--r--src/corelib/plugin/qplugin.qdoc10
-rw-r--r--src/corelib/plugin/qsystemlibrary.cpp4
-rw-r--r--src/corelib/statemachine/qstatemachine.cpp2
-rw-r--r--src/corelib/thread/qthread.cpp4
-rw-r--r--src/corelib/thread/qthread_unix.cpp53
-rw-r--r--src/corelib/thread/qthread_win.cpp1
-rw-r--r--src/corelib/thread/qwaitcondition.qdoc10
-rw-r--r--src/corelib/tools/qalgorithms.qdoc10
-rw-r--r--src/corelib/tools/qbitarray.cpp7
-rw-r--r--src/corelib/tools/qbitarray.h2
-rw-r--r--src/corelib/tools/qbytearray.cpp21
-rw-r--r--src/corelib/tools/qbytearray.h2
-rw-r--r--src/corelib/tools/qcache.qdoc10
-rw-r--r--src/corelib/tools/qcontiguouscache.cpp7
-rw-r--r--src/corelib/tools/qcontiguouscache.h1
-rw-r--r--src/corelib/tools/qdatetime.cpp1
-rw-r--r--src/corelib/tools/qelapsedtimer.cpp2
-rw-r--r--src/corelib/tools/qhash.cpp14
-rw-r--r--src/corelib/tools/qhash.h2
-rw-r--r--src/corelib/tools/qiterator.qdoc10
-rw-r--r--src/corelib/tools/qlinkedlist.cpp11
-rw-r--r--src/corelib/tools/qlinkedlist.h1
-rw-r--r--src/corelib/tools/qlist.cpp9
-rw-r--r--src/corelib/tools/qlist.h1
-rw-r--r--src/corelib/tools/qlocale.cpp7
-rw-r--r--src/corelib/tools/qlocale.h2
-rw-r--r--src/corelib/tools/qmap.cpp14
-rw-r--r--src/corelib/tools/qmap.h2
-rw-r--r--src/corelib/tools/qpair.qdoc10
-rw-r--r--src/corelib/tools/qpoint.cpp6
-rw-r--r--src/corelib/tools/qqueue.cpp8
-rw-r--r--src/corelib/tools/qqueue.h1
-rw-r--r--src/corelib/tools/qregexp.cpp8
-rw-r--r--src/corelib/tools/qregexp.h1
-rw-r--r--src/corelib/tools/qscopedpointer.h12
-rw-r--r--src/corelib/tools/qset.h1
-rw-r--r--src/corelib/tools/qset.qdoc17
-rw-r--r--src/corelib/tools/qshareddata.h14
-rw-r--r--src/corelib/tools/qsharedpointer.cpp6
-rw-r--r--src/corelib/tools/qsharedpointer_impl.h24
-rw-r--r--src/corelib/tools/qsimd.cpp9
-rw-r--r--src/corelib/tools/qsimd_p.h3
-rw-r--r--src/corelib/tools/qsize.cpp6
-rw-r--r--src/corelib/tools/qstack.cpp8
-rw-r--r--src/corelib/tools/qstack.h1
-rw-r--r--src/corelib/tools/qstring.cpp45
-rw-r--r--src/corelib/tools/qstring.h1
-rw-r--r--src/corelib/tools/qvarlengtharray.h124
-rw-r--r--src/corelib/tools/qvarlengtharray.qdoc218
-rw-r--r--src/corelib/tools/qvector.cpp7
-rw-r--r--src/corelib/tools/qvector.h7
-rw-r--r--src/corelib/tools/tools.pri2
-rw-r--r--src/corelib/xml/qxmlstream.h1
-rw-r--r--src/dbus/qdbusabstractinterface.cpp2
-rw-r--r--src/dbus/qdbusargument.h2
-rw-r--r--src/dbus/qdbusconnection.cpp6
-rw-r--r--src/dbus/qdbusintegrator.cpp2
-rw-r--r--src/dbus/qdbusmarshaller.cpp2
-rw-r--r--src/dbus/qdbusmessage.cpp6
-rw-r--r--src/dbus/qdbusmetatype.cpp4
-rw-r--r--src/dbus/qdbuspendingreply.h2
-rw-r--r--src/dbus/qdbusutil.cpp2
-rw-r--r--src/declarative/debugger/qdeclarativedebug_p.h30
-rw-r--r--src/declarative/debugger/qdeclarativedebugclient.cpp2
-rw-r--r--src/declarative/debugger/qdeclarativedebugclient_p.h6
-rw-r--r--src/declarative/debugger/qdeclarativedebuggerstatus_p.h4
-rw-r--r--src/declarative/debugger/qdeclarativedebughelper.cpp8
-rw-r--r--src/declarative/debugger/qdeclarativedebughelper_p.h6
-rw-r--r--src/declarative/debugger/qdeclarativedebugservice.cpp19
-rw-r--r--src/declarative/debugger/qdeclarativedebugservice_p.h4
-rw-r--r--src/declarative/debugger/qpacketprotocol_p.h8
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanchors.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanchors_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeborderimage.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativeevents.cpp21
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable.cpp109
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable_p.h3
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable_p_p.h16
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflipable.cpp27
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp91
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimage.cpp43
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimage_p.h1
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimagebase.cpp15
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimagebase_p_p.h2
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp56
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp258
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview_p.h2
-rw-r--r--src/declarative/graphicsitems/qdeclarativeloader.cpp60
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea.cpp15
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea_p_p.h3
-rw-r--r--src/declarative/graphicsitems/qdeclarativepainteditem.cpp1
-rw-r--r--src/declarative/graphicsitems/qdeclarativepath.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview.cpp58
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview_p_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativepositioners_p.h2
-rw-r--r--src/declarative/graphicsitems/qdeclarativerectangle.cpp7
-rw-r--r--src/declarative/graphicsitems/qdeclarativerectangle_p.h6
-rw-r--r--src/declarative/graphicsitems/qdeclarativerepeater.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativescalegrid_p_p.h11
-rw-r--r--src/declarative/graphicsitems/qdeclarativetext.cpp968
-rw-r--r--src/declarative/graphicsitems/qdeclarativetext_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativetext_p_p.h48
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit.cpp1
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp30
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextlayout.cpp19
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextlayout_p.h1
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp57
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h4
-rw-r--r--src/declarative/qml/parser/qdeclarativejs.g4
-rw-r--r--src/declarative/qml/parser/qdeclarativejslexer.cpp15
-rw-r--r--src/declarative/qml/parser/qdeclarativejsparser.cpp4
-rw-r--r--src/declarative/qml/qdeclarativebinding_p.h4
-rw-r--r--src/declarative/qml/qdeclarativecompiledbindings.cpp2
-rw-r--r--src/declarative/qml/qdeclarativecompileddata.cpp2
-rw-r--r--src/declarative/qml/qdeclarativecompiler.cpp38
-rw-r--r--src/declarative/qml/qdeclarativecompiler_p.h5
-rw-r--r--src/declarative/qml/qdeclarativecomponent.cpp95
-rw-r--r--src/declarative/qml/qdeclarativecomponent_p.h7
-rw-r--r--src/declarative/qml/qdeclarativecontext.cpp25
-rw-r--r--src/declarative/qml/qdeclarativedata_p.h20
-rw-r--r--src/declarative/qml/qdeclarativedom_p.h26
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp91
-rw-r--r--src/declarative/qml/qdeclarativeengine_p.h2
-rw-r--r--src/declarative/qml/qdeclarativeenginedebug.cpp3
-rw-r--r--src/declarative/qml/qdeclarativeenginedebug_p.h8
-rw-r--r--src/declarative/qml/qdeclarativefastproperties.cpp9
-rw-r--r--src/declarative/qml/qdeclarativeglobal_p.h19
-rw-r--r--src/declarative/qml/qdeclarativeimport.cpp11
-rw-r--r--src/declarative/qml/qdeclarativeinfo.cpp3
-rw-r--r--src/declarative/qml/qdeclarativemetatype_p.h5
-rw-r--r--src/declarative/qml/qdeclarativeobjectscriptclass.cpp309
-rw-r--r--src/declarative/qml/qdeclarativeobjectscriptclass_p.h9
-rw-r--r--src/declarative/qml/qdeclarativeparser_p.h5
-rw-r--r--src/declarative/qml/qdeclarativeprivate.h5
-rw-r--r--src/declarative/qml/qdeclarativeproperty.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeproperty_p.h8
-rw-r--r--src/declarative/qml/qdeclarativepropertycache.cpp139
-rw-r--r--src/declarative/qml/qdeclarativepropertycache_p.h9
-rw-r--r--src/declarative/qml/qdeclarativestringconverters_p.h22
-rw-r--r--src/declarative/qml/qdeclarativetypeloader.cpp27
-rw-r--r--src/declarative/qml/qdeclarativetypeloader_p.h2
-rw-r--r--src/declarative/qml/qdeclarativevaluetype_p.h4
-rw-r--r--src/declarative/qml/qdeclarativevme.cpp12
-rw-r--r--src/declarative/qml/qdeclarativevmemetaobject.cpp25
-rw-r--r--src/declarative/qml/qdeclarativevmemetaobject_p.h19
-rw-r--r--src/declarative/qml/qdeclarativeworkerscript.cpp30
-rw-r--r--src/declarative/qml/qmetaobjectbuilder.cpp12
-rw-r--r--src/declarative/qml/qmetaobjectbuilder_p.h10
-rw-r--r--src/declarative/util/qdeclarativeanimation_p.h4
-rw-r--r--src/declarative/util/qdeclarativeanimation_p_p.h2
-rw-r--r--src/declarative/util/qdeclarativebehavior_p.h2
-rw-r--r--src/declarative/util/qdeclarativefontloader.cpp25
-rw-r--r--src/declarative/util/qdeclarativelistmodel_p.h2
-rw-r--r--src/declarative/util/qdeclarativelistmodelworkeragent.cpp2
-rw-r--r--src/declarative/util/qdeclarativeopenmetaobject_p.h7
-rw-r--r--src/declarative/util/qdeclarativepixmapcache.cpp5
-rw-r--r--src/declarative/util/qdeclarativepropertychanges_p.h2
-rw-r--r--src/declarative/util/qdeclarativestate.cpp12
-rw-r--r--src/declarative/util/qdeclarativestate_p.h6
-rw-r--r--src/declarative/util/qdeclarativestate_p_p.h2
-rw-r--r--src/declarative/util/qdeclarativestateoperations.cpp2
-rw-r--r--src/declarative/util/qdeclarativetimer_p.h4
-rw-r--r--src/declarative/util/qdeclarativetransition.cpp6
-rw-r--r--src/declarative/util/qdeclarativetransitionmanager.cpp16
-rw-r--r--src/declarative/util/qdeclarativeview.cpp8
-rw-r--r--src/declarative/util/qlistmodelinterface.cpp8
-rw-r--r--src/declarative/util/qlistmodelinterface_p.h4
-rw-r--r--src/gui/accessible/accessible.pri2
-rw-r--r--src/gui/accessible/qaccessible_mac_p.h4
-rw-r--r--src/gui/dialogs/dialogs.pri4
-rw-r--r--src/gui/dialogs/qdialog.cpp2
-rw-r--r--src/gui/dialogs/qfiledialog.cpp5
-rw-r--r--src/gui/dialogs/qfiledialog_mac.mm9
-rw-r--r--src/gui/dialogs/qfiledialog_win.cpp3
-rw-r--r--src/gui/dialogs/qfileinfogatherer_p.h3
-rw-r--r--src/gui/dialogs/qfilesystemmodel.cpp45
-rw-r--r--src/gui/dialogs/qfontdialog_mac.mm4
-rw-r--r--src/gui/dialogs/qinputdialog.cpp44
-rw-r--r--src/gui/dialogs/qinputdialog.h25
-rw-r--r--src/gui/dialogs/qprintdialog.qdoc10
-rw-r--r--src/gui/egl/egl.pri28
-rw-r--r--src/gui/egl/qegl.cpp6
-rw-r--r--src/gui/egl/qegl_qpa.cpp111
-rw-r--r--src/gui/embedded/qcopchannel_qws.cpp2
-rw-r--r--src/gui/embedded/qkbd_defaultmap_qws_p.h7
-rw-r--r--src/gui/embedded/qkbd_qws.cpp24
-rw-r--r--src/gui/embedded/qtransportauth_qws.cpp4
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp39
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h6
-rw-r--r--src/gui/graphicsview/qgraphicslayoutitem.cpp4
-rw-r--r--src/gui/graphicsview/qgraphicsproxywidget.cpp6
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp14
-rw-r--r--src/gui/graphicsview/qgraphicsscene_p.h2
-rw-r--r--src/gui/graphicsview/qgraphicssceneevent.cpp2
-rw-r--r--src/gui/graphicsview/qgraphicsview.cpp10
-rw-r--r--src/gui/graphicsview/qgraphicsview_p.h2
-rw-r--r--src/gui/graphicsview/qgraphicswidget.cpp18
-rw-r--r--src/gui/graphicsview/qgridlayoutengine.cpp317
-rw-r--r--src/gui/graphicsview/qgridlayoutengine_p.h13
-rw-r--r--src/gui/gui.pro5
-rw-r--r--src/gui/image/image.pri5
-rw-r--r--src/gui/image/qbitmap.cpp8
-rw-r--r--src/gui/image/qbitmap.h1
-rw-r--r--src/gui/image/qicon.cpp8
-rw-r--r--src/gui/image/qicon.h2
-rw-r--r--src/gui/image/qimage.cpp12
-rw-r--r--src/gui/image/qimage.h2
-rw-r--r--src/gui/image/qimage_ssse3.cpp2
-rw-r--r--src/gui/image/qnativeimage.cpp20
-rw-r--r--src/gui/image/qpicture.cpp8
-rw-r--r--src/gui/image/qpicture.h1
-rw-r--r--src/gui/image/qpixmap.cpp13
-rw-r--r--src/gui/image/qpixmap.h2
-rw-r--r--src/gui/image/qpixmap_blitter.cpp311
-rw-r--r--src/gui/image/qpixmap_blitter_p.h166
-rw-r--r--src/gui/image/qpixmap_qpa.cpp49
-rw-r--r--src/gui/image/qpixmap_s60.cpp3
-rw-r--r--src/gui/image/qpixmap_x11_p.h2
-rw-r--r--src/gui/image/qpixmapdata_p.h3
-rw-r--r--src/gui/image/qpixmapdatafactory.cpp7
-rw-r--r--src/gui/image/qpnghandler.cpp82
-rw-r--r--src/gui/image/qtiffhandler.cpp1
-rw-r--r--src/gui/image/qxbmhandler.cpp25
-rw-r--r--src/gui/image/qxpmhandler.cpp2
-rw-r--r--src/gui/inputmethod/inputmethod.pri2
-rw-r--r--src/gui/inputmethod/qinputcontextfactory.cpp4
-rw-r--r--src/gui/itemviews/qabstractitemview.cpp14
-rw-r--r--src/gui/itemviews/qabstractproxymodel.cpp26
-rw-r--r--src/gui/itemviews/qabstractproxymodel.h3
-rw-r--r--src/gui/itemviews/qdirmodel.cpp19
-rw-r--r--src/gui/itemviews/qitemselectionmodel.cpp15
-rw-r--r--src/gui/itemviews/qlistview.cpp7
-rw-r--r--src/gui/itemviews/qstringlistmodel.cpp3
-rw-r--r--src/gui/itemviews/qtableview.cpp4
-rw-r--r--src/gui/kernel/kernel.pri66
-rw-r--r--src/gui/kernel/mac.pri2
-rw-r--r--src/gui/kernel/qapplication.cpp56
-rw-r--r--src/gui/kernel/qapplication_mac.mm4
-rw-r--r--src/gui/kernel/qapplication_p.h57
-rw-r--r--src/gui/kernel/qapplication_qpa.cpp928
-rw-r--r--src/gui/kernel/qapplication_s60.cpp20
-rw-r--r--src/gui/kernel/qapplication_win.cpp15
-rw-r--r--src/gui/kernel/qapplication_x11.cpp26
-rw-r--r--src/gui/kernel/qclipboard_qpa.cpp163
-rw-r--r--src/gui/kernel/qclipboard_s60.cpp84
-rw-r--r--src/gui/kernel/qclipboard_win.cpp2
-rw-r--r--src/gui/kernel/qclipboard_x11.cpp4
-rw-r--r--src/gui/kernel/qcocoamenuloader_mac.mm10
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm17
-rw-r--r--src/gui/kernel/qcursor.h2
-rw-r--r--src/gui/kernel/qcursor_p.h2
-rw-r--r--src/gui/kernel/qcursor_qpa.cpp127
-rw-r--r--src/gui/kernel/qdesktopwidget.qdoc10
-rw-r--r--src/gui/kernel/qdesktopwidget_qpa.cpp180
-rw-r--r--src/gui/kernel/qdesktopwidget_qpa_p.h76
-rw-r--r--src/gui/kernel/qdnd_p.h4
-rw-r--r--src/gui/kernel/qeventdispatcher_glib_qpa.cpp147
-rw-r--r--src/gui/kernel/qeventdispatcher_glib_qpa_p.h88
-rw-r--r--src/gui/kernel/qeventdispatcher_qpa.cpp302
-rw-r--r--src/gui/kernel/qeventdispatcher_qpa_p.h86
-rw-r--r--src/gui/kernel/qeventdispatcher_s60.cpp66
-rw-r--r--src/gui/kernel/qeventdispatcher_s60_p.h24
-rw-r--r--src/gui/kernel/qgenericplugin_qpa.cpp112
-rw-r--r--src/gui/kernel/qgenericplugin_qpa.h84
-rw-r--r--src/gui/kernel/qgenericpluginfactory_qpa.cpp115
-rw-r--r--src/gui/kernel/qgenericpluginfactory_qpa.h67
-rw-r--r--src/gui/kernel/qgesture.cpp27
-rw-r--r--src/gui/kernel/qgesturemanager.cpp14
-rw-r--r--src/gui/kernel/qgesturemanager_p.h1
-rw-r--r--src/gui/kernel/qguifunctions_wince.cpp3
-rw-r--r--src/gui/kernel/qguiplatformplugin.cpp2
-rw-r--r--src/gui/kernel/qkeymapper_mac.cpp2
-rw-r--r--src/gui/kernel/qkeysequence.cpp8
-rw-r--r--src/gui/kernel/qkeysequence.h1
-rw-r--r--src/gui/kernel/qmotifdnd_x11.cpp5
-rw-r--r--src/gui/kernel/qplatformcursor_qpa.cpp660
-rw-r--r--src/gui/kernel/qplatformcursor_qpa.h103
-rw-r--r--src/gui/kernel/qplatformeventloopintegration_qpa.cpp41
-rw-r--r--src/gui/kernel/qplatformeventloopintegration_qpa.h64
-rw-r--r--src/gui/kernel/qplatformglcontext_qpa.cpp57
-rw-r--r--src/gui/kernel/qplatformglcontext_qpa.h79
-rw-r--r--src/gui/kernel/qplatformintegration_qpa.cpp77
-rw-r--r--src/gui/kernel/qplatformintegration_qpa.h97
-rw-r--r--src/gui/kernel/qplatformintegrationfactory_qpa.cpp88
-rw-r--r--src/gui/kernel/qplatformintegrationfactory_qpa_p.h78
-rw-r--r--src/gui/kernel/qplatformintegrationplugin_qpa.cpp55
-rw-r--r--src/gui/kernel/qplatformintegrationplugin_qpa.h92
-rw-r--r--src/gui/kernel/qplatformscreen_qpa.cpp66
-rw-r--r--src/gui/kernel/qplatformscreen_qpa.h81
-rw-r--r--src/gui/kernel/qplatformwindow_qpa.cpp129
-rw-r--r--src/gui/kernel/qplatformwindow_qpa.h94
-rw-r--r--src/gui/kernel/qplatformwindowformat_qpa.cpp1012
-rw-r--r--src/gui/kernel/qplatformwindowformat_qpa.h241
-rw-r--r--src/gui/kernel/qsizepolicy.qdoc10
-rw-r--r--src/gui/kernel/qsoftkeymanager_s60.cpp2
-rw-r--r--src/gui/kernel/qstandardgestures.cpp25
-rw-r--r--src/gui/kernel/qt_cocoa_helpers_mac.mm37
-rw-r--r--src/gui/kernel/qt_cocoa_helpers_mac_p.h2
-rw-r--r--src/gui/kernel/qt_x11_p.h1
-rw-r--r--src/gui/kernel/qwidget.cpp153
-rw-r--r--src/gui/kernel/qwidget.h19
-rw-r--r--src/gui/kernel/qwidget_mac.mm52
-rw-r--r--src/gui/kernel/qwidget_p.h25
-rw-r--r--src/gui/kernel/qwidget_qpa.cpp895
-rw-r--r--src/gui/kernel/qwidget_qws.cpp24
-rw-r--r--src/gui/kernel/qwidget_s60.cpp7
-rw-r--r--src/gui/kernel/qwidget_win.cpp23
-rw-r--r--src/gui/kernel/qwindowdefs.h6
-rw-r--r--src/gui/kernel/qwindowsysteminterface_qpa.cpp255
-rw-r--r--src/gui/kernel/qwindowsysteminterface_qpa.h95
-rw-r--r--src/gui/kernel/qwindowsysteminterface_qpa_p.h189
-rw-r--r--src/gui/painting/painting.pri43
-rw-r--r--src/gui/painting/qbackingstore.cpp49
-rw-r--r--src/gui/painting/qblendfunctions_armv6_rvct.s222
-rw-r--r--src/gui/painting/qblittable.cpp105
-rw-r--r--src/gui/painting/qblittable_p.h91
-rw-r--r--src/gui/painting/qbrush.cpp9
-rw-r--r--src/gui/painting/qbrush.h2
-rw-r--r--src/gui/painting/qcolormap.qdoc10
-rw-r--r--src/gui/painting/qcolormap_qpa.cpp231
-rw-r--r--src/gui/painting/qdrawhelper.cpp159
-rw-r--r--src/gui/painting/qdrawhelper_arm_simd.cpp332
-rw-r--r--src/gui/painting/qdrawhelper_arm_simd_p.h76
-rw-r--r--src/gui/painting/qdrawhelper_armv6_p.h81
-rw-r--r--src/gui/painting/qdrawhelper_armv6_rvct.inc496
-rw-r--r--src/gui/painting/qdrawhelper_armv6_rvct.s177
-rw-r--r--src/gui/painting/qgraphicssystem.cpp7
-rw-r--r--src/gui/painting/qgraphicssystem_p.h6
-rw-r--r--src/gui/painting/qgraphicssystem_qws.cpp2
-rw-r--r--src/gui/painting/qgrayraster.c35
-rw-r--r--src/gui/painting/qgrayraster_p.h2
-rw-r--r--src/gui/painting/qimagescale.cpp2
-rw-r--r--src/gui/painting/qpaintdevice.cpp2
-rw-r--r--src/gui/painting/qpaintdevice.qdoc10
-rw-r--r--src/gui/painting/qpaintdevice_qpa.cpp68
-rw-r--r--src/gui/painting/qpaintengine.h4
-rw-r--r--src/gui/painting/qpaintengine_blitter.cpp663
-rw-r--r--src/gui/painting/qpaintengine_blitter_p.h113
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp107
-rw-r--r--src/gui/painting/qpaintengine_raster_p.h3
-rw-r--r--src/gui/painting/qpainter.cpp4
-rw-r--r--src/gui/painting/qpainterpath.cpp8
-rw-r--r--src/gui/painting/qpainterpath.h1
-rw-r--r--src/gui/painting/qpdf.cpp1
-rw-r--r--src/gui/painting/qpen.cpp8
-rw-r--r--src/gui/painting/qpen.h1
-rw-r--r--src/gui/painting/qpolygon.cpp16
-rw-r--r--src/gui/painting/qpolygon.h3
-rw-r--r--src/gui/painting/qprinterinfo.qdoc10
-rw-r--r--src/gui/painting/qregion.cpp12
-rw-r--r--src/gui/painting/qregion.h9
-rw-r--r--src/gui/painting/qtextureglyphcache.cpp11
-rw-r--r--src/gui/painting/qunifiedtoolbarsurface_mac.cpp257
-rw-r--r--src/gui/painting/qunifiedtoolbarsurface_mac_p.h100
-rw-r--r--src/gui/painting/qwindowsurface.cpp28
-rw-r--r--src/gui/painting/qwindowsurface_p.h9
-rw-r--r--src/gui/painting/qwindowsurface_raster.cpp50
-rw-r--r--src/gui/painting/qwindowsurface_raster_p.h2
-rw-r--r--src/gui/painting/qwindowsurface_s60.cpp8
-rw-r--r--src/gui/painting/qwindowsurface_x11.cpp2
-rw-r--r--src/gui/s60framework/qs60mainapplication.cpp7
-rw-r--r--src/gui/styles/qmacstyle.qdoc10
-rw-r--r--src/gui/styles/qmacstyle_mac.mm5
-rw-r--r--src/gui/styles/qs60style.cpp123
-rw-r--r--src/gui/styles/qs60style_feedbackinterface_p.h50
-rw-r--r--src/gui/styles/qs60style_p.h11
-rw-r--r--src/gui/styles/qs60style_s60.cpp99
-rw-r--r--src/gui/styles/qstyle.cpp8
-rw-r--r--src/gui/styles/qstylesheetstyle.cpp143
-rw-r--r--src/gui/styles/qstylesheetstyle_p.h20
-rw-r--r--src/gui/styles/qwindowsxpstyle.cpp2
-rw-r--r--src/gui/styles/styles.pri2
-rw-r--r--src/gui/text/qfont.cpp26
-rw-r--r--src/gui/text/qfont_qpa.cpp114
-rw-r--r--src/gui/text/qfontdatabase.cpp69
-rw-r--r--src/gui/text/qfontdatabase.h3
-rw-r--r--src/gui/text/qfontdatabase_qpa.cpp393
-rw-r--r--src/gui/text/qfontdatabase_qws.cpp10
-rw-r--r--src/gui/text/qfontdatabase_x11.cpp30
-rw-r--r--src/gui/text/qfontengine.cpp25
-rw-r--r--src/gui/text/qfontengine_ft.cpp32
-rw-r--r--src/gui/text/qfontengine_ft_p.h25
-rw-r--r--src/gui/text/qfontengine_mac.mm24
-rw-r--r--src/gui/text/qfontengine_p.h23
-rw-r--r--src/gui/text/qfontengine_qpa.cpp691
-rw-r--r--src/gui/text/qfontengine_qpa_p.h262
-rw-r--r--src/gui/text/qfontengine_s60.cpp68
-rw-r--r--src/gui/text/qfontengine_s60_p.h3
-rw-r--r--src/gui/text/qfontengine_win.cpp2
-rw-r--r--src/gui/text/qfontsubset.cpp4
-rw-r--r--src/gui/text/qplatformfontdatabase_qpa.cpp241
-rw-r--r--src/gui/text/qplatformfontdatabase_qpa.h108
-rw-r--r--src/gui/text/qstatictext.cpp22
-rw-r--r--src/gui/text/qstatictext_p.h54
-rw-r--r--src/gui/text/qtextcontrol.cpp3
-rw-r--r--src/gui/text/qtextcursor.h1
-rw-r--r--src/gui/text/qtextdocument.cpp8
-rw-r--r--src/gui/text/qtextdocument_p.cpp4
-rw-r--r--src/gui/text/qtextengine.cpp18
-rw-r--r--src/gui/text/qtextlayout.cpp2
-rw-r--r--src/gui/text/text.pri19
-rw-r--r--src/gui/util/qcompleter.cpp20
-rw-r--r--src/gui/util/qcompleter_p.h1
-rw-r--r--src/gui/util/qdesktopservices.cpp2
-rw-r--r--src/gui/util/util.pri4
-rw-r--r--src/gui/widgets/qabstractslider.cpp2
-rw-r--r--src/gui/widgets/qcocoamenu_mac.mm22
-rw-r--r--src/gui/widgets/qcombobox.cpp2
-rw-r--r--src/gui/widgets/qdatetimeedit.cpp4
-rw-r--r--src/gui/widgets/qlinecontrol.cpp4
-rw-r--r--src/gui/widgets/qlineedit.cpp5
-rw-r--r--src/gui/widgets/qmainwindow.cpp19
-rw-r--r--src/gui/widgets/qmainwindowlayout_mac.mm31
-rw-r--r--src/gui/widgets/qmainwindowlayout_p.h15
-rw-r--r--src/gui/widgets/qmenu.h4
-rw-r--r--src/gui/widgets/qmenubar.cpp30
-rw-r--r--src/gui/widgets/qtextedit.cpp2
-rw-r--r--src/gui/widgets/qvalidator.cpp45
-rw-r--r--src/gui/widgets/widgets.pri2
-rw-r--r--src/imports/folderlistmodel/folderlistmodel.pro5
-rw-r--r--src/imports/gestures/gestures.pro5
-rw-r--r--src/imports/particles/particles.pro5
-rw-r--r--src/multimedia/audio/audio.pri4
-rw-r--r--src/multimedia/audio/qaudioengine.cpp4
-rw-r--r--src/multimedia/audio/qaudioinput.cpp2
-rw-r--r--src/multimedia/audio/qaudioinput_alsa_p.cpp21
-rw-r--r--src/multimedia/audio/qaudioinput_win32_p.cpp11
-rw-r--r--src/multimedia/audio/qaudiooutput.cpp2
-rw-r--r--src/multimedia/audio/qaudiooutput_win32_p.cpp2
-rw-r--r--src/network/access/qhttp.cpp2
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp166
-rw-r--r--src/network/access/qhttpnetworkconnection_p.h36
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp54
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel_p.h7
-rw-r--r--src/network/access/qhttpnetworkheader.cpp12
-rw-r--r--src/network/access/qhttpnetworkreply.cpp5
-rw-r--r--src/network/access/qhttpnetworkreply_p.h8
-rw-r--r--src/network/access/qnetworkaccessbackend.cpp14
-rw-r--r--src/network/access/qnetworkaccessbackend_p.h1
-rw-r--r--src/network/access/qnetworkaccesscachebackend.cpp12
-rw-r--r--src/network/access/qnetworkaccesscachebackend_p.h2
-rw-r--r--src/network/access/qnetworkaccessdebugpipebackend.cpp6
-rw-r--r--src/network/access/qnetworkaccessdebugpipebackend_p.h1
-rw-r--r--src/network/access/qnetworkaccessfilebackend.cpp6
-rw-r--r--src/network/access/qnetworkaccessfilebackend_p.h1
-rw-r--r--src/network/access/qnetworkaccessftpbackend.cpp17
-rw-r--r--src/network/access/qnetworkaccessftpbackend_p.h1
-rw-r--r--src/network/access/qnetworkaccesshttpbackend.cpp84
-rw-r--r--src/network/access/qnetworkaccesshttpbackend_p.h2
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp49
-rw-r--r--src/network/access/qnetworkaccessmanager_p.h6
-rw-r--r--src/network/access/qnetworkreplyimpl.cpp2
-rw-r--r--src/network/access/qnetworkrequest.cpp20
-rw-r--r--src/network/bearer/qnetworkconfigmanager.cpp38
-rw-r--r--src/network/bearer/qnetworksession.cpp8
-rw-r--r--src/network/kernel/qauthenticator.cpp24
-rw-r--r--src/network/kernel/qauthenticator_p.h1
-rw-r--r--src/network/kernel/qnetworkproxy.cpp6
-rw-r--r--src/network/socket/qabstractsocket.cpp30
-rw-r--r--src/network/socket/qabstractsocket.h1
-rw-r--r--src/network/socket/qabstractsocket_p.h7
-rw-r--r--src/network/socket/qlocalserver_unix.cpp2
-rw-r--r--src/network/socket/qnativesocketengine_win.cpp4
-rw-r--r--src/network/ssl/qsslconfiguration.cpp7
-rw-r--r--src/network/ssl/qsslsocket.cpp14
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp121
-rw-r--r--src/network/ssl/qsslsocket_openssl_p.h2
-rw-r--r--src/network/ssl/qsslsocket_p.h2
-rw-r--r--src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp5
-rw-r--r--src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h2
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadermanager_p.h4
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadersource_p.h5
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp68
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp20
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h4
-rw-r--r--src/opengl/gl2paintengineex/qtriangulator.cpp21
-rw-r--r--src/opengl/opengl.pro7
-rw-r--r--src/opengl/qgl.cpp49
-rw-r--r--src/opengl/qgl.h1
-rw-r--r--src/opengl/qgl_egl.cpp6
-rw-r--r--src/opengl/qgl_p.h102
-rw-r--r--src/opengl/qgl_qpa.cpp345
-rw-r--r--src/opengl/qgl_x11egl.cpp2
-rw-r--r--src/opengl/qglextensions_p.h23
-rw-r--r--src/opengl/qglframebufferobject.cpp27
-rw-r--r--src/opengl/qglpixelbuffer.cpp4
-rw-r--r--src/opengl/qglpixelbuffer_p.h4
-rw-r--r--src/opengl/qglpixelbuffer_stub.cpp84
-rw-r--r--src/opengl/qglpixmapfilter.cpp6
-rw-r--r--src/opengl/qglshaderprogram.cpp10
-rw-r--r--src/opengl/qpaintengine_opengl.cpp10
-rw-r--r--src/opengl/qpixmapdata_gl.cpp4
-rw-r--r--src/opengl/qpixmapdata_gl_p.h1
-rw-r--r--src/opengl/qpixmapdata_x11gl_egl.cpp4
-rw-r--r--src/opengl/qwindowsurface_gl.cpp194
-rw-r--r--src/opengl/qwindowsurface_gl_p.h7
-rw-r--r--src/openvg/qpaintengine_vg.cpp98
-rw-r--r--src/openvg/qpaintengine_vg_p.h1
-rw-r--r--src/openvg/qpixmapdata_vg.cpp27
-rw-r--r--src/openvg/qpixmapdata_vg_p.h2
-rw-r--r--src/openvg/qvg_p.h5
-rw-r--r--src/openvg/qvg_symbian.cpp14
-rw-r--r--src/openvg/qvgfontglyphcache_p.h6
-rw-r--r--src/plugins/accessible/widgets/simplewidgets.cpp6
-rw-r--r--src/plugins/bearer/connman/qconnmanengine.cpp83
-rw-r--r--src/plugins/bearer/connman/qconnmanengine.h27
-rw-r--r--src/plugins/bearer/connman/qconnmanservice_linux.cpp15
-rw-r--r--src/plugins/bearer/connman/qofonoservice_linux.cpp12
-rw-r--r--src/plugins/bearer/corewlan/corewlan.pro5
-rw-r--r--src/plugins/bearer/corewlan/qcorewlanengine.mm89
-rw-r--r--src/plugins/bearer/icd/icd.pro2
-rw-r--r--src/plugins/bearer/icd/maemo_icd.cpp2
-rw-r--r--src/plugins/bearer/icd/qnetworksession_impl.cpp2
-rw-r--r--src/plugins/bearer/platformdefs_win.h3
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.cpp10
-rw-r--r--src/plugins/bearer/symbian/symbian.pri2
-rw-r--r--src/plugins/bearer/symbian/symbianengine.cpp37
-rw-r--r--src/plugins/bearer/symbian/symbianengine.h6
-rw-r--r--src/plugins/generic/linuxinput/linuxinput.pro18
-rw-r--r--src/plugins/generic/linuxinput/main.cpp80
-rw-r--r--src/plugins/generic/linuxinput/qlinuxinput.cpp557
-rw-r--r--src/plugins/generic/linuxinput/qlinuxinput.h111
-rw-r--r--src/plugins/generic/tslib/main.cpp78
-rw-r--r--src/plugins/generic/tslib/qtslib.cpp144
-rw-r--r--src/plugins/generic/tslib/qtslib.h77
-rw-r--r--src/plugins/generic/tslib/tslib.pro13
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp86
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp18
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp36
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.h1
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp9
-rw-r--r--src/plugins/graphicssystems/graphicssystems.pro4
-rw-r--r--src/plugins/graphicssystems/meego/dithering.cpp306
-rw-r--r--src/plugins/graphicssystems/meego/meego.pro4
-rw-r--r--src/plugins/graphicssystems/meego/qmeegoextensions.cpp80
-rw-r--r--src/plugins/graphicssystems/meego/qmeegoextensions.h22
-rw-r--r--src/plugins/graphicssystems/meego/qmeegographicssystem.cpp244
-rw-r--r--src/plugins/graphicssystems/meego/qmeegographicssystem.h30
-rw-r--r--src/plugins/graphicssystems/meego/qmeegolivepixmapdata.cpp292
-rw-r--r--src/plugins/graphicssystems/meego/qmeegolivepixmapdata.h71
-rw-r--r--src/plugins/graphicssystems/meego/qmeegopixmapdata.cpp74
-rw-r--r--src/plugins/graphicssystems/meego/qmeegopixmapdata.h2
-rw-r--r--src/plugins/graphicssystems/meego/qmeegorasterpixmapdata.cpp60
-rw-r--r--src/plugins/graphicssystems/meego/qmeegorasterpixmapdata.h55
-rw-r--r--src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp8
-rw-r--r--src/plugins/graphicssystems/trace/qgraphicssystem_trace.cpp4
-rw-r--r--src/plugins/phonon/gstreamer/gstreamer.pro2
-rw-r--r--src/plugins/phonon/mmf/mmf.pro8
-rw-r--r--src/plugins/platforms/cocoa/cocoa.pro29
-rw-r--r--src/plugins/platforms/cocoa/main.mm74
-rw-r--r--src/plugins/platforms/cocoa/qcocoaautoreleasepool.h57
-rw-r--r--src/plugins/platforms/cocoa/qcocoaautoreleasepool.mm52
-rw-r--r--src/plugins/platforms/cocoa/qcocoaeventloopintegration.h74
-rw-r--r--src/plugins/platforms/cocoa/qcocoaeventloopintegration.mm128
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintegration.h98
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintegration.mm122
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.h75
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm116
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindowsurface.h73
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindowsurface.mm103
-rw-r--r--src/plugins/platforms/cocoa/qnsview.h79
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm211
-rw-r--r--src/plugins/platforms/cocoa/qnswindowdelegate.h61
-rw-r--r--src/plugins/platforms/cocoa/qnswindowdelegate.mm73
-rw-r--r--src/plugins/platforms/directfb/directfb.pro35
-rw-r--r--src/plugins/platforms/directfb/main.cpp72
-rw-r--r--src/plugins/platforms/directfb/qdirectfbblitter.cpp155
-rw-r--r--src/plugins/platforms/directfb/qdirectfbblitter.h76
-rw-r--r--src/plugins/platforms/directfb/qdirectfbconvenience.cpp376
-rw-r--r--src/plugins/platforms/directfb/qdirectfbconvenience.h84
-rw-r--r--src/plugins/platforms/directfb/qdirectfbcursor.cpp80
-rw-r--r--src/plugins/platforms/directfb/qdirectfbcursor.h63
-rw-r--r--src/plugins/platforms/directfb/qdirectfbglcontext.cpp99
-rw-r--r--src/plugins/platforms/directfb/qdirectfbglcontext.h69
-rw-r--r--src/plugins/platforms/directfb/qdirectfbinput.cpp208
-rw-r--r--src/plugins/platforms/directfb/qdirectfbinput.h86
-rw-r--r--src/plugins/platforms/directfb/qdirectfbintegration.cpp144
-rw-r--r--src/plugins/platforms/directfb/qdirectfbintegration.h104
-rw-r--r--src/plugins/platforms/directfb/qdirectfbwindow.cpp191
-rw-r--r--src/plugins/platforms/directfb/qdirectfbwindow.h79
-rw-r--r--src/plugins/platforms/directfb/qdirectfbwindowsurface.cpp141
-rw-r--r--src/plugins/platforms/directfb/qdirectfbwindowsurface.h77
-rw-r--r--src/plugins/platforms/eglconvenience/qeglconvenience.cpp316
-rw-r--r--src/plugins/platforms/eglconvenience/qeglconvenience.h59
-rw-r--r--src/plugins/platforms/eglconvenience/qeglplatformcontext.cpp155
-rw-r--r--src/plugins/platforms/eglconvenience/qeglplatformcontext.h71
-rw-r--r--src/plugins/platforms/eglfs/eglfs.pro31
-rw-r--r--src/plugins/platforms/eglfs/main.cpp72
-rw-r--r--src/plugins/platforms/eglfs/qeglfsintegration.cpp101
-rw-r--r--src/plugins/platforms/eglfs/qeglfsintegration.h76
-rw-r--r--src/plugins/platforms/eglfs/qeglfsscreen.cpp203
-rw-r--r--src/plugins/platforms/eglfs/qeglfsscreen.h76
-rw-r--r--src/plugins/platforms/eglfs/qeglfswindow.cpp84
-rw-r--r--src/plugins/platforms/eglfs/qeglfswindow.h71
-rw-r--r--src/plugins/platforms/eglfs/qeglfswindowsurface.cpp104
-rw-r--r--src/plugins/platforms/eglfs/qeglfswindowsurface.h67
-rw-r--r--src/plugins/platforms/fb_base/fb_base.cpp507
-rw-r--r--src/plugins/platforms/fb_base/fb_base.h210
-rw-r--r--src/plugins/platforms/fb_base/fb_base.pri2
-rw-r--r--src/plugins/platforms/fb_base/fb_base.pro23
-rw-r--r--src/plugins/platforms/fontdatabases/basicunix/basicunix.pri82
-rw-r--r--src/plugins/platforms/fontdatabases/basicunix/qbasicunixfontdatabase.cpp326
-rw-r--r--src/plugins/platforms/fontdatabases/basicunix/qbasicunixfontdatabase.h67
-rw-r--r--src/plugins/platforms/fontdatabases/fontconfig/fontconfig.pri12
-rw-r--r--src/plugins/platforms/fontdatabases/fontconfig/qfontconfigdatabase.cpp572
-rw-r--r--src/plugins/platforms/fontdatabases/fontconfig/qfontconfigdatabase.h56
-rw-r--r--src/plugins/platforms/fontdatabases/genericunix/genericunix.pri10
-rw-r--r--src/plugins/platforms/fontdatabases/genericunix/qgenericunixfontdatabase.h53
-rw-r--r--src/plugins/platforms/linuxfb/linuxfb.pro13
-rw-r--r--src/plugins/platforms/linuxfb/main.cpp72
-rw-r--r--src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp866
-rw-r--r--src/plugins/platforms/linuxfb/qlinuxfbintegration.h133
-rw-r--r--src/plugins/platforms/minimal/main.cpp73
-rw-r--r--src/plugins/platforms/minimal/minimal.pro13
-rw-r--r--src/plugins/platforms/minimal/qminimalintegration.cpp74
-rw-r--r--src/plugins/platforms/minimal/qminimalintegration.h84
-rw-r--r--src/plugins/platforms/minimal/qminimalwindowsurface.cpp86
-rw-r--r--src/plugins/platforms/minimal/qminimalwindowsurface.h67
-rw-r--r--src/plugins/platforms/openkode/main.cpp72
-rw-r--r--src/plugins/platforms/openkode/openkode.pro42
-rw-r--r--src/plugins/platforms/openkode/openkodekeytranslator.h244
-rw-r--r--src/plugins/platforms/openkode/qopenkodeeventloopintegration.cpp119
-rw-r--r--src/plugins/platforms/openkode/qopenkodeeventloopintegration.h69
-rw-r--r--src/plugins/platforms/openkode/qopenkodeintegration.cpp240
-rw-r--r--src/plugins/platforms/openkode/qopenkodeintegration.h116
-rw-r--r--src/plugins/platforms/openkode/qopenkodewindow.cpp316
-rw-r--r--src/plugins/platforms/openkode/qopenkodewindow.h89
-rw-r--r--src/plugins/platforms/openkode/resources.qrc6
-rw-r--r--src/plugins/platforms/openkode/shaders/frag.glslf49
-rw-r--r--src/plugins/platforms/openkode/shaders/vert.glslv55
-rw-r--r--src/plugins/platforms/openvglite/main.cpp71
-rw-r--r--src/plugins/platforms/openvglite/openvglite.pro12
-rw-r--r--src/plugins/platforms/openvglite/qgraphicssystem_vglite.cpp193
-rw-r--r--src/plugins/platforms/openvglite/qgraphicssystem_vglite.h93
-rw-r--r--src/plugins/platforms/openvglite/qwindowsurface_vglite.cpp131
-rw-r--r--src/plugins/platforms/openvglite/qwindowsurface_vglite.h91
-rw-r--r--src/plugins/platforms/platforms.pro4
-rw-r--r--src/plugins/platforms/qvfb/main.cpp73
-rw-r--r--src/plugins/platforms/qvfb/qvfb.pro13
-rw-r--r--src/plugins/platforms/qvfb/qvfbintegration.cpp448
-rw-r--r--src/plugins/platforms/qvfb/qvfbintegration.h100
-rw-r--r--src/plugins/platforms/qvfb/qvfbwindowsurface.cpp108
-rw-r--r--src/plugins/platforms/qvfb/qvfbwindowsurface.h80
-rw-r--r--src/plugins/platforms/testlite/main.cpp79
-rw-r--r--src/plugins/platforms/testlite/qglxintegration.cpp370
-rw-r--r--src/plugins/platforms/testlite/qglxintegration.h93
-rw-r--r--src/plugins/platforms/testlite/qtestliteintegration.cpp153
-rw-r--r--src/plugins/platforms/testlite/qtestliteintegration.h102
-rw-r--r--src/plugins/platforms/testlite/qtestlitewindow.cpp1587
-rw-r--r--src/plugins/platforms/testlite/qtestlitewindow.h157
-rw-r--r--src/plugins/platforms/testlite/qtestlitewindowsurface.cpp226
-rw-r--r--src/plugins/platforms/testlite/qtestlitewindowsurface.h88
-rw-r--r--src/plugins/platforms/testlite/testlite.pro29
-rw-r--r--src/plugins/platforms/vnc/main.cpp73
-rw-r--r--src/plugins/platforms/vnc/qvnccursor.cpp156
-rw-r--r--src/plugins/platforms/vnc/qvnccursor.h76
-rw-r--r--src/plugins/platforms/vnc/qvncintegration.cpp242
-rw-r--r--src/plugins/platforms/vnc/qvncintegration.h109
-rw-r--r--src/plugins/platforms/vnc/qvncserver.cpp1935
-rw-r--r--src/plugins/platforms/vnc/qvncserver.h533
-rw-r--r--src/plugins/platforms/vnc/vnc.pro22
-rw-r--r--src/plugins/plugins.pro6
-rw-r--r--src/plugins/s60/feedback/feedback.pro18
-rw-r--r--src/plugins/s60/feedback/qtactileFeedback.h54
-rw-r--r--src/plugins/s60/feedback/qtactileFeedback_s60.cpp83
-rw-r--r--src/plugins/s60/s60.pro4
-rw-r--r--src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri10
-rw-r--r--src/qbase.pri12
-rw-r--r--src/qt3support/canvas/q3canvas.cpp2
-rw-r--r--src/qt3support/sql/q3sqlfieldinfo.qdoc10
-rw-r--r--src/qt3support/sql/q3sqlrecordinfo.qdoc10
-rw-r--r--src/qt3support/text/q3richtext.cpp2
-rw-r--r--src/qt3support/tools/q3asciicache.qdoc10
-rw-r--r--src/qt3support/tools/q3asciidict.qdoc10
-rw-r--r--src/qt3support/tools/q3cache.qdoc10
-rw-r--r--src/qt3support/tools/q3dict.qdoc10
-rw-r--r--src/qt3support/tools/q3intcache.qdoc10
-rw-r--r--src/qt3support/tools/q3intdict.qdoc10
-rw-r--r--src/qt3support/tools/q3memarray.qdoc10
-rw-r--r--src/qt3support/tools/q3ptrdict.qdoc10
-rw-r--r--src/qt3support/tools/q3ptrlist.qdoc10
-rw-r--r--src/qt3support/tools/q3ptrqueue.qdoc10
-rw-r--r--src/qt3support/tools/q3ptrstack.qdoc10
-rw-r--r--src/qt3support/tools/q3ptrvector.qdoc10
-rw-r--r--src/qt3support/tools/q3valuelist.qdoc10
-rw-r--r--src/qt3support/tools/q3valuestack.qdoc10
-rw-r--r--src/qt3support/tools/q3valuevector.h4
-rw-r--r--src/qt3support/tools/q3valuevector.qdoc10
-rw-r--r--src/qt_install.pri2
-rw-r--r--src/s60installs/bwins/QtCoreu.def63
-rw-r--r--src/s60installs/bwins/QtDeclarativeu.def2215
-rw-r--r--src/s60installs/bwins/QtGuiu.def72
-rw-r--r--src/s60installs/bwins/QtOpenVGu.def1
-rw-r--r--src/s60installs/eabi/QtCoreu.def49
-rw-r--r--src/s60installs/eabi/QtDeclarativeu.def2389
-rw-r--r--src/s60installs/eabi/QtGuiu.def67
-rw-r--r--src/s60installs/eabi/QtOpenVGu.def1
-rw-r--r--src/s60installs/qt.iby11
-rw-r--r--src/s60installs/qtdemoapps.iby15
-rw-r--r--src/s60installs/s60installs.pro65
-rw-r--r--src/s60main/s60main.pro2
-rw-r--r--src/script/api/qscriptengine.cpp18
-rw-r--r--src/script/api/qscriptengine.h5
-rw-r--r--src/script/api/qscriptvalue.cpp14
-rw-r--r--src/script/bridge/qscriptclassobject.cpp12
-rw-r--r--src/script/script.pro10
-rw-r--r--src/scripttools/debugging/qscriptdebuggeragent.cpp6
-rw-r--r--src/scripttools/debugging/qscriptdebuggerconsolewidget.cpp8
-rw-r--r--src/scripttools/debugging/qscriptdebugoutputwidget.cpp8
-rw-r--r--src/scripttools/debugging/qscripterrorlogwidget.cpp8
-rw-r--r--src/sql/drivers/oci/qsql_oci.cpp239
-rw-r--r--src/sql/kernel/qsql.qdoc10
-rw-r--r--src/sql/kernel/qsqldriver.cpp8
-rw-r--r--src/src.pro1
-rw-r--r--src/testlib/qsignalspy.qdoc10
-rw-r--r--src/testlib/qtestcase.cpp3
-rw-r--r--src/testlib/qtestevent.qdoc10
-rw-r--r--src/testlib/testlib.pro10
-rw-r--r--src/tools/uic/cpp/cppwriteinitialization.cpp4
-rw-r--r--src/tools/uic/ui4.cpp11
-rw-r--r--src/tools/uic/ui4.h8
-rw-r--r--src/xmlpatterns/data/qabstractfloat.cpp2
-rw-r--r--src/xmlpatterns/data/qatomicvalue.cpp2
-rw-r--r--src/xmlpatterns/data/qschematime_p.h2
-rwxr-xr-xsrc/xmlpatterns/parser/createTokenLookup.sh15
-rw-r--r--src/xmlpatterns/schema/qxsdschemaparser.cpp8
-rw-r--r--src/xmlpatterns/schema/qxsdschemaparser_setup.cpp2
-rw-r--r--src/xmlpatterns/schema/qxsdstatemachine_p.h4
-rw-r--r--src/xmlpatterns/type/qtypechecker.cpp2
-rw-r--r--tests/arthur/.gitignore2
-rw-r--r--tests/arthur/baselineserver/.gitignore2
-rwxr-xr-xtests/arthur/baselineserver/bin/runserver13
-rw-r--r--tests/arthur/baselineserver/src/baselineserver.cpp519
-rw-r--r--tests/arthur/baselineserver/src/baselineserver.h128
-rw-r--r--tests/arthur/baselineserver/src/baselineserver.pro27
-rw-r--r--tests/arthur/baselineserver/src/htmlpage.cpp228
-rw-r--r--tests/arthur/baselineserver/src/htmlpage.h77
-rw-r--r--tests/arthur/baselineserver/src/main.cpp70
-rw-r--r--tests/arthur/common/baselineprotocol.cpp405
-rw-r--r--tests/arthur/common/baselineprotocol.h168
-rw-r--r--tests/arthur/common/baselineprotocol.pri10
-rw-r--r--tests/arthur/common/lookup3.cpp786
-rw-r--r--tests/arthur/common/paintcommands.cpp29
-rw-r--r--tests/arthur/common/paintcommands.h5
-rw-r--r--tests/arthur/lance/lance.pro2
-rw-r--r--tests/auto/checkxmlfiles/checkxmlfiles.pro2
-rw-r--r--tests/auto/collections/collections.pro1
-rw-r--r--tests/auto/collections/tst_collections.cpp212
-rw-r--r--tests/auto/declarative/examples/examples.pro2
-rw-r--r--tests/auto/declarative/examples/tst_examples.cpp1
-rw-r--r--tests/auto/declarative/moduleqt47/moduleqt47.pro2
-rw-r--r--tests/auto/declarative/parserstress/parserstress.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro2
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/reassignedAnimation.qml7
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro2
-rw-r--r--tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro2
-rw-r--r--tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp78
-rw-r--r--tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativedebughelper/private_headers/qdeclarativedebughelper_p.h4
-rw-r--r--tests/auto/declarative/qdeclarativedebughelper/tst_qdeclarativedebughelper.cpp7
-rw-r--r--tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp4
-rw-r--r--tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/ConstantsOverrideBindings.qml6
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/constantsOverrideBindings.4.qml11
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/objectName.qml8
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/outerBindingOverridesInnerBinding.qml3
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/propertySplicing.qml10
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scope.2.qml8
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp1
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/testtypes.h43
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp93
-rw-r--r--tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro2
-rw-r--r--tests/auto/declarative/qdeclarativefocusscope/data/qtBug13380.qml24
-rw-r--r--tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro2
-rw-r--r--tests/auto/declarative/qdeclarativefocusscope/tst_qdeclarativefocusscope.cpp32
-rw-r--r--tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro2
-rw-r--r--tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro2
-rw-r--r--tests/auto/declarative/qdeclarativegridview/data/gridview-noCurrent.qml52
-rw-r--r--tests/auto/declarative/qdeclarativegridview/data/header.qml32
-rw-r--r--tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro2
-rw-r--r--tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp78
-rw-r--r--tests/auto/declarative/qdeclarativeimage/data/rect.pngbin0 -> 171 bytes
-rw-r--r--tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp108
-rw-r--r--tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeitem/data/keystest.qml1
-rw-r--r--tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp22
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/AliasPropertyChangeSignalsType.qml20
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/alias.10.qml8
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/alias.11.qml8
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/aliasPropertyChangeSignals.2.qml10
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/importIncorrectCase.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/incorrectCase.errors.insensitive.txt2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/incorrectCase.errors.sensitive.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/incorrectCase.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/incorrectCaseType.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/insertedSemicolon.1.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/insertedSemicolon.1.qml10
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.10.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.10.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.3.errors.txt2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.4.errors.txt2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.8.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.8.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.9.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.9.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/singularProperty.2.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/singularProperty.2.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/singularProperty.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/singularProperty.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/noqmldir/Test.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/testtypes.h2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp126
-rw-r--r--tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro2
-rw-r--r--tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro2
-rw-r--r--tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp10
-rw-r--r--tests/auto/declarative/qdeclarativelistview/data/listview-noCurrent.qml50
-rw-r--r--tests/auto/declarative/qdeclarativelistview/data/sizelessthan1.qml26
-rw-r--r--tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro2
-rw-r--r--tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp103
-rw-r--r--tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro2
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/data/incorrectCase.qml4
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/WrongCase/qmldir1
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/pluginWrongCase/plugin.cpp83
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/pluginWrongCase/pluginWrongCase.pro10
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/qdeclarativemoduleplugin.pro2
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp25
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro2
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/data/clicktwice.qml16
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/data/doubleclick.qml2
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro2
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp47
-rw-r--r--tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro2
-rw-r--r--tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro2
-rw-r--r--tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro2
-rw-r--r--tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp27
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro2
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro2
-rw-r--r--tests/auto/declarative/qdeclarativescriptdebugging/qdeclarativescriptdebugging.pro2
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro2
-rw-r--r--tests/auto/declarative/qdeclarativespringanimation/qdeclarativespringanimation.pro2
-rw-r--r--tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/QTBUG-14830.qml29
-rw-r--r--tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro2
-rw-r--r--tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp13
-rw-r--r--tests/auto/declarative/qdeclarativetext/data/alignments_cb.pngbin496 -> 496 bytes
-rw-r--r--tests/auto/declarative/qdeclarativetext/data/alignments_cc.pngbin556 -> 556 bytes
-rw-r--r--tests/auto/declarative/qdeclarativetext/data/alignments_ct.pngbin533 -> 533 bytes
-rw-r--r--tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro2
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro2
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp25
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro2
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro2
-rw-r--r--tests/auto/declarative/qdeclarativevisualdatamodel/data/modelproperties.qml17
-rw-r--r--tests/auto/declarative/qdeclarativevisualdatamodel/data/modelproperties2.qml17
-rw-r--r--tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro2
-rw-r--r--tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp132
-rw-r--r--tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro2
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro2
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro2
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/basic1.qml11
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/basic2.qml11
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/basic3.qml11
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/basic4.qml11
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/basic1.qml159
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/basic2.qml187
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/basic3.qml147
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/basic4.qml171
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/itemlist.0.pngbin961 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/itemlist.1.pngbin972 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/itemlist.2.pngbin962 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/itemlist.3.pngbin962 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/itemlist.4.pngbin962 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/itemlist.5.pngbin970 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/itemlist.6.pngbin961 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/itemlist.qml2203
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/listview.0.pngbin1510 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/listview.1.pngbin1510 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/listview.10.pngbin1588 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/listview.11.pngbin1575 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/listview.12.pngbin1502 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/listview.13.pngbin1583 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/listview.14.pngbin1681 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/listview.15.pngbin1524 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/listview.16.pngbin1510 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/listview.17.pngbin1510 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/listview.18.pngbin1510 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/listview.19.pngbin1510 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/listview.2.pngbin1627 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/listview.3.pngbin1524 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/listview.4.pngbin1678 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/listview.5.pngbin1510 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/listview.6.pngbin1573 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/listview.7.pngbin1670 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/listview.8.pngbin1658 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/listview.9.pngbin1510 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-MAC/listview.qml3079
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-X11/basic1.qml159
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-X11/basic2.qml187
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-X11/basic3.qml147
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data-X11/basic4.qml171
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/basic1.0.pngbin0 -> 948 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/basic1.qml150
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/basic2.0.pngbin0 -> 948 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/basic2.qml178
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/basic3.0.pngbin0 -> 948 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/basic3.qml138
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/basic4.0.pngbin0 -> 948 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/basic4.qml162
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/enforcerange.0.pngbin0 -> 680 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/enforcerange.1.pngbin0 -> 680 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/enforcerange.2.pngbin0 -> 704 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/enforcerange.3.pngbin0 -> 695 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/enforcerange.4.pngbin0 -> 680 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/enforcerange.5.pngbin0 -> 710 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/enforcerange.6.pngbin0 -> 705 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/enforcerange.qml2119
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/itemlist.0.pngbin961 -> 976 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/itemlist.1.pngbin972 -> 976 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/itemlist.2.pngbin962 -> 986 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/itemlist.3.pngbin962 -> 977 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/itemlist.4.pngbin962 -> 977 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/itemlist.5.pngbin970 -> 977 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/itemlist.6.pngbin961 -> 990 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/itemlist.7.pngbin0 -> 976 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/itemlist.qml380
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/listview.0.pngbin1510 -> 1525 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/listview.1.pngbin1510 -> 1647 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/listview.10.pngbin1588 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/listview.11.pngbin1575 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/listview.12.pngbin1502 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/listview.13.pngbin1583 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/listview.14.pngbin1681 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/listview.15.pngbin1524 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/listview.16.pngbin1510 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/listview.17.pngbin1510 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/listview.18.pngbin1510 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/listview.19.pngbin1510 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/listview.2.pngbin1656 -> 1584 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/listview.3.pngbin1524 -> 1648 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/listview.4.pngbin1678 -> 1613 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/listview.5.pngbin1510 -> 1663 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/listview.6.pngbin1573 -> 1666 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/listview.7.pngbin1669 -> 1579 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/listview.8.pngbin1658 -> 1579 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/listview.9.pngbin1510 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/data/listview.qml2618
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/enforcerange.qml31
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/listview.qml13
-rw-r--r--tests/auto/declarative/qmlvisual/Package_Views/data/packageviews.0.pngbin714 -> 766 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/Package_Views/data/packageviews.1.pngbin798 -> 797 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/Package_Views/data/packageviews.10.pngbin773 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/Package_Views/data/packageviews.11.pngbin773 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/Package_Views/data/packageviews.12.pngbin754 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/Package_Views/data/packageviews.13.pngbin742 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/Package_Views/data/packageviews.14.pngbin733 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/Package_Views/data/packageviews.15.pngbin712 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/Package_Views/data/packageviews.16.pngbin730 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/Package_Views/data/packageviews.17.pngbin730 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/Package_Views/data/packageviews.18.pngbin730 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/Package_Views/data/packageviews.19.pngbin744 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/Package_Views/data/packageviews.2.pngbin757 -> 794 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/Package_Views/data/packageviews.20.pngbin754 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/Package_Views/data/packageviews.21.pngbin721 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/Package_Views/data/packageviews.22.pngbin732 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/Package_Views/data/packageviews.3.pngbin813 -> 822 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/Package_Views/data/packageviews.4.pngbin756 -> 801 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/Package_Views/data/packageviews.5.pngbin752 -> 803 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/Package_Views/data/packageviews.6.pngbin752 -> 774 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/Package_Views/data/packageviews.7.pngbin774 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/Package_Views/data/packageviews.8.pngbin774 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/Package_Views/data/packageviews.9.pngbin754 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/Package_Views/data/packageviews.qml3194
-rw-r--r--tests/auto/declarative/qmlvisual/Package_Views/packageviews.qml16
-rw-r--r--tests/auto/declarative/qmlvisual/TEST_GUIDELINES7
-rw-r--r--tests/auto/declarative/qmlvisual/animation/bindinganimation/bindinganimation.qml6
-rw-r--r--tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.0.pngbin817 -> 832 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.1.pngbin815 -> 830 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.2.pngbin817 -> 829 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.3.pngbin815 -> 830 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.4.pngbin813 -> 830 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.5.pngbin815 -> 832 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.6.pngbin817 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.qml1178
-rw-r--r--tests/auto/declarative/qmlvisual/animation/colorAnimation/data-X11/colorAnimation-visual.0.pngbin0 -> 622 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/colorAnimation/data-X11/colorAnimation-visual.1.pngbin0 -> 627 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/colorAnimation/data-X11/colorAnimation-visual.2.pngbin0 -> 626 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/colorAnimation/data-X11/colorAnimation-visual.3.pngbin0 -> 625 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/colorAnimation/data-X11/colorAnimation-visual.qml951
-rw-r--r--tests/auto/declarative/qmlvisual/animation/easing/data/easing.0.pngbin3393 -> 1267 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/easing/data/easing.1.pngbin3381 -> 1648 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/easing/data/easing.2.pngbin3101 -> 1617 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/easing/data/easing.3.pngbin16542 -> 1267 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/easing/data/easing.qml494
-rw-r--r--tests/auto/declarative/qmlvisual/animation/easing/easing.qml21
-rw-r--r--tests/auto/declarative/qmlvisual/animation/loop/data/loop.0.pngbin508 -> 502 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/loop/data/loop.1.pngbin507 -> 508 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/loop/data/loop.2.pngbin508 -> 507 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/loop/data/loop.3.pngbin508 -> 508 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/loop/data/loop.4.pngbin505 -> 508 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/loop/data/loop.5.pngbin508 -> 507 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/loop/data/loop.6.pngbin0 -> 508 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/loop/data/loop.qml26
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parallelAnimation/data/parallelAnimation-visual.0.pngbin0 -> 379 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parallelAnimation/data/parallelAnimation-visual.qml338
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parallelAnimation/data/parallelAnimation.0.pngbin774 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parallelAnimation/data/parallelAnimation.1.pngbin762 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parallelAnimation/data/parallelAnimation.2.pngbin773 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parallelAnimation/parallelAnimation-visual.qml19
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parentAnimation/data/parentAnimation-visual.0.pngbin0 -> 1635 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parentAnimation/data/parentAnimation-visual.1.pngbin0 -> 1619 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parentAnimation/data/parentAnimation-visual.2.pngbin0 -> 1586 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parentAnimation/data/parentAnimation-visual.3.pngbin0 -> 1635 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parentAnimation/data/parentAnimation-visual.4.pngbin0 -> 1653 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parentAnimation/data/parentAnimation-visual.qml1216
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parentAnimation/data/parentAnimation.0.pngbin3742 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parentAnimation/data/parentAnimation.1.pngbin3727 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parentAnimation/data/parentAnimation.2.pngbin3742 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parentAnimation/data/parentAnimation.3.pngbin3628 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parentAnimation/data/parentAnimation.4.pngbin3610 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parentAnimation/data/parentAnimation.5.pngbin3742 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parentAnimation/parentAnimation-visual.qml18
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parentAnimation2/data/parentAnimation2.0.pngbin2046 -> 2011 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parentAnimation2/data/parentAnimation2.1.pngbin2059 -> 2047 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parentAnimation2/data/parentAnimation2.2.pngbin2052 -> 2058 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parentAnimation2/data/parentAnimation2.3.pngbin2011 -> 2052 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parentAnimation2/data/parentAnimation2.qml16
-rw-r--r--tests/auto/declarative/qmlvisual/animation/pauseAnimation/data/pauseAnimation-visual.0.pngbin0 -> 3224 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/pauseAnimation/data/pauseAnimation-visual.1.pngbin0 -> 3226 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/pauseAnimation/data/pauseAnimation-visual.2.pngbin0 -> 3229 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/pauseAnimation/data/pauseAnimation-visual.3.pngbin0 -> 3224 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/pauseAnimation/data/pauseAnimation-visual.4.pngbin0 -> 3226 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/pauseAnimation/data/pauseAnimation-visual.5.pngbin0 -> 3229 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/pauseAnimation/data/pauseAnimation-visual.6.pngbin0 -> 3229 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/pauseAnimation/data/pauseAnimation-visual.qml26
-rw-r--r--tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction-visual.0.pngbin1418 -> 336 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction-visual.1.pngbin1430 -> 335 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction-visual.2.pngbin1431 -> 344 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction-visual.3.pngbin0 -> 336 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/propertyAction/data/propertyAction-visual.qml552
-rw-r--r--tests/auto/declarative/qmlvisual/animation/propertyAction/propertyAction-visual.qml13
-rw-r--r--tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.0.pngbin1149 -> 1131 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.1.pngbin1173 -> 1135 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.2.pngbin1173 -> 1141 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.3.pngbin1149 -> 1147 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.4.pngbin0 -> 1132 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.qml870
-rw-r--r--tests/auto/declarative/qmlvisual/animation/qtbug10586/qtbug10586.qml6
-rw-r--r--tests/auto/declarative/qmlvisual/animation/qtbug13398/data/qtbug13398.0.pngbin1265 -> 1281 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/qtbug13398/data/qtbug13398.1.pngbin0 -> 1265 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/qtbug13398/data/qtbug13398.qml6
-rw-r--r--tests/auto/declarative/qmlvisual/animation/reanchor/data/reanchor.0.pngbin637 -> 637 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/reanchor/data/reanchor.1.pngbin642 -> 637 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/reanchor/data/reanchor.2.pngbin637 -> 642 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/reanchor/data/reanchor.3.pngbin637 -> 647 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/reanchor/data/reanchor.4.pngbin647 -> 637 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/reanchor/data/reanchor.5.pngbin637 -> 646 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/reanchor/data/reanchor.6.pngbin637 -> 637 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/reanchor/data/reanchor.7.pngbin637 -> 637 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/reanchor/data/reanchor.8.pngbin642 -> 647 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/reanchor/data/reanchor.9.pngbin0 -> 642 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/reanchor/data/reanchor.qml38
-rw-r--r--tests/auto/declarative/qmlvisual/animation/scriptAction/data/scriptAction-visual.0.pngbin0 -> 334 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/scriptAction/data/scriptAction-visual.1.pngbin0 -> 335 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/scriptAction/data/scriptAction-visual.2.pngbin0 -> 335 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/scriptAction/data/scriptAction-visual.qml298
-rw-r--r--tests/auto/declarative/qmlvisual/animation/scriptAction/data/scriptAction.0.pngbin1418 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/scriptAction/data/scriptAction.1.pngbin1431 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/scriptAction/scriptAction-visual.qml4
-rw-r--r--tests/auto/declarative/qmlvisual/fillmode/data/fillmode.0.pngbin28886 -> 16855 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/fillmode/face.pngbin905 -> 1011 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/fillmode/fillmode.qml14
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-MAC/test.0.pngbin14875 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-MAC/test.1.pngbin14875 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-MAC/test.2.pngbin14863 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-MAC/test.3.pngbin14877 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-MAC/test.4.pngbin14877 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-MAC/test.5.pngbin14877 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-MAC/test.qml1599
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-MAC/test2.0.pngbin5375 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-MAC/test2.1.pngbin5375 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-MAC/test2.qml607
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-MAC/test3.0.pngbin12749 -> 1549 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-MAC/test3.1.pngbin12667 -> 1140 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-MAC/test3.2.pngbin12373 -> 1338 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-MAC/test3.3.pngbin12150 -> 1221 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-MAC/test3.4.pngbin11944 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-MAC/test3.5.pngbin12150 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-MAC/test3.6.pngbin12373 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-MAC/test3.7.pngbin12667 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-MAC/test3.8.pngbin12749 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-MAC/test3.9.pngbin12710 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-MAC/test3.qml2554
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-X11/test.0.pngbin11501 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-X11/test.1.pngbin11501 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-X11/test.2.pngbin11486 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-X11/test.3.pngbin11500 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-X11/test.4.pngbin11500 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-X11/test.5.pngbin11500 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-X11/test.qml1599
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-X11/test2.0.pngbin4656 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-X11/test2.1.pngbin4656 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-X11/test2.qml607
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-X11/test3.0.pngbin10093 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-X11/test3.1.pngbin10051 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-X11/test3.2.pngbin9812 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-X11/test3.3.pngbin9625 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-X11/test3.4.pngbin9458 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-X11/test3.5.pngbin9645 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-X11/test3.6.pngbin9812 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-X11/test3.7.pngbin10051 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-X11/test3.8.pngbin10087 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-X11/test3.9.pngbin10072 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data-X11/test3.qml2879
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data/test.0.pngbin14836 -> 1974 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data/test.1.pngbin14836 -> 1968 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data/test.2.pngbin14821 -> 1968 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data/test.3.pngbin14833 -> 1974 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data/test.4.pngbin14833 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data/test.5.pngbin14833 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data/test.qml1330
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data/test2.0.pngbin5359 -> 305 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data/test2.1.pngbin5359 -> 305 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data/test2.qml442
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data/test3.0.pngbin12616 -> 487 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data/test3.1.pngbin12538 -> 509 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data/test3.2.pngbin12257 -> 491 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data/test3.3.pngbin12035 -> 499 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data/test3.4.pngbin11877 -> 487 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data/test3.5.pngbin12046 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data/test3.6.pngbin12257 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data/test3.7.pngbin12538 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data/test3.8.pngbin12616 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data/test3.9.pngbin12581 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/data/test3.qml2562
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/test.qml13
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/test2.qml26
-rw-r--r--tests/auto/declarative/qmlvisual/focusscope/test3.qml34
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/animated-smooth.qml105
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/animated.qml97
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/content/MyBorderImage.qml10
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/content/colors-round.sci8
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/content/colors-stretch.sci8
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/content/colors.pngbin1655 -> 713 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/content/qmldir1
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated-smooth.0.pngbin61731 -> 4686 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated-smooth.1.pngbin98927 -> 25454 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated-smooth.2.pngbin48780 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated-smooth.3.pngbin32431 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated-smooth.4.pngbin35835 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated-smooth.5.pngbin79428 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated-smooth.6.pngbin45928 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated-smooth.qml1660
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated.0.pngbin23684 -> 4686 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated.1.pngbin29115 -> 9642 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated.2.pngbin27580 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated.3.pngbin14822 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated.4.pngbin21356 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated.5.pngbin31143 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated.6.pngbin26468 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated.7.pngbin16225 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/animated.qml1916
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeborderimage/data/borders.0.pngbin22832 -> 28741 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.0.pngbin1427 -> 1439 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.1.pngbin1357 -> 1424 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.2.pngbin1405 -> 1428 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.3.pngbin1427 -> 1397 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.4.pngbin0 -> 1454 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.qml1150
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.0.pngbin1951 -> 1073 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.1.pngbin1951 -> 1063 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.10.pngbin1952 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.11.pngbin1930 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.12.pngbin1974 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.13.pngbin1961 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.14.pngbin1959 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.15.pngbin1937 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.16.pngbin1618 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.17.pngbin1952 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.18.pngbin1952 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.19.pngbin1930 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.2.pngbin1976 -> 1080 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.20.pngbin1930 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.21.pngbin1947 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.22.pngbin1941 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.23.pngbin1951 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.24.png0
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.3.pngbin1987 -> 1080 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.4.pngbin1947 -> 1056 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.5.pngbin1975 -> 1075 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.6.pngbin1928 -> 1029 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.7.pngbin1928 -> 1073 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.8.pngbin1928 -> 1053 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.9.pngbin1928 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.qml6406
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflickable/flickable-vertical.qml6
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflipable/data/test-flipable.0.pngbin1090 -> 942 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflipable/data/test-flipable.1.pngbin1134 -> 1111 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflipable/data/test-flipable.2.pngbin961 -> 1152 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflipable/data/test-flipable.3.pngbin1076 -> 976 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflipable/data/test-flipable.4.pngbin1134 -> 1096 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflipable/data/test-flipable.5.pngbin969 -> 1154 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflipable/data/test-flipable.6.pngbin0 -> 984 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflipable/data/test-flipable.qml26
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflipable/data/test_flipable_resize.0.pngbin0 -> 1649 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeflipable/data/test_flipable_resize.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview.0.pngbin1303 -> 1318 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview.1.pngbin1317 -> 1318 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview.10.pngbin0 -> 1318 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview.2.pngbin1318 -> 1332 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview.3.pngbin1306 -> 1331 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview.4.pngbin1308 -> 1321 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview.5.pngbin1303 -> 1325 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview.6.pngbin1323 -> 1321 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview.7.pngbin1325 -> 1341 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview.8.pngbin1346 -> 1341 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview.9.pngbin1303 -> 1359 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview.qml772
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview2.0.pngbin1310 -> 1325 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview2.1.pngbin1322 -> 1325 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview2.2.pngbin1341 -> 1337 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview2.3.pngbin1368 -> 1360 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview2.4.pngbin1319 -> 1406 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview2.5.pngbin1352 -> 1337 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview2.6.pngbin1309 -> 1340 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview2.7.pngbin1347 -> 1327 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview2.8.pngbin1310 -> 1353 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview2.9.pngbin1354 -> 1325 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativegridview/data/gridview2.qml670
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativegridview/gridview.qml2
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativegridview/gridview2.qml3
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.0.pngbin1578 -> 1578 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.1.pngbin1585 -> 1578 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.2.pngbin1568 -> 1585 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.3.pngbin1578 -> 1568 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.4.pngbin1584 -> 1578 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.5.pngbin1584 -> 1583 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.6.pngbin1581 -> 1581 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.7.pngbin1581 -> 1582 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.8.pngbin1567 -> 1581 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/drag.qml34
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.0.pngbin1701 -> 1701 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.1.pngbin1701 -> 1701 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.10.pngbin1721 -> 1701 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.11.pngbin1705 -> 1721 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.12.pngbin1705 -> 1705 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.13.pngbin1701 -> 1705 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.14.pngbin0 -> 1701 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.2.pngbin1704 -> 1701 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.3.pngbin1704 -> 1704 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.4.pngbin1705 -> 1704 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.5.pngbin1705 -> 1705 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.6.pngbin1701 -> 1705 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.7.pngbin1701 -> 1701 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.8.pngbin1705 -> 1701 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.9.pngbin1701 -> 1705 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.qml454
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-visual.0.pngbin0 -> 486 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-visual.1.pngbin0 -> 486 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-visual.10.pngbin0 -> 494 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-visual.11.pngbin0 -> 494 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-visual.12.pngbin0 -> 494 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-visual.13.pngbin0 -> 494 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-visual.14.pngbin0 -> 494 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-visual.15.pngbin0 -> 494 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-visual.2.pngbin0 -> 489 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-visual.3.pngbin0 -> 489 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-visual.4.pngbin0 -> 489 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-visual.5.pngbin0 -> 496 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-visual.6.pngbin0 -> 496 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-visual.7.pngbin0 -> 496 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-visual.8.pngbin0 -> 496 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-visual.9.pngbin0 -> 494 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-visual.qml62
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeparticles/data/particles.0.pngbin10219 -> 1055 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeparticles/data/particles.1.pngbin13469 -> 10086 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeparticles/data/particles.2.pngbin14051 -> 14829 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeparticles/data/particles.3.pngbin0 -> 14095 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeparticles/data/particles.qml384
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativeparticles/particles.qml11
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.0.pngbin2263 -> 1114 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.1.pngbin2329 -> 1105 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.2.pngbin2279 -> 1088 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.3.pngbin2263 -> 1096 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.4.pngbin2263 -> 1143 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.5.pngbin2308 -> 1143 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.6.pngbin2280 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.qml2056
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.0.pngbin2412 -> 1169 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.1.pngbin2443 -> 1182 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.2.pngbin2398 -> 1211 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.3.pngbin2390 -> 1184 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.4.pngbin2416 -> 1152 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.5.pngbin2395 -> 1141 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.6.pngbin0 -> 1189 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.qml1940
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview-2.qml30
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview.qml19
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/dynamic.0.pngbin1429 -> 263 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/dynamic.1.pngbin1433 -> 280 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/dynamic.2.pngbin1431 -> 270 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/dynamic.3.pngbin1428 -> 280 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/dynamic.4.pngbin1432 -> 280 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/dynamic.5.pngbin1434 -> 283 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/dynamic.6.pngbin0 -> 281 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/dynamic.qml798
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/repeater.0.pngbin2790 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/usingRepeater.0.pngbin0 -> 1199 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/usingRepeater.qml268
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepositioners/dynamic.qml65
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativepositioners/usingRepeater.qml5
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/data/easefollow.0.pngbin1305 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/data/easefollow.1.pngbin1306 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/data/easefollow.2.pngbin1305 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/data/easefollow.3.pngbin1303 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/data/easefollow.4.pngbin1303 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/data/easefollow.5.pngbin1305 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/data/easefollow.6.pngbin1306 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/data/easefollow.qml1807
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/data/smoothedfollow.0.pngbin3692 -> 1513 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/data/smoothedfollow.1.pngbin3697 -> 1537 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/data/smoothedfollow.2.pngbin3696 -> 1537 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/data/smoothedfollow.3.pngbin0 -> 1537 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/data/smoothedfollow.qml394
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/smoothedanimation.qml45
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/smoothedfollow.qml78
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringanimation/clock.qml64
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringanimation/content/background.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativespringfollow/content/background.png)bin46895 -> 46895 bytes
-rwxr-xr-xtests/auto/declarative/qmlvisual/qdeclarativespringanimation/content/center.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativespringfollow/content/center.png)bin765 -> 765 bytes
-rwxr-xr-xtests/auto/declarative/qmlvisual/qdeclarativespringanimation/content/clock.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativespringfollow/content/clock.png)bin20653 -> 20653 bytes
-rwxr-xr-xtests/auto/declarative/qmlvisual/qdeclarativespringanimation/content/hour.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativespringfollow/content/hour.png)bin625 -> 625 bytes
-rwxr-xr-xtests/auto/declarative/qmlvisual/qdeclarativespringanimation/content/minute.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativespringfollow/content/minute.png)bin625 -> 625 bytes
-rwxr-xr-xtests/auto/declarative/qmlvisual/qdeclarativespringanimation/content/second.png (renamed from tests/auto/declarative/qmlvisual/qdeclarativespringfollow/content/second.png)bin303 -> 303 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/clock.0.pngbin0 -> 16333 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/clock.1.pngbin0 -> 16437 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/clock.2.pngbin0 -> 16543 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/clock.qml615
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.0.pngbin0 -> 941 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.1.pngbin0 -> 975 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.2.pngbin0 -> 1235 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.3.pngbin0 -> 1225 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.4.pngbin0 -> 1247 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.5.pngbin0 -> 1243 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.6.pngbin0 -> 1234 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.7.pngbin0 -> 1242 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.qml1763
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringanimation/follow.qml (renamed from tests/auto/declarative/qmlvisual/qdeclarativespringfollow/follow.qml)0
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringfollow/clock.qml67
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringfollow/data/clock.0.pngbin17294 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringfollow/data/clock.1.pngbin17394 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringfollow/data/clock.2.pngbin17524 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringfollow/data/clock.3.pngbin17572 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringfollow/data/clock.qml1135
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringfollow/data/follow.0.pngbin959 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringfollow/data/follow.1.pngbin1244 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringfollow/data/follow.10.pngbin1299 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringfollow/data/follow.2.pngbin1224 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringfollow/data/follow.3.pngbin1243 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringfollow/data/follow.4.pngbin1230 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringfollow/data/follow.5.pngbin1231 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringfollow/data/follow.6.pngbin1239 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringfollow/data/follow.7.pngbin1241 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringfollow/data/follow.8.pngbin1237 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringfollow/data/follow.9.pngbin1229 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativespringfollow/data/follow.qml1763
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-MAC/multilineAlign.0.pngbin0 -> 2388 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-MAC/multilineAlign.qml247
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-X11/multilineAlign.0.pngbin0 -> 762 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-X11/multilineAlign.qml247
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/align/data/multilineAlign.0.pngbin0 -> 1895 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/align/data/multilineAlign.qml247
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/align/multilineAlign.qml25
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/data-MAC/parentanchor.qml131
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/data-X11/parentanchor.0.pngbin0 -> 1313 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/data-X11/parentanchor.qml62
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/parentanchor.qml7
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/bugs/QTBUG-14469.qml23
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/bugs/data-X11/QTBUG-14469.0.pngbin0 -> 210 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/bugs/data-X11/QTBUG-14469.qml475
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/bugs/data/QTBUG-14469.0.pngbin0 -> 422 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/bugs/data/QTBUG-14469.qml475
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/data-MAC/qtbug_14865.0.pngbin0 -> 1640 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/data-MAC/qtbug_14865.1.pngbin0 -> 625 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/data-MAC/qtbug_14865.qml447
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/data-X11/qtbug_14865.0.pngbin0 -> 303 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/data-X11/qtbug_14865.1.pngbin0 -> 303 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/data-X11/qtbug_14865.qml447
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/data/qtbug_14865.0.pngbin0 -> 1400 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/data/qtbug_14865.qml447
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-MAC/elide.0.pngbin2276 -> 1706 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-MAC/elide.qml130
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-MAC/elide2.0.pngbin4818 -> 3564 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-MAC/elide2.1.pngbin4089 -> 3271 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-MAC/elide2.2.pngbin3128 -> 2549 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-MAC/elide2.3.pngbin1963 -> 1574 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-MAC/elide2.qml480
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-MAC/multilength.0.pngbin736 -> 2883 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-MAC/multilength.qml146
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide.0.pngbin1002 -> 483 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide.1.pngbin0 -> 483 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide.qml132
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide2.0.pngbin0 -> 1189 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide2.1.pngbin0 -> 1068 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide2.2.pngbin0 -> 948 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide2.3.pngbin0 -> 819 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide2.4.pngbin0 -> 682 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide2.qml991
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.0.pngbin596 -> 747 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.1.pngbin0 -> 814 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.2.pngbin0 -> 809 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.3.pngbin0 -> 527 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.4.pngbin0 -> 526 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.5.pngbin0 -> 399 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.qml1168
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data/elide.0.pngbin1604 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data/elide.qml279
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data/elide2.0.pngbin4818 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data/elide2.1.pngbin4089 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data/elide2.2.pngbin3128 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data/elide2.3.pngbin1963 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data/elide2.qml991
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide.qml9
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide2.qml5
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/elide/multilength.qml5
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/BorderedText.qml9
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext.0.pngbin103018 -> 96247 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext.qml340
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext2.0.pngbin0 -> 3481 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext2.qml11
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext3.0.pngbin0 -> 53503 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext3.qml11
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/richtext.0.pngbin136492 -> 118835 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/richtext.qml348
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext.0.pngbin0 -> 13140 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext.qml11
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext2.0.pngbin0 -> 1503 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext2.qml11
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext3.0.pngbin0 -> 6368 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext3.qml11
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext.0.pngbin0 -> 9297 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext.qml11
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext2.0.pngbin0 -> 10626 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext2.qml11
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/plaintext.0.pngbin94120 -> 77181 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/plaintext.qml340
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/plaintext2.0.pngbin0 -> 2778 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/plaintext2.qml11
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/plaintext3.0.pngbin0 -> 53503 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/plaintext3.qml11
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/richtext.0.pngbin121122 -> 103375 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/richtext.qml348
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/richtext2.0.pngbin0 -> 10671 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/data/richtext2.qml11
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml168
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext2.qml23
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext3.qml62
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml76
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext2.qml43
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/qtbug_14865.qml18
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/MultilineEdit.qml15
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/cursorDelegate.qml21
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/cursorDelegate.0.pngbin793 -> 3636 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/cursorDelegate.1.pngbin795 -> 3611 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/cursorDelegate.2.pngbin803 -> 3612 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/cursorDelegate.3.pngbin805 -> 3612 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/cursorDelegate.4.pngbin805 -> 3609 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/cursorDelegate.5.pngbin805 -> 3147 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/cursorDelegate.6.pngbin799 -> 3145 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/cursorDelegate.7.pngbin799 -> 3146 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/cursorDelegate.8.pngbin803 -> 3144 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/cursorDelegate.9.pngbin0 -> 3135 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/cursorDelegate.qml3050
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/qt-669.0.pngbin365 -> 3273 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/qt-669.1.pngbin365 -> 3265 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/qt-669.2.pngbin366 -> 3266 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/qt-669.3.pngbin362 -> 3245 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/qt-669.qml530
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.0.pngbin0 -> 5123 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.1.pngbin0 -> 5500 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.10.pngbin0 -> 8641 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.11.pngbin0 -> 8641 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.2.pngbin0 -> 6163 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.3.pngbin0 -> 6785 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.4.pngbin0 -> 6943 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.5.pngbin0 -> 7043 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.6.pngbin0 -> 7428 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.7.pngbin0 -> 6860 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.8.pngbin0 -> 8659 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.9.pngbin0 -> 8641 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.qml4687
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.0.pngbin0 -> 11626 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.1.pngbin0 -> 11869 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.2.pngbin0 -> 12264 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.3.pngbin0 -> 12607 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.4.pngbin0 -> 13243 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.5.pngbin0 -> 13260 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.6.pngbin0 -> 13260 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.qml2467
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/cursorDelegate.0.pngbin0 -> 1173 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/cursorDelegate.1.pngbin0 -> 1249 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/cursorDelegate.2.pngbin0 -> 1331 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/cursorDelegate.3.pngbin0 -> 1212 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/cursorDelegate.4.pngbin0 -> 1208 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/cursorDelegate.5.pngbin0 -> 1213 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/cursorDelegate.6.pngbin0 -> 3145 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/cursorDelegate.7.pngbin0 -> 3146 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/cursorDelegate.8.pngbin0 -> 3144 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/cursorDelegate.9.pngbin0 -> 3135 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/cursorDelegate.qml1499
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.0.pngbin0 -> 688 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.1.pngbin0 -> 693 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.2.pngbin0 -> 695 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.3.pngbin0 -> 694 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.4.pngbin0 -> 688 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.qml1371
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.0.pngbin0 -> 1357 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.1.pngbin0 -> 1371 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.10.pngbin0 -> 2032 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.11.pngbin0 -> 2032 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.12.pngbin0 -> 2032 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.2.pngbin0 -> 1451 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.3.pngbin0 -> 1565 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.4.pngbin0 -> 1691 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.5.pngbin0 -> 1763 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.6.pngbin0 -> 1779 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.7.pngbin0 -> 1843 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.8.pngbin0 -> 1825 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.9.pngbin0 -> 2024 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.qml4687
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/wrap.0.pngbin1110 -> 3493 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/wrap.1.pngbin1110 -> 3617 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/wrap.2.pngbin1110 -> 3688 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/wrap.3.pngbin1110 -> 3766 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/wrap.4.pngbin1110 -> 3839 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/wrap.5.pngbin1110 -> 3940 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/wrap.6.pngbin1110 -> 3943 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/wrap.7.pngbin0 -> 3943 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/wrap.qml858
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/cursorDelegate.0.pngbin3322 -> 3171 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/cursorDelegate.1.pngbin3323 -> 3603 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/cursorDelegate.2.pngbin3325 -> 3152 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/cursorDelegate.3.pngbin3332 -> 3147 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/cursorDelegate.4.pngbin3329 -> 3145 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/cursorDelegate.5.pngbin3818 -> 3147 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/cursorDelegate.6.pngbin3333 -> 3145 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/cursorDelegate.7.pngbin3332 -> 3146 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/cursorDelegate.8.pngbin3347 -> 3144 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/cursorDelegate.9.pngbin0 -> 3135 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/cursorDelegate.qml3050
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/usingMultilineEdit.0.pngbin0 -> 4006 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/usingMultilineEdit.1.pngbin0 -> 4293 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/usingMultilineEdit.10.pngbin0 -> 6074 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/usingMultilineEdit.11.pngbin0 -> 6074 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/usingMultilineEdit.2.pngbin0 -> 4683 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/usingMultilineEdit.3.pngbin0 -> 5114 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/usingMultilineEdit.4.pngbin0 -> 5270 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/usingMultilineEdit.5.pngbin0 -> 5401 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/usingMultilineEdit.6.pngbin0 -> 5591 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/usingMultilineEdit.7.pngbin0 -> 5261 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/usingMultilineEdit.8.pngbin0 -> 6072 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/usingMultilineEdit.9.pngbin0 -> 6074 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/usingMultilineEdit.qml4687
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/qt-669.qml8
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/usingMultilineEdit.qml11
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/wrap.qml9
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/LineEdit.qml12
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/cursorDelegate.qml10
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/cursorDelegate.0.pngbin793 -> 3613 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/cursorDelegate.1.pngbin796 -> 4140 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/cursorDelegate.2.pngbin804 -> 3593 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/cursorDelegate.3.pngbin805 -> 3605 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/cursorDelegate.4.pngbin805 -> 3605 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/cursorDelegate.qml2966
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/echoMode.0.pngbin0 -> 703 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/echoMode.1.pngbin0 -> 1360 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/echoMode.2.pngbin0 -> 2031 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/echoMode.qml1043
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/hAlign.qml107
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/cursorDelegate.0.pngbin0 -> 1173 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/cursorDelegate.1.pngbin0 -> 1143 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/cursorDelegate.2.pngbin0 -> 1312 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/cursorDelegate.3.pngbin0 -> 1250 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/cursorDelegate.4.pngbin0 -> 1193 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/cursorDelegate.5.pngbin0 -> 1193 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/cursorDelegate.qml1551
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/echoMode.0.pngbin716 -> 256 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/echoMode.1.pngbin1352 -> 339 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/echoMode.2.pngbin2047 -> 446 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/echoMode.3.pngbin2827 -> 510 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/echoMode.4.pngbin2827 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/echoMode.qml382
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/hAlign.0.pngbin1245 -> 3661 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/hAlign.qml50
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.0.pngbin3137 -> 1265 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.1.pngbin3195 -> 1337 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.10.pngbin3853 -> 1389 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.11.pngbin0 -> 1468 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.2.pngbin3171 -> 1337 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.3.pngbin3228 -> 1279 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.4.pngbin3198 -> 1368 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.5.pngbin3310 -> 1367 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.6.pngbin3233 -> 1377 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.7.pngbin3607 -> 1368 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.8.pngbin3657 -> 1384 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.9.pngbin3262 -> 1471 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.qml1408
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data/cursorDelegate.0.pngbin3314 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data/cursorDelegate.1.pngbin3377 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data/cursorDelegate.2.pngbin3323 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data/cursorDelegate.3.pngbin3325 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data/cursorDelegate.4.pngbin3322 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data/cursorDelegate.5.pngbin3322 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data/cursorDelegate.6.pngbin3326 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data/cursorDelegate.7.pngbin3814 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data/cursorDelegate.8.pngbin3324 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data/cursorDelegate.qml2966
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data/echoMode.0.pngbin999 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data/echoMode.1.pngbin1880 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data/echoMode.2.pngbin2962 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data/echoMode.3.pngbin2827 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data/echoMode.4.pngbin2827 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/data/hAlign.0.pngbin1245 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/echoMode.qml9
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/hAlign.qml28
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextinput/usingLineEdit.qml6
-rw-r--r--tests/auto/declarative/qmlvisual/qmlvisual.pro2
-rw-r--r--tests/auto/declarative/qmlvisual/rect/GradientRect.qml4
-rw-r--r--tests/auto/declarative/qmlvisual/rect/MyRect.qml4
-rw-r--r--tests/auto/declarative/qmlvisual/rect/data/GradientRect.0.pngbin0 -> 248 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/rect/data/GradientRect.qml11
-rw-r--r--tests/auto/declarative/qmlvisual/rect/data/MyRect.0.pngbin0 -> 135 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/rect/data/MyRect.qml11
-rw-r--r--tests/auto/declarative/qmlvisual/rect/data/rect-painting.0.pngbin29725 -> 15272 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/rect/data/rect-painting.qml276
-rw-r--r--tests/auto/declarative/qmlvisual/rect/rect-painting.qml4
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/basic1.qml24
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/basic2.qml24
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/basic3.qml28
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/basic4.qml28
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data-MAC/basic1.0.pngbin1550 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data-MAC/basic1.qml323
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data-MAC/basic2.0.pngbin1550 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data-MAC/basic2.qml331
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data-MAC/basic3.0.pngbin1550 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data-MAC/basic3.qml347
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data-MAC/basic4.0.pngbin1550 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data-MAC/basic4.qml419
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data-X11/basic1.0.pngbin1354 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data-X11/basic1.qml323
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data-X11/basic2.0.pngbin1354 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data-X11/basic2.qml331
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data-X11/basic3.0.pngbin1354 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data-X11/basic3.qml347
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data-X11/basic4.0.pngbin1354 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data-X11/basic4.qml419
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data/basic1.0.pngbin1513 -> 707 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data/basic1.qml312
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data/basic2.0.pngbin1513 -> 707 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data/basic2.qml320
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data/basic3.0.pngbin1513 -> 707 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data/basic3.qml336
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data/basic4.0.pngbin1513 -> 707 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/repeater/data/basic4.qml408
-rw-r--r--tests/auto/declarative/qmlvisual/shared/DejaVuSansMono.ttfbin0 -> 237788 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/shared/README7
-rw-r--r--tests/auto/declarative/qmlvisual/shared/TestText.qml8
-rw-r--r--tests/auto/declarative/qmlvisual/shared/TestTextEdit.qml14
-rw-r--r--tests/auto/declarative/qmlvisual/shared/TestTextInput.qml14
-rw-r--r--tests/auto/declarative/qmlvisual/shared/qmldir3
-rw-r--r--tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp56
-rw-r--r--tests/auto/declarative/qmlvisual/webview/autosize/autosize.qml3
-rw-r--r--tests/auto/declarative/qmlvisual/webview/autosize/data-X11/autosize.qml115
-rw-r--r--tests/auto/declarative/qmlvisual/webview/javascript/evaluateJavaScript.qml3
-rw-r--r--tests/auto/declarative/qmlvisual/webview/javascript/windowObjects.qml3
-rw-r--r--tests/auto/declarative/qmlvisual/webview/settings/fontFamily.qml3
-rw-r--r--tests/auto/declarative/qmlvisual/webview/settings/fontSize.qml3
-rw-r--r--tests/auto/declarative/qmlvisual/webview/settings/noAutoLoadImages.qml3
-rw-r--r--tests/auto/declarative/qmlvisual/webview/settings/setFontFamily.qml3
-rw-r--r--tests/auto/declarative/qmlvisual/webview/zooming/pageWidth.qml13
-rw-r--r--tests/auto/declarative/qmlvisual/webview/zooming/renderControl.qml3
-rw-r--r--tests/auto/declarative/qmlvisual/webview/zooming/resolution.qml5
-rw-r--r--tests/auto/declarative/qmlvisual/webview/zooming/zoomTextOnly.qml5
-rw-r--r--tests/auto/declarative/qmlvisual/webview/zooming/zooming.qml3
-rw-r--r--tests/auto/exceptionsafety/exceptionsafety.pro1
-rw-r--r--tests/auto/gestures/tst_gestures.cpp4
-rw-r--r--tests/auto/guiapplauncher/guiapplauncher.pro1
-rw-r--r--tests/auto/lancelot/.gitignore1
-rw-r--r--tests/auto/lancelot/lancelot.pro15
-rw-r--r--tests/auto/lancelot/scripts/aliasing.qps156
-rw-r--r--tests/auto/lancelot/scripts/arcs.qps68
-rw-r--r--tests/auto/lancelot/scripts/arcs2.qps47
-rw-r--r--tests/auto/lancelot/scripts/background.qps136
-rw-r--r--tests/auto/lancelot/scripts/background_brush.qps5
-rw-r--r--tests/auto/lancelot/scripts/beziers.qps147
-rw-r--r--tests/auto/lancelot/scripts/bitmaps.qps166
-rw-r--r--tests/auto/lancelot/scripts/borderimage.qps120
-rw-r--r--tests/auto/lancelot/scripts/brush_pens.qps104
-rw-r--r--tests/auto/lancelot/scripts/brushes.qps79
-rw-r--r--tests/auto/lancelot/scripts/clippaths.qps60
-rw-r--r--tests/auto/lancelot/scripts/clipping.qps182
-rw-r--r--tests/auto/lancelot/scripts/clipping_state.qps47
-rw-r--r--tests/auto/lancelot/scripts/cliprects.qps59
-rw-r--r--tests/auto/lancelot/scripts/conical_gradients.qps85
-rw-r--r--tests/auto/lancelot/scripts/conical_gradients_perspectives.qps64
-rw-r--r--tests/auto/lancelot/scripts/dashes.qps268
-rw-r--r--tests/auto/lancelot/scripts/degeneratebeziers.qps10
-rw-r--r--tests/auto/lancelot/scripts/deviceclipping.qps48
-rw-r--r--tests/auto/lancelot/scripts/drawpoints.qps101
-rw-r--r--tests/auto/lancelot/scripts/ellipses.qps86
-rw-r--r--tests/auto/lancelot/scripts/filltest.qps413
-rw-r--r--tests/auto/lancelot/scripts/gradients.qps44
-rw-r--r--tests/auto/lancelot/scripts/image_formats.qps81
-rw-r--r--tests/auto/lancelot/scripts/images.qps106
-rw-r--r--tests/auto/lancelot/scripts/images2.qps145
-rw-r--r--tests/auto/lancelot/scripts/join_cap_styles.qps63
-rw-r--r--tests/auto/lancelot/scripts/join_cap_styles_duplicate_control_points.qps68
-rw-r--r--tests/auto/lancelot/scripts/linear_gradients.qps144
-rw-r--r--tests/auto/lancelot/scripts/linear_gradients_perspectives.qps62
-rw-r--r--tests/auto/lancelot/scripts/linear_resolving_gradients.qps66
-rw-r--r--tests/auto/lancelot/scripts/lineconsistency.qps72
-rw-r--r--tests/auto/lancelot/scripts/linedashes.qps94
-rw-r--r--tests/auto/lancelot/scripts/linedashes2.qps154
-rw-r--r--tests/auto/lancelot/scripts/linedashes2_aa.qps5
-rw-r--r--tests/auto/lancelot/scripts/lines.qps558
-rw-r--r--tests/auto/lancelot/scripts/lines2.qps179
-rw-r--r--tests/auto/lancelot/scripts/pathfill.qps38
-rw-r--r--tests/auto/lancelot/scripts/paths.qps34
-rw-r--r--tests/auto/lancelot/scripts/paths_aa.qps4
-rw-r--r--tests/auto/lancelot/scripts/pens.qps133
-rw-r--r--tests/auto/lancelot/scripts/pens_aa.qps6
-rw-r--r--tests/auto/lancelot/scripts/pens_cosmetic.qps110
-rw-r--r--tests/auto/lancelot/scripts/perspectives.qps72
-rw-r--r--tests/auto/lancelot/scripts/perspectives2.qps309
-rw-r--r--tests/auto/lancelot/scripts/pixmap_rotation.qps30
-rw-r--r--tests/auto/lancelot/scripts/pixmap_scaling.qps224
-rw-r--r--tests/auto/lancelot/scripts/pixmap_subpixel.qps117
-rw-r--r--tests/auto/lancelot/scripts/pixmaps.qps106
-rw-r--r--tests/auto/lancelot/scripts/porter_duff.qps251
-rw-r--r--tests/auto/lancelot/scripts/porter_duff2.qps261
-rw-r--r--tests/auto/lancelot/scripts/primitives.qps184
-rw-r--r--tests/auto/lancelot/scripts/radial_gradients.qps99
-rw-r--r--tests/auto/lancelot/scripts/radial_gradients_perspectives.qps62
-rw-r--r--tests/auto/lancelot/scripts/rasterops.qps87
-rw-r--r--tests/auto/lancelot/scripts/sizes.qps150
-rw-r--r--tests/auto/lancelot/scripts/text.qps124
-rw-r--r--tests/auto/lancelot/scripts/text_perspectives.qps102
-rw-r--r--tests/auto/lancelot/scripts/tiled_pixmap.qps84
-rw-r--r--tests/auto/lancelot/tst_lancelot.cpp301
-rwxr-xr-xtests/auto/mediaobject/mediaobject.pro2
-rw-r--r--tests/auto/mediaobject/tst_mediaobject.cpp2
-rw-r--r--tests/auto/moc/moc.pro2
-rw-r--r--tests/auto/modeltest/dynamictreemodel.cpp7
-rw-r--r--tests/auto/networkselftest/networkselftest.pro4
-rw-r--r--tests/auto/other.pro1
-rw-r--r--tests/auto/patternistexamples/patternistexamples.pro12
-rw-r--r--tests/auto/platformquirks.h122
-rw-r--r--tests/auto/q_func_info/q_func_info.pro1
-rw-r--r--tests/auto/qabstractitemmodel/tst_qabstractitemmodel.cpp6
-rw-r--r--tests/auto/qabstractnetworkcache/qabstractnetworkcache.pro2
-rw-r--r--tests/auto/qabstractscrollarea/tst_qabstractscrollarea.cpp5
-rw-r--r--tests/auto/qabstractslider/tst_qabstractslider.cpp17
-rw-r--r--tests/auto/qabstractxmlnodemodel/qabstractxmlnodemodel.pro2
-rw-r--r--tests/auto/qaccessibility/qaccessibility.pro2
-rw-r--r--tests/auto/qaccessibility/tst_qaccessibility.cpp8
-rw-r--r--tests/auto/qaction/tst_qaction.cpp2
-rw-r--r--tests/auto/qalgorithms/tst_qalgorithms.cpp23
-rw-r--r--tests/auto/qanimationgroup/qanimationgroup.pro1
-rw-r--r--tests/auto/qapplication/test/test.pro10
-rw-r--r--tests/auto/qatomicint/qatomicint.pro1
-rw-r--r--tests/auto/qatomicpointer/qatomicpointer.pro1
-rw-r--r--tests/auto/qaudioinput/qaudioinput.pro2
-rw-r--r--tests/auto/qaudiooutput/qaudiooutput.pro2
-rw-r--r--tests/auto/qbitarray/qbitarray.pro1
-rw-r--r--tests/auto/qbitarray/tst_qbitarray.cpp9
-rw-r--r--tests/auto/qboxlayout/tst_qboxlayout.cpp5
-rw-r--r--tests/auto/qbrush/tst_qbrush.cpp9
-rw-r--r--tests/auto/qbuffer/qbuffer.pro1
-rw-r--r--tests/auto/qbuttongroup/tst_qbuttongroup.cpp9
-rw-r--r--tests/auto/qbytearray/qbytearray.pro3
-rw-r--r--tests/auto/qbytearray/tst_qbytearray.cpp9
-rw-r--r--tests/auto/qbytearraymatcher/qbytearraymatcher.pro1
-rw-r--r--tests/auto/qcache/qcache.pro1
-rw-r--r--tests/auto/qcalendarwidget/tst_qcalendarwidget.cpp5
-rw-r--r--tests/auto/qchar/qchar.pro3
-rw-r--r--tests/auto/qclipboard/test/test.pro14
-rw-r--r--tests/auto/qclipboard/tst_qclipboard.cpp82
-rw-r--r--tests/auto/qcolumnview/tst_qcolumnview.cpp21
-rw-r--r--tests/auto/qcombobox/tst_qcombobox.cpp14
-rw-r--r--tests/auto/qcompleter/tst_qcompleter.cpp159
-rw-r--r--tests/auto/qcomplextext/tst_qcomplextext.cpp39
-rw-r--r--tests/auto/qcontiguouscache/qcontiguouscache.pro1
-rw-r--r--tests/auto/qcontiguouscache/tst_qcontiguouscache.cpp13
-rw-r--r--tests/auto/qcoreapplication/qcoreapplication.pro1
-rw-r--r--tests/auto/qcryptographichash/qcryptographichash.pro1
-rw-r--r--tests/auto/qcssparser/qcssparser.pro4
-rw-r--r--tests/auto/qdatastream/qdatastream.pro4
-rw-r--r--tests/auto/qdate/qdate.pro1
-rw-r--r--tests/auto/qdatetime/qdatetime.pro1
-rw-r--r--tests/auto/qdebug/qdebug.pro1
-rw-r--r--tests/auto/qdesktopservices/qdesktopservices.pro12
-rw-r--r--tests/auto/qdir/qdir.pro2
-rw-r--r--tests/auto/qdiriterator/qdiriterator.pro1
-rw-r--r--tests/auto/qdirmodel/qdirmodel.pro6
-rw-r--r--tests/auto/qdom/qdom.pro2
-rw-r--r--tests/auto/qdoublevalidator/tst_qdoublevalidator.cpp12
-rw-r--r--tests/auto/qeasingcurve/qeasingcurve.pro1
-rw-r--r--tests/auto/qelapsedtimer/qelapsedtimer.pro1
-rw-r--r--tests/auto/qevent/qevent.pro1
-rw-r--r--tests/auto/qeventloop/tst_qeventloop.cpp2
-rw-r--r--tests/auto/qexplicitlyshareddatapointer/qexplicitlyshareddatapointer.pro1
-rw-r--r--tests/auto/qfile/test/test.pro4
-rw-r--r--tests/auto/qfiledialog/qfiledialog.pro4
-rw-r--r--tests/auto/qfiledialog2/qfiledialog2.pro4
-rw-r--r--tests/auto/qfileinfo/qfileinfo.pro4
-rw-r--r--tests/auto/qfileinfo/tst_qfileinfo.cpp8
-rw-r--r--tests/auto/qfilesystemmodel/qfilesystemmodel.pro2
-rw-r--r--tests/auto/qflags/qflags.pro1
-rw-r--r--tests/auto/qfontdatabase/qfontdatabase.pro2
-rw-r--r--tests/auto/qftp/qftp.pro4
-rw-r--r--tests/auto/qfuture/qfuture.pro1
-rw-r--r--tests/auto/qfuturewatcher/qfuturewatcher.pro1
-rw-r--r--tests/auto/qgetputenv/qgetputenv.pro1
-rw-r--r--tests/auto/qgl/tst_qgl.cpp122
-rw-r--r--tests/auto/qglobal/qglobal.pro1
-rw-r--r--tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp6
-rw-r--r--tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp250
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp100
-rw-r--r--tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp65
-rw-r--r--tests/auto/qgraphicsscene/qgraphicsscene.pro4
-rw-r--r--tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp12
-rw-r--r--tests/auto/qgraphicsview/tst_qgraphicsview.cpp203
-rw-r--r--tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp15
-rw-r--r--tests/auto/qgridlayout/tst_qgridlayout.cpp17
-rw-r--r--tests/auto/qhash/qhash.pro1
-rw-r--r--tests/auto/qhash/tst_qhash.cpp11
-rw-r--r--tests/auto/qheaderview/tst_qheaderview.cpp29
-rw-r--r--tests/auto/qhelpcontentmodel/qhelpcontentmodel.pro4
-rw-r--r--tests/auto/qhelpenginecore/qhelpenginecore.pro4
-rw-r--r--tests/auto/qhttp/qhttp.pro12
-rw-r--r--tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp54
-rw-r--r--tests/auto/qicoimageformat/qicoimageformat.pro10
-rw-r--r--tests/auto/qicon/qicon.pro12
-rw-r--r--tests/auto/qicon/tst_qicon.cpp16
-rw-r--r--tests/auto/qimage/qimage.pro6
-rw-r--r--tests/auto/qimage/tst_qimage.cpp15
-rw-r--r--tests/auto/qimagereader/qimagereader.pro8
-rw-r--r--tests/auto/qimagereader/tst_qimagereader.cpp98
-rw-r--r--tests/auto/qimagewriter/qimagewriter.pro6
-rw-r--r--tests/auto/qinputcontext/tst_qinputcontext.cpp4
-rw-r--r--tests/auto/qinputdialog/tst_qinputdialog.cpp28
-rw-r--r--tests/auto/qiodevice/qiodevice.pro4
-rw-r--r--tests/auto/qitemmodel/qitemmodel.pro4
-rw-r--r--tests/auto/qitemselectionmodel/tst_qitemselectionmodel.cpp66
-rw-r--r--tests/auto/qkeysequence/tst_qkeysequence.cpp10
-rw-r--r--tests/auto/qlabel/qlabel.pro2
-rw-r--r--tests/auto/qlayout/qlayout.pro2
-rw-r--r--tests/auto/qlayout/tst_qlayout.cpp5
-rw-r--r--tests/auto/qlibrary/qlibrary.pro1
-rw-r--r--tests/auto/qlibrary/tst/tst.pro6
-rw-r--r--tests/auto/qline/qline.pro1
-rw-r--r--tests/auto/qlist/tst_qlist.cpp7
-rw-r--r--tests/auto/qlistview/tst_qlistview.cpp35
-rw-r--r--tests/auto/qlistwidget/tst_qlistwidget.cpp53
-rw-r--r--tests/auto/qlocale/test/test.pro2
-rw-r--r--tests/auto/qlocalsocket/test/test.pro6
-rw-r--r--tests/auto/qmainwindow/tst_qmainwindow.cpp10
-rw-r--r--tests/auto/qmap/qmap.pro1
-rw-r--r--tests/auto/qmap/tst_qmap.cpp12
-rw-r--r--tests/auto/qmargins/qmargins.pro1
-rw-r--r--tests/auto/qmath/qmath.pro1
-rw-r--r--tests/auto/qmdiarea/tst_qmdiarea.cpp19
-rw-r--r--tests/auto/qmenu/tst_qmenu.cpp13
-rw-r--r--tests/auto/qmenubar/tst_qmenubar.cpp4
-rw-r--r--tests/auto/qmetatype/qmetatype.pro1
-rw-r--r--tests/auto/qmouseevent_modal/tst_qmouseevent_modal.cpp4
-rw-r--r--tests/auto/qmovie/qmovie.pro6
-rw-r--r--tests/auto/qmutex/qmutex.pro1
-rw-r--r--tests/auto/qmutexlocker/qmutexlocker.pro1
-rw-r--r--tests/auto/qnetworkreply/test/test.pro6
-rw-r--r--tests/auto/qnetworkreply/tst_qnetworkreply.cpp623
-rw-r--r--tests/auto/qnumeric/qnumeric.pro1
-rw-r--r--tests/auto/qobject/qobject.pro1
-rw-r--r--tests/auto/qobject/tst_qobject.cpp78
-rw-r--r--tests/auto/qobject/tst_qobject.pro4
-rw-r--r--tests/auto/qobjectrace/qobjectrace.pro1
-rw-r--r--tests/auto/qpainter/qpainter.pro2
-rw-r--r--tests/auto/qpainter/tst_qpainter.cpp84
-rw-r--r--tests/auto/qpainterpath/tst_qpainterpath.cpp13
-rw-r--r--tests/auto/qpathclipper/tst_qpathclipper.cpp3
-rw-r--r--tests/auto/qpauseanimation/tst_qpauseanimation.cpp5
-rw-r--r--tests/auto/qpen/tst_qpen.cpp9
-rw-r--r--tests/auto/qpicture/tst_qpicture.cpp13
-rw-r--r--tests/auto/qpixmap/loadFromData/designer_indexed8_no_alpha_animated.gifbin0 -> 4075 bytes
-rw-r--r--tests/auto/qpixmap/qpixmap.pro8
-rw-r--r--tests/auto/qpixmap/tst_qpixmap.cpp94
-rw-r--r--tests/auto/qpixmapfilter/qpixmapfilter.pro2
-rw-r--r--tests/auto/qplaintextedit/tst_qplaintextedit.cpp1
-rw-r--r--tests/auto/qplugin/qplugin.pro1
-rw-r--r--tests/auto/qplugin/tst_qplugin.pro4
-rw-r--r--tests/auto/qpluginloader/qpluginloader.pro1
-rw-r--r--tests/auto/qpluginloader/tst/tst.pro6
-rw-r--r--tests/auto/qpoint/qpoint.pro1
-rw-r--r--tests/auto/qpolygon/tst_qpolygon.cpp10
-rw-r--r--tests/auto/qprinter/tst_qprinter.cpp12
-rw-r--r--tests/auto/qprocess/test/test.pro40
-rw-r--r--tests/auto/qprocessenvironment/qprocessenvironment.pro1
-rw-r--r--tests/auto/qqueue/qqueue.pro1
-rw-r--r--tests/auto/qrand/qrand.pro1
-rw-r--r--tests/auto/qreadlocker/qreadlocker.pro1
-rw-r--r--tests/auto/qreadwritelock/qreadwritelock.pro1
-rw-r--r--tests/auto/qrect/qrect.pro1
-rw-r--r--tests/auto/qregexp/qregexp.pro1
-rw-r--r--tests/auto/qregexp/tst_qregexp.cpp9
-rw-r--r--tests/auto/qregion/tst_qregion.cpp10
-rw-r--r--tests/auto/qresourceengine/qresourceengine.pro19
-rw-r--r--tests/auto/qringbuffer/qringbuffer.pro1
-rw-r--r--tests/auto/qscopedpointer/qscopedpointer.pro1
-rw-r--r--tests/auto/qscriptable/tst_qscriptable.cpp4
-rw-r--r--tests/auto/qscriptclass/tst_qscriptclass.cpp61
-rw-r--r--tests/auto/qscriptcontext/tst_qscriptcontext.cpp207
-rw-r--r--tests/auto/qscriptengine/idtranslatable-unicode.js5
-rw-r--r--tests/auto/qscriptengine/qscriptengine.pro2
-rw-r--r--tests/auto/qscriptengine/qscriptengine.qrc2
-rw-r--r--tests/auto/qscriptengine/translatable-unicode.js9
-rw-r--r--tests/auto/qscriptengine/translations/idtranslatable-unicode.qmbin0 -> 209 bytes
-rw-r--r--tests/auto/qscriptengine/translations/idtranslatable-unicode.ts26
-rw-r--r--tests/auto/qscriptengine/translations/translatable-unicode.qmbin0 -> 322 bytes
-rw-r--r--tests/auto/qscriptengine/translations/translatable-unicode.ts37
-rw-r--r--tests/auto/qscriptengine/tst_qscriptengine.cpp384
-rw-r--r--tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp94
-rw-r--r--tests/auto/qscriptextensionplugin/qscriptextensionplugin.pro3
-rw-r--r--tests/auto/qscriptextensionplugin/simpleplugin/simpleplugin.cpp79
-rw-r--r--tests/auto/qscriptextensionplugin/simpleplugin/simpleplugin.pro10
-rw-r--r--tests/auto/qscriptextensionplugin/staticplugin/__init__.js6
-rw-r--r--tests/auto/qscriptextensionplugin/staticplugin/staticplugin.cpp75
-rw-r--r--tests/auto/qscriptextensionplugin/staticplugin/staticplugin.pro7
-rw-r--r--tests/auto/qscriptextensionplugin/staticplugin/staticplugin.qrc6
-rw-r--r--tests/auto/qscriptextensionplugin/test/test.pro18
-rw-r--r--tests/auto/qscriptextensionplugin/tst_qscriptextensionplugin.cpp167
-rw-r--r--tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp157
-rw-r--r--tests/auto/qscriptjstestsuite/qscriptjstestsuite.pro2
-rw-r--r--tests/auto/qscriptv8testsuite/qscriptv8testsuite.pro2
-rw-r--r--tests/auto/qscriptvalue/qscriptvalue.pro8
-rw-r--r--tests/auto/qscriptvalue/testgen/data.txt161
-rw-r--r--tests/auto/qscriptvalue/testgen/testgenerator.cpp794
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue.cpp1593
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue.h404
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue_generated_cast.cpp1453
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp7026
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue_generated_init.cpp198
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue_generated_isXXX.cpp830
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue_generated_toXXX.cpp1897
-rw-r--r--tests/auto/qscriptvaluegenerated/.gitignore1
-rw-r--r--tests/auto/qscriptvaluegenerated/qscriptvaluegenerated.pro18
-rw-r--r--tests/auto/qscriptvaluegenerated/testgen/data.txt167
-rwxr-xr-xtests/auto/qscriptvaluegenerated/testgen/gen.py (renamed from tests/auto/qscriptvalue/testgen/gen.py)0
-rw-r--r--tests/auto/qscriptvaluegenerated/testgen/main.cpp (renamed from tests/auto/qscriptvalue/testgen/main.cpp)0
-rw-r--r--tests/auto/qscriptvaluegenerated/testgen/testgen.pro (renamed from tests/auto/qscriptvalue/testgen/testgen.pro)0
-rw-r--r--tests/auto/qscriptvaluegenerated/testgen/testgenerator.cpp795
-rw-r--r--tests/auto/qscriptvaluegenerated/testgen/testgenerator.h (renamed from tests/auto/qscriptvalue/testgen/testgenerator.h)0
-rw-r--r--tests/auto/qscriptvaluegenerated/tst_qscriptvalue.cpp116
-rw-r--r--tests/auto/qscriptvaluegenerated/tst_qscriptvalue.h370
-rw-r--r--tests/auto/qscriptvaluegenerated/tst_qscriptvalue_generated_cast.cpp1504
-rw-r--r--tests/auto/qscriptvaluegenerated/tst_qscriptvalue_generated_comparison.cpp7542
-rw-r--r--tests/auto/qscriptvaluegenerated/tst_qscriptvalue_generated_init.cpp204
-rw-r--r--tests/auto/qscriptvaluegenerated/tst_qscriptvalue_generated_isXXX.cpp862
-rw-r--r--tests/auto/qscriptvaluegenerated/tst_qscriptvalue_generated_toXXX.cpp1963
-rw-r--r--tests/auto/qscriptvalueiterator/tst_qscriptvalueiterator.cpp21
-rw-r--r--tests/auto/qsemaphore/qsemaphore.pro1
-rw-r--r--tests/auto/qsequentialanimationgroup/qsequentialanimationgroup.pro1
-rw-r--r--tests/auto/qset/qset.pro1
-rw-r--r--tests/auto/qset/tst_qset.cpp11
-rw-r--r--tests/auto/qsharedpointer/qsharedpointer.pro1
-rw-r--r--tests/auto/qsignalspy/qsignalspy.pro1
-rw-r--r--tests/auto/qsize/qsize.pro1
-rw-r--r--tests/auto/qsizef/qsizef.pro1
-rw-r--r--tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp138
-rw-r--r--tests/auto/qsound/qsound.pro2
-rw-r--r--tests/auto/qsound/tst_qsound.cpp7
-rw-r--r--tests/auto/qsplitter/qsplitter.pro2
-rw-r--r--tests/auto/qsplitter/tst_qsplitter.cpp12
-rw-r--r--tests/auto/qsql/qsql.pro2
-rw-r--r--tests/auto/qsqldatabase/qsqldatabase.pro4
-rw-r--r--tests/auto/qsqldatabase/tst_databases.h2
-rw-r--r--tests/auto/qsqldriver/qsqldriver.pro4
-rw-r--r--tests/auto/qsqlerror/qsqlerror.pro2
-rw-r--r--tests/auto/qsqlfield/qsqlfield.pro2
-rw-r--r--tests/auto/qsqlquery/qsqlquery.pro4
-rw-r--r--tests/auto/qsqlquery/tst_qsqlquery.cpp131
-rw-r--r--tests/auto/qsqlquerymodel/qsqlquerymodel.pro2
-rw-r--r--tests/auto/qsqlrecord/qsqlrecord.pro2
-rw-r--r--tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro4
-rw-r--r--tests/auto/qsqltablemodel/qsqltablemodel.pro4
-rw-r--r--tests/auto/qsqlthread/qsqlthread.pro4
-rw-r--r--tests/auto/qsslcertificate/qsslcertificate.pro5
-rw-r--r--tests/auto/qsslkey/qsslkey.pro4
-rw-r--r--tests/auto/qsslsocket/qsslsocket.pro4
-rw-r--r--tests/auto/qstate/qstate.pro1
-rw-r--r--tests/auto/qstl/qstl.pro1
-rw-r--r--tests/auto/qstring/qstring.pro1
-rw-r--r--tests/auto/qstring/tst_qstring.cpp51
-rw-r--r--tests/auto/qstringbuilder1/qstringbuilder1.pro1
-rw-r--r--tests/auto/qstringbuilder2/qstringbuilder2.pro1
-rw-r--r--tests/auto/qstringbuilder3/qstringbuilder3.pro1
-rw-r--r--tests/auto/qstringbuilder4/qstringbuilder4.pro1
-rw-r--r--tests/auto/qstringlist/qstringlist.pro1
-rw-r--r--tests/auto/qstringmatcher/qstringmatcher.pro1
-rw-r--r--tests/auto/qstringref/qstringref.pro1
-rw-r--r--tests/auto/qstyle/qstyle.pro2
-rw-r--r--tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp40
-rw-r--r--tests/auto/qsvggenerator/qsvggenerator.pro2
-rw-r--r--tests/auto/qsvgrenderer/qsvgrenderer.pro2
-rw-r--r--tests/auto/qtableview/tst_qtableview.cpp24
-rw-r--r--tests/auto/qtconcurrentfilter/qtconcurrentfilter.pro2
-rw-r--r--tests/auto/qtconcurrentiteratekernel/qtconcurrentiteratekernel.pro2
-rw-r--r--tests/auto/qtconcurrentmap/qtconcurrentmap.pro2
-rw-r--r--tests/auto/qtconcurrentrun/qtconcurrentrun.pro2
-rw-r--r--tests/auto/qtconcurrentrun/tst_qtconcurrentrun.cpp38
-rw-r--r--tests/auto/qtconcurrentthreadengine/qtconcurrentthreadengine.pro2
-rw-r--r--tests/auto/qtcpserver/test/test.pro4
-rw-r--r--tests/auto/qtemporaryfile/qtemporaryfile.pro2
-rw-r--r--tests/auto/qtextboundaryfinder/qtextboundaryfinder.pro3
-rw-r--r--tests/auto/qtextbrowser/qtextbrowser.pro4
-rw-r--r--tests/auto/qtextcodec/test/test.pro2
-rw-r--r--tests/auto/qtextdocument/tst_qtextdocument.cpp1
-rw-r--r--tests/auto/qtextedit/qtextedit.pro2
-rw-r--r--tests/auto/qtextedit/tst_qtextedit.cpp11
-rw-r--r--tests/auto/qtextstream/test/test.pro6
-rw-r--r--tests/auto/qthread/qthread.pro1
-rw-r--r--tests/auto/qthread/tst_qthread.cpp14
-rw-r--r--tests/auto/qthreadonce/qthreadonce.pro1
-rw-r--r--tests/auto/qthreadpool/qthreadpool.pro1
-rw-r--r--tests/auto/qthreadstorage/qthreadstorage.pro1
-rw-r--r--tests/auto/qtime/qtime.pro1
-rw-r--r--tests/auto/qtimeline/qtimeline.pro1
-rw-r--r--tests/auto/qtimer/qtimer.pro1
-rw-r--r--tests/auto/qtipc/qsharedmemory/test/test.pro6
-rw-r--r--tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp33
-rw-r--r--tests/auto/qtipc/qsystemsemaphore/qsystemsemaphore.pro4
-rw-r--r--tests/auto/qtmd5/qtmd5.pro1
-rw-r--r--tests/auto/qtokenautomaton/qtokenautomaton.pro1
-rw-r--r--tests/auto/qtranslator/qtranslator.pro2
-rw-r--r--tests/auto/qtreeview/tst_qtreeview.cpp23
-rw-r--r--tests/auto/qtreewidget/tst_qtreewidget.cpp6
-rw-r--r--tests/auto/qudpsocket/test/test.pro2
-rw-r--r--tests/auto/qurl/qurl.pro1
-rw-r--r--tests/auto/qurl/tst_qurl.cpp9
-rw-r--r--tests/auto/quuid/quuid.pro1
-rw-r--r--tests/auto/quuid/test/test.pro4
-rw-r--r--tests/auto/qvariant/tst_qvariant.cpp11
-rw-r--r--tests/auto/qvarlengtharray/qvarlengtharray.pro1
-rw-r--r--tests/auto/qvector/qvector.pro1
-rw-r--r--tests/auto/qvector/tst_qvector.cpp12
-rw-r--r--tests/auto/qwaitcondition/qwaitcondition.pro1
-rw-r--r--tests/auto/qwaitcondition/tst_qwaitcondition.cpp2
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp62
-rw-r--r--tests/auto/qwineventnotifier/qwineventnotifier.pro1
-rw-r--r--tests/auto/qwritelocker/qwritelocker.pro1
-rw-r--r--tests/auto/qxml/qxml.pro2
-rw-r--r--tests/auto/qxmlformatter/qxmlformatter.pro2
-rw-r--r--tests/auto/qxmlquery/qxmlquery.pro4
-rw-r--r--tests/auto/qxmlquery/tst_qxmlquery.cpp29
-rw-r--r--tests/auto/qxmlsimplereader/qxmlsimplereader.pro2
-rw-r--r--tests/auto/qxmlstream/qxmlstream.pro2
-rw-r--r--tests/auto/qzip/qzip.pro2
-rw-r--r--tests/auto/script.pro2
-rw-r--r--tests/auto/selftests/selftests.pro1
-rw-r--r--tests/auto/symbols/tst_symbols.cpp2
-rw-r--r--tests/auto/uic/baseline/gridalignment.ui49
-rw-r--r--tests/auto/uic/baseline/gridalignment.ui.h83
-rw-r--r--tests/auto/uiloader/uiloader/uiloader.pro4
-rw-r--r--tests/auto/utf8/utf8.pro1
-rw-r--r--tests/auto/windowsmobile/test/test.pro2
-rw-r--r--tests/auto/xmlpatterns.pri4
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/xmlpatternsdiagnosticsts.pro2
-rw-r--r--tests/auto/xmlpatternsview/xmlpatternsview.pro2
-rw-r--r--tests/auto/xmlpatternsxslts/xmlpatternsxslts.pro2
-rw-r--r--tests/benchmarks/benchmarks.pro3
-rw-r--r--tests/benchmarks/corelib/codecs/qtextcodec/qtextcodec.pro2
-rw-r--r--tests/benchmarks/corelib/corelib.pro10
-rwxr-xr-xtests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro2
-rw-r--r--tests/benchmarks/corelib/tools/qstring/data.cpp19
-rw-r--r--tests/benchmarks/corelib/tools/qstring/data.h7
-rw-r--r--tests/benchmarks/corelib/tools/qstring/generatelist.pl8
-rw-r--r--tests/benchmarks/corelib/tools/qstring/main.cpp2
-rw-r--r--tests/benchmarks/corelib/tools/qstring/qstring.pro2
-rw-r--r--tests/benchmarks/declarative/binding/binding.pro2
-rw-r--r--tests/benchmarks/declarative/compilation/compilation.pro2
-rw-r--r--tests/benchmarks/declarative/creation/creation.pro2
-rw-r--r--tests/benchmarks/declarative/creation/tst_creation.cpp4
-rw-r--r--tests/benchmarks/declarative/declarative.pro2
-rw-r--r--tests/benchmarks/declarative/qdeclarativecomponent/qdeclarativecomponent.pro2
-rw-r--r--tests/benchmarks/declarative/qdeclarativeimage/qdeclarativeimage.pro2
-rw-r--r--tests/benchmarks/declarative/qdeclarativemetaproperty/qdeclarativemetaproperty.pro2
-rw-r--r--tests/benchmarks/declarative/qmltime/qmltime.cpp65
-rw-r--r--tests/benchmarks/declarative/qmltime/qmltime.pro2
-rw-r--r--tests/benchmarks/declarative/script/script.pro2
-rw-r--r--tests/benchmarks/declarative/typeimports/typeimports.pro2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/qgraphicsview.pro2
-rw-r--r--tests/benchmarks/gui/gui.pro7
-rw-r--r--tests/benchmarks/gui/image/qimagereader/qimagereader.pro6
-rw-r--r--tests/benchmarks/gui/text/qtext/qtext.pro2
-rw-r--r--tests/benchmarks/network/network.pro7
-rw-r--r--tests/benchmarks/opengl/opengl.pro2
-rw-r--r--tests/benchmarks/script/qscriptengine/tst_qscriptengine.cpp314
-rw-r--r--tests/benchmarks/script/qscriptqobject/tst_qscriptqobject.cpp28
-rw-r--r--tests/benchmarks/script/qscriptvalue/tst_qscriptvalue.cpp862
-rw-r--r--tests/benchmarks/script/script.pro11
-rw-r--r--tests/benchmarks/script/sunspider/sunspider.pro20
-rw-r--r--tests/benchmarks/script/sunspider/tests/3d-cube.js337
-rw-r--r--tests/benchmarks/script/sunspider/tests/3d-morph.js54
-rw-r--r--tests/benchmarks/script/sunspider/tests/3d-raytrace.js441
-rw-r--r--tests/benchmarks/script/sunspider/tests/VERSION1
-rw-r--r--tests/benchmarks/script/sunspider/tests/access-binary-trees.js50
-rw-r--r--tests/benchmarks/script/sunspider/tests/access-fannkuch.js66
-rw-r--r--tests/benchmarks/script/sunspider/tests/access-nbody.js169
-rw-r--r--tests/benchmarks/script/sunspider/tests/access-nsieve.js38
-rw-r--r--tests/benchmarks/script/sunspider/tests/bitops-3bit-bits-in-byte.js32
-rw-r--r--tests/benchmarks/script/sunspider/tests/bitops-bits-in-byte.js21
-rw-r--r--tests/benchmarks/script/sunspider/tests/bitops-bitwise-and.js28
-rw-r--r--tests/benchmarks/script/sunspider/tests/bitops-nsieve-bits.js32
-rw-r--r--tests/benchmarks/script/sunspider/tests/controlflow-recursive.js25
-rw-r--r--tests/benchmarks/script/sunspider/tests/crypto-aes.js422
-rw-r--r--tests/benchmarks/script/sunspider/tests/crypto-md5.js286
-rw-r--r--tests/benchmarks/script/sunspider/tests/crypto-sha1.js224
-rw-r--r--tests/benchmarks/script/sunspider/tests/date-format-tofte.js299
-rw-r--r--tests/benchmarks/script/sunspider/tests/date-format-xparb.js417
-rw-r--r--tests/benchmarks/script/sunspider/tests/math-cordic.js95
-rw-r--r--tests/benchmarks/script/sunspider/tests/math-partial-sums.js33
-rw-r--r--tests/benchmarks/script/sunspider/tests/math-spectral-norm.js51
-rw-r--r--tests/benchmarks/script/sunspider/tests/regexp-dna.js1712
-rw-r--r--tests/benchmarks/script/sunspider/tests/string-base64.js135
-rw-r--r--tests/benchmarks/script/sunspider/tests/string-fasta.js85
-rw-r--r--tests/benchmarks/script/sunspider/tests/string-tagcloud.js265
-rw-r--r--tests/benchmarks/script/sunspider/tests/string-unpack-code.js68
-rw-r--r--tests/benchmarks/script/sunspider/tests/string-validate-input.js89
-rw-r--r--tests/benchmarks/script/sunspider/tst_sunspider.cpp129
-rw-r--r--tests/benchmarks/script/v8/tests/README.txt79
-rw-r--r--tests/benchmarks/script/v8/tests/base.js284
-rw-r--r--tests/benchmarks/script/v8/tests/crypto.js1698
-rw-r--r--tests/benchmarks/script/v8/tests/deltablue.js880
-rw-r--r--tests/benchmarks/script/v8/tests/earley-boyer.js4684
-rw-r--r--tests/benchmarks/script/v8/tests/raytrace.js904
-rw-r--r--tests/benchmarks/script/v8/tests/regexp.js1764
-rw-r--r--tests/benchmarks/script/v8/tests/richards.js539
-rw-r--r--tests/benchmarks/script/v8/tests/splay.js394
-rw-r--r--tests/benchmarks/script/v8/tst_v8.cpp142
-rw-r--r--tests/benchmarks/script/v8/v8.pro20
-rw-r--r--tests/benchmarks/svg/svg.pro2
-rw-r--r--tests/benchmarks/trusted-benchmarks.pri8
-rw-r--r--tests/manual/bearerex/datatransferer.cpp2
-rw-r--r--tests/manual/mkspecs/.gitignore2
-rwxr-xr-xtests/manual/mkspecs/test.sh64
-rw-r--r--tests/manual/qtouchevent/qtouchevent.pro (renamed from tests/manual/qtouchevent/multitouch.pro)0
-rw-r--r--tests/manual/textrendering/glyphshaping/glyphshaping.pro2
-rw-r--r--tools/assistant/lib/qhelpgenerator.cpp13
-rw-r--r--tools/assistant/tools/assistant/doc/assistant.qdoc10
-rw-r--r--tools/assistant/tools/assistant/openpagesmanager.cpp3
-rw-r--r--tools/configure/configureapp.cpp5
-rw-r--r--tools/designer/data/ui4.xsd1
-rw-r--r--tools/designer/src/components/formeditor/formwindow.cpp17
-rw-r--r--tools/designer/src/lib/sdk/abstractdnditem.qdoc10
-rw-r--r--tools/designer/src/lib/sdk/abstracticoncache.qdoc10
-rw-r--r--tools/designer/src/lib/sdk/dynamicpropertysheet.qdoc10
-rw-r--r--tools/designer/src/lib/sdk/layoutdecoration.qdoc10
-rw-r--r--tools/designer/src/lib/sdk/membersheet.qdoc10
-rw-r--r--tools/designer/src/lib/sdk/propertysheet.qdoc10
-rw-r--r--tools/designer/src/lib/sdk/taskmenu.qdoc10
-rw-r--r--tools/designer/src/lib/shared/morphmenu.cpp2
-rw-r--r--tools/designer/src/lib/shared/qdesigner_command2.cpp62
-rw-r--r--tools/designer/src/lib/shared/qdesigner_command2_p.h22
-rw-r--r--tools/designer/src/lib/shared/qdesigner_taskmenu.cpp139
-rw-r--r--tools/designer/src/lib/shared/qdesigner_taskmenu_p.h1
-rw-r--r--tools/designer/src/lib/shared/qlayout_widget.cpp14
-rw-r--r--tools/designer/src/lib/shared/qtresourcemodel.cpp6
-rw-r--r--tools/designer/src/lib/uilib/abstractformbuilder.cpp82
-rw-r--r--tools/designer/src/lib/uilib/container.qdoc10
-rw-r--r--tools/designer/src/lib/uilib/customwidget.qdoc10
-rw-r--r--tools/designer/src/lib/uilib/ui4.cpp11
-rw-r--r--tools/designer/src/lib/uilib/ui4_p.h8
-rw-r--r--tools/linguist/linguist/mainwindow.cpp4
-rw-r--r--tools/linguist/linguist/printout.cpp2
-rw-r--r--tools/linguist/shared/ts.dtd23
-rw-r--r--tools/macdeployqt/shared/shared.cpp2
-rw-r--r--tools/porting/src/preprocessorcontrol.cpp2
-rw-r--r--tools/porting/src/textreplacement.h4
-rw-r--r--tools/qconfig/qconfig.pro1
-rw-r--r--tools/qdbus/qdbusxml2cpp/qdbusxml2cpp.cpp4
-rw-r--r--tools/qdoc3/ditaxmlgenerator.cpp4
-rw-r--r--tools/qdoc3/doc/qdoc-manual.qdoc10
-rw-r--r--tools/qdoc3/doc/qdoc-manual.qdocconf253
-rw-r--r--tools/qdoc3/helpprojectwriter.cpp16
-rw-r--r--tools/qdoc3/htmlgenerator.cpp151
-rw-r--r--tools/qdoc3/htmlgenerator.h2
-rw-r--r--tools/qdoc3/pagegenerator.cpp4
-rw-r--r--tools/qdoc3/qdoc3.pro4
-rw-r--r--tools/qdoc3/test/qt-build-docs.qdocconf8
-rw-r--r--tools/qdoc3/test/qt-cpp-ignore.qdocconf5
-rw-r--r--tools/qdoc3/test/qt-html-templates.qdocconf34
-rw-r--r--tools/qdoc3/test/qt.qdocconf5
-rw-r--r--tools/qdoc3/tokenizer.h2
-rw-r--r--tools/qdoc3/tree.cpp71
-rw-r--r--tools/qmeegographicssystemhelper/qmeegofencesync.cpp79
-rw-r--r--tools/qmeegographicssystemhelper/qmeegofencesync.h101
-rw-r--r--tools/qmeegographicssystemhelper/qmeegofencesync_p.h60
-rw-r--r--tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h2
-rw-r--r--tools/qmeegographicssystemhelper/qmeegographicssystemhelper.pro4
-rw-r--r--tools/qmeegographicssystemhelper/qmeegolivepixmap.cpp66
-rw-r--r--tools/qmeegographicssystemhelper/qmeegolivepixmap.h11
-rw-r--r--tools/qmeegographicssystemhelper/qmeegolivepixmap_p.h6
-rw-r--r--tools/qmeegographicssystemhelper/qmeegooverlaywidget.cpp9
-rw-r--r--tools/qmeegographicssystemhelper/qmeegooverlaywidget.h2
-rw-r--r--tools/qmeegographicssystemhelper/qmeegoruntime.cpp98
-rw-r--r--tools/qmeegographicssystemhelper/qmeegoruntime.h14
-rw-r--r--tools/qml/main.cpp3
-rw-r--r--tools/qml/qdeclarativetester.cpp46
-rw-r--r--tools/qml/qdeclarativetester.h1
-rw-r--r--tools/qml/qmlruntime.cpp3
-rw-r--r--tools/qml/qmlruntime.h3
-rw-r--r--tools/qtconfig/mainwindow.cpp20
-rw-r--r--tools/qtestlib/wince/cetest/activesyncconnection.cpp2
-rw-r--r--tools/qtestlib/wince/cetest/deployment.cpp10
-rw-r--r--tools/qtestlib/wince/cetest/main.cpp2
-rw-r--r--tools/qvfb/qvfb.cpp2
-rw-r--r--tools/runonphone/serenum_unix.cpp35
-rw-r--r--tools/runonphone/symbianutils/tcftrkdevice.h2
-rw-r--r--tools/runonphone/symbianutils/tcftrkmessage.h2
-rw-r--r--tools/tools.pro2
-rw-r--r--translations/assistant_de.ts37
-rw-r--r--[-rwxr-xr-x]translations/assistant_ja.ts0
-rw-r--r--translations/assistant_ru.ts581
-rw-r--r--translations/designer_ru.ts172
-rw-r--r--[-rwxr-xr-x]translations/linguist_ja.ts0
-rw-r--r--translations/linguist_ru.ts955
-rw-r--r--translations/qt_de.ts4
-rw-r--r--[-rwxr-xr-x]translations/qt_ja.ts0
-rw-r--r--translations/qt_ru.ts166
-rw-r--r--translations/qt_zh_CN.ts2
-rw-r--r--translations/qtconfig_ru.ts82
-rw-r--r--translations/qvfb_ru.ts139
-rw-r--r--util/normalize/main.cpp2
-rw-r--r--util/qlalr/doc/src/qlalr.qdoc10
-rw-r--r--util/s60pixelmetrics/pm_mapperapp.cpp20
3245 files changed, 159533 insertions, 94301 deletions
diff --git a/.commit-template b/.commit-template
index 589ca89..6e0e3a4 100644
--- a/.commit-template
+++ b/.commit-template
@@ -5,6 +5,6 @@
# ---[ Fields ]-----------------[ uncomment and edit as applicable ]---|
#Task-number:
-#Reviewed-by:
+Reviewed-by: pending
# ==================================[ please wrap at 72 characters ]===|
diff --git a/.gitignore b/.gitignore
index 7bacc11..af52197 100644
--- a/.gitignore
+++ b/.gitignore
@@ -51,6 +51,7 @@ Makefile*
*.prl
*.app
*.pro.user
+*.qmlproject.user
*.gcov
bin/Qt*.dll
bin/assistant*
diff --git a/bin/createpackage.pl b/bin/createpackage.pl
index 41ba2e3..522d1fb 100755
--- a/bin/createpackage.pl
+++ b/bin/createpackage.pl
@@ -140,7 +140,12 @@ unless (GetOptions('i|install' => \$install,
}
my $epocroot = $ENV{EPOCROOT};
-$epocroot =~ s,[\\/]$,,x;
+if ($epocroot ne "") {
+ $epocroot =~ s,\\,/,g;
+ if ($epocroot =~ m,[^/]$,) {
+ $epocroot = $epocroot."/";
+ }
+}
my $certfilepath = abs_path(dirname($certfile));
@@ -328,11 +333,11 @@ if ($preprocessonly) {
if($stub) {
if(!($epocroot)) { die("ERROR: EPOCROOT must be set to create stub sis files"); }
- my $systeminstall = "$epocroot/epoc32/data/z/system/install";
+ my $systeminstall = "${epocroot}epoc32/data/z/system/install";
mkpath($systeminstall);
my $stub_sis_name = $systeminstall."/".$stub_sis_name;
# Create stub SIS.
- system ("$epocroot/epoc32/tools/makesis -s $pkgoutput $stub_sis_name");
+ system ("${epocroot}epoc32/tools/makesis -s $pkgoutput $stub_sis_name");
} else {
if ($certtext eq "Self Signed"
&& !@certificates
@@ -346,7 +351,7 @@ if($stub) {
# Create SIS.
# The 'and' is because system uses 0 to indicate success.
if($epocroot) {
- system ("$epocroot/epoc32/tools/makesis $pkgoutput $unsigned_sis_name") and die ("ERROR: makesis failed");
+ system ("${epocroot}epoc32/tools/makesis $pkgoutput $unsigned_sis_name") and die ("ERROR: makesis failed");
} else {
system ("makesis $pkgoutput $unsigned_sis_name") and die ("ERROR: makesis failed");
}
diff --git a/bin/elf2e32_qtwrapper b/bin/elf2e32_qtwrapper
index 694d54a..a3a4065 100755
--- a/bin/elf2e32_qtwrapper
+++ b/bin/elf2e32_qtwrapper
@@ -1,145 +1,3 @@
-#!/usr/bin/perl -w
-
-# A script to get around some shortcomings in elf2e32, namely:
-# - Returning 0 even when there are errors.
-# - Excluding symbols from the dso file even when they are present in the ELF file.
-# - Including symbols in the the dso file even when they are not present in the ELF file.
-# - Overwriting the old dso file even when there are no changes (increases build time).
-
-use File::Copy;
-
-my @args = ();
-my @definput;
-my @defoutput;
-my @dso;
-my @tmpdso;
-foreach (@ARGV) {
- if (/^--definput/o) {
- @definput = split('=', $_);
- } elsif (/^--defoutput/o) {
- @defoutput = split('=', $_);
- } elsif (/^--dso/o) {
- @dso = split('=', $_);
- } elsif (/^--tmpdso/o) {
- @tmpdso = split('=', $_);
- $tmpdso[0] = "--dso";
- } else {
- push(@args, $_);
- }
-}
-
-@definput = () if (!@definput || ! -e $definput[1]);
-
-if (@dso && !@tmpdso || !@dso && @tmpdso) {
- print("--dso and --tmpdso must be used together.\n");
- exit 1;
-}
-
-my $buildingLibrary = (@defoutput && @dso) ? 1 : 0;
-
-my $fixupFile = "";
-my $runCount = 0;
-my $returnCode = 0;
-
-while (1) {
- if (++$runCount > 2) {
- print("Internal error in $0, link succeeded, but exports may be wrong.\n");
- last;
- }
-
- my $elf2e32Pipe;
- my $elf2e32Cmd = "elf2e32 @args"
- . " " . join("=", @definput)
- . " " . join("=", @defoutput)
- . " " . join("=", @tmpdso);
- open($elf2e32Pipe, "$elf2e32Cmd 2>&1 |") or die ("Could not run elf2e32");
-
- my %fixupSymbols;
- my $foundBrokenSymbols = 0;
- my $errors = 0;
- while (<$elf2e32Pipe>) {
- print;
- if (/Error:/io) {
- $errors = 1;
- } elsif (/symbol ([a-z0-9_]+) absent in the DEF file, but present in the ELF file/io) {
- $fixupSymbols{$1} = 1;
- $foundBrokenSymbols = 1;
- } elsif (/[0-9]+ Frozen Export\(s\) missing from the ELF file/io) {
- $foundBrokenSymbols = 1;
- }
- }
- close($elf2e32Pipe);
-
- if ($errors) {
- $returnCode = 1;
- last;
- }
-
- if ($buildingLibrary) {
- my $tmpDefFile;
- my $defFile;
- open($defFile, "< $defoutput[1]") or die("Could not open $defoutput[1]");
- open($tmpDefFile, "> $defoutput[1].tmp") or die("Could not open $defoutput[1].tmp");
- $fixupFile = "$defoutput[1].tmp";
- while (<$defFile>) {
- s/\r//;
- s/\n//;
- next if (/; NEW:/);
- if (/([a-z0-9_]+) @/i) {
- if (exists($fixupSymbols{$1})) {
- s/ ABSENT//;
- } elsif (s/; MISSING://) {
- s/$/ ABSENT/;
- }
- }
- print($tmpDefFile "$_\n");
- }
- close($defFile);
- close($tmpDefFile);
-
- $definput[1] = "$defoutput[1].tmp";
-
- if (!$foundBrokenSymbols || $errors) {
- last;
- }
-
- print("Rerunning elf2e32 due to DEF file / ELF file mismatch\n");
- } else {
- last;
- }
-};
-
-if ($fixupFile) {
- unlink($defoutput[1]);
- move($fixupFile, $defoutput[1]);
-}
-
-exit $returnCode if ($returnCode != 0);
-
-if ($buildingLibrary) {
- my $differenceFound = 0;
-
- if (-e $dso[1]) {
- my $dsoFile;
- my $tmpdsoFile;
- my $dsoBuf;
- my $tmpdsoBuf;
- open($dsoFile, "< $dso[1]") or die("Could not open $dso[1]");
- open($tmpdsoFile, "< $tmpdso[1]") or die("Could not open $tmpdso[1]");
- binmode($dsoFile);
- binmode($tmpdsoFile);
- while(read($dsoFile, $dsoBuf, 4096) && read($tmpdsoFile, $tmpdsoBuf, 4096)) {
- if ($dsoBuf ne $tmpdsoBuf) {
- $differenceFound = 1;
- }
- }
- close($tmpdsoFile);
- close($dsoFile);
- } else {
- $differenceFound = 1;
- }
-
- if ($differenceFound) {
- copy($tmpdso[1], $dso[1]);
- }
-}
+#!/bin/sh
+scriptpath=`dirname $0`
+perl $scriptpath/elf2e32_qtwrapper.pl "$@"
diff --git a/bin/elf2e32_qtwrapper.bat b/bin/elf2e32_qtwrapper.bat
new file mode 100644
index 0000000..52910df
--- /dev/null
+++ b/bin/elf2e32_qtwrapper.bat
@@ -0,0 +1,3 @@
+@echo off
+set scriptpath=%~dp0
+perl %scriptpath%elf2e32_qtwrapper.pl %*
diff --git a/bin/elf2e32_qtwrapper.pl b/bin/elf2e32_qtwrapper.pl
new file mode 100755
index 0000000..4eeb098
--- /dev/null
+++ b/bin/elf2e32_qtwrapper.pl
@@ -0,0 +1,225 @@
+#!/usr/bin/perl -w
+
+# A script to get around some shortcomings in elf2e32, namely:
+# - Returning 0 even when there are errors.
+# - Excluding symbols from the dso file even when they are present in the ELF file.
+# - Including symbols in the the dso file even when they are not present in the ELF file.
+# - Overwriting the old dso file even when there are no changes (increases build time).
+
+use File::Copy;
+
+my @args = ();
+my @definput;
+my @defoutput;
+my @dso;
+my @tmpdso;
+foreach (@ARGV) {
+ if (/^--definput/o) {
+ @definput = split('=', $_);
+ } elsif (/^--defoutput/o) {
+ @defoutput = split('=', $_);
+ } elsif (/^--dso/o) {
+ @dso = split('=', $_);
+ } elsif (/^--tmpdso/o) {
+ @tmpdso = split('=', $_);
+ $tmpdso[0] = "--dso";
+ } else {
+ push(@args, $_);
+ }
+}
+
+@definput = () if (!@definput || ! -e $definput[1]);
+
+if (@dso && !@tmpdso || !@dso && @tmpdso) {
+ print("--dso and --tmpdso must be used together.\n");
+ exit 1;
+}
+
+my $buildingLibrary = (@defoutput && @dso) ? 1 : 0;
+
+my $fixupFile = "";
+my $runCount = 0;
+my $returnCode = 0;
+
+while (1) {
+ if (++$runCount > 2) {
+ print("Internal error in $0, link succeeded, but exports may be wrong.\n");
+ last;
+ }
+
+ my $elf2e32Pipe;
+ my $elf2e32Cmd = "elf2e32 @args"
+ . " " . join("=", @definput)
+ . " " . join("=", @defoutput)
+ . " " . join("=", @tmpdso);
+ open($elf2e32Pipe, "$elf2e32Cmd 2>&1 |") or die ("Could not run elf2e32");
+
+ my %fixupSymbols;
+ my $foundBrokenSymbols = 0;
+ my $errors = 0;
+ while (<$elf2e32Pipe>) {
+ print;
+ if (/Error:/io) {
+ $errors = 1;
+ } elsif (/symbol ([a-z0-9_]+) absent in the DEF file, but present in the ELF file/io) {
+ $fixupSymbols{$1} = 1;
+ $foundBrokenSymbols = 1;
+ } elsif (/[0-9]+ Frozen Export\(s\) missing from the ELF file/io) {
+ $foundBrokenSymbols = 1;
+ }
+ }
+ close($elf2e32Pipe);
+
+ if ($errors) {
+ $returnCode = 1;
+ last;
+ }
+
+ if ($buildingLibrary && $runCount == 1) {
+ my $tmpDefFile;
+ my $newDefFile;
+ my $origDefFile;
+ my $savedNewDefFileLine = "";
+ if ($definput[1]) {
+ open($origDefFile, "< $definput[1]") or die("Could not open $definput[1]");
+ }
+ open($newDefFile, "< $defoutput[1]") or die("Could not open $defoutput[1]");
+ open($tmpDefFile, "> $defoutput[1].tmp") or die("Could not open $defoutput[1].tmp");
+ print($tmpDefFile "EXPORTS\n");
+ $fixupFile = "$defoutput[1].tmp";
+ while (1) {
+ my $origDefLine;
+ my $origSym;
+ my $origOrdinal;
+ my $origExtraData;
+ my $newDefLine;
+ my $newSym;
+ my $newOrdinal;
+ my $newExtraData;
+ my $defLine;
+ my $sym;
+ my $ordinal;
+ my $extraData;
+ if ($definput[1]) {
+ # Read from original def file, and skip non-symbol lines
+ while (1) {
+ $origDefLine = <$origDefFile>;
+ if (defined($origDefLine)) {
+ $origDefLine =~ s/[\n\r]//;
+ if ($origDefLine =~ /([a-z0-9_]+) +\@ ([0-9]+) (.*)/i) {
+ $origSym = $1;
+ $origOrdinal = $2;
+ $origExtraData = $3;
+ last;
+ }
+ } else {
+ last;
+ }
+ }
+ }
+
+ if ($savedNewDefFileLine) {
+ # This happens if the new def file was missing an entry.
+ $newDefLine = $savedNewDefFileLine;
+ $newDefLine =~ /([a-z0-9_]+) +\@ ([0-9]+) (.*)/i or die("$0: Shouldn't happen");
+ $newSym = $1;
+ $newOrdinal = $2;
+ $newExtraData = $3;
+ } else {
+ # Read from new def file, and skip non-symbol lines
+ while (1) {
+ $newDefLine = <$newDefFile>;
+ if (defined($newDefLine)) {
+ $newDefLine =~ s/[\n\r]//;
+ if ($newDefLine =~ /([a-z0-9_]+) +\@ ([0-9]+) (.*)/i) {
+ $newSym = $1;
+ $newOrdinal = $2;
+ $newExtraData = $3;
+ last;
+ }
+ } else {
+ last;
+ }
+ }
+ }
+ $savedNewDefFileLine = "";
+ last if (!defined($origDefLine) && !defined($newDefLine));
+
+ if (defined($origOrdinal) && (!defined($newOrdinal) || $origOrdinal != $newOrdinal)) {
+ # If the symbol is missing from the new def file, use the original symbol.
+ $savedNewDefFileLine = $newDefLine;
+ $defLine = $origDefLine;
+ $sym = $origSym;
+ $ordinal = $origOrdinal;
+ $extraData = $origExtraData;
+ } else {
+ $defLine = $newDefLine;
+ $sym = $newSym;
+ $ordinal = $newOrdinal;
+ if ($newExtraData =~ /ABSENT/) {
+ # Special case to keep "DATA [0-9]+" data in absent entries.
+ $extraData = $origExtraData;
+ } else {
+ $extraData = $newExtraData;
+ }
+ }
+ if (exists($fixupSymbols{$sym})) {
+ # Fix symbols that have returned after first being marked ABSENT.
+ $extraData =~ s/ ABSENT//;
+ } elsif ($defLine =~ s/; MISSING://) {
+ # Auto-absent symbols.
+ $extraData .= " ABSENT";
+ }
+ print($tmpDefFile "\t$sym \@ $ordinal $extraData\n");
+ }
+ print($tmpDefFile "\n");
+ close($origDefFile) if ($definput[1]);
+ close($newDefFile);
+ close($tmpDefFile);
+
+ $definput[1] = "$defoutput[1].tmp";
+
+ if (!$foundBrokenSymbols || $errors) {
+ last;
+ }
+
+ print("Rerunning elf2e32 due to DEF file / ELF file mismatch\n");
+ } else {
+ last;
+ }
+};
+
+if ($fixupFile) {
+ unlink($defoutput[1]);
+ move($fixupFile, $defoutput[1]);
+}
+
+exit $returnCode if ($returnCode != 0);
+
+if ($buildingLibrary) {
+ my $differenceFound = 0;
+
+ if (-e $dso[1]) {
+ my $dsoFile;
+ my $tmpdsoFile;
+ my $dsoBuf;
+ my $tmpdsoBuf;
+ open($dsoFile, "< $dso[1]") or die("Could not open $dso[1]");
+ open($tmpdsoFile, "< $tmpdso[1]") or die("Could not open $tmpdso[1]");
+ binmode($dsoFile);
+ binmode($tmpdsoFile);
+ while(read($dsoFile, $dsoBuf, 4096) && read($tmpdsoFile, $tmpdsoBuf, 4096)) {
+ if ($dsoBuf ne $tmpdsoBuf) {
+ $differenceFound = 1;
+ }
+ }
+ close($tmpdsoFile);
+ close($dsoFile);
+ } else {
+ $differenceFound = 1;
+ }
+
+ if ($differenceFound) {
+ copy($tmpdso[1], $dso[1]);
+ }
+}
diff --git a/bin/patch_capabilities.pl b/bin/patch_capabilities.pl
index 06ab116..5230480 100755
--- a/bin/patch_capabilities.pl
+++ b/bin/patch_capabilities.pl
@@ -269,6 +269,9 @@ if (@ARGV)
if (@capabilitiesSpecified)
{
$commandToExecute = sprintf($baseCommandToExecute, join(" ", @capabilitiesSpecified));
+ $executeNeeded = 1;
+ my $capString = join(" ", @capabilitiesSpecified);
+ print ("Patching: Patching the the Vendor ID to 0 and the capabilities used to: \"$capString\" in \"$binaryBaseName\".\n");
} else {
# Test which capabilities are present and then restrict them to the allowed set.
# This avoid raising the capabilities of apps that already have none.
diff --git a/bin/syncqt b/bin/syncqt
index faa3575..99562fb 100755
--- a/bin/syncqt
+++ b/bin/syncqt
@@ -694,10 +694,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", "qatomic_arm.h", "qatomic_armv7.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;
-# Force generation of forwarding header for qconfig.h if (and only if) we can't
-# find the header by normal means.
-%inject_headers = ( "$basedir/src/corelib/global" => ( "*qconfig.h" ) ) unless (-e "$basedir/src/corelib/global/qconfig.h");
+my %inject_headers = ( "$basedir/src/corelib/global" => ( "qconfig.h" ) ); # all from build dir
foreach my $lib (@modules_to_sync) {
#iteration info
@@ -799,7 +796,12 @@ foreach my $lib (@modules_to_sync) {
#calc files and "copy" them
foreach my $subdir (@subdirs) {
my @headers = findFiles($subdir, "^[-a-z0-9_]*\\.h\$" , 0);
- push @headers, $inject_headers{$subdir} if (defined $inject_headers{$subdir});
+ if (defined $inject_headers{$subdir}) {
+ foreach my $if ($inject_headers{$subdir}) {
+ @headers = grep(!/^\Q$if\E$/, @headers); #in case we configure'd previously
+ push @headers, "*".$if;
+ }
+ }
foreach my $header (@headers) {
my $shadow = ($header =~ s/^\*//);
$header = 0 if($header =~ /^ui_.*.h/);
@@ -877,7 +879,7 @@ foreach my $lib (@modules_to_sync) {
@headers = ( "$out_basedir/include/$lib/private/$header" );
}
foreach(@headers) { #sync them
- $header_copies++ if(syncHeader($_, $iheader, $copy_headers, $ts));
+ $header_copies++ if(syncHeader($_, $iheader, $copy_headers && !$shadow, $ts));
}
if($public_header) {
diff --git a/config.tests/mac/coreservices/coreservices.mm b/config.tests/mac/coreservices/coreservices.mm
new file mode 100644
index 0000000..0091e49
--- /dev/null
+++ b/config.tests/mac/coreservices/coreservices.mm
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** 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 <CoreServices/CoreServices.h>
+
+int main()
+{
+ FSRef ref;
+ return 0;
+}
diff --git a/config.tests/mac/coreservices/coreservices.pro b/config.tests/mac/coreservices/coreservices.pro
new file mode 100644
index 0000000..c9bf8ec
--- /dev/null
+++ b/config.tests/mac/coreservices/coreservices.pro
@@ -0,0 +1,3 @@
+SOURCES = coreservices.mm
+LIBS += -framework CoreServices
+CONFIG -= app_bundle qt
diff --git a/config.tests/mac/corewlan/corewlan.pro b/config.tests/mac/corewlan/corewlan.pro
index 8451af3..a9c2560 100644
--- a/config.tests/mac/corewlan/corewlan.pro
+++ b/config.tests/mac/corewlan/corewlan.pro
@@ -1,3 +1,3 @@
-SOURCES = corewlantest.mm
+OBJECTIVE_SOURCES = corewlantest.mm
LIBS += -framework CoreWLAN -framework Foundation
CONFIG -= app_bundle qt
diff --git a/config.tests/symbian/audio/audio.pro b/config.tests/symbian/audio/audio.pro
index b2a1986..b496341 100644
--- a/config.tests/symbian/audio/audio.pro
+++ b/config.tests/symbian/audio/audio.pro
@@ -6,4 +6,5 @@ INCLUDEPATH += $${EPOCROOT}epoc32/include/mmf/common
INCLUDEPATH += $${EPOCROOT}epoc32/include/platform
LIBS += -lmmfdevsound
+CONFIG -= qt
QT =
diff --git a/config.tests/symbian/simple/simple.pro b/config.tests/symbian/simple/simple.pro
index fa086c9..9c60d62 100644
--- a/config.tests/symbian/simple/simple.pro
+++ b/config.tests/symbian/simple/simple.pro
@@ -1,4 +1,5 @@
TEMPLATE = app
+CONFIG -= qt
QT =
SOURCES += main.cpp
diff --git a/config.tests/unix/doubleformat/doubleformattest.cpp b/config.tests/unix/doubleformat/doubleformattest.cpp
index 8e83251..2c51d0c 100644
--- a/config.tests/unix/doubleformat/doubleformattest.cpp
+++ b/config.tests/unix/doubleformat/doubleformattest.cpp
@@ -44,8 +44,8 @@
LE: strings | grep 0123ABCD0123ABCD
BE: strings | grep DCBA3210DCBA3210
-LE arm-swaped-dword-order: strings | grep ABCD0123ABCD0123
-BE arm-swaped-dword-order: strings | grep 3210DCBA3210DCBA (untested)
+LE arm-swapped-dword-order: strings | grep ABCD0123ABCD0123
+BE arm-swapped-dword-order: strings | grep 3210DCBA3210DCBA (untested)
tested on x86, arm-le (gp), aix
diff --git a/config.tests/unix/opengldesktop/opengldesktop.cpp b/config.tests/unix/opengldesktop/opengldesktop.cpp
new file mode 100644
index 0000000..969767c
--- /dev/null
+++ b/config.tests/unix/opengldesktop/opengldesktop.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 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 <GL/gl.h>
+
+int main(int, char **)
+{
+ glBegin(GL_TRIANGLES);
+ glVertex2f(20.0f, 10.0f);
+ glVertex2f(10.0f, 30.0f);
+ glVertex2f(20.0f, 50.0f);
+ glEnd();
+ return 0;
+}
diff --git a/config.tests/unix/opengldesktop/opengldesktop.pro b/config.tests/unix/opengldesktop/opengldesktop.pro
new file mode 100644
index 0000000..ac70ca3
--- /dev/null
+++ b/config.tests/unix/opengldesktop/opengldesktop.pro
@@ -0,0 +1,9 @@
+SOURCES = opengldesktop.cpp
+INCLUDEPATH += $$QMAKE_INCDIR_OPENGL
+
+for(p, QMAKE_LIBDIR_OPENGL) {
+ exists($$p):LIBS += -L$$p
+}
+
+CONFIG -= qt
+LIBS += $$QMAKE_LIBS_OPENGL
diff --git a/configure b/configure
index bf81e26..875fef4 100755
--- a/configure
+++ b/configure
@@ -186,9 +186,12 @@ fi
PLATFORM_X11=no
PLATFORM_MAC=no
-PLATFORM_QWS=no
+PLATFORM_QWS=maybe
+PLATFORM_QPA=maybe
+BUILD_ON_MAC=no;
+[ -d /System/Library/Frameworks/Carbon.framework ] && BUILD_ON_MAC=yes
-if [ -f "$relpath"/src/gui/kernel/qapplication_mac.mm ] && [ -d /System/Library/Frameworks/Carbon.framework ]; then
+if [ -f "$relpath"/src/gui/kernel/qapplication_mac.mm ] && [ $BUILD_ON_MAC = "yes" ]; then
# Qt/Mac
# ~ the Carbon SDK exists
# ~ src/gui/base/qapplication_mac.cpp is present
@@ -283,6 +286,22 @@ earlyArgParse()
VAL=$1
fi
;;
+ -embedded-lite|-qpa)
+ VAR=qpa
+ # this option may or may not be followed by an argument
+ if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
+ VAL=auto
+ else
+ shift;
+ VAL=$1
+ fi
+ ;;
+ -nacl)
+ shift;
+ VAR=nacl
+ VAL=$1
+ ;;
+
-h|help|--help|-help)
if [ "$VAL" = "yes" ]; then
OPT_HELP="$VAL"
@@ -319,12 +338,36 @@ earlyArgParse()
PLATFORM_X11=no
PLATFORM_MAC=no
PLATFORM_QWS=yes
+ PLATFORM_QPA=no
fi
else
echo "No license exists to enable Qt for Embedded Linux. Disabling."
CFG_EMBEDDED=no
fi
;;
+ qpa)
+ CFG_EMBEDDED="$VAL"
+ if [ "$PLATFORM_QPA" != "no" ]; then
+ if [ "$PLATFORM_QPA" = "maybe" ]; then
+ PLATFORM_X11=no
+ PLATFORM_MAC=no
+ PLATFORM_QWS=no
+ PLATFORM_QPA=yes
+ fi
+ else
+ echo "No license exists to enable Qt QPA. Disabling."
+ CFG_EMBEDDED=no
+ fi
+ ;;
+ nacl)
+ echo "Using NaCl at $VAL."
+ PLATFORM_X11=no
+ PLATFORM_MAC=no
+ PLATFORM_QWS=no
+ CFG_NACL_PATH=$VAL
+ CFG_EMBEDDED=nacl
+ ;;
+
developer-build)
CFG_DEV="yes"
;;
@@ -383,6 +426,7 @@ elif [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes"
elif [ $COMMERCIAL_USER = "yes" ]; then
# one of commercial editions
[ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
+ [ "$PLATFORM_QPA" = "maybe" ] && PLATFORM_QPA=no
[ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS=no
# read in the license file
@@ -475,6 +519,7 @@ elif [ $COMMERCIAL_USER = "yes" ]; then
PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
;;
esac
+ ### EMBEDDED_QPA logic missing ###
case "$PlatformCode,$PLATFORM_MAC,$PLATFORM_QWS" in
X9,* | XC,* | XU,* | XW,* | XM,*)
# Qt All-OS
@@ -784,8 +829,10 @@ L_FLAGS=
RPATH_FLAGS=
l_FLAGS=
QCONFIG_FLAGS=
-XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++" or "symbian/linux-gcce"
+XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++" or "symbian-gcce"
XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
+XPLATFORM_SYMBIAN=no # Whether target platform is SYMBIAN (*symbian*)
+XPLATFORM_SYMBIAN_SBSV2=no # Whether target platform is SYMBIAN_SBSV2 (symbian-sbsv2)
PLATFORM=$QMAKESPEC
QT_CROSS_COMPILE=no
OPT_CONFIRM_LICENSE=no
@@ -905,6 +952,44 @@ if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
fi
#-------------------------------------------------------------------------------
+# Set Default NaCl options
+#-------------------------------------------------------------------------------
+if [ "$CFG_EMBEDDED" = "nacl" ]; then
+ echo "Setting NaCl options:"
+ echo "-static"
+ CFG_SHARED=no
+ echo "-qpa nacl"
+ PLATFORM_QPA=yes
+ echo "-fast"
+ OPT_FAST=yes
+ echo "-release"
+ CFG_DEBUG=no
+ echo "-qconfig minimal-system-dependencies"
+ CFG_QCONFIG=minimal-system-dependencies
+
+ if [ `uname` = "Linux" ]; then
+ I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/include"
+ L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/lib"
+ else
+ I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/include"
+ L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/lib"
+ fi
+
+ echo "-no-multimedia -no-webkit -no-phonon -no-nultimedia -no-mediaservices -no-xmlpatterns -no-script -no-sql-sqlite -nomake tests"
+ CFG_MULTIMEDIA=no
+ CFG_WEBKIT=no
+ CFG_PHONON=no
+ CFG_MULTIMEDIA=no
+ CFG_MEDIASERVICES=no
+ CFG_XMLPATTERNS=no
+ CFG_SCRIPT=no
+ CFG_SQLITE=no
+ CFG_SQL_sqlite=no
+ CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS tests"
+ QT_CONFIG="$QT_CONFIG nacl"
+fi
+
+#-------------------------------------------------------------------------------
# parse command line arguments
#-------------------------------------------------------------------------------
@@ -964,7 +1049,7 @@ while [ "$#" -gt 0 ]; do
;;
#Qt style options that pass an argument
-qconfig)
- if [ "$PLATFORM_QWS" != "yes" ]; then
+ if [ "$PLATFORM_QWS" != "yes" -a "$PLATFORM_QPA" != "yes" ]; then
echo
echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux."
echo
@@ -1004,6 +1089,20 @@ while [ "$#" -gt 0 ]; do
VAL=$1
fi
;;
+ -embedded-lite|-qpa)
+ VAR=qpa
+ # this option may or may not be followed by an argument
+ if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
+ VAL=auto
+ else
+ shift;
+ VAL=$1
+ fi
+ ;;
+ -nacl)
+ VAR=nacl
+ shift;
+ ;;
-opengl)
VAR=opengl
# this option may or may not be followed by an argument
@@ -1226,12 +1325,29 @@ while [ "$#" -gt 0 ]; do
PLATFORM_X11=no
PLATFORM_MAC=no
PLATFORM_QWS=yes
+ PLATFORM_QPA=no
fi
else
echo "No license exists to enable Qt for Embedded Linux. Disabling."
CFG_EMBEDDED=no
fi
;;
+ embedded-lite|qpa)
+ CFG_EMBEDDED="$VAL"
+ if [ "$PLATFORM_QPA" != "no" ]; then
+ if [ "$PLATFORM_QPA" = "maybe" ]; then
+ PLATFORM_X11=no
+ PLATFORM_MAC=no
+ PLATFORM_QWS=no
+ PLATFORM_QPA=yes
+ fi
+ else
+ echo "No license exists to enable Qt QPA. Disabling."
+ CFG_EMBEDDED=no
+ fi
+ ;;
+ nacl)
+ ;;
sse)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_SSE="$VAL"
@@ -1339,6 +1455,8 @@ while [ "$#" -gt 0 ]; do
PLATFORM_MAC=no
elif [ "$PLATFORM_QWS" = "yes" ]; then
PLATFORM_QWS=no
+ elif [ "$PLATFORM_QPA" = "yes" ]; then
+ PLATFORM_QPA=no
fi
if [ "$CFG_FRAMEWORK" = "auto" ]; then
CFG_FRAMEWORK=no
@@ -1478,6 +1596,8 @@ while [ "$#" -gt 0 ]; do
xplatform)
XPLATFORM="$VAL"
case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
+ case "$XPLATFORM" in *symbian*) XPLATFORM_SYMBIAN=yes;; esac
+ case "$XPLATFORM" in symbian-sbsv2) XPLATFORM_SYMBIAN_SBSV2=yes;; esac
;;
debug-and-release)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
@@ -1556,8 +1676,7 @@ while [ "$#" -gt 0 ]; do
fi
;;
gif)
- [ "$VAL" = "qt" ] && VAL=auto
- if [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
+ if [ "$VAL" = "no" ]; then
CFG_GIF="$VAL"
else
UNKNOWN_OPT=yes
@@ -2263,6 +2382,11 @@ if [ "$CFG_GUI" = "no" ]; then
CFG_QT3SUPPORT="no"
fi
+#disable Qt3Support for Lighthouse
+if [ "$PLATFORM_QPA" = "yes" ]; then
+ CFG_QT3SUPPORT="no"
+fi
+
# update QT_CONFIG to show our current predefined configuration
case "$CFG_QCONFIG" in
minimal|small|medium|large|full)
@@ -2333,7 +2457,7 @@ if [ "$OPT_SHADOW" = "yes" ]; then
[ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
fi
-if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
+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 "Qt can be built in release mode with separate debug information, so"
@@ -2429,14 +2553,8 @@ if [ "$OPT_SHADOW" = "yes" ]; then
ShadowMkspecs()
{
rm -rf "$outpath/mkspecs/$1"
- if [ "$UNAME_SYSTEM" = "Linux" ]; then
- # This works with GNU coreutils, and is needed for ScratchBox
- cp -rs "$relpath/mkspecs/$1" "$outpath/mkspecs/$1"
- else
- # A simple "cp -rs" doesn't work on Mac. :(
- find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
- find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | xargs -n 1 -I % ln -s "$relpath/%" "$outpath/%"
- fi
+ find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p
+ find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done
}
# Special case for mkspecs/features directory.
@@ -2458,7 +2576,7 @@ if [ "$OPT_SHADOW" = "yes" ]; then
fi
# symlink fonts to be able to run application from build directory
-if [ "$PLATFORM_QWS" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
+if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
if [ "$PLATFORM" = "$XPLATFORM" ]; then
mkdir -p "${outpath}/lib"
ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
@@ -2498,6 +2616,7 @@ fi ### help
#-------------------------------------------------------------------------------
[ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED=auto
+[ "$PLATFORM_QPA" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED=auto
if [ "$CFG_EMBEDDED" != "no" ]; then
case "$UNAME_SYSTEM:$UNAME_RELEASE" in
Darwin:*)
@@ -2572,6 +2691,7 @@ if [ "$CFG_EMBEDDED" != "no" ]; then
echo "Qt for Embedded Linux is not supported on this platform. Disabling."
CFG_EMBEDDED=no
PLATFORM_QWS=no
+ PLATFORM_QPA=no
;;
esac
fi
@@ -2740,7 +2860,7 @@ if [ -z "$PLATFORM" ]; then
esac
fi
-if [ "$PLATFORM_QWS" = "yes" ]; then
+if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
CFG_SM=no
PLATFORMS=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
else
@@ -2750,6 +2870,8 @@ fi
[ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
+case "$XPLATFORM" in *symbian*) XPLATFORM_SYMBIAN=yes;; esac
+case "$XPLATFORM" in symbian-sbsv2) XPLATFORM_SYMBIAN_SBSV2=yes;; esac
if [ -d "$PLATFORM" ]; then
QMAKESPEC="$PLATFORM"
@@ -3028,7 +3150,7 @@ 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
+elif [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
CFG_ARCH=symbian
elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
CFG_ARCH=$CFG_HOST_ARCH
@@ -3068,9 +3190,9 @@ if [ "$CFG_HOST_ARCH" != "$CFG_ARCH" ]; then
fi
if [ "$OPT_VERBOSE" = "yes" ]; then
- echo "Target architecture: '$CFG_ARCH'"
- if [ "$PLATFORM_QWS" = "yes" ]; then
- echo "Host architecture: '$CFG_HOST_ARCH'"
+ echo "System architecture: '$CFG_ARCH'"
+ if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
+ echo "Host architecture: '$CFG_HOST_ARCH'"
fi
fi
@@ -3166,7 +3288,7 @@ QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" |
TEST_COMPILER="$CXX"
[ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
-if [ "$XPLATFORM" != "symbian-sbsv2" ]; then
+if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
#for Symbian we don't need this checking
if [ -z "$TEST_COMPILER" ]; then
echo "ERROR: Cannot set the compiler for the configuration tests"
@@ -3174,6 +3296,9 @@ if [ "$XPLATFORM" != "symbian-sbsv2" ]; then
fi
fi
+if [ "$CFG_EMBEDDED" = "nacl" ]; then
+ TEST_COMPILER="nacl-gcc"
+fi
# auto-detect precompiled header support
if [ "$CFG_PRECOMPILE" = "auto" ]; then
@@ -3328,24 +3453,25 @@ fi
if [ -z "$QT_INSTALL_PREFIX" ]; 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}"
+ 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
- elif [ -d "$EPOCROOT" ]; then
- case "$XPLATFORM" in *symbian*)
- QT_INSTALL_PREFIX="$EPOCROOT/epoc32/"
- QT_INSTALL_LIBS="$EPOCROOT/epoc32/release/armv5/lib/"
- ;;
- esac
+ elif [ -d "$EPOCROOT" ] && [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
+ QT_INSTALL_PREFIX="$EPOCROOT/epoc32/"
+ QT_INSTALL_LIBS="$EPOCROOT/epoc32/release/armv5/lib/"
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"`
-if echo $XPLATFORM | grep symbian > /dev/null; then
+if [ "$XPLATFORM_SYMBIAN" = "yes" ]; 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=
@@ -3541,14 +3667,14 @@ Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir
[-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
[-plugin-sql-<driver>] [-system-sqlite] [-no-qt3support] [-qt3support]
[-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
- [-qt-zlib] [-system-zlib] [-no-gif] [-qt-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
+ [-qt-zlib] [-system-zlib] [-no-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
[-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
[-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
[-nomake <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
[-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]
+ [-no-sse3] [-no-ssse3] [-no-sse4.1] [-no-sse4.2] [-no-avx] [-no-neon]
[-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]
@@ -3568,7 +3694,7 @@ Installation options:
-prefix <dir> ...... This will install everything relative to <dir>
(default $QT_INSTALL_PREFIX)
EOF
-if [ "$PLATFORM_QWS" = "yes" ]; then
+if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
cat <<EOF
-hostprefix [dir] .. Tools and libraries needed when developing
@@ -3647,7 +3773,7 @@ Configure options:
+ -largefile ......... Enables Qt to access files larger than 4 GB.
EOF
-if [ "$PLATFORM_QWS" = "yes" ]; then
+if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
EXCN="*"
EXCY=" "
else
@@ -3752,6 +3878,7 @@ cat << EOF
-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.
+ -no-neon ........... Do not compile with use of NEON instructions.
-qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
-qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
@@ -3769,8 +3896,6 @@ Third Party Libraries:
See http://www.gzip.org/zlib
-no-gif ............ Do not compile GIF reading support.
- * -qt-gif ............ Compile GIF reading support.
- See also src/gui/image/qgifhandler_p.h
-no-libtiff ........ Do not compile TIFF support.
-qt-libtiff ........ Use the libtiff bundled with Qt.
@@ -3866,7 +3991,7 @@ else
SBN="*"
fi
-if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
+if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
cat << EOF
@@ -4096,7 +4221,7 @@ Qt/Mac only:
EOF
fi
-if [ "$PLATFORM_QWS" = "yes" ]; then
+if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
cat << EOF
Qt for Embedded Linux only:
@@ -4111,6 +4236,10 @@ Qt for Embedded Linux only:
proper license for this switch to work.
Example values for <arch>: arm mips x86 generic
+ -qpa <arch> ......... This will enable the QPA build.
+ Example values for <arch>: arm mips x86 generic
+ QPA is a window system agnostic implementation of Qt.
+
-armfpa ............. Target platform uses the ARM-FPA floating point format.
-no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
@@ -4183,13 +4312,11 @@ Qt for Embedded Linux only:
-iwmmxt ............ Compile using the iWMMXt instruction set
(available on some XScale CPUs).
-
- -no-neon ........... Do not compile with use of NEON instructions.
EOF
fi
-if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
+if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
if [ "$CFG_GLIB" = "no" ]; then
GBY=" "
GBN="+"
@@ -4204,7 +4331,7 @@ if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
EOF
fi
-case "$XPLATFORM" in *symbian*)
+if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
cat << EOF
Qt for Symbian only:
@@ -4216,9 +4343,7 @@ Qt for Symbian only:
-no-usedeffiles .... Disable the usage of DEF files.
* -usedeffiles ....... Enable the usage of DEF files.
EOF
-;;
-esac
-
+fi
[ "x$ERROR" = "xyes" ] && exit 1
exit 0
fi # Help
@@ -4228,12 +4353,12 @@ fi # Help
# LICENSING, INTERACTIVE PART
# -----------------------------------------------------------------------------
-if [ "$PLATFORM_QWS" = "yes" ]; then
+if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
Platform="Qt for Embedded Linux"
+elif [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
+ Platform="Qt for Symbian"
elif [ "$PLATFORM_MAC" = "yes" ]; then
Platform="Qt for Mac OS X"
-elif echo "$XPLATFORM" | grep "symbian" > /dev/null ; then
- Platform="Qt for Symbian"
elif [ "$XPLATFORM_MINGW" = "yes" ]; then
Platform="Qt for Windows"
elif [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ]; then
@@ -4568,27 +4693,37 @@ fi
# $2: optional transformation
# relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
# is where the resulting variable is written to
+# Assumes that the optional transformation produces the same variable name for each hit
setBootstrapVariable()
{
getQMakeConf | $AWK '/^('"$1"')[^_A-Z0-9]/ { print $0; }' | ( [ -n "$2" ] && sed "$2" ; [ -z "$2" ] && cat ) | $AWK '
+BEGIN {
+ variable = ""
+ combinedValue = ""
+}
{
- varLength = index($0, "=") - 1
- valStart = varLength + 2
- if (substr($0, varLength, 1) == "+") {
- varLength = varLength - 1
- valStart = valStart + 1
+ valStart = index($0, "=") + 1
+
+ append = 0
+ if (substr($0, valStart - 2, 1) == "+") {
+ append = 1
+ }
+
+ variable = substr($0, 0, valStart - 2 - append)
+ value = substr($0, valStart)
+ gsub("[ \t]+", "", variable)
+ gsub("^[ \t]+", "", value)
+ gsub("[ \t]+$", "", value)
+
+ if (append == 1 && length(combinedValue) > 0) {
+ combinedValue = combinedValue " " value
+ } else {
+ combinedValue = value
}
- var = substr($0, 0, varLength)
- gsub("[ \t]+", "", var)
- val = substr($0, valStart)
- printf "%s_%s = %s\n", var, NR, val
}
END {
- if (length(var) > 0) {
- printf "%s =", var
- for (i = 1; i <= NR; ++i)
- printf " $(%s_%s)", var, i
- printf "\n"
+ if (length(combinedValue) > 0) {
+ printf "%s = %s\n", variable, combinedValue
}
}' >> "$mkfile"
}
@@ -4618,7 +4753,7 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
#mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
rm -rf mkspecs/default
- if echo "$XPLATFORM" | grep "symbian-sbsv2" > /dev/null ; then
+ if [ "$XPLATFORM_SYMBIAN_SBSV2" = "yes" ]; then
#Link is not supported for Symbian build system
cp -a mkspecs/`echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
else
@@ -4691,7 +4826,7 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
done
fi
- if [ "$PLATFORM_MAC" = "yes" ]; then
+ if [ "$BUILD_ON_MAC" = "yes" ]; then
echo "export MACOSX_DEPLOYMENT_TARGET = 10.4" >> "$mkfile"
echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
@@ -4870,33 +5005,12 @@ if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
fi
fi
-# detect zlib
-if [ "$CFG_ZLIB" = "no" ]; then
- # Note: Qt no longer support builds without zlib
- # So we force a "no" to be "auto" here.
- # If you REALLY really need no zlib support, you can still disable
- # it by doing the following:
- # add "no-zlib" to mkspecs/qconfig.pri
- # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
- #
- # There's no guarantee that Qt will build under those conditions
-
- CFG_ZLIB=auto
- ZLIB_FORCED=yes
-fi
-if [ "$CFG_ZLIB" = "auto" ]; then
- if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/zlib "zlib" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
- CFG_ZLIB=system
- else
- CFG_ZLIB=yes
- fi
-fi
-
[ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
-case "$XPLATFORM" in *symbian*)
+if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
QMakeVar set styles "windows s60" #overwrite previous default
CFG_LIBFREETYPE=no
+ CFG_ZLIB=yes
if [ "$CFG_LARGEFILE" = auto ]; then
CFG_LARGEFILE=no
@@ -4911,7 +5025,7 @@ case "$XPLATFORM" in *symbian*)
exit 1
fi
- if ! echo $XPLATFORM | grep symbian-sbsv2 > /dev/null; then
+ if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
# Raptor does not support configure tests.
# the main commands needed to compile;
@@ -4935,8 +5049,29 @@ case "$XPLATFORM" in *symbian*)
exit 1;
fi
fi
- ;;
-esac
+fi
+
+# detect zlib
+if [ "$CFG_ZLIB" = "no" ]; then
+ # Note: Qt no longer support builds without zlib
+ # So we force a "no" to be "auto" here.
+ # If you REALLY really need no zlib support, you can still disable
+ # it by doing the following:
+ # add "no-zlib" to mkspecs/qconfig.pri
+ # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
+ #
+ # There's no guarantee that Qt will build under those conditions
+
+ CFG_ZLIB=auto
+ ZLIB_FORCED=yes
+fi
+if [ "$CFG_ZLIB" = "auto" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/zlib "zlib" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
+ CFG_ZLIB=system
+ else
+ CFG_ZLIB=yes
+ fi
+fi
if [ "$CFG_LARGEFILE" = "auto" ]; then
#Large files should be enabled for all Linux systems
@@ -4945,7 +5080,7 @@ fi
if [ "$CFG_S60" = "auto" ]; then
- if echo "$XPLATFORM" | grep symbian > /dev/null; then
+ if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
CFG_S60=yes
else
CFG_S60=no
@@ -4953,7 +5088,7 @@ if [ "$CFG_S60" = "auto" ]; then
fi
if [ "$CFG_QS60STYLE" = "auto" ]; then
- if echo "$XPLATFORM" | grep symbian > /dev/null; then
+ if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
CFG_QS60STYLE=qt
else
CFG_QS60STYLE=no
@@ -4961,7 +5096,7 @@ if [ "$CFG_QS60STYLE" = "auto" ]; then
fi
if [ "$CFG_SYMBIAN_DEFFILES" = "auto" ]; then
- if echo "$XPLATFORM" | grep symbian > /dev/null && [ "$CFG_DEV" = "no" ]; then
+ if [ "$XPLATFORM_SYMBIAN" = "yes" ] && [ "$CFG_DEV" = "no" ]; then
CFG_SYMBIAN_DEFFILES=yes
else
CFG_SYMBIAN_DEFFILES=no
@@ -5040,14 +5175,12 @@ fi
# detect accessibility
if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
- case "$XPLATFORM" in
- symbian*)
+ if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
# accessibility is currently unsupported
CFG_ACCESSIBILITY=no
- ;;
- *)
+ else
CFG_ACCESSIBILITY=yes
- esac
+ fi
fi
# auto-detect SQL-modules support
@@ -5259,15 +5392,13 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do
;;
sqlite)
if [ "$CFG_SQL_sqlite" = "auto" ]; then # the default
- case "$XPLATFORM" in
- symbian*)
+ if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
# 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
fi
if [ "$CFG_SQL_sqlite" != "no" ]; then
SQLITE_AUTODETECT_FAILED="no"
@@ -5347,7 +5478,7 @@ fi
# auto-detect iconv(3) support
if [ "$CFG_ICONV" != "no" ]; then
- if [ "$PLATFORM_QWS" = "yes" ]; then
+ if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
CFG_ICONV=no
elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/iconv" "POSIX iconv" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
CFG_ICONV=yes
@@ -5409,8 +5540,8 @@ if [ "$PLATFORM_MAC" = "yes" -a ! -z "$QT_NAMESPACE" ]; then
QT_NAMESPACE_MAC_CRC=`"$mactests/crc.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/mac/crc $QT_NAMESPACE $L_FLAGS $I_FLAGS $l_FLAGS`
fi
-# X11/QWS
-if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
+# X11/QWS/Lighthouse
+if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
# auto-detect Glib support
if [ "$CFG_GLIB" != "no" ]; then
@@ -5544,7 +5675,7 @@ if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
fi
fi
fi
-fi # X11/QWS
+fi # X11/QWS/Lighthouse
# X11
if [ "$PLATFORM_X11" = "yes" ]; then
@@ -5958,6 +6089,84 @@ if [ "$PLATFORM_MAC" = "yes" ]; then
fi
fi
+
+if [ "$PLATFORM_QPA" = "yes" ]; then
+ # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es2 = OpenGL ES 2.x)
+ if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
+ CFG_OPENGL=desktop
+ elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ CFG_OPENGL=es2
+ elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ CFG_OPENGL=es1
+ else
+ if [ "$CFG_OPENGL" = "yes" ]; then
+ echo "All the OpenGL functionality tests failed!"
+ echo " You might need to modify the include and library search paths by editing"
+ echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
+ echo " ${XQMAKESPEC}."
+ exit 1
+ fi
+ CFG_OPENGL=no
+ fi
+ elif [ "$CFG_OPENGL" = "es1" ]; then
+ # OpenGL ES 1.x
+ "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS
+ if [ $? != "0" ]; then
+ echo "The OpenGL ES 1.x functionality test failed!"
+ echo " You might need to modify the include and library search paths by editing"
+ echo " QMAKE_INCDIR_OPENGL_ES1, QMAKE_LIBDIR_OPENGL_ES1 and QMAKE_LIBS_OPENGL_ES1 in"
+ echo " ${XQMAKESPEC}."
+ exit 1
+ fi
+ elif [ "$CFG_OPENGL" = "es2" ]; then
+ #OpenGL ES 2.x
+ "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
+ if [ $? != "0" ]; then
+ echo "The OpenGL ES 2.0 functionality test failed!"
+ echo " You might need to modify the include and library search paths by editing"
+ echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
+ echo " ${XQMAKESPEC}."
+ exit 1
+ fi
+ elif [ "$CFG_OPENGL" = "desktop" ]; then
+ # Desktop OpenGL support
+ "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS
+ if [ $? != "0" ]; then
+ echo "The OpenGL functionality test failed!"
+ echo " You might need to modify the include and library search paths by editing"
+ echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
+ echo " ${XQMAKESPEC}."
+ exit 1
+ fi
+ fi
+
+ # auto-detect FontConfig support
+ if [ "$CFG_FONTCONFIG" != "no" ]; then
+ if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
+ QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
+ QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
+ else
+ QT_CFLAGS_FONTCONFIG=
+ QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
+ fi
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/fontconfig "FontConfig" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS $QT_CFLAGS_FONTCONFIG $QT_LIBS_FONTCONFIG; then
+ QT_CONFIG="$QT_CONFIG fontconfig"
+ QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
+ QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
+ CFG_LIBFREETYPE=system
+ fi
+ fi
+
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/mac/coreservices "CoreServices" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
+ QT_CONFIG="$QT_CONFIG coreservices"
+ else
+ QMakeVar add DEFINES QT_NO_CORESERVICES
+ fi
+
+fi
+
+
# QWS
if [ "$PLATFORM_QWS" = "yes" ]; then
@@ -5976,7 +6185,7 @@ if [ "$PLATFORM_QWS" = "yes" ]; then
CFG_EGL=auto
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
CFG_OPENGL=es2
- elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
CFG_OPENGL=es1
else
echo "All the OpenGL ES functionality tests failed!"
@@ -6012,6 +6221,9 @@ if [ "$PLATFORM_QWS" = "yes" ]; then
echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
exit 1
fi
+fi
+
+if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
# screen drivers
for screen in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
@@ -6138,10 +6350,10 @@ fi
if [ "$CFG_ENDIAN" = "auto" ]; then
if [ "$XPLATFORM_MINGW" = "yes" ]; then
CFG_ENDIAN="Q_LITTLE_ENDIAN"
- elif [ "$PLATFORM_MAC" = "yes" ]; then
- true #leave as auto
- elif [ "$XPLATFORM" = "symbian-sbsv2" ]; then
+ elif [ "$XPLATFORM_SYMBIAN_SBSV2" = "yes" ]; then
CFG_ENDIAN="Q_LITTLE_ENDIAN"
+ elif [ "$PLATFORM_MAC" = "yes" ] && [ "$XPLATFORM_SYMBIAN" = "no" ]; then
+ true #leave as auto
else
"$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
F="$?"
@@ -6195,7 +6407,7 @@ fi
if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
- if [ "$PLATFORM_QWS" != "yes" ]; then
+ if [ "$PLATFORM_QWS" != "yes" -o "$PLATFORM_QPA" = "yes" ]; then
CFG_DOUBLEFORMAT=normal
else
"$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
@@ -6227,7 +6439,7 @@ if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
fi
HAVE_STL=no
-if echo "$XPLATFORM" | grep symbian > /dev/null || "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
+if [ "$XPLATFORM_SYMBIAN" = "yes" ] || "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
HAVE_STL=yes
fi
@@ -6254,7 +6466,7 @@ if [ "$CFG_IPV6" != "no" ]; then
# Therefore for 4.7.1 and following we disable it until OpenC either supports it or we have the native Qt
# symbian socket engine.
#
- if echo "$XPLATFORM" | grep symbian > /dev/null; then
+ if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
CFG_IPV6=no
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
@@ -6369,7 +6581,7 @@ if [ "$CFG_GETIFADDRS" != "no" ]; then
fi
# detect OpenSSL
-if [ "$CFG_OPENSSL" != "no" ] && [ "$XPLATFORM" != "symbian-sbsv2" ]; then
+if [ "$CFG_OPENSSL" != "no" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; 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
@@ -6386,14 +6598,14 @@ if [ "$CFG_OPENSSL" != "no" ] && [ "$XPLATFORM" != "symbian-sbsv2" ]; then
fi
fi
else
- if [ "$CFG_OPENSSL" = "auto" ] && [ "$XPLATFORM" = "symbian-sbsv2" ]; then
+ if [ "$CFG_OPENSSL" = "auto" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "yes" ]; then
#OpenSSl should be enabled for Symbian release
CFG_OPENSSL=yes
fi
fi
# detect OpenVG support
-if [ "$CFG_OPENVG" != "no" ] && [ "$XPLATFORM" != "symbian-sbsv2" ]; then
+if [ "$CFG_OPENVG" != "no" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
if [ "$CFG_OPENVG" = "auto" ]; then
CFG_OPENVG=yes
@@ -6450,13 +6662,13 @@ if [ "$CFG_PTMALLOC" != "no" ]; then
QMakeVar add QMAKE_LFLAGS "$outpath/lib/libptmalloc3.a"
fi
-if [ "$CFG_ALSA" = "auto" ] && [ "$XPLATFORM" != "symbian-sbsv2" ]; then
+if [ "$CFG_ALSA" = "auto" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; 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
+elif [ "$XPLATFORM_SYMBIAN_SBSV2" = "yes" ]; then
# Disabled for Symbian release
CFG_ALSA=no
fi
@@ -6477,7 +6689,7 @@ elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
fi
if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
- if echo "$XPLATFORM" | grep symbian > /dev/null 2>&1; then
+ if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
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
@@ -6489,7 +6701,7 @@ 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
+elif [ "$CFG_LARGEFILE" != "no" ] && [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
echo "Warning: largefile support cannot be enabled for symbian."
CFG_LARGEFILE="no"
fi
@@ -6499,7 +6711,12 @@ fi
#-------------------------------------------------------------------------------
### fix this: user input should be validated in a loop
-if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PLATFORM_QWS" = "yes" ]; then
+if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
+ PROMPT_FOR_DEPTHS="yes"
+else
+ PROMPT_FOR_DEPTHS="no"
+fi
+if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PROMPT_FOR_DEPTHS" = "yes" ]; then
echo
echo "Choose pixel-depths to support:"
echo
@@ -6596,8 +6813,9 @@ if [ "$PLATFORM_MAC" = "yes" ]; then
fi
fi
-# but disable Cocoa if cross-building for mingw
+# but disable Cocoa if cross-building for mingw and symbian
[ "$XPLATFORM_MINGW" = "yes" ] && CFG_MAC_COCOA="no"
+[ "$XPLATFORM_SYMBIAN" = "yes" ] && CFG_MAC_COCOA="no"
# set the global Mac deployment target. This is overridden on an arch-by-arch basis
# in some cases, see code further down
@@ -6641,6 +6859,11 @@ else
QT_CONFIG="$QT_CONFIG accessibility"
fi
+# egl stuff does not belong in lighthouse, but rather in plugins
+if [ "$PLATFORM_QPA" = "yes" ]; then
+ CFG_EGL="no"
+fi
+
# enable egl
if [ "$CFG_EGL" = "no" ]; then
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
@@ -6675,11 +6898,9 @@ else
fi
# Disable OpenGL on Symbian.
-case "$XPLATFORM" in
- symbian*)
+if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
CFG_OPENGL="no"
- ;;
-esac
+fi
# enable opengl
if [ "$CFG_OPENGL" = "no" ]; then
@@ -6689,8 +6910,12 @@ else
fi
if [ "$CFG_OPENGL" = "es1" ] || [ "$CFG_OPENGL" = "es2" ]; then
- if [ "$PLATFORM_QWS" = "yes" ]; then
- QCONFIG_FLAGS="$QCONFIG_FLAGS Q_BACKINGSTORE_SUBSURFACES"
+ if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
+ if [ "$PLATFORM_QWS" = "yes" ]; then
+ QCONFIG_FLAGS="$QCONFIG_FLAGS Q_BACKINGSTORE_SUBSURFACES"
+ else
+ echo "### Q_BACKINGSTORE_SUBSURFACES disabled, re-enable once it compiles again"
+ fi
QCONFIG_FLAGS="$QCONFIG_FLAGS Q_USE_EGLWINDOWSURFACE"
fi
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
@@ -6732,6 +6957,19 @@ if [ "$PLATFORM_QWS" = "yes" ]; then
QT_CONFIG="$QT_CONFIG embedded"
rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
fi
+if [ "$PLATFORM_QPA" = "yes" ]; then
+ QMAKE_OUTDIR="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
+ QMAKE_CONFIG="$QMAKE_CONFIG qpa"
+ QT_CONFIG="$QT_CONFIG qpa"
+ rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
+fi
+
+if [ "$CFG_EMBEDDED" = "nacl" ]; then
+ QMAKE_CONFIG="$QMAKE_CONFIG nacl pepper"
+ QT_CONFIG="$QT_CONFIG nacl pepper"
+ rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
+fi
+
if [ "$XPLATFORM_MINGW" != "yes" ]; then
# Do not set this here for Windows. Let qmake do it so
# debug and release precompiled headers are kept separate.
@@ -6863,7 +7101,7 @@ else
fi
-if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
+if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && [ "$XPLATFORM_SYMBIAN" != "yes" ]; then
#On Mac we implicitly link against libz, so we
#never use the 3rdparty stuff.
[ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
@@ -6990,7 +7228,7 @@ if [ '!' -z "$I_FLAGS" ]; then
fi
# turn off exceptions for the compilers that support it
-if [ "$PLATFORM_QWS" = "yes" ]; then
+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-`
@@ -7429,7 +7667,7 @@ esac
# ipv6
#
# X11 : x11sm xinerama xcursor xfixes xrandr xrender mitshm fontconfig xkb
-# Embedded: embedded freetype
+# Embedded: embedded qpa freetype
#
ALL_OPTIONS=
BUILD_CONFIG=
@@ -7502,14 +7740,11 @@ 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*)
+if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
QT_BUILD_KEY_SYSTEM_PART="Symbian"
- ;;
-*)
+else
QT_BUILD_KEY_SYSTEM_PART="$CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER"
- ;;
-esac
+fi
# when cross-compiling, don't include build-host information (build key is target specific)
QT_BUILD_KEY="$CFG_USER_BUILD_KEY $QT_BUILD_KEY_SYSTEM_PART $BUILD_OPTIONS"
@@ -7768,6 +8003,11 @@ if [ "$PLATFORM_QWS" = "yes" ]; then
done
fi # QWS
+if [ "$PLATFORM_QPA" = "yes" ]; then
+ # Add QPA to config.h
+ QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QPA QT_NO_QWS_QPF QT_NO_QWS_QPF2"
+fi
+
if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
fi
@@ -7856,8 +8096,7 @@ fi
[ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
-if echo $XPLATFORM | grep symbian >/dev/null
-then
+if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
# Enable Symbian DLLs and export rules.
# We cannot use Linux's default export rules since they export everything.
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_DLL"
@@ -7937,7 +8176,7 @@ 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 echo "$XPLATFORM" | grep "symbian-sbsv2" > /dev/null 2>&1 ; then
+ if [ "$XPLATFORM_SYMBIAN_SBSV2" = "yes" ]; then
[ -e "$conf" ] && rm -rf "$conf"
cp -a "$outpath/src/corelib/global/qconfig.h" "$conf"
elif [ '!' -f "$conf" ]; then
@@ -8014,7 +8253,7 @@ 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
+if [ "$XPLATFORM_SYMBIAN_SBSV2" = "yes" ]; then
echo "#Qt for symbian FPU settings" >> "$QTCONFIG.tmp"
echo "MMP_RULES += \"ARMFPU softvfp\"" >> "$QTCONFIG.tmp"
fi
@@ -8051,10 +8290,9 @@ QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
EOF
# Ensure we can link to uninistalled libraries
-if [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
+if [ "$XPLATFORM_MINGW" != "yes" ] && [ "$CFG_EMBEDDED" != "nacl" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
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"
fi
@@ -8201,7 +8439,7 @@ else
echo "Architecture: $CFG_ARCH"
fi
-if [ "$PLATFORM_QWS" = "yes" ]; then
+if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
echo "Host architecture: $CFG_HOST_ARCH"
fi
@@ -8316,7 +8554,7 @@ else
fi
echo "zlib support ........... $CFG_ZLIB"
echo "Session management ..... $CFG_SM"
-if [ "$PLATFORM_QWS" = "yes" ]; then
+if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
echo "Embedded support ....... $CFG_EMBEDDED"
if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
echo "Freetype2 support ...... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
@@ -8602,9 +8840,9 @@ for file in .projects .projects.3; do
*winmain/winmain.pro)
[ "$XPLATFORM_MINGW" = "yes" ] || continue
SPEC=$XQMAKESPEC ;;
- *s60main/s60main.pro) if [ -z "`echo "$XPLATFORM" | grep "symbian" >/dev/null`" ]; then
- continue
- fi;;
+ *s60main/s60main.pro)
+ [ "$XPLATFORM_SYMBIAN" = "yes" ] || continue
+ ;;
*examples/activeqt/*) continue ;;
*/qmake/qmake.pro) continue ;;
*tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*linguist/lrelease*) SPEC=$QMAKESPEC ;;
diff --git a/demos/books/books.pro b/demos/books/books.pro
index a5e44e5..06718d1 100644
--- a/demos/books/books.pro
+++ b/demos/books/books.pro
@@ -16,8 +16,8 @@ INSTALLS += target sources
symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
wince*: {
- CONFIG(debug, debug|release):sqlPlugins.sources = $$QT_BUILD_TREE/plugins/sqldrivers/*d4.dll
- CONFIG(release, debug|release):sqlPlugins.sources = $$QT_BUILD_TREE/plugins/sqldrivers/*[^d]4.dll
+ CONFIG(debug, debug|release):sqlPlugins.files = $$QT_BUILD_TREE/plugins/sqldrivers/*d4.dll
+ CONFIG(release, debug|release):sqlPlugins.files = $$QT_BUILD_TREE/plugins/sqldrivers/*[^d]4.dll
sqlPlugins.path = sqldrivers
DEPLOYMENT += sqlPlugins
}
diff --git a/demos/chip/view.cpp b/demos/chip/view.cpp
index 7af3074..d6a641e 100644
--- a/demos/chip/view.cpp
+++ b/demos/chip/view.cpp
@@ -48,15 +48,29 @@
#include <qmath.h>
+void GraphicsView::wheelEvent(QWheelEvent *e)
+{
+ if (e->modifiers() & Qt::ControlModifier) {
+ if (e->delta() > 0)
+ view->zoomIn(6);
+ else
+ view->zoomOut(6);
+ e->accept();
+ } else {
+ QGraphicsView::wheelEvent(e);
+ }
+}
+
View::View(const QString &name, QWidget *parent)
: QFrame(parent)
{
setFrameStyle(Sunken | StyledPanel);
- graphicsView = new QGraphicsView;
+ graphicsView = new GraphicsView(this);
graphicsView->setRenderHint(QPainter::Antialiasing, false);
graphicsView->setDragMode(QGraphicsView::RubberBandDrag);
graphicsView->setOptimizationFlags(QGraphicsView::DontSavePainterState);
graphicsView->setViewportUpdateMode(QGraphicsView::SmartViewportUpdate);
+ graphicsView->setTransformationAnchor(QGraphicsView::AnchorUnderMouse);
int size = style()->pixelMetric(QStyle::PM_ToolBarIconSize);
QSize iconSize(size, size);
@@ -111,6 +125,15 @@ View::View(const QString &name, QWidget *parent)
// Label layout
QHBoxLayout *labelLayout = new QHBoxLayout;
label = new QLabel(name);
+ label2 = new QLabel(tr("Pointer Mode"));
+ selectModeButton = new QToolButton;
+ selectModeButton->setText(tr("Select"));
+ selectModeButton->setCheckable(true);
+ selectModeButton->setChecked(true);
+ dragModeButton = new QToolButton;
+ dragModeButton->setText(tr("Drag"));
+ dragModeButton->setCheckable(true);
+ dragModeButton->setChecked(false);
antialiasButton = new QToolButton;
antialiasButton->setText(tr("Antialiasing"));
antialiasButton->setCheckable(true);
@@ -126,8 +149,17 @@ View::View(const QString &name, QWidget *parent)
printButton = new QToolButton;
printButton->setIcon(QIcon(QPixmap(":/fileprint.png")));
+ QButtonGroup *pointerModeGroup = new QButtonGroup;
+ pointerModeGroup->setExclusive(true);
+ pointerModeGroup->addButton(selectModeButton);
+ pointerModeGroup->addButton(dragModeButton);
+
labelLayout->addWidget(label);
labelLayout->addStretch();
+ labelLayout->addWidget(label2);
+ labelLayout->addWidget(selectModeButton);
+ labelLayout->addWidget(dragModeButton);
+ labelLayout->addStretch();
labelLayout->addWidget(antialiasButton);
labelLayout->addWidget(openGlButton);
labelLayout->addWidget(printButton);
@@ -145,6 +177,8 @@ View::View(const QString &name, QWidget *parent)
connect(rotateSlider, SIGNAL(valueChanged(int)), this, SLOT(setupMatrix()));
connect(graphicsView->verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(setResetButtonEnabled()));
connect(graphicsView->horizontalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(setResetButtonEnabled()));
+ connect(selectModeButton, SIGNAL(toggled(bool)), this, SLOT(togglePointerMode()));
+ connect(dragModeButton, SIGNAL(toggled(bool)), this, SLOT(togglePointerMode()));
connect(antialiasButton, SIGNAL(toggled(bool)), this, SLOT(toggleAntialiasing()));
connect(openGlButton, SIGNAL(toggled(bool)), this, SLOT(toggleOpenGL()));
connect(rotateLeftIcon, SIGNAL(clicked()), this, SLOT(rotateLeft()));
@@ -158,7 +192,7 @@ View::View(const QString &name, QWidget *parent)
QGraphicsView *View::view() const
{
- return graphicsView;
+ return static_cast<QGraphicsView *>(graphicsView);
}
void View::resetView()
@@ -188,6 +222,14 @@ void View::setupMatrix()
setResetButtonEnabled();
}
+void View::togglePointerMode()
+{
+ graphicsView->setDragMode(selectModeButton->isChecked()
+ ? QGraphicsView::RubberBandDrag
+ : QGraphicsView::ScrollHandDrag);
+ graphicsView->setInteractive(selectModeButton->isChecked());
+}
+
void View::toggleOpenGL()
{
#ifndef QT_NO_OPENGL
@@ -212,14 +254,14 @@ void View::print()
#endif
}
-void View::zoomIn()
+void View::zoomIn(int level)
{
- zoomSlider->setValue(zoomSlider->value() + 1);
+ zoomSlider->setValue(zoomSlider->value() + level);
}
-void View::zoomOut()
+void View::zoomOut(int level)
{
- zoomSlider->setValue(zoomSlider->value() - 1);
+ zoomSlider->setValue(zoomSlider->value() - level);
}
void View::rotateLeft()
diff --git a/demos/chip/view.h b/demos/chip/view.h
index 8047b8b..67c7675 100644
--- a/demos/chip/view.h
+++ b/demos/chip/view.h
@@ -43,12 +43,27 @@
#define VIEW_H
#include <QFrame>
+#include <QGraphicsView>
-QT_FORWARD_DECLARE_CLASS(QGraphicsView)
QT_FORWARD_DECLARE_CLASS(QLabel)
QT_FORWARD_DECLARE_CLASS(QSlider)
QT_FORWARD_DECLARE_CLASS(QToolButton)
+class View;
+
+class GraphicsView : public QGraphicsView
+{
+ Q_OBJECT
+public:
+ GraphicsView(View *v) : QGraphicsView(), view(v) { }
+
+protected:
+ void wheelEvent(QWheelEvent *);
+
+private:
+ View *view;
+};
+
class View : public QFrame
{
Q_OBJECT
@@ -57,22 +72,27 @@ public:
QGraphicsView *view() const;
+public slots:
+ void zoomIn(int level = 1);
+ void zoomOut(int level = 1);
+
private slots:
void resetView();
void setResetButtonEnabled();
void setupMatrix();
+ void togglePointerMode();
void toggleOpenGL();
void toggleAntialiasing();
void print();
-
- void zoomIn();
- void zoomOut();
void rotateLeft();
void rotateRight();
-
+
private:
- QGraphicsView *graphicsView;
+ GraphicsView *graphicsView;
QLabel *label;
+ QLabel *label2;
+ QToolButton *selectModeButton;
+ QToolButton *dragModeButton;
QToolButton *openGlButton;
QToolButton *antialiasButton;
QToolButton *printButton;
diff --git a/demos/declarative/minehunt/minehunt.cpp b/demos/declarative/minehunt/minehunt.cpp
index 9c82f30..aaaaaac 100644
--- a/demos/declarative/minehunt/minehunt.cpp
+++ b/demos/declarative/minehunt/minehunt.cpp
@@ -195,6 +195,7 @@ bool MinehuntGame::flip(int row, int col)
won = false;
hasWonChanged();
setPlaying(false);
+ return true;
}
remaining--;
@@ -202,6 +203,7 @@ bool MinehuntGame::flip(int row, int col)
won = true;
hasWonChanged();
setPlaying(false);
+ return true;
}
return true;
}
@@ -209,7 +211,7 @@ bool MinehuntGame::flip(int row, int col)
bool MinehuntGame::flag(int row, int col)
{
TileData *t = tile(row, col);
- if(!t)
+ if(!t || !playing || t->flipped())
return false;
t->setHasFlag(!t->hasFlag());
diff --git a/demos/declarative/minehunt/minehunt.pro b/demos/declarative/minehunt/minehunt.pro
index 4cf1441..d23bb05 100644
--- a/demos/declarative/minehunt/minehunt.pro
+++ b/demos/declarative/minehunt/minehunt.pro
@@ -1,7 +1,6 @@
TEMPLATE = app
TARGET = minehunt
QT += declarative
-CONFIG += qt plugin
# Input
HEADERS += minehunt.h
@@ -18,7 +17,7 @@ symbian:{
TARGET.EPOCALLOWDLLDATA = 1
TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
- qmlminehuntfiles.sources = MinehuntCore minehunt.qml
+ qmlminehuntfiles.files = MinehuntCore minehunt.qml
DEPLOYMENT += qmlminehuntfiles
}
- \ No newline at end of file
+
diff --git a/demos/declarative/samegame/SamegameCore/Button.qml b/demos/declarative/samegame/SamegameCore/Button.qml
index 7fb7b65..140b196 100644
--- a/demos/declarative/samegame/SamegameCore/Button.qml
+++ b/demos/declarative/samegame/SamegameCore/Button.qml
@@ -48,7 +48,7 @@ Rectangle {
signal clicked
- width: buttonLabel.width + 20; height: buttonLabel.height + 6
+ width: buttonLabel.width + 20; height: buttonLabel.height + 20
smooth: true
border { width: 1; color: Qt.darker(activePalette.button) }
radius: 8
@@ -70,6 +70,6 @@ Rectangle {
MouseArea { id: mouseArea; anchors.fill: parent; onClicked: container.clicked() }
Text {
- id: buttonLabel; text: container.text; anchors.centerIn: container; color: activePalette.buttonText
+ id: buttonLabel; text: container.text; anchors.centerIn: container; color: activePalette.buttonText; font.pixelSize: 24
}
}
diff --git a/demos/declarative/samegame/SamegameCore/samegame.js b/demos/declarative/samegame/SamegameCore/samegame.js
index 9266767..e618a10 100755
--- a/demos/declarative/samegame/SamegameCore/samegame.js
+++ b/demos/declarative/samegame/SamegameCore/samegame.js
@@ -9,12 +9,14 @@ var scoresURL = "";
var gameDuration;
var component = Qt.createComponent(blockSrc);
-//Index function used instead of a 2D array
-function index(column,row) {
- return column + (row * maxColumn);
+// Index function used instead of a 2D array
+function index(column, row)
+{
+ return column + row * maxColumn;
}
-function timeStr(msecs) {
+function timeStr(msecs)
+{
var secs = Math.floor(msecs/1000);
var m = Math.floor(secs/60);
var ret = "" + m + "m " + (secs%60) + "s";
@@ -23,47 +25,48 @@ function timeStr(msecs) {
function startNewGame()
{
- //Delete blocks from previous game
- for(var i = 0; i<maxIndex; i++){
- if(board[i] != null)
+ // Delete blocks from previous game
+ for (var i = 0; i < maxIndex; i++) {
+ if (board[i] != null)
board[i].destroy();
}
- //Calculate board size
+ // Calculate board size
maxColumn = Math.floor(gameCanvas.width/gameCanvas.blockSize);
maxRow = Math.floor(gameCanvas.height/gameCanvas.blockSize);
- maxIndex = maxRow*maxColumn;
+ maxIndex = maxRow * maxColumn;
- //Close dialogs
+ // Close dialogs
nameInputDialog.forceClose();
dialog.forceClose();
- //Initialize Board
+ // Initialize Board
board = new Array(maxIndex);
gameCanvas.score = 0;
- for(var column=0; column<maxColumn; column++){
- for(var row=0; row<maxRow; row++){
- board[index(column,row)] = null;
- createBlock(column,row);
+ for (var column = 0; column < maxColumn; column++) {
+ for (var row = 0; row < maxRow; row++) {
+ board[index(column, row)] = null;
+ createBlock(column, row);
}
}
gameDuration = new Date();
}
-var fillFound;//Set after a floodFill call to the number of blocks found
-var floodBoard;//Set to 1 if the floodFill reaches off that node
-//NOTE: Be careful with vars named x,y, as the calling object's x,y are still in scope
+var fillFound; // Set after a floodFill call to the number of blocks found
+var floodBoard; // Set to 1 if the floodFill reaches off that node
+
+// NOTE: Be careful with vars named x,y, as the calling object's x,y are still in scope
function handleClick(x,y)
{
var column = Math.floor(x/gameCanvas.blockSize);
var row = Math.floor(y/gameCanvas.blockSize);
- if(column >= maxColumn || column < 0 || row >= maxRow || row < 0)
+ if (column >= maxColumn || column < 0 || row >= maxRow || row < 0)
return;
- if(board[index(column, row)] == null)
+ if (board[index(column, row)] == null)
return;
- //If it's a valid block, remove it and all connected (does nothing if it's not connected)
+ // If it's a valid block, remove it and all connected (does nothing if it's not connected)
floodFill(column,row, -1);
- if(fillFound <= 0)
+ if (fillFound <= 0)
return;
gameCanvas.score += (fillFound - 1) * (fillFound - 1);
shuffleDown();
@@ -72,65 +75,65 @@ function handleClick(x,y)
function floodFill(column,row,type)
{
- if(board[index(column, row)] == null)
+ if (board[index(column, row)] == null)
return;
var first = false;
- if(type == -1){
+ if (type == -1) {
first = true;
type = board[index(column,row)].type;
-
- //Flood fill initialization
+
+ // Flood fill initialization
fillFound = 0;
floodBoard = new Array(maxIndex);
}
- if(column >= maxColumn || column < 0 || row >= maxRow || row < 0)
+ if (column >= maxColumn || column < 0 || row >= maxRow || row < 0)
return;
- if(floodBoard[index(column, row)] == 1 || (!first && type != board[index(column,row)].type))
+ if (floodBoard[index(column, row)] == 1 || (!first && type != board[index(column, row)].type))
return;
floodBoard[index(column, row)] = 1;
- floodFill(column+1,row,type);
- floodFill(column-1,row,type);
- floodFill(column,row+1,type);
- floodFill(column,row-1,type);
- if(first==true && fillFound == 0)
- return;//Can't remove single blocks
- board[index(column,row)].dying = true;
- board[index(column,row)] = null;
+ floodFill(column + 1, row, type);
+ floodFill(column - 1, row, type);
+ floodFill(column, row + 1, type);
+ floodFill(column, row - 1, type);
+ if (first == true && fillFound == 0)
+ return; // Can't remove single blocks
+ board[index(column, row)].dying = true;
+ board[index(column, row)] = null;
fillFound += 1;
}
function shuffleDown()
{
- //Fall down
- for(var column=0; column<maxColumn; column++){
+ // Fall down
+ for (var column = 0; column < maxColumn; column++) {
var fallDist = 0;
- for(var row=maxRow-1; row>=0; row--){
- if(board[index(column,row)] == null){
+ for (var row = maxRow - 1; row >= 0; row--) {
+ if (board[index(column,row)] == null) {
fallDist += 1;
- }else{
- if(fallDist > 0){
- var obj = board[index(column,row)];
- obj.y = (row+fallDist) * gameCanvas.blockSize;
- board[index(column,row+fallDist)] = obj;
- board[index(column,row)] = null;
+ } else {
+ if (fallDist > 0) {
+ var obj = board[index(column, row)];
+ obj.y = (row + fallDist) * gameCanvas.blockSize;
+ board[index(column, row + fallDist)] = obj;
+ board[index(column, row)] = null;
}
}
}
}
- //Fall to the left
+ // Fall to the left
fallDist = 0;
- for(column=0; column<maxColumn; column++){
- if(board[index(column, maxRow - 1)] == null){
+ for (column = 0; column < maxColumn; column++) {
+ if (board[index(column, maxRow - 1)] == null) {
fallDist += 1;
- }else{
- if(fallDist > 0){
- for(row=0; row<maxRow; row++){
- obj = board[index(column,row)];
- if(obj == null)
+ } else {
+ if (fallDist > 0) {
+ for (row = 0; row < maxRow; row++) {
+ obj = board[index(column, row)];
+ if (obj == null)
continue;
- obj.x = (column-fallDist) * gameCanvas.blockSize;
- board[index(column-fallDist,row)] = obj;
- board[index(column,row)] = null;
+ obj.x = (column - fallDist) * gameCanvas.blockSize;
+ board[index(column - fallDist,row)] = obj;
+ board[index(column, row)] = null;
}
}
}
@@ -139,58 +142,59 @@ function shuffleDown()
function victoryCheck()
{
- //awards bonuses for no blocks left
+ // Awards bonuses for no blocks left
var deservesBonus = true;
- for(var column=maxColumn-1; column>=0; column--)
- if(board[index(column, maxRow - 1)] != null)
+ for (var column = maxColumn - 1; column >= 0; column--)
+ if (board[index(column, maxRow - 1)] != null)
deservesBonus = false;
- if(deservesBonus)
+ if (deservesBonus)
gameCanvas.score += 500;
- //Checks for game over
- if(deservesBonus || !(floodMoveCheck(0,maxRow-1, -1))){
+ // Checks for game over
+ if (deservesBonus || !(floodMoveCheck(0, maxRow - 1, -1))) {
gameDuration = new Date() - gameDuration;
nameInputDialog.show("You won! Please enter your name: ");
nameInputDialog.initialWidth = nameInputDialog.text.width + 20;
- if(nameInputDialog.name == "")
+ if (nameInputDialog.name == "")
nameInputDialog.width = nameInputDialog.initialWidth;
- nameInputDialog.text.opacity = 0;//Just a spacer
+ nameInputDialog.text.opacity = 0; // Just a spacer
}
}
-//only floods up and right, to see if it can find adjacent same-typed blocks
+// Only floods up and right, to see if it can find adjacent same-typed blocks
function floodMoveCheck(column, row, type)
{
- if(column >= maxColumn || column < 0 || row >= maxRow || row < 0)
+ if (column >= maxColumn || column < 0 || row >= maxRow || row < 0)
return false;
- if(board[index(column, row)] == null)
+ if (board[index(column, row)] == null)
return false;
var myType = board[index(column, row)].type;
- if(type == myType)
+ if (type == myType)
return true;
return floodMoveCheck(column + 1, row, myType) ||
- floodMoveCheck(column, row - 1, board[index(column,row)].type);
+ floodMoveCheck(column, row - 1, board[index(column, row)].type);
}
-function createBlock(column,row){
+function createBlock(column,row)
+{
// Note that we don't wait for the component to become ready. This will
// only work if the block QML is a local file. Otherwise the component will
// not be ready immediately. There is a statusChanged signal on the
// component you could use if you want to wait to load remote files.
- if(component.status == Component.Ready){
+ if (component.status == Component.Ready) {
var dynamicObject = component.createObject(gameCanvas);
- if(dynamicObject == null){
+ if (dynamicObject == null) {
console.log("error creating block");
console.log(component.errorString());
return false;
}
dynamicObject.type = Math.floor(Math.random() * 3);
- dynamicObject.x = column*gameCanvas.blockSize;
- dynamicObject.y = row*gameCanvas.blockSize;
+ dynamicObject.x = column * gameCanvas.blockSize;
+ dynamicObject.y = row * gameCanvas.blockSize;
dynamicObject.width = gameCanvas.blockSize;
dynamicObject.height = gameCanvas.blockSize;
dynamicObject.spawned = true;
- board[index(column,row)] = dynamicObject;
- }else{
+ board[index(column, row)] = dynamicObject;
+ } else {
console.log("error loading block component");
console.log(component.errorString());
return false;
@@ -198,23 +202,35 @@ function createBlock(column,row){
return true;
}
-function saveHighScore(name) {
- if(scoresURL!="")
+function saveHighScore(name)
+{
+ if (scoresURL != "")
sendHighScore(name);
- //OfflineStorage
- var db = openDatabaseSync("SameGameScores", "1.0", "Local SameGame High Scores",100);
+ // Offline storage
+ var db = openDatabaseSync(
+ "SameGameScores",
+ "1.0",
+ "Local SameGame High Scores",
+ 100
+ );
var dataStr = "INSERT INTO Scores VALUES(?, ?, ?, ?)";
- var data = [name, gameCanvas.score, maxColumn+"x"+maxRow ,Math.floor(gameDuration/1000)];
+ var data = [
+ name,
+ gameCanvas.score,
+ maxColumn + "x" + maxRow,
+ Math.floor(gameDuration / 1000)
+ ];
db.transaction(
function(tx) {
tx.executeSql('CREATE TABLE IF NOT EXISTS Scores(name TEXT, score NUMBER, gridSize TEXT, time NUMBER)');
tx.executeSql(dataStr, data);
- //Only show results for the current grid size
- var rs = tx.executeSql('SELECT * FROM Scores WHERE gridSize = "'+maxColumn+"x"+maxRow+'" ORDER BY score desc LIMIT 10');
+ // Only show results for the current grid size
+ var rs = tx.executeSql('SELECT * FROM Scores WHERE gridSize = "'
+ + maxColumn + "x" + maxRow + '" ORDER BY score desc LIMIT 10');
var r = "\nHIGH SCORES for this grid size\n\n"
- for(var i = 0; i < rs.rows.length; i++){
- r += (i+1)+". " + rs.rows.item(i).name +' got '
+ for (var i = 0; i < rs.rows.length; i++) {
+ r += (i+1) + ". " + rs.rows.item(i).name + ' got '
+ rs.rows.item(i).score + ' points in '
+ rs.rows.item(i).time + ' seconds.\n';
}
@@ -223,13 +239,15 @@ function saveHighScore(name) {
);
}
-function sendHighScore(name) {
+function sendHighScore(name)
+{
var postman = new XMLHttpRequest()
- var postData = "name="+name+"&score="+gameCanvas.score
- +"&gridSize="+maxColumn+"x"+maxRow +"&time="+Math.floor(gameDuration/1000);
+ var postData = "name=" + name + "&score=" + gameCanvas.score
+ + "&gridSize=" + maxColumn + "x" + maxRow
+ + "&time=" + Math.floor(gameDuration / 1000);
postman.open("POST", scoresURL, true);
postman.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
- postman.onreadystatechange = function() {
+ postman.onreadystatechange = function() {
if (postman.readyState == postman.DONE) {
dialog.show("Your score has been uploaded.");
}
diff --git a/demos/declarative/samegame/samegame.qml b/demos/declarative/samegame/samegame.qml
index f66c40e..ab49c04 100644
--- a/demos/declarative/samegame/samegame.qml
+++ b/demos/declarative/samegame/samegame.qml
@@ -92,9 +92,7 @@ Rectangle {
enabled: nameInputDialog.initialWidth != 0
}
- onOpened: nameInputText.focus = true;
onClosed: {
- nameInputText.focus = false;
if (nameInputText.text != "")
Logic.saveHighScore(nameInputText.text);
}
@@ -116,7 +114,7 @@ Rectangle {
TextInput {
id: nameInputText
anchors { verticalCenter: parent.verticalCenter; left: dialogText.right }
- focus: false
+ focus: visible
autoScroll: false
maximumLength: 24
onTextChanged: {
@@ -133,7 +131,7 @@ Rectangle {
Rectangle {
id: toolBar
- width: parent.width; height: 32
+ width: parent.width; height: 58
color: activePalette.window
anchors.bottom: screen.bottom
@@ -156,6 +154,7 @@ Rectangle {
anchors { right: parent.right; rightMargin: 3; verticalCenter: parent.verticalCenter }
text: "Score: " + gameCanvas.score
font.bold: true
+ font.pixelSize: 24
color: activePalette.windowText
}
}
diff --git a/demos/declarative/snake/content/pics/pause.png b/demos/declarative/snake/content/pics/pause.png
new file mode 100644
index 0000000..056d97d
--- /dev/null
+++ b/demos/declarative/snake/content/pics/pause.png
Binary files differ
diff --git a/demos/declarative/snake/content/snake.js b/demos/declarative/snake/content/snake.js
index 2a99aa8..837b82a 100644
--- a/demos/declarative/snake/content/snake.js
+++ b/demos/declarative/snake/content/snake.js
@@ -39,7 +39,7 @@ function startNewGame()
return;
}
- if (heartbeat.running) {
+ if (activeGame) {
endGame();
startNewGameTimer.running = true;
return;
@@ -93,7 +93,7 @@ function startNewGame()
function endGame()
{
- heartbeat.running = false;
+ activeGame = false;
for(var i in snake)
snake[i].dying = true;
if (cookie) {
diff --git a/demos/declarative/snake/snake.qml b/demos/declarative/snake/snake.qml
index 5cbf1be..585c0b2 100644
--- a/demos/declarative/snake/snake.qml
+++ b/demos/declarative/snake/snake.qml
@@ -47,6 +47,7 @@ Rectangle {
id: screen;
SystemPalette { id: activePalette }
color: activePalette.window
+ property bool activeGame: false
property int gridSize : 34
property int margin: 4
@@ -75,6 +76,7 @@ Rectangle {
Timer {
id: heartbeat;
interval: heartbeatInterval;
+ running: activeGame && runtime.isActiveWindow
repeat: true
onTriggered: { Logic.move() }
}
@@ -94,7 +96,16 @@ Rectangle {
Timer {
id: startHeartbeatTimer;
interval: 1000 ;
- onTriggered: { state = "running"; heartbeat.running = true;}
+ onTriggered: { state = "running"; activeGame = true; }
+ }
+
+ Image{
+ id: pauseDialog
+ z: 1
+ source: "content/pics/pause.png"
+ anchors.centerIn: parent;
+ //opacity is deliberately not animated
+ opacity: activeGame && !runtime.isActiveWindow
}
Image {
diff --git a/demos/declarative/twitter/twitter.qml b/demos/declarative/twitter/twitter.qml
index 4495523..74bab37 100644
--- a/demos/declarative/twitter/twitter.qml
+++ b/demos/declarative/twitter/twitter.qml
@@ -78,7 +78,7 @@ Item {
id: views
x: 2; width: parent.width - 4
y:60 //Below the title bars
- height: 380
+ height: parent.height - 100
Text {
id:title
diff --git a/demos/demos.pro b/demos/demos.pro
index fdc1e4c..362a3bc 100644
--- a/demos/demos.pro
+++ b/demos/demos.pro
@@ -44,7 +44,7 @@ contains(QT_CONFIG, opengl):!contains(QT_CONFIG, opengles1):!contains(QT_CONFIG,
SUBDIRS += demos_boxes
}
-mac*: SUBDIRS += demos_macmainwindow
+mac* && !qpa: SUBDIRS += demos_macmainwindow
wince*|symbian|embedded|x11: SUBDIRS += demos_embedded
!contains(QT_EDITION, Console):!cross_compile:!embedded:!wince*:SUBDIRS += demos_arthurplugin
diff --git a/demos/embedded/desktopservices/desktopservices.pro b/demos/embedded/desktopservices/desktopservices.pro
index 94ddedd..e66db1c 100644
--- a/demos/embedded/desktopservices/desktopservices.pro
+++ b/demos/embedded/desktopservices/desktopservices.pro
@@ -7,8 +7,8 @@ SOURCES += desktopwidget.cpp contenttab.cpp linktab.cpp main.cpp
RESOURCES += desktopservices.qrc
-music.sources = data/*.mp3 data/*.wav
-image.sources = data/*.png
+music.files = data/*.mp3 data/*.wav
+image.files = data/*.png
target.path = $$[QT_INSTALL_DEMOS]/embedded/desktopservices
sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro
diff --git a/demos/embedded/fluidlauncher/fluidlauncher.pro b/demos/embedded/fluidlauncher/fluidlauncher.pro
index ca74c38..0799ed9 100644
--- a/demos/embedded/fluidlauncher/fluidlauncher.pro
+++ b/demos/embedded/fluidlauncher/fluidlauncher.pro
@@ -33,7 +33,7 @@ wince*{
BUILD_DIR = debug
}
- executables.sources = \
+ executables.files = \
$$QT_BUILD_TREE/demos/embedded/embeddedsvgviewer/$${BUILD_DIR}/embeddedsvgviewer.exe \
$$QT_BUILD_TREE/demos/embedded/styledemo/$${BUILD_DIR}/styledemo.exe \
$$QT_BUILD_TREE/demos/deform/$${BUILD_DIR}/deform.exe \
@@ -45,10 +45,10 @@ wince*{
executables.path = .
- files.sources = $$PWD/screenshots $$PWD/slides $$PWD/../embeddedsvgviewer/shapes.svg
+ files.files = $$PWD/screenshots $$PWD/slides $$PWD/../embeddedsvgviewer/shapes.svg
files.path = .
- config.sources = $$PWD/config_wince/config.xml
+ config.files = $$PWD/config_wince/config.xml
config.path = .
DEPLOYMENT += config files executables
@@ -79,7 +79,7 @@ symbian {
}
}
- executables.sources = \
+ executables.files = \
$$QT_BUILD_TREE/demos/embedded/styledemo/styledemo.exe \
$$QT_BUILD_TREE/demos/deform/deform.exe \
$$QT_BUILD_TREE/demos/pathstroke/pathstroke.exe \
@@ -97,7 +97,7 @@ symbian {
executables.path = /sys/bin
- reg_resource.sources = \
+ reg_resource.files = \
$$regResourceDir(demos/embedded/styledemo/styledemo_reg.rsc) \
$$regResourceDir(demos/deform/deform_reg.rsc) \
$$regResourceDir(demos/pathstroke/pathstroke_reg.rsc) \
@@ -114,17 +114,17 @@ symbian {
$$regResourceDir(demos/embedded/flightinfo/flightinfo_reg.rsc)
contains(QT_CONFIG, phonon) {
- reg_resource.sources += $$regResourceDir(demos/qmediaplayer/qmediaplayer_reg.rsc)
+ reg_resource.files += $$regResourceDir(demos/qmediaplayer/qmediaplayer_reg.rsc)
}
contains(QT_CONFIG, multimedia) {
- reg_resource.sources += $$regResourceDir(demos/spectrum/app/spectrum_reg.rsc)
+ reg_resource.files += $$regResourceDir(demos/spectrum/app/spectrum_reg.rsc)
}
reg_resource.path = $$REG_RESOURCE_IMPORT_DIR
- resource.sources = \
+ resource.files = \
$$appResourceDir(demos/embedded/styledemo/styledemo.rsc) \
$$appResourceDir(demos/deform/deform.rsc) \
$$appResourceDir(demos/pathstroke/pathstroke.rsc) \
@@ -143,7 +143,7 @@ symbian {
resource.path = $$APP_RESOURCE_DIR
- mifs.sources = \
+ mifs.files = \
$$appResourceDir(demos/embedded/fluidlauncher/fluidlauncher.mif) \
$$appResourceDir(demos/embedded/styledemo/styledemo.mif) \
$$appResourceDir(demos/deform/deform.mif) \
@@ -162,28 +162,28 @@ symbian {
mifs.path = $$APP_RESOURCE_DIR
contains(QT_CONFIG, svg) {
- executables.sources += \
+ executables.files += \
$$QT_BUILD_TREE/demos/embedded/embeddedsvgviewer/embeddedsvgviewer.exe \
$$QT_BUILD_TREE/demos/embedded/weatherinfo/weatherinfo.exe
- reg_resource.sources += \
+ reg_resource.files += \
$$regResourceDir(demos/embedded/embeddedsvgviewer/embeddedsvgviewer_reg.rsc) \
$$regResourceDir(demos/embedded/weatherinfo/weatherinfo_reg.rsc)
- resource.sources += \
+ resource.files += \
$$appResourceDir(demos/embedded/embeddedsvgviewer/embeddedsvgviewer.rsc) \
$$appResourceDir(demos/embedded/weatherinfo/weatherinfo.rsc)
- mifs.sources += \
+ mifs.files += \
$$appResourceDir(demos/embedded/embeddedsvgviewer/embeddedsvgviewer.mif) \
$$appResourceDir(demos/embedded/weatherinfo/weatherinfo.mif)
}
contains(QT_CONFIG, webkit) {
- executables.sources += $$QT_BUILD_TREE/demos/embedded/anomaly/anomaly.exe
- reg_resource.sources += $$regResourceDir(demos/embedded/anomaly/anomaly_reg.rsc)
- resource.sources += $$appResourceDir(demos/embedded/anomaly/anomaly.rsc)
- mifs.sources += \
+ executables.files += $$QT_BUILD_TREE/demos/embedded/anomaly/anomaly.exe
+ reg_resource.files += $$regResourceDir(demos/embedded/anomaly/anomaly_reg.rsc)
+ resource.files += $$appResourceDir(demos/embedded/anomaly/anomaly.rsc)
+ mifs.files += \
$$appResourceDir(demos/embedded/anomaly/anomaly.mif)
isEmpty(QT_LIBINFIX) {
@@ -195,61 +195,61 @@ symbian {
}
contains(QT_CONFIG, phonon) {
- executables.sources += $$QT_BUILD_TREE/demos/qmediaplayer/qmediaplayer.exe
- resource.sources += $$appResourceDir(demos/qmediaplayer/qmediaplayer.rsc)
- mifs.sources += \
+ executables.files += $$QT_BUILD_TREE/demos/qmediaplayer/qmediaplayer.exe
+ resource.files += $$appResourceDir(demos/qmediaplayer/qmediaplayer.rsc)
+ mifs.files += \
$$appResourceDir(demos/qmediaplayer/qmediaplayer.mif)
}
contains(QT_CONFIG, multimedia) {
- executables.sources += $$QT_BUILD_TREE/demos/spectrum/app/spectrum.exe
- executables.sources += $$QT_BUILD_TREE/demos/spectrum/3rdparty/fftreal/fftreal.dll
- resource.sources += $$appResourceDir(demos/spectrum/app/spectrum.rsc)
- mifs.sources += \
+ executables.files += $$QT_BUILD_TREE/demos/spectrum/app/spectrum.exe
+ executables.files += $$QT_BUILD_TREE/demos/spectrum/3rdparty/fftreal/fftreal.dll
+ resource.files += $$appResourceDir(demos/spectrum/app/spectrum.rsc)
+ mifs.files += \
$$appResourceDir(demos/spectrum/app/spectrum.mif)
}
contains(QT_CONFIG, script) {
- executables.sources += $$QT_BUILD_TREE/examples/script/context2d/context2d.exe
- reg_resource.sources += $$regResourceDir(examples/script/context2d/context2d_reg.rsc)
- resource.sources += $$appResourceDir(examples/script/context2d/context2d.rsc)
- mifs.sources += \
+ executables.files += $$QT_BUILD_TREE/examples/script/context2d/context2d.exe
+ reg_resource.files += $$regResourceDir(examples/script/context2d/context2d_reg.rsc)
+ resource.files += $$appResourceDir(examples/script/context2d/context2d.rsc)
+ mifs.files += \
$$appResourceDir(examples/script/context2d/context2d.mif)
}
qmldemos = qmlcalculator qmlclocks qmldialcontrol qmleasing qmlflickr qmlphotoviewer qmltwitter
contains(QT_CONFIG, declarative) {
for(qmldemo, qmldemos) {
- executables.sources += $$QT_BUILD_TREE/demos/embedded/$${qmldemo}/$${qmldemo}.exe
- reg_resource.sources += $$regResourceDir(demos/embedded/$${qmldemo}/$${qmldemo}_reg.rsc)
- resource.sources += $$appResourceDir(demos/embedded/$${qmldemo}/$${qmldemo}.rsc)
- mifs.sources += $$appResourceDir(demos/embedded/$${qmldemo}/$${qmldemo}.mif)
+ executables.files += $$QT_BUILD_TREE/demos/embedded/$${qmldemo}/$${qmldemo}.exe
+ reg_resource.files += $$regResourceDir(demos/embedded/$${qmldemo}/$${qmldemo}_reg.rsc)
+ resource.files += $$appResourceDir(demos/embedded/$${qmldemo}/$${qmldemo}.rsc)
+ mifs.files += $$appResourceDir(demos/embedded/$${qmldemo}/$${qmldemo}.mif)
}
}
- files.sources = $$PWD/screenshots $$PWD/slides
+ files.files = $$PWD/screenshots $$PWD/slides
files.path = .
- config.sources = $$PWD/config_s60/config.xml
+ config.files = $$PWD/config_s60/config.xml
config.path = .
- viewerimages.sources = $$PWD/../embeddedsvgviewer/shapes.svg
+ viewerimages.files = $$PWD/../embeddedsvgviewer/shapes.svg
viewerimages.path = /data/images/qt/demos/embeddedsvgviewer
# demos/mediaplayer make also use of these files.
- desktopservices_music.sources = \
+ desktopservices_music.files = \
$$PWD/../desktopservices/data/*.mp3 \
$$PWD/../desktopservices/data/*.wav
desktopservices_music.path = /data/sounds
- desktopservices_images.sources = $$PWD/../desktopservices/data/*.png
+ desktopservices_images.files = $$PWD/../desktopservices/data/*.png
desktopservices_images.path = /data/images
- saxbookmarks.sources = $$PWD/../../../examples/xml/saxbookmarks/frank.xbel
- saxbookmarks.sources += $$PWD/../../../examples/xml/saxbookmarks/jennifer.xbel
+ saxbookmarks.files = $$PWD/../../../examples/xml/saxbookmarks/frank.xbel
+ saxbookmarks.files += $$PWD/../../../examples/xml/saxbookmarks/jennifer.xbel
saxbookmarks.path = /data/qt/saxbookmarks
- fluidbackup.sources = backup_registration.xml
+ fluidbackup.files = backup_registration.xml
fluidbackup.path = /private/$$replace(TARGET.UID3, 0x,)
DEPLOYMENT += config files executables viewerimages saxbookmarks reg_resource resource \
diff --git a/demos/embedded/qmlcalculator/deployment.pri b/demos/embedded/qmlcalculator/deployment.pri
index a31303d..a97498e 100644
--- a/demos/embedded/qmlcalculator/deployment.pri
+++ b/demos/embedded/qmlcalculator/deployment.pri
@@ -4,5 +4,5 @@ symbian {
qmlcalculator_uid3 = A000E3FB
qmlcalculator_files.path = $$APP_PRIVATE_DIR_BASE/$$qmlcalculator_uid3
}
-qmlcalculator_files.sources = $$qmlcalculator_src/calculator.qml $$qmlcalculator_src/Core
+qmlcalculator_files.files = $$qmlcalculator_src/calculator.qml $$qmlcalculator_src/Core
DEPLOYMENT += qmlcalculator_files
diff --git a/demos/embedded/qmlclocks/deployment.pri b/demos/embedded/qmlclocks/deployment.pri
index 0946733..6c6704c 100644
--- a/demos/embedded/qmlclocks/deployment.pri
+++ b/demos/embedded/qmlclocks/deployment.pri
@@ -4,5 +4,5 @@ symbian {
qmlclocks_uid3 = A000E3FC
qmlclocks_files.path = $$APP_PRIVATE_DIR_BASE/$$qmlclocks_uid3
}
-qmlclocks_files.sources = $$qmlclocks_src/clocks.qml $$qmlclocks_src/content
+qmlclocks_files.files = $$qmlclocks_src/clocks.qml $$qmlclocks_src/content
DEPLOYMENT += qmlclocks_files
diff --git a/demos/embedded/qmldialcontrol/deployment.pri b/demos/embedded/qmldialcontrol/deployment.pri
index e0e72e6..a978443 100644
--- a/demos/embedded/qmldialcontrol/deployment.pri
+++ b/demos/embedded/qmldialcontrol/deployment.pri
@@ -4,5 +4,5 @@ symbian {
qmldialcontrol_uid3 = A000E3FD
qmldialcontrol_files.path = $$APP_PRIVATE_DIR_BASE/$$qmldialcontrol_uid3
}
-qmldialcontrol_files.sources = $$qmldialcontrol_src/dialcontrol.qml $$qmldialcontrol_src/content
+qmldialcontrol_files.files = $$qmldialcontrol_src/dialcontrol.qml $$qmldialcontrol_src/content
DEPLOYMENT += qmldialcontrol_files
diff --git a/demos/embedded/qmleasing/deployment.pri b/demos/embedded/qmleasing/deployment.pri
index d3621cb..946fcd9 100644
--- a/demos/embedded/qmleasing/deployment.pri
+++ b/demos/embedded/qmleasing/deployment.pri
@@ -4,5 +4,5 @@ symbian {
qmleasing_uid3 = A000E3FE
qmleasing_files.path = $$APP_PRIVATE_DIR_BASE/$$qmleasing_uid3
}
-qmleasing_files.sources = $$qmleasing_src/easing.qml $$qmleasing_src/content
+qmleasing_files.files = $$qmleasing_src/easing.qml $$qmleasing_src/content
DEPLOYMENT += qmleasing_files
diff --git a/demos/embedded/qmlflickr/deployment.pri b/demos/embedded/qmlflickr/deployment.pri
index b508292..a38dc95 100644
--- a/demos/embedded/qmlflickr/deployment.pri
+++ b/demos/embedded/qmlflickr/deployment.pri
@@ -4,5 +4,5 @@ symbian {
qmlflickr_uid3 = A000E3FF
qmlflickr_files.path = $$APP_PRIVATE_DIR_BASE/$$qmlflickr_uid3
}
-qmlflickr_files.sources = $$qmlflickr_src/flickr.qml $$qmlflickr_src/common $$qmlflickr_src/mobile
+qmlflickr_files.files = $$qmlflickr_src/flickr.qml $$qmlflickr_src/common $$qmlflickr_src/mobile
DEPLOYMENT += qmlflickr_files
diff --git a/demos/embedded/qmlphotoviewer/deployment.pri b/demos/embedded/qmlphotoviewer/deployment.pri
index 35937a8..23882e3 100644
--- a/demos/embedded/qmlphotoviewer/deployment.pri
+++ b/demos/embedded/qmlphotoviewer/deployment.pri
@@ -4,5 +4,5 @@ symbian {
qmlphotoviewer_uid3 = A000E400
qmlphotoviewer_files.path = $$APP_PRIVATE_DIR_BASE/$$qmlphotoviewer_uid3
}
-qmlphotoviewer_files.sources = $$qmlphotoviewer_src/photoviewer.qml $$qmlphotoviewer_src/PhotoViewerCore
+qmlphotoviewer_files.files = $$qmlphotoviewer_src/photoviewer.qml $$qmlphotoviewer_src/PhotoViewerCore
DEPLOYMENT += qmlphotoviewer_files
diff --git a/demos/embedded/qmltwitter/deployment.pri b/demos/embedded/qmltwitter/deployment.pri
index 4404e33..3edc0e5 100644
--- a/demos/embedded/qmltwitter/deployment.pri
+++ b/demos/embedded/qmltwitter/deployment.pri
@@ -4,5 +4,5 @@ symbian {
qmltwitter_uid3 = A000E401
qmltwitter_files.path = $$APP_PRIVATE_DIR_BASE/$$qmltwitter_uid3
}
-qmltwitter_files.sources = $$qmltwitter_src/twitter.qml $$qmltwitter_src/TwitterCore
+qmltwitter_files.files = $$qmltwitter_src/twitter.qml $$qmltwitter_src/TwitterCore
DEPLOYMENT += qmltwitter_files
diff --git a/demos/qmediaplayer/main.cpp b/demos/qmediaplayer/main.cpp
index 02c579b..9f15e43 100644
--- a/demos/qmediaplayer/main.cpp
+++ b/demos/qmediaplayer/main.cpp
@@ -42,6 +42,8 @@
#include <QtGui>
#include "mediaplayer.h"
+const qreal DefaultVolume = -1.0;
+
int main (int argc, char *argv[])
{
Q_INIT_RESOURCE(mediaplayer);
@@ -50,36 +52,38 @@ int main (int argc, char *argv[])
app.setOrganizationName("Qt");
app.setQuitOnLastWindowClosed(true);
- bool hasSmallScreen =
+ QString fileName;
+ qreal volume = DefaultVolume;
+ bool smallScreen = false;
#ifdef Q_OS_SYMBIAN
- /* On Symbian, we always want fullscreen. One reason is that it's not
- * possible to launch any demos from the fluidlauncher due to a
- * limitation in the emulator. */
- true
-#else
- false
+ smallScreen = true;
#endif
- ;
-
- QString fileString;
- const QStringList args(app.arguments());
- /* We have a minor problem here, we accept two arguments, both are
- * optional:
- * - A file name
- * - the option "-small-screen", so let's try to cope with that.
- */
- for (int i = 0; i < args.count(); ++i) {
- const QString &at = args.at(i);
- if (at == QLatin1String("-small-screen"))
- hasSmallScreen = true;
- else if (i > 0) // We don't want the app name.
- fileString = at;
+ QStringList args(app.arguments());
+ args.removeFirst(); // remove name of executable
+ while (!args.empty()) {
+ const QString &arg = args.first();
+ if (QLatin1String("-small-screen") == arg || QLatin1String("--small-screen") == arg) {
+ smallScreen = true;
+ } else if (QLatin1String("-volume") == arg || QLatin1String("--volume") == arg) {
+ if (!args.empty()) {
+ args.removeFirst();
+ volume = qMax(qMin(args.first().toFloat(), float(1.0)), float(0.0));
+ }
+ } else if (fileName.isNull()) {
+ fileName = arg;
+ }
+ args.removeFirst();
}
- MediaPlayer player(fileString, hasSmallScreen);
+ MediaPlayer player;
+ player.setSmallScreen(smallScreen);
+ if (DefaultVolume != volume)
+ player.setVolume(volume);
+ if (!fileName.isNull())
+ player.setFile(fileName);
- if (hasSmallScreen)
+ if (smallScreen)
player.showMaximized();
else
player.show();
diff --git a/demos/qmediaplayer/mediaplayer.cpp b/demos/qmediaplayer/mediaplayer.cpp
index 97a8e35..5bf7d6d 100644
--- a/demos/qmediaplayer/mediaplayer.cpp
+++ b/demos/qmediaplayer/mediaplayer.cpp
@@ -152,12 +152,10 @@ void MediaVideoWidget::dragEnterEvent(QDragEnterEvent *e) {
}
-MediaPlayer::MediaPlayer(const QString &filePath,
- const bool hasSmallScreen) :
+MediaPlayer::MediaPlayer() :
playButton(0), nextEffect(0), settingsDialog(0), ui(0),
m_AudioOutput(Phonon::VideoCategory),
- m_videoWidget(new MediaVideoWidget(this)),
- m_hasSmallScreen(hasSmallScreen)
+ m_videoWidget(new MediaVideoWidget(this))
{
setWindowTitle(tr("Media Player"));
setContextMenuPolicy(Qt::CustomContextMenu);
@@ -346,8 +344,6 @@ MediaPlayer::MediaPlayer(const QString &filePath,
m_audioOutputPath = Phonon::createPath(&m_MediaObject, &m_AudioOutput);
Phonon::createPath(&m_MediaObject, m_videoWidget);
- if (!filePath.isEmpty())
- setFile(filePath);
resize(minimumSizeHint());
}
@@ -358,7 +354,7 @@ void MediaPlayer::stateChanged(Phonon::State newstate, Phonon::State oldstate)
if (oldstate == Phonon::LoadingState) {
QRect videoHintRect = QRect(QPoint(0, 0), m_videoWindow.sizeHint());
QRect newVideoRect = QApplication::desktop()->screenGeometry().intersected(videoHintRect);
- if (!m_hasSmallScreen) {
+ if (!m_smallScreen) {
if (m_MediaObject.hasVideo()) {
// Flush event que so that sizeHint takes the
// recently shown/hidden m_videoWindow into account:
@@ -466,6 +462,16 @@ void MediaPlayer::initSettingsDialog()
}
+void MediaPlayer::setVolume(qreal volume)
+{
+ m_AudioOutput.setVolume(volume);
+}
+
+void MediaPlayer::setSmallScreen(bool smallScreen)
+{
+ m_smallScreen = smallScreen;
+}
+
void MediaPlayer::effectChanged()
{
int currentIndex = ui->audioEffectsCombo->currentIndex();
@@ -589,7 +595,7 @@ void MediaPlayer::configureEffect()
effectDialog.exec();
if (effectDialog.result() != QDialog::Accepted) {
- //we need to restore the paramaters values
+ //we need to restore the parameters values
int currentIndex = 0;
foreach(Phonon::EffectParameter param, nextEffect->parameters()) {
nextEffect->setParameterValue(param, savedParamValues.at(currentIndex++));
@@ -685,7 +691,7 @@ bool MediaPlayer::playPauseForDialog()
// If we're running on a small screen, we want to pause the video when
// popping up dialogs. We neither want to tamper with the state if the
// user has paused.
- if (m_hasSmallScreen && m_MediaObject.hasVideo()) {
+ if (m_smallScreen && m_MediaObject.hasVideo()) {
if (Phonon::PlayingState == m_MediaObject.state()) {
m_MediaObject.pause();
return true;
diff --git a/demos/qmediaplayer/mediaplayer.h b/demos/qmediaplayer/mediaplayer.h
index d6ae58b..73450fe 100644
--- a/demos/qmediaplayer/mediaplayer.h
+++ b/demos/qmediaplayer/mediaplayer.h
@@ -104,8 +104,7 @@ class MediaPlayer :
{
Q_OBJECT
public:
- MediaPlayer(const QString &,
- const bool hasSmallScreen);
+ MediaPlayer();
void dragEnterEvent(QDragEnterEvent *e);
void dragMoveEvent(QDragMoveEvent *e);
@@ -115,6 +114,8 @@ public:
void setLocation(const QString &location);
void initVideoWindow();
void initSettingsDialog();
+ void setVolume(qreal volume);
+ void setSmallScreen(bool smallScreen);
public slots:
void openFile();
@@ -171,7 +172,7 @@ private:
Phonon::AudioOutput m_AudioOutput;
MediaVideoWidget *m_videoWidget;
Phonon::Path m_audioOutputPath;
- const bool m_hasSmallScreen;
+ bool m_smallScreen;
};
#endif //MEDIAPLAYER_H
diff --git a/demos/qmediaplayer/qmediaplayer.pro b/demos/qmediaplayer/qmediaplayer.pro
index 9407a81..8803d2e 100644
--- a/demos/qmediaplayer/qmediaplayer.pro
+++ b/demos/qmediaplayer/qmediaplayer.pro
@@ -27,7 +27,7 @@ DEPLOYMENT_PLUGIN += phonon_ds9 phonon_waveout
symbian {
TARGET.UID3 = 0xA000C613
- addFiles.sources = ../embedded/desktopservices/data/sax.mp3
+ addFiles.files = ../embedded/desktopservices/data/sax.mp3
addFiles.path = /data/sounds/
DEPLOYMENT += addFiles
diff --git a/demos/qtdemo/itemcircleanimation.h b/demos/qtdemo/itemcircleanimation.h
index 425d2f5..7276f7f 100644
--- a/demos/qtdemo/itemcircleanimation.h
+++ b/demos/qtdemo/itemcircleanimation.h
@@ -61,7 +61,7 @@ public:
ItemCircleAnimation(QGraphicsScene *scene = 0, QGraphicsItem *parent = 0);
virtual ~ItemCircleAnimation();
- // overidden methods:
+ // overridden methods:
QRectF boundingRect() const;
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = 0);
void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
diff --git a/demos/qtdemo/mainwindow.cpp b/demos/qtdemo/mainwindow.cpp
index 16c5bf3..e39802a 100644
--- a/demos/qtdemo/mainwindow.cpp
+++ b/demos/qtdemo/mainwindow.cpp
@@ -388,7 +388,7 @@ void MainWindow::keyPressEvent(QKeyEvent *event)
s += "\nAdapt: ";
s += Colors::noAdapt ? "off" : "on";
- s += "\nAdaption occured: ";
+ s += "\nAdaption occurred: ";
s += Colors::adapted ? "yes" : "no";
s += "\nOpenGL version: ";
s += Colors::glVersion;
diff --git a/demos/qtdemo/mainwindow.h b/demos/qtdemo/mainwindow.h
index b8cfda6..460f941 100644
--- a/demos/qtdemo/mainwindow.h
+++ b/demos/qtdemo/mainwindow.h
@@ -74,7 +74,7 @@ public:
DemoTextItem *fpsLabel;
protected:
- // Overidden methods:
+ // Overridden methods:
void showEvent(QShowEvent *event);
void keyPressEvent(QKeyEvent *event);
void resizeEvent(QResizeEvent *event);
diff --git a/demos/qtdemo/qmlShell.qml b/demos/qtdemo/qmlShell.qml
index 2764865..8ca06f1 100644
--- a/demos/qtdemo/qmlShell.qml
+++ b/demos/qtdemo/qmlShell.qml
@@ -85,7 +85,7 @@ Item {
MouseArea{
anchors.fill: parent
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
- onClicked: loader.focus=true;/* and don't propogate to the 'exit' area*/
+ onClicked: loader.focus=true;/* and don't propagate to the 'exit' area*/
}
Rectangle{ id: innerFrame
diff --git a/demos/qtdemo/textbutton.h b/demos/qtdemo/textbutton.h
index 55b4edc..039f923 100644
--- a/demos/qtdemo/textbutton.h
+++ b/demos/qtdemo/textbutton.h
@@ -61,7 +61,7 @@ public:
QGraphicsScene *scene = 0, QGraphicsItem *parent = 0, BUTTONTYPE color = SIDEBAR);
virtual ~TextButton();
- // overidden methods:
+ // overridden methods:
virtual QRectF boundingRect() const;
virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = 0){};
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
diff --git a/demos/qtdemo/xml/examples.xml b/demos/qtdemo/xml/examples.xml
index 27f72bb..b94d2b8 100644
--- a/demos/qtdemo/xml/examples.xml
+++ b/demos/qtdemo/xml/examples.xml
@@ -19,7 +19,6 @@
<example filename="sub-attaq" name="Sub-attaq" />
<example filename="spectrum" name="Spectrum Analyzer" />
<example filename="declarative/minehunt" name="Minehunt"/>
- <example filename="declarative/snake" name="Snake" executable="false" qml="true"/>
<example filename="deform" name="Vector Deformation" />
<example filename="books" name="Books" />
<example filename="mainwindow" name="Main Window" />
diff --git a/demos/spectrum/3rdparty/fftreal/fftreal.pro b/demos/spectrum/3rdparty/fftreal/fftreal.pro
index 6305af4..e5093ba 100644
--- a/demos/spectrum/3rdparty/fftreal/fftreal.pro
+++ b/demos/spectrum/3rdparty/fftreal/fftreal.pro
@@ -40,7 +40,7 @@ symbian {
macx {
CONFIG += lib_bundle
} else {
- !symbian: DESTDIR = ../..
+ !symbian: DESTDIR = ../..$${spectrum_build_dir}
}
# Install
diff --git a/demos/spectrum/app/app.pro b/demos/spectrum/app/app.pro
index 4fe8b6d..a75b41a 100644
--- a/demos/spectrum/app/app.pro
+++ b/demos/spectrum/app/app.pro
@@ -65,7 +65,7 @@ symbian {
LIBS += -F$${fftreal_dir}
LIBS += -framework fftreal
} else {
- LIBS += -L..
+ LIBS += -L..$${spectrum_build_dir}
LIBS += -lfftreal
}
}
@@ -86,15 +86,13 @@ symbian {
!contains(DEFINES, DISABLE_FFT) {
# Include FFTReal DLL in the SIS file
- fftreal.sources = ../fftreal.dll
+ fftreal.files = ../fftreal.dll
fftreal.path = !:/sys/bin
DEPLOYMENT += fftreal
}
} else {
+ DESTDIR = ..$${spectrum_build_dir}
macx {
- # Specify directory in which to create spectrum.app bundle
- DESTDIR = ..
-
!contains(DEFINES, DISABLE_FFT) {
# Relocate fftreal.framework into spectrum.app bundle
framework_dir = ../spectrum.app/Contents/Frameworks
@@ -110,10 +108,7 @@ symbian {
../spectrum.app/Contents/MacOS/spectrum
}
} else {
- # Specify directory in which to create spectrum application
- DESTDIR = ..
-
- unix: {
+ linux-g++*: {
# Provide relative path from application to fftreal library
QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN
}
diff --git a/demos/spectrum/app/engine.cpp b/demos/spectrum/app/engine.cpp
index 119a0e3..cd847fe 100644
--- a/demos/spectrum/app/engine.cpp
+++ b/demos/spectrum/app/engine.cpp
@@ -85,6 +85,7 @@ Engine::Engine(QObject *parent)
, m_state(QAudio::StoppedState)
, m_generateTone(false)
, m_file(0)
+ , m_analysisFile(0)
, m_availableAudioInputDevices
(QAudioDeviceInfo::availableDevices(QAudio::AudioInput))
, m_audioInputDevice(QAudioDeviceInfo::defaultInputDevice())
@@ -96,15 +97,19 @@ Engine::Engine(QObject *parent)
, m_audioOutputDevice(QAudioDeviceInfo::defaultOutputDevice())
, m_audioOutput(0)
, m_playPosition(0)
+ , m_bufferPosition(0)
+ , m_bufferLength(0)
, m_dataLength(0)
+ , m_levelBufferLength(0)
, m_rmsLevel(0.0)
, m_peakLevel(0.0)
- , m_spectrumLengthBytes(0)
+ , m_spectrumBufferLength(0)
, m_spectrumAnalyser()
, m_spectrumPosition(0)
, m_count(0)
{
qRegisterMetaType<FrequencySpectrum>("FrequencySpectrum");
+ qRegisterMetaType<WindowFunction>("WindowFunction");
CHECKED_CONNECT(&m_spectrumAnalyser,
SIGNAL(spectrumChanged(FrequencySpectrum)),
this,
@@ -132,34 +137,33 @@ Engine::~Engine()
bool Engine::loadFile(const QString &fileName)
{
+ reset();
bool result = false;
- m_generateTone = false;
-
- Q_ASSERT(!fileName.isEmpty());
+ Q_ASSERT(!m_generateTone);
Q_ASSERT(!m_file);
- m_file = new QFile(fileName, this);
- m_file->setFileName(fileName);
- Q_ASSERT(m_file->exists());
- if (m_file->open(QFile::ReadOnly)) {
- m_wavFile.readHeader(*m_file);
- if (isPCMS16LE(m_wavFile.format())) {
+ Q_ASSERT(!fileName.isEmpty());
+ m_file = new WavFile(this);
+ if (m_file->open(fileName)) {
+ if (isPCMS16LE(m_file->fileFormat())) {
result = initialize();
} else {
emit errorMessage(tr("Audio format not supported"),
- formatToString(m_wavFile.format()));
+ formatToString(m_file->fileFormat()));
}
} else {
emit errorMessage(tr("Could not open file"), fileName);
}
-
- delete m_file;
- m_file = 0;
-
+ if (result) {
+ m_analysisFile = new WavFile(this);
+ m_analysisFile->open(fileName);
+ }
return result;
}
bool Engine::generateTone(const Tone &tone)
{
+ reset();
+ Q_ASSERT(!m_generateTone);
Q_ASSERT(!m_file);
m_generateTone = true;
m_tone = tone;
@@ -172,6 +176,7 @@ bool Engine::generateTone(const Tone &tone)
bool Engine::generateSweptTone(qreal amplitude)
{
+ Q_ASSERT(!m_generateTone);
Q_ASSERT(!m_file);
m_generateTone = true;
m_tone.startFreq = 1;
@@ -185,41 +190,18 @@ bool Engine::generateSweptTone(qreal amplitude)
bool Engine::initializeRecord()
{
+ reset();
ENGINE_DEBUG << "Engine::initializeRecord";
+ Q_ASSERT(!m_generateTone);
Q_ASSERT(!m_file);
m_generateTone = false;
m_tone = SweptTone();
return initialize();
}
-qint64 Engine::bufferDuration() const
-{
- return BufferDurationUs;
-}
-
-qint64 Engine::dataDuration() const
+qint64 Engine::bufferLength() const
{
- qint64 result = 0;
- if (QAudioFormat() != m_format)
- result = audioDuration(m_format, m_dataLength);
- return result;
-}
-
-qint64 Engine::audioBufferLength() const
-{
- qint64 length = 0;
- if (QAudio::ActiveState == m_state || QAudio::IdleState == m_state) {
- Q_ASSERT(QAudioFormat() != m_format);
- switch (m_mode) {
- case QAudio::AudioInput:
- length = m_audioInput->bufferSize();
- break;
- case QAudio::AudioOutput:
- length = m_audioOutput->bufferSize();
- break;
- }
- }
- return length;
+ return m_file ? m_file->size() : m_bufferLength;
}
void Engine::setWindowFunction(WindowFunction type)
@@ -252,7 +234,7 @@ void Engine::startRecording()
this, SLOT(audioNotify()));
m_count = 0;
m_dataLength = 0;
- emit dataDurationChanged(0);
+ emit dataLengthChanged(0);
m_audioInputIODevice = m_audioInput->start();
CHECKED_CONNECT(m_audioInputIODevice, SIGNAL(readyRead()),
this, SLOT(audioDataReady()));
@@ -275,7 +257,6 @@ void Engine::startPlayback()
} else {
m_spectrumAnalyser.cancelCalculation();
spectrumChanged(0, 0, FrequencySpectrum());
-
setPlayPosition(0, true);
stopRecording();
m_mode = QAudio::AudioOutput;
@@ -284,10 +265,17 @@ void Engine::startPlayback()
CHECKED_CONNECT(m_audioOutput, SIGNAL(notify()),
this, SLOT(audioNotify()));
m_count = 0;
- m_audioOutputIODevice.close();
- m_audioOutputIODevice.setBuffer(&m_buffer);
- m_audioOutputIODevice.open(QIODevice::ReadOnly);
- m_audioOutput->start(&m_audioOutputIODevice);
+ if (m_file) {
+ m_file->seek(0);
+ m_bufferPosition = 0;
+ m_dataLength = 0;
+ m_audioOutput->start(m_file);
+ } else {
+ m_audioOutputIODevice.close();
+ m_audioOutputIODevice.setBuffer(&m_buffer);
+ m_audioOutputIODevice.open(QIODevice::ReadOnly);
+ m_audioOutput->start(&m_audioOutputIODevice);
+ }
}
}
}
@@ -332,40 +320,55 @@ void Engine::audioNotify()
{
switch (m_mode) {
case QAudio::AudioInput: {
- const qint64 recordPosition =
- qMin(BufferDurationUs, m_audioInput->processedUSecs());
+ const qint64 recordPosition = qMin(m_bufferLength, audioLength(m_format, m_audioInput->processedUSecs()));
setRecordPosition(recordPosition);
-
- // Calculate level of most recently captured data
- qint64 levelLength = audioLength(m_format, LevelWindowUs);
- levelLength = qMin(m_dataLength, levelLength);
- const qint64 levelPosition = m_dataLength - levelLength;
- calculateLevel(levelPosition, levelLength);
-
- // Calculate spectrum of most recently captured data
- if (m_dataLength >= m_spectrumLengthBytes) {
- const qint64 spectrumPosition = m_dataLength - m_spectrumLengthBytes;
+ const qint64 levelPosition = m_dataLength - m_levelBufferLength;
+ if (levelPosition >= 0)
+ calculateLevel(levelPosition, m_levelBufferLength);
+ if (m_dataLength >= m_spectrumBufferLength) {
+ const qint64 spectrumPosition = m_dataLength - m_spectrumBufferLength;
calculateSpectrum(spectrumPosition);
}
+ emit bufferChanged(0, m_dataLength, m_buffer);
}
break;
case QAudio::AudioOutput: {
- const qint64 playPosition =
- qMin(dataDuration(), m_audioOutput->processedUSecs());
- setPlayPosition(playPosition);
-
- qint64 analysisPosition = audioLength(m_format, playPosition);
-
- // Calculate level of data starting at current playback position
- const qint64 levelLength = audioLength(m_format, LevelWindowUs);
- if (analysisPosition + levelLength < m_dataLength)
- calculateLevel(analysisPosition, levelLength);
-
- if (analysisPosition + m_spectrumLengthBytes < m_dataLength)
- calculateSpectrum(analysisPosition);
-
- if (dataDuration() == playPosition)
- stopPlayback();
+ const qint64 playPosition = audioLength(m_format, m_audioOutput->processedUSecs());
+ setPlayPosition(qMin(bufferLength(), playPosition));
+ const qint64 levelPosition = playPosition - m_levelBufferLength;
+ const qint64 spectrumPosition = playPosition - m_spectrumBufferLength;
+ if (m_file) {
+ if (levelPosition > m_bufferPosition ||
+ spectrumPosition > m_bufferPosition ||
+ qMax(m_levelBufferLength, m_spectrumBufferLength) > m_dataLength) {
+ m_bufferPosition = 0;
+ m_dataLength = 0;
+ // Data needs to be read into m_buffer in order to be analysed
+ const qint64 readPos = qMax(qint64(0), qMin(levelPosition, spectrumPosition));
+ const qint64 readEnd = qMin(m_analysisFile->size(), qMax(levelPosition + m_levelBufferLength, spectrumPosition + m_spectrumBufferLength));
+ const qint64 readLen = readEnd - readPos + audioLength(m_format, WaveformWindowDuration);
+ qDebug() << "Engine::audioNotify [1]"
+ << "analysisFileSize" << m_analysisFile->size()
+ << "readPos" << readPos
+ << "readLen" << readLen;
+ if (m_analysisFile->seek(readPos + m_analysisFile->headerLength())) {
+ m_buffer.resize(readLen);
+ m_bufferPosition = readPos;
+ m_dataLength = m_analysisFile->read(m_buffer.data(), readLen);
+ qDebug() << "Engine::audioNotify [2]" << "bufferPosition" << m_bufferPosition << "dataLength" << m_dataLength;
+ } else {
+ qDebug() << "Engine::audioNotify [2]" << "file seek error";
+ }
+ emit bufferChanged(m_bufferPosition, m_dataLength, m_buffer);
+ }
+ } else {
+ if (playPosition >= m_dataLength)
+ stopPlayback();
+ }
+ if (levelPosition >= 0 && levelPosition + m_levelBufferLength < m_bufferPosition + m_dataLength)
+ calculateLevel(levelPosition, m_levelBufferLength);
+ if (spectrumPosition >= 0 && spectrumPosition + m_spectrumBufferLength < m_bufferPosition + m_dataLength)
+ calculateSpectrum(spectrumPosition);
}
break;
}
@@ -376,27 +379,32 @@ void Engine::audioStateChanged(QAudio::State state)
ENGINE_DEBUG << "Engine::audioStateChanged from" << m_state
<< "to" << state;
- if (QAudio::StoppedState == state) {
- // Check error
- QAudio::Error error = QAudio::NoError;
- switch (m_mode) {
- case QAudio::AudioInput:
- error = m_audioInput->error();
- break;
- case QAudio::AudioOutput:
- error = m_audioOutput->error();
- break;
- }
- if (QAudio::NoError != error) {
- reset();
- return;
+ if (QAudio::IdleState == state && m_file && m_file->pos() == m_file->size()) {
+ stopPlayback();
+ } else {
+ if (QAudio::StoppedState == state) {
+ // Check error
+ QAudio::Error error = QAudio::NoError;
+ switch (m_mode) {
+ case QAudio::AudioInput:
+ error = m_audioInput->error();
+ break;
+ case QAudio::AudioOutput:
+ error = m_audioOutput->error();
+ break;
+ }
+ if (QAudio::NoError != error) {
+ reset();
+ return;
+ }
}
+ setState(state);
}
- setState(state);
}
void Engine::audioDataReady()
{
+ Q_ASSERT(0 == m_bufferPosition);
const qint64 bytesReady = m_audioInput->bytesReady();
const qint64 bytesSpace = m_buffer.size() - m_dataLength;
const qint64 bytesToRead = qMin(bytesReady, bytesSpace);
@@ -407,9 +415,7 @@ void Engine::audioDataReady()
if (bytesRead) {
m_dataLength += bytesRead;
-
- const qint64 duration = audioDuration(m_format, m_dataLength);
- emit dataDurationChanged(duration);
+ emit dataLengthChanged(dataLength());
}
if (m_buffer.size() == m_dataLength)
@@ -419,9 +425,7 @@ void Engine::audioDataReady()
void Engine::spectrumChanged(const FrequencySpectrum &spectrum)
{
ENGINE_DEBUG << "Engine::spectrumChanged" << "pos" << m_spectrumPosition;
- const qint64 positionUs = audioDuration(m_format, m_spectrumPosition);
- const qint64 lengthUs = audioDuration(m_format, m_spectrumLengthBytes);
- emit spectrumChanged(positionUs, lengthUs, spectrum);
+ emit spectrumChanged(m_spectrumPosition, m_spectrumBufferLength, spectrum);
}
@@ -429,12 +433,8 @@ void Engine::spectrumChanged(const FrequencySpectrum &spectrum)
// Private functions
//-----------------------------------------------------------------------------
-void Engine::reset()
+void Engine::resetAudioDevices()
{
- stopRecording();
- stopPlayback();
- setState(QAudio::AudioInput, QAudio::StoppedState);
- setFormat(QAudioFormat());
delete m_audioInput;
m_audioInput = 0;
m_audioInputIODevice = 0;
@@ -442,55 +442,71 @@ void Engine::reset()
delete m_audioOutput;
m_audioOutput = 0;
setPlayPosition(0);
- m_buffer.clear();
- m_dataLength = 0;
m_spectrumPosition = 0;
- emit dataDurationChanged(0);
setLevel(0.0, 0.0, 0);
}
+void Engine::reset()
+{
+ stopRecording();
+ stopPlayback();
+ setState(QAudio::AudioInput, QAudio::StoppedState);
+ setFormat(QAudioFormat());
+ m_generateTone = false;
+ delete m_file;
+ m_file = 0;
+ delete m_analysisFile;
+ m_analysisFile = 0;
+ m_buffer.clear();
+ m_bufferPosition = 0;
+ m_bufferLength = 0;
+ m_dataLength = 0;
+ emit dataLengthChanged(0);
+ resetAudioDevices();
+}
+
bool Engine::initialize()
{
bool result = false;
- reset();
+ QAudioFormat format = m_format;
if (selectFormat()) {
- const qint64 bufferLength = audioLength(m_format, BufferDurationUs);
- m_buffer.resize(bufferLength);
- m_buffer.fill(0);
- emit bufferDurationChanged(BufferDurationUs);
-
- if (m_generateTone) {
- if (0 == m_tone.endFreq) {
- const qreal nyquist = nyquistFrequency(m_format);
- m_tone.endFreq = qMin(qreal(SpectrumHighFreq), nyquist);
- }
-
- // Call function defined in utils.h, at global scope
- ::generateTone(m_tone, m_format, m_buffer);
- m_dataLength = m_buffer.size();
- emit dataDurationChanged(bufferDuration());
- setRecordPosition(bufferDuration());
- result = true;
- } else if (m_file) {
- const qint64 length = m_wavFile.readData(*m_file, m_buffer, m_format);
- if (length) {
- m_dataLength = length;
- emit dataDurationChanged(dataDuration());
- setRecordPosition(dataDuration());
+ if (m_format != format) {
+ resetAudioDevices();
+ if (m_file) {
+ emit bufferLengthChanged(bufferLength());
+ emit dataLengthChanged(dataLength());
+ emit bufferChanged(0, 0, m_buffer);
+ setRecordPosition(bufferLength());
result = true;
+ } else {
+ m_bufferLength = audioLength(m_format, BufferDurationUs);
+ m_buffer.resize(m_bufferLength);
+ m_buffer.fill(0);
+ emit bufferLengthChanged(bufferLength());
+ if (m_generateTone) {
+ if (0 == m_tone.endFreq) {
+ const qreal nyquist = nyquistFrequency(m_format);
+ m_tone.endFreq = qMin(qreal(SpectrumHighFreq), nyquist);
+ }
+ // Call function defined in utils.h, at global scope
+ ::generateTone(m_tone, m_format, m_buffer);
+ m_dataLength = m_bufferLength;
+ emit dataLengthChanged(dataLength());
+ emit bufferChanged(0, m_dataLength, m_buffer);
+ setRecordPosition(m_bufferLength);
+ result = true;
+ } else {
+ emit bufferChanged(0, 0, m_buffer);
+ m_audioInput = new QAudioInput(m_audioInputDevice, m_format, this);
+ m_audioInput->setNotifyInterval(NotifyIntervalMs);
+ result = true;
+ }
}
- } else {
- m_audioInput = new QAudioInput(m_audioInputDevice, m_format, this);
- m_audioInput->setNotifyInterval(NotifyIntervalMs);
- result = true;
+ m_audioOutput = new QAudioOutput(m_audioOutputDevice, m_format, this);
+ m_audioOutput->setNotifyInterval(NotifyIntervalMs);
}
-
- m_audioOutput = new QAudioOutput(m_audioOutputDevice, m_format, this);
- m_audioOutput->setNotifyInterval(NotifyIntervalMs);
- m_spectrumLengthBytes = SpectrumLengthSamples *
- (m_format.sampleSize() / 8) * m_format.channels();
} else {
if (m_file)
emit errorMessage(tr("Audio format not supported"),
@@ -501,6 +517,8 @@ bool Engine::initialize()
emit errorMessage(tr("No common input / output format found"), "");
}
+ ENGINE_DEBUG << "Engine::initialize" << "m_bufferLength" << m_bufferLength;
+ ENGINE_DEBUG << "Engine::initialize" << "m_dataLength" << m_dataLength;
ENGINE_DEBUG << "Engine::initialize" << "format" << m_format;
return result;
@@ -510,21 +528,15 @@ bool Engine::selectFormat()
{
bool foundSupportedFormat = false;
- if (m_file) {
- // Header is read from the WAV file; just need to check whether
- // it is supported by the audio output device
- QAudioFormat format = m_wavFile.format();
- if (m_audioOutputDevice.isFormatSupported(m_wavFile.format())) {
- setFormat(m_wavFile.format());
+ if (m_file || QAudioFormat() != m_format) {
+ QAudioFormat format = m_format;
+ if (m_file)
+ // Header is read from the WAV file; just need to check whether
+ // it is supported by the audio output device
+ format = m_file->fileFormat();
+ if (m_audioOutputDevice.isFormatSupported(format)) {
+ setFormat(format);
foundSupportedFormat = true;
- } else {
- // Try flipping mono <-> stereo
- const int channels = (format.channels() == 1) ? 2 : 1;
- format.setChannels(channels);
- if (m_audioOutputDevice.isFormatSupported(format)) {
- setFormat(format);
- foundSupportedFormat = true;
- }
}
} else {
@@ -648,12 +660,12 @@ void Engine::calculateLevel(qint64 position, qint64 length)
Q_UNUSED(position)
Q_UNUSED(length)
#else
- Q_ASSERT(position + length <= m_dataLength);
+ Q_ASSERT(position + length <= m_bufferPosition + m_dataLength);
qreal peakLevel = 0.0;
qreal sum = 0.0;
- const char *ptr = m_buffer.constData() + position;
+ const char *ptr = m_buffer.constData() + position - m_bufferPosition;
const char *const end = ptr + length;
while (ptr < end) {
const qint16 value = *reinterpret_cast<const qint16*>(ptr);
@@ -679,18 +691,18 @@ void Engine::calculateSpectrum(qint64 position)
#ifdef DISABLE_SPECTRUM
Q_UNUSED(position)
#else
- Q_ASSERT(position + m_spectrumLengthBytes <= m_dataLength);
- Q_ASSERT(0 == m_spectrumLengthBytes % 2); // constraint of FFT algorithm
+ Q_ASSERT(position + m_spectrumBufferLength <= m_bufferPosition + m_dataLength);
+ Q_ASSERT(0 == m_spectrumBufferLength % 2); // constraint of FFT algorithm
// QThread::currentThread is marked 'for internal use only', but
// we're only using it for debug output here, so it's probably OK :)
ENGINE_DEBUG << "Engine::calculateSpectrum" << QThread::currentThread()
- << "count" << m_count << "pos" << position << "len" << m_spectrumLengthBytes
+ << "count" << m_count << "pos" << position << "len" << m_spectrumBufferLength
<< "spectrumAnalyser.isReady" << m_spectrumAnalyser.isReady();
if(m_spectrumAnalyser.isReady()) {
- m_spectrumBuffer = QByteArray::fromRawData(m_buffer.constData() + position,
- m_spectrumLengthBytes);
+ m_spectrumBuffer = QByteArray::fromRawData(m_buffer.constData() + position - m_bufferPosition,
+ m_spectrumBufferLength);
m_spectrumPosition = position;
m_spectrumAnalyser.calculate(m_spectrumBuffer, m_format);
}
@@ -701,6 +713,9 @@ void Engine::setFormat(const QAudioFormat &format)
{
const bool changed = (format != m_format);
m_format = format;
+ m_levelBufferLength = audioLength(m_format, LevelWindowUs);
+ m_spectrumBufferLength = SpectrumLengthSamples *
+ (m_format.sampleSize() / 8) * m_format.channels();
if (changed)
emit formatChanged(m_format);
}
diff --git a/demos/spectrum/app/engine.h b/demos/spectrum/app/engine.h
index b6fe3ed..c97083e 100644
--- a/demos/spectrum/app/engine.h
+++ b/demos/spectrum/app/engine.h
@@ -91,12 +91,6 @@ public:
QAudio::State state() const { return m_state; }
/**
- * \return Reference to internal audio buffer
- * \note This reference is valid for the lifetime of the Engine
- */
- const QByteArray& buffer() const { return m_buffer; }
-
- /**
* \return Current audio format
* \note May be QAudioFormat() if engine is not initialized
*/
@@ -129,7 +123,7 @@ public:
/**
* Position of the audio input device.
- * \return Position in microseconds.
+ * \return Position in bytes.
*/
qint64 recordPosition() const { return m_recordPosition; }
@@ -147,27 +141,21 @@ public:
/**
* Position of the audio output device.
- * \return Position in microseconds.
+ * \return Position in bytes.
*/
qint64 playPosition() const { return m_playPosition; }
/**
* Length of the internal engine buffer.
- * \return Buffer length in microseconds.
+ * \return Buffer length in bytes.
*/
- qint64 bufferDuration() const;
+ qint64 bufferLength() const;
/**
* Amount of data held in the buffer.
- * \return Data duration in microseconds.
+ * \return Data length in bytes.
*/
- qint64 dataDuration() const;
-
- /**
- * Returns the size of the underlying audio buffer in bytes.
- * This should be an approximation of the capture latency.
- */
- qint64 audioBufferLength() const;
+ qint64 dataLength() const { return m_dataLength; }
/**
* Set window function applied to audio data before spectral analysis.
@@ -203,23 +191,23 @@ signals:
* Length of buffer has changed.
* \param duration Duration in microseconds
*/
- void bufferDurationChanged(qint64 duration);
+ void bufferLengthChanged(qint64 duration);
/**
* Amount of data in buffer has changed.
- * \param duration Duration of data in microseconds
+ * \param Length of data in bytes
*/
- void dataDurationChanged(qint64 duration);
+ void dataLengthChanged(qint64 duration);
/**
* Position of the audio input device has changed.
- * \param position Position in microseconds
+ * \param position Position in bytes
*/
void recordPositionChanged(qint64 position);
/**
* Position of the audio output device has changed.
- * \param position Position in microseconds
+ * \param position Position in bytes
*/
void playPositionChanged(qint64 position);
@@ -227,18 +215,25 @@ signals:
* Level changed
* \param rmsLevel RMS level in range 0.0 - 1.0
* \param peakLevel Peak level in range 0.0 - 1.0
- * \param numSamples Number of audio samples analysed
+ * \param numSamples Number of audio samples analyzed
*/
void levelChanged(qreal rmsLevel, qreal peakLevel, int numSamples);
/**
* Spectrum has changed.
- * \param position Position of start of window in microseconds
- * \param length Length of window in microseconds
+ * \param position Position of start of window in bytes
+ * \param length Length of window in bytes
* \param spectrum Resulting frequency spectrum
*/
void spectrumChanged(qint64 position, qint64 length, const FrequencySpectrum &spectrum);
+ /**
+ * Buffer containing audio data has changed.
+ * \param position Position of start of buffer in bytes
+ * \param buffer Buffer
+ */
+ void bufferChanged(qint64 position, qint64 length, const QByteArray &buffer);
+
private slots:
void audioNotify();
void audioStateChanged(QAudio::State state);
@@ -246,6 +241,7 @@ private slots:
void spectrumChanged(const FrequencySpectrum &spectrum);
private:
+ void resetAudioDevices();
bool initialize();
bool selectFormat();
void stopRecording();
@@ -275,8 +271,10 @@ private:
bool m_generateTone;
SweptTone m_tone;
- QFile* m_file;
- WavFile m_wavFile;
+ WavFile* m_file;
+ // We need a second file handle via which to read data into m_buffer
+ // for analysis
+ WavFile* m_analysisFile;
QAudioFormat m_format;
@@ -293,12 +291,15 @@ private:
QBuffer m_audioOutputIODevice;
QByteArray m_buffer;
+ qint64 m_bufferPosition;
+ qint64 m_bufferLength;
qint64 m_dataLength;
+ int m_levelBufferLength;
qreal m_rmsLevel;
qreal m_peakLevel;
- int m_spectrumLengthBytes;
+ int m_spectrumBufferLength;
QByteArray m_spectrumBuffer;
SpectrumAnalyser m_spectrumAnalyser;
qint64 m_spectrumPosition;
diff --git a/demos/spectrum/app/levelmeter.h b/demos/spectrum/app/levelmeter.h
index 38d13b1..683dba7 100644
--- a/demos/spectrum/app/levelmeter.h
+++ b/demos/spectrum/app/levelmeter.h
@@ -46,7 +46,7 @@
/**
* Widget which displays a vertical audio level meter, indicating the
- * RMS and peak levels of the window of audio samples most recently analysed
+ * RMS and peak levels of the window of audio samples most recently analyzed
* by the Engine.
*/
class LevelMeter : public QWidget {
diff --git a/demos/spectrum/app/main.cpp b/demos/spectrum/app/main.cpp
index 3bdfb7d..fb5183e 100644
--- a/demos/spectrum/app/main.cpp
+++ b/demos/spectrum/app/main.cpp
@@ -44,7 +44,7 @@
int main(int argc, char **argv)
{
QApplication app(argc, argv);
- app.setApplicationName("QtMultimedia spectrum analyser");
+ app.setApplicationName("QtMultimedia spectrum analyzer");
MainWidget w;
#ifdef Q_OS_SYMBIAN
diff --git a/demos/spectrum/app/mainwidget.cpp b/demos/spectrum/app/mainwidget.cpp
index dd51a91..4b53bbe 100644
--- a/demos/spectrum/app/mainwidget.cpp
+++ b/demos/spectrum/app/mainwidget.cpp
@@ -65,7 +65,7 @@ MainWidget::MainWidget(QWidget *parent)
, m_mode(NoMode)
, m_engine(new Engine(this))
#ifndef DISABLE_WAVEFORM
- , m_waveform(new Waveform(m_engine->buffer(), this))
+ , m_waveform(new Waveform(this))
#endif
, m_progressBar(new ProgressBar(this))
, m_spectrograph(new Spectrograph(this))
@@ -166,19 +166,18 @@ void MainWidget::timerEvent(QTimerEvent *event)
m_infoMessage->setText("");
}
-void MainWidget::positionChanged(qint64 positionUs)
+void MainWidget::audioPositionChanged(qint64 position)
{
#ifndef DISABLE_WAVEFORM
- qint64 positionBytes = audioLength(m_engine->format(), positionUs);
- m_waveform->positionChanged(positionBytes);
+ m_waveform->audioPositionChanged(position);
#else
- Q_UNUSED(positionUs)
+ Q_UNUSED(position)
#endif
}
-void MainWidget::bufferDurationChanged(qint64 durationUs)
+void MainWidget::bufferLengthChanged(qint64 length)
{
- m_progressBar->bufferDurationChanged(durationUs);
+ m_progressBar->bufferLengthChanged(length);
}
@@ -186,33 +185,22 @@ void MainWidget::bufferDurationChanged(qint64 durationUs)
// Private slots
//-----------------------------------------------------------------------------
-void MainWidget::dataDurationChanged(qint64 duration)
-{
-#ifndef DISABLE_WAVEFORM
- const qint64 dataLength = audioLength(m_engine->format(), duration);
- m_waveform->dataLengthChanged(dataLength);
-#else
- Q_UNUSED(duration)
-#endif
-
- updateButtonStates();
-}
-
void MainWidget::showFileDialog()
{
- reset();
const QString dir;
const QStringList fileNames = QFileDialog::getOpenFileNames(this, tr("Open WAV file"), dir, "*.wav");
if (fileNames.count()) {
+ reset();
setMode(LoadFileMode);
m_engine->loadFile(fileNames.front());
updateButtonStates();
+ } else {
+ updateModeMenu();
}
}
void MainWidget::showSettingsDialog()
{
- reset();
m_settingsDialog->exec();
if (m_settingsDialog->result() == QDialog::Accepted) {
m_engine->setAudioInputDevice(m_settingsDialog->inputDevice());
@@ -223,9 +211,9 @@ void MainWidget::showSettingsDialog()
void MainWidget::showToneGeneratorDialog()
{
- reset();
m_toneGeneratorDialog->exec();
if (m_toneGeneratorDialog->result() == QDialog::Accepted) {
+ reset();
setMode(GenerateToneMode);
const qreal amplitude = m_toneGeneratorDialog->amplitude();
if (m_toneGeneratorDialog->isFrequencySweepEnabled()) {
@@ -236,6 +224,8 @@ void MainWidget::showToneGeneratorDialog()
m_engine->generateTone(tone);
updateButtonStates();
}
+ } else {
+ updateModeMenu();
}
}
@@ -360,13 +350,13 @@ void MainWidget::connectUi()
CHECKED_CONNECT(m_engine, SIGNAL(formatChanged(const QAudioFormat &)),
this, SLOT(formatChanged(const QAudioFormat &)));
- m_progressBar->bufferDurationChanged(m_engine->bufferDuration());
+ m_progressBar->bufferLengthChanged(m_engine->bufferLength());
- CHECKED_CONNECT(m_engine, SIGNAL(bufferDurationChanged(qint64)),
- this, SLOT(bufferDurationChanged(qint64)));
+ CHECKED_CONNECT(m_engine, SIGNAL(bufferLengthChanged(qint64)),
+ this, SLOT(bufferLengthChanged(qint64)));
- CHECKED_CONNECT(m_engine, SIGNAL(dataDurationChanged(qint64)),
- this, SLOT(dataDurationChanged(qint64)));
+ CHECKED_CONNECT(m_engine, SIGNAL(dataLengthChanged(qint64)),
+ this, SLOT(updateButtonStates()));
CHECKED_CONNECT(m_engine, SIGNAL(recordPositionChanged(qint64)),
m_progressBar, SLOT(recordPositionChanged(qint64)));
@@ -375,10 +365,10 @@ void MainWidget::connectUi()
m_progressBar, SLOT(playPositionChanged(qint64)));
CHECKED_CONNECT(m_engine, SIGNAL(recordPositionChanged(qint64)),
- this, SLOT(positionChanged(qint64)));
+ this, SLOT(audioPositionChanged(qint64)));
CHECKED_CONNECT(m_engine, SIGNAL(playPositionChanged(qint64)),
- this, SLOT(positionChanged(qint64)));
+ this, SLOT(audioPositionChanged(qint64)));
CHECKED_CONNECT(m_engine, SIGNAL(levelChanged(qreal, qreal, int)),
m_levelMeter, SLOT(levelChanged(qreal, qreal, int)));
@@ -394,6 +384,11 @@ void MainWidget::connectUi()
CHECKED_CONNECT(m_spectrograph, SIGNAL(infoMessage(QString, int)),
this, SLOT(infoMessage(QString, int)));
+
+#ifndef DISABLE_WAVEFORM
+ CHECKED_CONNECT(m_engine, SIGNAL(bufferChanged(qint64, qint64, const QByteArray &)),
+ m_waveform, SLOT(bufferChanged(qint64, qint64, const QByteArray &)));
+#endif
}
void MainWidget::createMenus()
@@ -425,7 +420,7 @@ void MainWidget::updateButtonStates()
QAudio::IdleState == m_engine->state());
m_pauseButton->setEnabled(pauseEnabled);
- const bool playEnabled = (m_engine->dataDuration() &&
+ const bool playEnabled = (/*m_engine->dataLength() &&*/
(QAudio::AudioOutput != m_engine->mode() ||
(QAudio::ActiveState != m_engine->state() &&
QAudio::IdleState != m_engine->state())));
@@ -445,10 +440,14 @@ void MainWidget::reset()
void MainWidget::setMode(Mode mode)
{
-
m_mode = mode;
- m_loadFileAction->setChecked(LoadFileMode == mode);
- m_generateToneAction->setChecked(GenerateToneMode == mode);
- m_recordAction->setChecked(RecordMode == mode);
+ updateModeMenu();
+}
+
+void MainWidget::updateModeMenu()
+{
+ m_loadFileAction->setChecked(LoadFileMode == m_mode);
+ m_generateToneAction->setChecked(GenerateToneMode == m_mode);
+ m_recordAction->setChecked(RecordMode == m_mode);
}
diff --git a/demos/spectrum/app/mainwidget.h b/demos/spectrum/app/mainwidget.h
index ddab8b7..13131c0 100644
--- a/demos/spectrum/app/mainwidget.h
+++ b/demos/spectrum/app/mainwidget.h
@@ -80,21 +80,21 @@ public slots:
const FrequencySpectrum &spectrum);
void infoMessage(const QString &message, int timeoutMs);
void errorMessage(const QString &heading, const QString &detail);
- void positionChanged(qint64 position);
- void bufferDurationChanged(qint64 duration);
+ void audioPositionChanged(qint64 position);
+ void bufferLengthChanged(qint64 length);
private slots:
void showFileDialog();
void showSettingsDialog();
void showToneGeneratorDialog();
void initializeRecord();
- void dataDurationChanged(qint64 duration);
+ void updateModeMenu();
+ void updateButtonStates();
private:
void createUi();
void createMenus();
void connectUi();
- void updateButtonStates();
void reset();
enum Mode {
@@ -111,7 +111,9 @@ private:
Engine* m_engine;
+#ifndef DISABLE_WAVEFORM
Waveform* m_waveform;
+#endif
ProgressBar* m_progressBar;
Spectrograph* m_spectrograph;
LevelMeter* m_levelMeter;
diff --git a/demos/spectrum/app/progressbar.cpp b/demos/spectrum/app/progressbar.cpp
index 6bfc690..0ac76f1 100644
--- a/demos/spectrum/app/progressbar.cpp
+++ b/demos/spectrum/app/progressbar.cpp
@@ -44,7 +44,7 @@
ProgressBar::ProgressBar(QWidget *parent)
: QWidget(parent)
- , m_bufferDuration(0)
+ , m_bufferLength(0)
, m_recordPosition(0)
, m_playPosition(0)
, m_windowPosition(0)
@@ -64,7 +64,7 @@ ProgressBar::~ProgressBar()
void ProgressBar::reset()
{
- m_bufferDuration = 0;
+ m_bufferLength = 0;
m_recordPosition = 0;
m_playPosition = 0;
m_windowPosition = 0;
@@ -86,26 +86,26 @@ void ProgressBar::paintEvent(QPaintEvent * /*event*/)
painter.fillRect(rect(), Qt::black);
#endif
- if (m_bufferDuration) {
+ if (m_bufferLength) {
QRect bar = rect();
- const qreal play = qreal(m_playPosition) / m_bufferDuration;
+ const qreal play = qreal(m_playPosition) / m_bufferLength;
bar.setLeft(rect().left() + play * rect().width());
- const qreal record = qreal(m_recordPosition) / m_bufferDuration;
+ const qreal record = qreal(m_recordPosition) / m_bufferLength;
bar.setRight(rect().left() + record * rect().width());
painter.fillRect(bar, bufferColor);
QRect window = rect();
- const qreal windowLeft = qreal(m_windowPosition) / m_bufferDuration;
+ const qreal windowLeft = qreal(m_windowPosition) / m_bufferLength;
window.setLeft(rect().left() + windowLeft * rect().width());
- const qreal windowWidth = qreal(m_windowLength) / m_bufferDuration;
+ const qreal windowWidth = qreal(m_windowLength) / m_bufferLength;
window.setWidth(windowWidth * rect().width());
painter.fillRect(window, windowColor);
}
}
-void ProgressBar::bufferDurationChanged(qint64 bufferSize)
+void ProgressBar::bufferLengthChanged(qint64 bufferSize)
{
- m_bufferDuration = bufferSize;
+ m_bufferLength = bufferSize;
m_recordPosition = 0;
m_playPosition = 0;
m_windowPosition = 0;
@@ -116,7 +116,7 @@ void ProgressBar::bufferDurationChanged(qint64 bufferSize)
void ProgressBar::recordPositionChanged(qint64 recordPosition)
{
Q_ASSERT(recordPosition >= 0);
- Q_ASSERT(recordPosition <= m_bufferDuration);
+ Q_ASSERT(recordPosition <= m_bufferLength);
m_recordPosition = recordPosition;
repaint();
}
@@ -124,7 +124,7 @@ void ProgressBar::recordPositionChanged(qint64 recordPosition)
void ProgressBar::playPositionChanged(qint64 playPosition)
{
Q_ASSERT(playPosition >= 0);
- Q_ASSERT(playPosition <= m_bufferDuration);
+ Q_ASSERT(playPosition <= m_bufferLength);
m_playPosition = playPosition;
repaint();
}
@@ -132,8 +132,8 @@ void ProgressBar::playPositionChanged(qint64 playPosition)
void ProgressBar::windowChanged(qint64 position, qint64 length)
{
Q_ASSERT(position >= 0);
- Q_ASSERT(position <= m_bufferDuration);
- Q_ASSERT(position + length <= m_bufferDuration);
+ Q_ASSERT(position <= m_bufferLength);
+ Q_ASSERT(position + length <= m_bufferLength);
m_windowPosition = position;
m_windowLength = length;
repaint();
diff --git a/demos/spectrum/app/progressbar.h b/demos/spectrum/app/progressbar.h
index 8514adb..e715cf5 100644
--- a/demos/spectrum/app/progressbar.h
+++ b/demos/spectrum/app/progressbar.h
@@ -57,13 +57,13 @@ public:
void paintEvent(QPaintEvent *event);
public slots:
- void bufferDurationChanged(qint64 bufferSize);
+ void bufferLengthChanged(qint64 length);
void recordPositionChanged(qint64 recordPosition);
void playPositionChanged(qint64 playPosition);
void windowChanged(qint64 position, qint64 length);
private:
- qint64 m_bufferDuration;
+ qint64 m_bufferLength;
qint64 m_recordPosition;
qint64 m_playPosition;
qint64 m_windowPosition;
diff --git a/demos/spectrum/app/spectrograph.h b/demos/spectrum/app/spectrograph.h
index ce59d90..fa4a6cf 100644
--- a/demos/spectrum/app/spectrograph.h
+++ b/demos/spectrum/app/spectrograph.h
@@ -48,7 +48,7 @@ QT_FORWARD_DECLARE_CLASS(QMouseEvent)
/**
* Widget which displays a spectrograph showing the frequency spectrum
- * of the window of audio samples most recently analysed by the Engine.
+ * of the window of audio samples most recently analyzed by the Engine.
*/
class Spectrograph : public QWidget {
Q_OBJECT
diff --git a/demos/spectrum/app/spectrumanalyser.cpp b/demos/spectrum/app/spectrumanalyser.cpp
index c467f61..2fa17b1 100644
--- a/demos/spectrum/app/spectrumanalyser.cpp
+++ b/demos/spectrum/app/spectrumanalyser.cpp
@@ -64,6 +64,8 @@ SpectrumAnalyserThread::SpectrumAnalyserThread(QObject *parent)
#endif
{
#ifdef SPECTRUM_ANALYSER_SEPARATE_THREAD
+ // moveToThread() cannot be called on a QObject with a parent
+ setParent(0);
moveToThread(m_thread);
m_thread->start();
#endif
@@ -124,7 +126,7 @@ void SpectrumAnalyserThread::calculateSpectrum(const QByteArray &buffer,
// Calculate the FFT
m_fft->calculateFFT(m_output.data(), m_input.data());
- // Analyse output to obtain amplitude and phase for each frequency
+ // Analyze output to obtain amplitude and phase for each frequency
for (int i=2; i<=m_numSamples/2; ++i) {
// Calculate frequency of this complex sample
m_spectrum[i].frequency = qreal(i * inputFrequency) / (m_numSamples);
diff --git a/demos/spectrum/app/utils.cpp b/demos/spectrum/app/utils.cpp
index 4ead6c2..49a7626 100644
--- a/demos/spectrum/app/utils.cpp
+++ b/demos/spectrum/app/utils.cpp
@@ -49,8 +49,10 @@ qint64 audioDuration(const QAudioFormat &format, qint64 bytes)
qint64 audioLength(const QAudioFormat &format, qint64 microSeconds)
{
- return (format.frequency() * format.channels() * (format.sampleSize() / 8))
+ qint64 result = (format.frequency() * format.channels() * (format.sampleSize() / 8))
* microSeconds / 1000000;
+ result -= result % (format.channelCount() * format.sampleSize());
+ return result;
}
qreal nyquistFrequency(const QAudioFormat &format)
diff --git a/demos/spectrum/app/waveform.cpp b/demos/spectrum/app/waveform.cpp
index 1f7d315..bd854c0 100644
--- a/demos/spectrum/app/waveform.cpp
+++ b/demos/spectrum/app/waveform.cpp
@@ -44,12 +44,18 @@
#include <QResizeEvent>
#include <QDebug>
-
-Waveform::Waveform(const QByteArray &buffer, QWidget *parent)
+//#define PAINT_EVENT_TRACE
+#ifdef PAINT_EVENT_TRACE
+# define WAVEFORM_PAINT_DEBUG qDebug()
+#else
+# define WAVEFORM_PAINT_DEBUG nullDebug()
+#endif
+
+Waveform::Waveform(QWidget *parent)
: QWidget(parent)
- , m_buffer(buffer)
- , m_dataLength(0)
- , m_position(0)
+ , m_bufferPosition(0)
+ , m_bufferLength(0)
+ , m_audioPosition(0)
, m_active(false)
, m_tileLength(0)
, m_tileArrayStart(0)
@@ -72,19 +78,19 @@ void Waveform::paintEvent(QPaintEvent * /*event*/)
painter.fillRect(rect(), Qt::black);
if (m_active) {
- WAVEFORM_DEBUG << "Waveform::paintEvent"
- << "windowPosition" << m_windowPosition
- << "windowLength" << m_windowLength;
+ WAVEFORM_PAINT_DEBUG << "Waveform::paintEvent"
+ << "windowPosition" << m_windowPosition
+ << "windowLength" << m_windowLength;
qint64 pos = m_windowPosition;
const qint64 windowEnd = m_windowPosition + m_windowLength;
int destLeft = 0;
int destRight = 0;
while (pos < windowEnd) {
const TilePoint point = tilePoint(pos);
- WAVEFORM_DEBUG << "Waveform::paintEvent" << "pos" << pos
- << "tileIndex" << point.index
- << "positionOffset" << point.positionOffset
- << "pixelOffset" << point.pixelOffset;
+ WAVEFORM_PAINT_DEBUG << "Waveform::paintEvent" << "pos" << pos
+ << "tileIndex" << point.index
+ << "positionOffset" << point.positionOffset
+ << "pixelOffset" << point.pixelOffset;
if (point.index != NullIndex) {
const Tile &tile = m_tiles[point.index];
@@ -104,9 +110,9 @@ void Waveform::paintEvent(QPaintEvent * /*event*/)
sourceRect.setLeft(point.pixelOffset);
sourceRect.setRight(sourceRight);
- WAVEFORM_DEBUG << "Waveform::paintEvent" << "tileIndex" << point.index
- << "source" << point.pixelOffset << sourceRight
- << "dest" << destLeft << destRight;
+ WAVEFORM_PAINT_DEBUG << "Waveform::paintEvent" << "tileIndex" << point.index
+ << "source" << point.pixelOffset << sourceRight
+ << "dest" << destLeft << destRight;
painter.drawPixmap(destRect, *tile.pixmap, sourceRect);
@@ -114,25 +120,25 @@ void Waveform::paintEvent(QPaintEvent * /*event*/)
if (point.index < m_tiles.count()) {
pos = tilePosition(point.index + 1);
- WAVEFORM_DEBUG << "Waveform::paintEvent" << "pos ->" << pos;
+ WAVEFORM_PAINT_DEBUG << "Waveform::paintEvent" << "pos ->" << pos;
} else {
// Reached end of tile array
- WAVEFORM_DEBUG << "Waveform::paintEvent" << "reached end of tile array";
+ WAVEFORM_PAINT_DEBUG << "Waveform::paintEvent" << "reached end of tile array";
break;
}
} else {
// Passed last tile which is painted
- WAVEFORM_DEBUG << "Waveform::paintEvent" << "tile" << point.index << "not painted";
+ WAVEFORM_PAINT_DEBUG << "Waveform::paintEvent" << "tile" << point.index << "not painted";
break;
}
} else {
// pos is past end of tile array
- WAVEFORM_DEBUG << "Waveform::paintEvent" << "pos" << pos << "past end of tile array";
+ WAVEFORM_PAINT_DEBUG << "Waveform::paintEvent" << "pos" << pos << "past end of tile array";
break;
}
}
- WAVEFORM_DEBUG << "Waveform::paintEvent" << "final pos" << pos << "final x" << destRight;
+ WAVEFORM_PAINT_DEBUG << "Waveform::paintEvent" << "final pos" << pos << "final x" << destRight;
}
}
@@ -146,7 +152,6 @@ void Waveform::initialize(const QAudioFormat &format, qint64 audioBufferSize, qi
{
WAVEFORM_DEBUG << "Waveform::initialize"
<< "audioBufferSize" << audioBufferSize
- << "m_buffer.size()" << m_buffer.size()
<< "windowDurationUs" << windowDurationUs;
reset();
@@ -186,8 +191,9 @@ void Waveform::reset()
{
WAVEFORM_DEBUG << "Waveform::reset";
- m_dataLength = 0;
- m_position = 0;
+ m_bufferPosition = 0;
+ m_buffer = QByteArray();
+ m_audioPosition = 0;
m_format = QAudioFormat();
m_active = false;
deletePixmaps();
@@ -198,30 +204,31 @@ void Waveform::reset()
m_windowLength = 0;
}
-void Waveform::dataLengthChanged(qint64 length)
+void Waveform::bufferChanged(qint64 position, qint64 length, const QByteArray &buffer)
{
- WAVEFORM_DEBUG << "Waveform::dataLengthChanged" << length;
- const qint64 oldLength = m_dataLength;
- m_dataLength = length;
-
- if (m_active) {
- if (m_dataLength < oldLength)
- positionChanged(m_dataLength);
- else
- paintTiles();
- }
+ WAVEFORM_DEBUG << "Waveform::bufferChanged"
+ << "audioPosition" << m_audioPosition
+ << "bufferPosition" << position
+ << "bufferLength" << length;
+ m_bufferPosition = position;
+ m_bufferLength = length;
+ m_buffer = buffer;
+ paintTiles();
}
-void Waveform::positionChanged(qint64 position)
+void Waveform::audioPositionChanged(qint64 position)
{
- WAVEFORM_DEBUG << "Waveform::positionChanged" << position;
-
- if (position + m_windowLength > m_dataLength)
- position = m_dataLength - m_windowLength;
-
- m_position = position;
-
- setWindowPosition(position);
+ WAVEFORM_DEBUG << "Waveform::audioPositionChanged"
+ << "audioPosition" << position
+ << "bufferPosition" << m_bufferPosition
+ << "bufferLength" << m_bufferLength;
+
+ if (position >= m_bufferPosition) {
+ if (position + m_windowLength > m_bufferPosition + m_bufferLength)
+ position = qMax(qint64(0), m_bufferPosition + m_bufferLength - m_windowLength);
+ m_audioPosition = position;
+ setWindowPosition(position);
+ }
}
void Waveform::deletePixmaps()
@@ -255,8 +262,6 @@ void Waveform::createPixmaps(const QSize &widgetSize)
m_tiles[i].pixmap = m_pixmaps[i];
m_tiles[i].painted = false;
}
-
- paintTiles();
}
void Waveform::setWindowPosition(qint64 position)
@@ -327,8 +332,9 @@ bool Waveform::paintTiles()
for (int i=0; i<m_tiles.count(); ++i) {
const Tile &tile = m_tiles[i];
if (!tile.painted) {
- const qint64 tileEnd = m_tileArrayStart + (i + 1) * m_tileLength;
- if (m_dataLength >= tileEnd) {
+ const qint64 tileStart = m_tileArrayStart + i * m_tileLength;
+ const qint64 tileEnd = tileStart + m_tileLength;
+ if (m_bufferPosition <= tileStart && m_bufferPosition + m_bufferLength >= tileEnd) {
paintTile(i);
updateRequired = true;
}
@@ -343,16 +349,23 @@ bool Waveform::paintTiles()
void Waveform::paintTile(int index)
{
- WAVEFORM_DEBUG << "Waveform::paintTile" << "index" << index;
-
const qint64 tileStart = m_tileArrayStart + index * m_tileLength;
- Q_ASSERT(m_dataLength >= tileStart + m_tileLength);
+
+ WAVEFORM_DEBUG << "Waveform::paintTile"
+ << "index" << index
+ << "bufferPosition" << m_bufferPosition
+ << "bufferLength" << m_bufferLength
+ << "start" << tileStart
+ << "end" << tileStart + m_tileLength;
+
+ Q_ASSERT(m_bufferPosition <= tileStart);
+ Q_ASSERT(m_bufferPosition + m_bufferLength >= tileStart + m_tileLength);
Tile &tile = m_tiles[index];
Q_ASSERT(!tile.painted);
const qint16* base = reinterpret_cast<const qint16*>(m_buffer.constData());
- const qint16* buffer = base + (tileStart / 2);
+ const qint16* buffer = base + ((tileStart - m_bufferPosition) / 2);
const int numSamples = m_tileLength / (2 * m_format.channels());
QPainter painter(tile.pixmap);
@@ -376,6 +389,11 @@ void Waveform::paintTile(int index)
for (int i=0; i<numSamples; ++i) {
const qint16* ptr = buffer + i * m_format.channels();
+
+ const int offset = reinterpret_cast<const char*>(ptr) - m_buffer.constData();
+ Q_ASSERT(offset >= 0);
+ Q_ASSERT(offset < m_bufferLength);
+
const qint16 pcmValue = *ptr;
const qreal realValue = pcmToReal(pcmValue);
diff --git a/demos/spectrum/app/waveform.h b/demos/spectrum/app/waveform.h
index 57c9eec..1c54c86 100644
--- a/demos/spectrum/app/waveform.h
+++ b/demos/spectrum/app/waveform.h
@@ -60,7 +60,7 @@ QT_FORWARD_DECLARE_CLASS(QByteArray)
class Waveform : public QWidget {
Q_OBJECT
public:
- Waveform(const QByteArray &buffer, QWidget *parent = 0);
+ Waveform(QWidget *parent = 0);
~Waveform();
// QWidget
@@ -73,8 +73,8 @@ public:
void setAutoUpdatePosition(bool enabled);
public slots:
- void dataLengthChanged(qint64 length);
- void positionChanged(qint64 position);
+ void bufferChanged(qint64 position, qint64 length, const QByteArray &buffer);
+ void audioPositionChanged(qint64 position);
private:
static const int NullIndex = -1;
@@ -167,9 +167,11 @@ private:
void resetTiles(qint64 newStartPos);
private:
- const QByteArray& m_buffer;
- qint64 m_dataLength;
- qint64 m_position;
+ qint64 m_bufferPosition;
+ qint64 m_bufferLength;
+ QByteArray m_buffer;
+
+ qint64 m_audioPosition;
QAudioFormat m_format;
bool m_active;
diff --git a/demos/spectrum/app/wavfile.cpp b/demos/spectrum/app/wavfile.cpp
index b9467e3..44c3ac5 100644
--- a/demos/spectrum/app/wavfile.cpp
+++ b/demos/spectrum/app/wavfile.cpp
@@ -76,171 +76,76 @@ struct CombinedHeader
{
RIFFHeader riff;
WAVEHeader wave;
- DATAHeader data;
};
-static const int HeaderLength = sizeof(CombinedHeader);
-
-
-WavFile::WavFile(const QAudioFormat &format, qint64 dataLength)
- : m_format(format)
- , m_dataLength(dataLength)
-{
-
-}
-
-bool WavFile::readHeader(QIODevice &device)
-{
- bool result = true;
-
- if (!device.isSequential())
- result = device.seek(0);
- // else, assume that current position is the start of the header
-
- if (result) {
- CombinedHeader header;
- result = (device.read(reinterpret_cast<char *>(&header), HeaderLength) == HeaderLength);
- if (result) {
- if ((memcmp(&header.riff.descriptor.id, "RIFF", 4) == 0
- || memcmp(&header.riff.descriptor.id, "RIFX", 4) == 0)
- && memcmp(&header.riff.type, "WAVE", 4) == 0
- && memcmp(&header.wave.descriptor.id, "fmt ", 4) == 0
- && header.wave.audioFormat == 1 // PCM
- ) {
- if (memcmp(&header.riff.descriptor.id, "RIFF", 4) == 0)
- m_format.setByteOrder(QAudioFormat::LittleEndian);
- else
- m_format.setByteOrder(QAudioFormat::BigEndian);
-
- m_format.setChannels(qFromLittleEndian<quint16>(header.wave.numChannels));
- m_format.setCodec("audio/pcm");
- m_format.setFrequency(qFromLittleEndian<quint32>(header.wave.sampleRate));
- m_format.setSampleSize(qFromLittleEndian<quint16>(header.wave.bitsPerSample));
-
- switch(header.wave.bitsPerSample) {
- case 8:
- m_format.setSampleType(QAudioFormat::UnSignedInt);
- break;
- case 16:
- m_format.setSampleType(QAudioFormat::SignedInt);
- break;
- default:
- result = false;
- }
-
- m_dataLength = device.size() - HeaderLength;
- } else {
- result = false;
- }
- }
- }
-
- return result;
-}
-
-bool WavFile::writeHeader(QIODevice &device)
+WavFile::WavFile(QObject *parent)
+ : QFile(parent)
+ , m_headerLength(0)
{
- CombinedHeader header;
- memset(&header, 0, HeaderLength);
-
- // RIFF header
- if (m_format.byteOrder() == QAudioFormat::LittleEndian)
- strncpy(&header.riff.descriptor.id[0], "RIFF", 4);
- else
- strncpy(&header.riff.descriptor.id[0], "RIFX", 4);
- qToLittleEndian<quint32>(quint32(m_dataLength + HeaderLength - 8),
- reinterpret_cast<unsigned char*>(&header.riff.descriptor.size));
- strncpy(&header.riff.type[0], "WAVE", 4);
-
- // WAVE header
- strncpy(&header.wave.descriptor.id[0], "fmt ", 4);
- qToLittleEndian<quint32>(quint32(16),
- reinterpret_cast<unsigned char*>(&header.wave.descriptor.size));
- qToLittleEndian<quint16>(quint16(1),
- reinterpret_cast<unsigned char*>(&header.wave.audioFormat));
- qToLittleEndian<quint16>(quint16(m_format.channels()),
- reinterpret_cast<unsigned char*>(&header.wave.numChannels));
- qToLittleEndian<quint32>(quint32(m_format.frequency()),
- reinterpret_cast<unsigned char*>(&header.wave.sampleRate));
- qToLittleEndian<quint32>(quint32(m_format.frequency() * m_format.channels() * m_format.sampleSize() / 8),
- reinterpret_cast<unsigned char*>(&header.wave.byteRate));
- qToLittleEndian<quint16>(quint16(m_format.channels() * m_format.sampleSize() / 8),
- reinterpret_cast<unsigned char*>(&header.wave.blockAlign));
- qToLittleEndian<quint16>(quint16(m_format.sampleSize()),
- reinterpret_cast<unsigned char*>(&header.wave.bitsPerSample));
-
- // DATA header
- strncpy(&header.data.descriptor.id[0], "data", 4);
- qToLittleEndian<quint32>(quint32(m_dataLength),
- reinterpret_cast<unsigned char*>(&header.data.descriptor.size));
-
- return (device.write(reinterpret_cast<const char *>(&header), HeaderLength) == HeaderLength);
-}
-
-const QAudioFormat& WavFile::format() const
-{
- return m_format;
}
-qint64 WavFile::dataLength() const
+bool WavFile::open(const QString &fileName)
{
- return m_dataLength;
+ close();
+ setFileName(fileName);
+ return QFile::open(QIODevice::ReadOnly) && readHeader();
}
-qint64 WavFile::headerLength()
+const QAudioFormat &WavFile::fileFormat() const
{
- return HeaderLength;
+ return m_fileFormat;
}
-bool WavFile::writeDataLength(QIODevice &device, qint64 dataLength)
+qint64 WavFile::headerLength() const
{
- bool result = false;
- if (!device.isSequential()) {
- device.seek(40);
- unsigned char dataLengthLE[4];
- qToLittleEndian<quint32>(quint32(dataLength), dataLengthLE);
- result = (device.write(reinterpret_cast<const char *>(dataLengthLE), 4) == 4);
- }
- return result;
+return m_headerLength;
}
-#include <QFile>
-#include <QTextStream>
-
-qint64 WavFile::readData(QIODevice &device, QByteArray &buffer,
- QAudioFormat outputFormat)
+bool WavFile::readHeader()
{
- if (QAudioFormat() == outputFormat)
- outputFormat = m_format;
-
- qint64 result = 0;
-
- QFile file("wav.txt");
- file.open(QIODevice::WriteOnly | QIODevice::Text);
- QTextStream stream;
- stream.setDevice(&file);
-
- if (isPCMS16LE(outputFormat) && isPCMS16LE(m_format)) {
- QVector<char> inputSample(2 * m_format.channels());
-
- qint16 *output = reinterpret_cast<qint16*>(buffer.data());
-
- while (result < buffer.size()) {
- if (device.read(inputSample.data(), inputSample.count())) {
- int inputIdx = 0;
- for (int outputIdx = 0; outputIdx < outputFormat.channels(); ++outputIdx) {
- const qint16* input = reinterpret_cast<const qint16*>(inputSample.data() + 2 * inputIdx);
- *output++ = qFromLittleEndian<qint16>(*input);
- result += 2;
- if (inputIdx < m_format.channels())
- ++inputIdx;
- }
- } else {
- break;
+ seek(0);
+ CombinedHeader header;
+ bool result = read(reinterpret_cast<char *>(&header), sizeof(CombinedHeader)) == sizeof(CombinedHeader);
+ if (result) {
+ if ((memcmp(&header.riff.descriptor.id, "RIFF", 4) == 0
+ || memcmp(&header.riff.descriptor.id, "RIFX", 4) == 0)
+ && memcmp(&header.riff.type, "WAVE", 4) == 0
+ && memcmp(&header.wave.descriptor.id, "fmt ", 4) == 0
+ && (header.wave.audioFormat == 1 || header.wave.audioFormat == 0)) {
+
+ // Read off remaining header information
+ DATAHeader dataHeader;
+
+ if (qFromLittleEndian<quint32>(header.wave.descriptor.size) > sizeof(WAVEHeader)) {
+ // Extended data available
+ quint16 extraFormatBytes;
+ if (peek((char*)&extraFormatBytes, sizeof(quint16)) != sizeof(quint16))
+ return false;
+ const qint64 throwAwayBytes = sizeof(quint16) + qFromLittleEndian<quint16>(extraFormatBytes);
+ if (read(throwAwayBytes).size() != throwAwayBytes)
+ return false;
}
+
+ if (read((char*)&dataHeader, sizeof(DATAHeader)) != sizeof(DATAHeader))
+ return false;
+
+ // Establish format
+ if (memcmp(&header.riff.descriptor.id, "RIFF", 4) == 0)
+ m_fileFormat.setByteOrder(QAudioFormat::LittleEndian);
+ else
+ m_fileFormat.setByteOrder(QAudioFormat::BigEndian);
+
+ int bps = qFromLittleEndian<quint16>(header.wave.bitsPerSample);
+ m_fileFormat.setChannels(qFromLittleEndian<quint16>(header.wave.numChannels));
+ m_fileFormat.setCodec("audio/pcm");
+ m_fileFormat.setFrequency(qFromLittleEndian<quint32>(header.wave.sampleRate));
+ m_fileFormat.setSampleSize(qFromLittleEndian<quint16>(header.wave.bitsPerSample));
+ m_fileFormat.setSampleType(bps == 8 ? QAudioFormat::UnSignedInt : QAudioFormat::SignedInt);
+ } else {
+ result = false;
}
}
+ m_headerLength = pos();
return result;
}
-
diff --git a/demos/spectrum/app/wavfile.h b/demos/spectrum/app/wavfile.h
index f2f3304..935e935 100644
--- a/demos/spectrum/app/wavfile.h
+++ b/demos/spectrum/app/wavfile.h
@@ -46,37 +46,22 @@
#include <QtCore/qfile.h>
#include <QtMultimedia/qaudioformat.h>
-/**
- * Helper class for reading WAV files
- *
- * See https://ccrma.stanford.edu/courses/422/projects/WaveFormat/
- */
-class WavFile
+class WavFile : public QFile
{
public:
- WavFile(const QAudioFormat &format = QAudioFormat(),
- qint64 dataLength = 0);
+ WavFile(QObject *parent = 0);
- // Reads WAV header and seeks to start of data
- bool readHeader(QIODevice &device);
+ bool open(const QString &fileName);
+ const QAudioFormat &fileFormat() const;
+ qint64 headerLength() const;
- // Writes WAV header
- bool writeHeader(QIODevice &device);
-
- // Read PCM data
- qint64 readData(QIODevice &device, QByteArray &buffer,
- QAudioFormat outputFormat = QAudioFormat());
-
- const QAudioFormat& format() const;
- qint64 dataLength() const;
-
- static qint64 headerLength();
-
- static bool writeDataLength(QIODevice &device, qint64 dataLength);
+private:
+ bool readHeader();
private:
- QAudioFormat m_format;
- qint64 m_dataLength;
+ QAudioFormat m_fileFormat;
+ qint64 m_headerLength;
+
};
#endif
diff --git a/demos/spectrum/spectrum.pri b/demos/spectrum/spectrum.pri
index c09aa0d..5773900 100644
--- a/demos/spectrum/spectrum.pri
+++ b/demos/spectrum/spectrum.pri
@@ -35,3 +35,15 @@ DEFINES += SPECTRUM_ANALYSER_SEPARATE_THREAD
# Suppress warnings about strncpy potentially being unsafe, emitted by MSVC
win32: DEFINES += _CRT_SECURE_NO_WARNINGS
+win32 {
+ # spectrum_build_dir is defined with a leading slash so that it can
+ # be used in contexts such as
+ # ..$${spectrum_build_dir}
+ # without the result having a trailing slash where spectrum_build_dir
+ # is undefined.
+ spectrum_build_dir = /release
+ if (!debug_and_release|build_pass): CONFIG(debug, debug|release) {
+ spectrum_build_dir = /debug
+ }
+}
+
diff --git a/demos/spreadsheet/spreadsheet.cpp b/demos/spreadsheet/spreadsheet.cpp
index f2a1738..519afe9 100644
--- a/demos/spreadsheet/spreadsheet.cpp
+++ b/demos/spreadsheet/spreadsheet.cpp
@@ -511,7 +511,7 @@ void SpreadSheet::setupContents()
// column 2
table->setItem(0, 2, new SpreadSheetItem("Price"));
table->item(0, 2)->setBackgroundColor(titleBackground);
- table->item(0, 2)->setToolTip("This collumn shows the price of the purchase");
+ table->item(0, 2)->setToolTip("This column shows the price of the purchase");
table->item(0, 2)->setFont(titleFont);
table->setItem(1, 2, new SpreadSheetItem("150"));
diff --git a/demos/symbianpkgrules.pri b/demos/symbianpkgrules.pri
index 68a82cd..c9cc492 100644
--- a/demos/symbianpkgrules.pri
+++ b/demos/symbianpkgrules.pri
@@ -13,4 +13,6 @@ vendorinfo = \
demos_deployment.pkg_prerules += vendorinfo
DEPLOYMENT += demos_deployment
-isEmpty(ICON):ICON = $$QT_SOURCE_TREE/src/s60installs/qt.svg
+isEmpty(ICON):contains(TEMPLATE, ".*app"):contains(QT, gui):contains(CONFIG, qt):!contains(CONFIG, "no_icon") {
+ ICON = $$QT_SOURCE_TREE/src/s60installs/qt.svg
+}
diff --git a/demos/textedit/textedit.qdoc b/demos/textedit/textedit.qdoc
index f3ba4d7..c27589e 100644
--- a/demos/textedit/textedit.qdoc
+++ b/demos/textedit/textedit.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/dist/changes-4.6.4 b/dist/changes-4.6.4
index 389aa3a..3949b9a 100644
--- a/dist/changes-4.6.4
+++ b/dist/changes-4.6.4
@@ -66,8 +66,6 @@ QtOpenGL
- QGLShaderProgram
* [QTBUG-12478] Don't resolve GLSL extensions if no shaders.
* [QTBUG-12591] setUniformValue(QSize) was setting (w,w) not (w,h).
- * [QTBUG-12862] Don't #define highp/mediump/lowp if the desktop OpenGL
- implementation has the GL_ARB_ES2_compatibility extension.
* [QTBUG-12554] Wrong OpenGLVersionFlags on OpenGL 4.0 systems.
QtScript
@@ -109,7 +107,7 @@ Third party components
Qt for Unix (X11 and Mac OS X)
------------------------------
- -
+ -
Qt for Linux/X11
----------------
diff --git a/dist/changes-4.7.1 b/dist/changes-4.7.1
index 51a10a3..b25b95c 100644
--- a/dist/changes-4.7.1
+++ b/dist/changes-4.7.1
@@ -13,7 +13,6 @@ corresponding to tasks in the Qt Bug Tracker, the (now obsolete) Task
Tracker, or the Merge Request queue of the public source repository.
Qt Bug Tracker: http://bugreports.qt.nokia.com
-Task Tracker: http://qt.nokia.com/developer/task-tracker
Merge Request: http://qt.gitorious.org
****************************************************************************
@@ -31,8 +30,6 @@ Optimizations
- On x86 and 86_64, the memory access has been improved for alpha blending
and for some composition functions.
- * See list of Important Behavior Changes below
-
****************************************************************************
* Library *
@@ -42,69 +39,68 @@ QtCore
------
- Containers
- * [QTBUG-13079] Fix assingment of a container included in the container itself
+ * [QTBUG-13079] Fix assignment of a container included in the container
+ itself.
- - QLibrary
- * [QT-3825] System libraries are only loaded from the system directories
+ - QEventDispatcherUnix
+ * [QTBUG-13633] Do not process too many timer events if other events need
+ to be processed first.
+ - QLibrary
+ * [QT-3825] System libraries are only loaded from the system directories.
- QUuid
- * [QTBUG-11213] QUuid::createUuid() should not generate identical sequences on UNIX
-
- - QEventDispatcherUnix
- * [QTBUG-13633] Do not process too many timer events if other events need
- to be processed first
+ * [QTBUG-11213] QUuid::createUuid() should not generate identical sequences
+ on UNIX.
QtGui
-----
- - QGraphicsWidget
- * [QTBUG-13188] Make sure a font that has propagated from a parent can
- be set on a QPainter.
- * [QT-3808] Issues when applying effects in combination with ItemHasNoContents flag.
+ - QGraphicsEffect
+ * [QT-3633] Wrong bounding rect.
- QGraphicsItem
* [QTBUG-3633, QT-3828] Wrong children bounding rect when applying effects.
- - QGraphicsEffect
- * [QT-3633] Wrong bounding rect.
-
- QGraphicsScene
* [QT-3674] Spurious assert triggered from render().
+ - QGraphicsWidget
+ * [QTBUG-13188] Make sure a font that has propagated from a parent can
+ be set on a QPainter.
+ * [QT-3808] Issues when applying effects in combination with
+ ItemHasNoContents flag.
+
+ - QGtkStyle
+ * [QTBUG-13125] Fixed a regression with custom itemview background color.
+
+ - QLineEdit
+ * [QTBUG-13520] Fixed the scrolling of text with right alignment.
+
- QPainter
* [QTBUG-13429] Fixed scale point drawing with square cap in the raster
engine, plus some potential floating point overflows in the rasterizer.
* Optimized pixmap drawing with SmoothPixmapTransform.
- - QStaticText
- * [QTBUG-12614] Fix crash with zero-width string.
- * [QTBUG-12540] Fix rendering of large glyphs with OpenGL2 paint engine.
-
-
- QPinchGesture
* The scaleFactor and totalScaleFactor now represent a value that allows
an object to track a touchpoint during a Pinch Gesture even when using
sequences for zooming.
- Therefor the scale factors are initialized to 1.0 and for every new
+ Therefore the scale factors are initialized to 1.0 and for every new
sequence the totalScaleFactor is multiplied with the scaleFactor of the
new sequence.
- - QLineEdit
- * [QTBUG-13520] Fixed the scrolling of text with right alignment
-
- QPixmap
- * [QTBUG-12560] Fixed a regression preventing loading images without extensions
+ * [QTBUG-12560] Fixed a regression preventing loading images without
+ extensions.
- - QTreeView
- * [QTBUG-13567] Do not scroll to top if last item is removed
-
- - QGtkStyle
- * [QTBUG-13125] Fixed a regression with custom itemview background color.
+ - QStaticText
+ * [QTBUG-12614] Fix crash with zero-width string.
+ * [QTBUG-12540] Fix rendering of large glyphs with OpenGL2 paint engine.
-QtDBus
-------
+ - QTreeView
+ * [QTBUG-13567] Do not scroll to top if last item is removed.
QtMultimedia
@@ -115,151 +111,170 @@ QtMultimedia
* [QTBUG-11883] Fixed segmentation fault when closing a QAudioInput or
QAudioOutput.
+
QtNetwork
---------
- - QSslConfiguration
- * [QTBUG-13265] fix crash with empty configuration
- - QSslCertificate
- * [QTBUG-12489] support dates > 2049
- Bearer Management
* Improved reliability on Symbian and Maemo.
* Added connman/meego backend.
- IPv6
- * Disable on Symbian until OpenC properly supports it
+ * Disable on Symbian until OpenC properly supports it.
+ - QSslConfiguration
+ * [QTBUG-13265] Fixed crash with empty configuration.
+ - QSslCertificate
+ * [QTBUG-12489] Support dates > 2049.
- QNetworkAccessManager
- * [QTBUG-12285] Crash fix related to aborted uploads
+ * [QTBUG-12285] Crash fix related to aborted uploads.
QtOpenGL
--------
- QGL2PaintEngineEx
* Fixed drawing a large number of glyphs with the same font on systems
- with small texure size limits.
-
-QtOpenVG
---------
-
-
-QtWebKit
---------
-
-
-QtSql
------
-
+ with small texture size limits.
-QtSvg
------
QtXml
-----
* Fixed a crash when parsing invalid tag names.
+
QtXmlPatterns
-------------
- XML Schema internals:
- * [QTBUG-11559] Only parse 3 digits of time fraction
+ * [QTBUG-11559] Only parse 3 digits of time fraction.
+
QtDeclarative
-------------
- QML language
- * [QTBUG-13799] QML core module renamed to QtQuick to decouple it from Qt releases.
- Old "import Qt 4.7" will co-exist with "import QtQuick 1.0' at least during Qt 4.7 releases.
- * [QTBUG-13047] Support passing QObject derived types to QML methods
- * [QTBUG-12837] Support JS "in" operator on QML objects
- * [QTBUG-13045] Prevent calling deleteLater() from QML
- * [QTBUG-13043] Ignore non-scriptable properties in QML
- * [QTBUG-13114] Don't double call classBegin()
- * [QTBUG-12946] Ensure the onDestruction handlers are called before the expressions are cleared
- * [QTBUG-12599] Re-enabled script program caching on Symbian
- * [QTBUG-13374] Don't modify the signal order on the second dynamic meta object pass
- * Support for qsTrId and meta-data in comments for QML
- - QML debugging:
+ * [QTBUG-13799] QML core module renamed to QtQuick to decouple it from Qt
+ releases. Old "import Qt 4.7" will co-exist with "import QtQuick 1.0' at
+ least during Qt 4.7 releases.
+ * [QTBUG-13047] Support passing QObject derived types to QML methods.
+ * [QTBUG-12837] Support JS "in" operator on QML objects.
+ * [QTBUG-13045] Prevent calling deleteLater() from QML.
+ * [QTBUG-13043] Ignore non-scriptable properties in QML.
+ * [QTBUG-13114] Don't double call classBegin().
+ * [QTBUG-12946] Ensure the onDestruction handlers are called before the
+ expressions are cleared.
+ * [QTBUG-12599] Re-enabled script program caching on Symbian.
+ * [QTBUG-13374] Don't modify the signal order on the second dynamic meta
+ object pass.
+ * Support for qsTrId and meta-data in comments for QML.
+ - QML debugging
* [QTBUG-5162] The debugger is now activated with -qmljsdebugger command
- line arg to enable support for platforms without environment variables
- * Various improvements to ease debugging in creator
+ line arg to enable support for platforms without environment variables.
+ * Various improvements to ease debugging in creator.
- AnchorAnimation
- * [QTBUG-13398] Fix AnchorAnimation for multiple AnchorChanges with dependancies
+ * [QTBUG-13398] Fix AnchorAnimation for multiple AnchorChanges with
+ dependancies.
- AnchorChanges
- * [QTBUG-11834] Restore any absolute geometry changed by AnchorChanges when returning to the base state
+ * [QTBUG-11834] Restore any absolute geometry changed by AnchorChanges when
+ returning to the base state.
- Component
- * [QTBUG-13170] Complete Component::createObject() creation after setting the parent
+ * [QTBUG-13170] Complete Component::createObject() creation after setting
+ the parent.
- GridView
- * [QTBUG-13166] GridView.view property should not be writable
+ * [QTBUG-13166] GridView.view property should not be writable.
- Flickable
- * [QTBUG-13095] Ensure Flickable visibleArea is updated when view height changes
- * [QTBUG-13176] Avoid Flickable view jumping when drag threashold is exceeded
- * [QTBUG-13078] Fix poor flicking behavior with slower flicks
- * Handle QGraphicsWidgets in Flickable
+ * [QTBUG-13095] Ensure Flickable visibleArea is updated when view height
+ changes.
+ * [QTBUG-13176] Avoid Flickable view jumping when drag threashold is
+ exceeded.
+ * [QTBUG-13078] Fix poor flicking behavior with slower flicks.
+ * Handle QGraphicsWidgets in Flickable.
- FocusScope
- * [QTBUG-12649] Make sure onFocusChanged is correctly emitted for items in a FocusScope.
+ * [QTBUG-12649] Make sure onFocusChanged is correctly emitted for items
+ in a FocusScope.
- FontLoader
- * [QTBUG-13419] Don't add the same font to the font database multiple times
+ * [QTBUG-13419] Don't add the same font to the font database multiple
+ times.
+ - Image
+ * [QTBUG-13454] Changing the Image 'source' no longer goes through the
+ 'Loading' state if the image is cached.
+ * [QTBUG-13383] Do not reset sourceSize when changing image source url.
+ * [QTBUG-13002] Setting one dimension of the sourceSize should set the other
+ dimension.
+ * [QTBUG-12302] Fix remote image url redirects are done in the right thread.
+ * Ensure all image states are updated before emitting statusChanged signals.
- ListModel
- * [QTBUG-12363] Modifying an object returned by ListModel.get(0) didn't update the view
- * [QTBUG-13666] Calling set() and setProperty() on ListModel from a WorkerScript didn't update the view
- * Fix Worker ListModel to emit the right signal when items change
- * Fix crash with invalid role indexes
- * improved ListModel error messages
+ * [QTBUG-12363] Modifying an object returned by ListModel.get(0) didn't
+ update the view.
+ * [QTBUG-13666] Calling set() and setProperty() on ListModel from a
+ WorkerScript didn't update the view.
+ * Fix Worker ListModel to emit the right signal when items change.
+ * Fix crash with invalid role indexes.
+ * improved ListModel error messages.
- ListView
- * [QTBUG-13664] Models with a single role didn't always update correctly
- * [QTBUG-13543] Ensure flickable velocity is updated when view is moved by setCurrentIndex
- * [QTBUG-12664] Ensure highlight is positioned correctly in positionViewAtIndex()
- * [QTBUG-13166] Fix ListView.view attached property with VisualItemModel
- * [QTBUG-13039] Fix crash in synchronization of ListModel in WorkerThread
- * [QTBUG-11341] Flicking a ListView sometimes made it loose focus
- * [QTBUG-13166] ListView.view property should not be writable
+ * [QTBUG-13664] Models with a single role didn't always update correctly.
+ * [QTBUG-13543] Ensure flickable velocity is updated when view is moved by
+ setCurrentIndex.
+ * [QTBUG-12664] Ensure highlight is positioned correctly in
+ positionViewAtIndex().
+ * [QTBUG-13166] Fix ListView.view attached property with VisualItemModel.
+ * [QTBUG-13039] Fix crash in synchronization of ListModel in WorkerThread.
+ * [QTBUG-11341] Flicking a ListView sometimes made it lose focus.
+ * [QTBUG-13166] ListView.view property should not be writable.
+ - MouseArea
+ * [QTBUG-12250] When onDoubleClicked: is handled don't emit a second
+ onPressed/onClicked.
+ - NumberAnimation
+ * [QTBUG-12805] Clear previous animation data for non-triggering animations.
+ - ParentChange
+ * [QTBUG-13554] ParentChange fails to apply rotation changes of exactly 180
+ degrees.
- PathView
- * [QTBUG-13689] Moving items in a PathView caused PathView.onPath to be set to false
- * [QTBUG-13687] PathView didn't accept mouse events, preventing it from working in a Flickable
- * [QTBUG-13416] Fix PathView item position on insertion and removal
- * [QTBUG-13017] Fix PathView when setting an empty model that is later filled
- * [QTBUG-12747] PathView required some diagonal movement before a drag was initiated
+ * [QTBUG-13689] Moving items in a PathView caused PathView.onPath to be set
+ to false.
+ * [QTBUG-13687] PathView didn't accept mouse events, preventing it from
+ working in a Flickable.
+ * [QTBUG-13416] Fix PathView item position on insertion and removal.
+ * [QTBUG-13017] Fix PathView when setting an empty model that is later
+ filled.
+ * [QTBUG-12747] PathView required some diagonal movement before a drag was
+ initiated.
- Positioners
- * made positioners work with QGraphicsWidgets
+ * made positioners work with QGraphicsWidgets.
- PropertyChanges
- * [QTBUG-12559] Correctly apply PropertyChanges when entering an extended state directly from the base state
- - VisualDataModel
- * [QTBUG-13754] Fixed a crash when updating a property in ListModel with multiple roles
- * [QTBUG-13038] Fix VisualDataModel model update handling when rootIndex is specified
- * [QTBUG-13146] Handle layoutChanged() properly in QML views
- - XmlListModel
- * [QTBUG-13041] XmlListModel thread was left hanging on Symbian application exit
- - ParentChange
- * [QTBUG-13554] ParentChange fails to apply rotation changes of exactly 180 degrees
- - MouseArea
- * [QTBUG-12250] When onDoubleClicked: is handled don't emit a second onPressed/onClicked
- - Image
- * [QTBUG-13454] Changing the Image 'source' no longer goes through the 'Loading' state if the image is cached.
- * [QTBUG-13383] Do not reset sourceSize when changing image source url
- * [QTBUG-13002] Setting one dimension of the sourceSize should set the other dimensio
- * [QTBUG-12302] Fix remote image url redirects are done in the right thread
- * Ensure all image states are updated before emitting statusChanged signals
- - NumberAnimation
- * [QTBUG-12805] Clear previous animation data for non-triggering animations
+ * [QTBUG-12559] Correctly apply PropertyChanges when entering an extended
+ state directly from the base state.
+ - QDeclarativeImageProvider:
+ * Fixed memory leak.
+ * Improved concurrency when using in asynchronus mode.
- Repeater
- * [QTBUG-12905] Emit countChanged where appropriate in Repeater
+ * [QTBUG-12905] Emit countChanged where appropriate in Repeater.
- SmoothedAnimation
- * [QTBUG-12336] Update running animations if a SmoothedAnimation is changed
+ * [QTBUG-12336] Update running animations if a SmoothedAnimation is changed.
- SpringAnimation
- * [QTBUG-13044] SpringAnimation velocity animation stop logic was fragile
+ * [QTBUG-13044] SpringAnimation velocity animation stop logic was fragile.
- Text
- * [QTBUG-13453] Fix jerky scrolling caused by unnecessary repaints of Text element
- * [QTBUG-13142] Fix alignment of shadow for rich text when using text styles
- * [QTBUG-11002] Improve QML text rendering when LCD smoothing is enabled for OS X
+ * [QTBUG-13453] Fix jerky scrolling caused by unnecessary repaints of Text
+ element.
+ * [QTBUG-13142] Fix alignment of shadow for rich text when using text
+ styles.
+ * [QTBUG-11002] Improve QML text rendering when LCD smoothing is enabled
+ for OS X.
- TextInput
- * [QTBUG-11127] Fix autoScroll implementation
- - XmlHttpRequest
- * [QTBUG-13117] Fix responseText to check the charset encoding field and also to not assume that the data is xml
+ * [QTBUG-11127] Fix autoScroll implementation.
+ - VisualDataModel
+ * [QTBUG-13754] Fixed a crash when updating a property in ListModel with
+ multiple roles.
+ * [QTBUG-13038] Fix VisualDataModel model update handling when rootIndex is
+ specified.
+ * [QTBUG-13146] Handle layoutChanged() properly in QML views.
- WebView
- * [QTBUG-13342] Ensure WebView gets focus when an editable node is clicked on
- - QDeclarativeImageProvider:
- * Fixed memory leak
- * Improved concurrency when using in assynchronus mode.
+ * [QTBUG-13342] Ensure WebView gets focus when an editable node is clicked.
+ - XmlHttpRequest
+ * [QTBUG-13117] Fix responseText to check the charset encoding field and
+ also to not assume that the data is xml.
+ - XmlListModel
+ * [QTBUG-13041] XmlListModel thread was left hanging on Symbian application
+ exit.
+
Qt Plugins
----------
-
- Jpeg image IO plugin
* [QTBUG-13653] Fixed infinite loop when loading jpeg without EOI marker
from memory.
@@ -275,15 +290,16 @@ Qt for Unix (X11 and Mac OS X)
Qt for Linux/X11
----------------
- - The configure script now detects all vector extensions of x86 and x86_64
+ - The configure script now detects all vector extensions of x86 and x86_64.
Qt for Windows
--------------
- Event System:
- * [QTBUG-12721] Fix Qt applications freezing until mouse/keyboard events occur.
+ * [QTBUG-12721] Fix Qt applications freezing until mouse/keyboard events
+ occur.
- Drag & Drop:
- * [QTBUG-13787] Fixed a possible crash with mingw
+ * [QTBUG-13787] Fixed a possible crash with mingw.
- QPrinter
* [QTBUG-12263] Strokes were in some cases not printed with the correct
@@ -303,7 +319,6 @@ Qt for Mac OS X
Qt for Symbian
--------------
-
- configure
* [QTBUG-4586] Fixed wrong paths in include/ActiveQt/headers.pri.
* [QTBUG-11671] Fixed audio-backend detection in configure tests.
@@ -319,21 +334,27 @@ Qt for Symbian
* [QTBUG-13081] vc[x]proj generators: support /MAP option without file
name.
* [QTBUG-13902] Added support for unsigned smart installer package creation.
- * [QTBUG-13991] No longer need to manually edit smart installer pkg file for publishing.
+ * [QTBUG-13991] No longer need to manually edit smart installer pkg file for
+ publishing.
* [QT-3949] Load environment.prf from Symbian SDK if it exists there.
- * [QTBUG-13499] Provide a way to compile with RVCT 4.0 using generated Makefile.
+ * [QTBUG-13499] Provide a way to compile with RVCT 4.0 using generated
+ Makefile.
* [QTBUG-13336] Ignore MAKEFILE variable for Symbian abld and sbsv2 builds.
- * [QTBUG-13363] Fix Symbian handling of projects with special characters in TARGET.
+ * [QTBUG-13363] Fix Symbian handling of projects with special characters in
+ TARGET.
* [QTBUG-12762 & QTBUG-13307] Gcce building support for symbian-sbsv2
* [QTBUG-13147] Added support for DEPLOYMENT.pkg_build_version
* [QTBUG-12884] Fix "installer_sis" and "deploy" targets when TARGET has path.
* [QTBUG-12879] Fix check to remove unnecessary deployments in Symbian.
* [QTBUG-12716] Make bld.inf target in Symbian mkspecs to depend on .pro file.
- * [QTBUG-12715] Rename Symbian generated mmp/mk files to include target in filename.
- * [QTBUG-12617] Fix package header in cases where VERSION doesn't contain all values.
+ * [QTBUG-12715] Rename Symbian generated mmp/mk files to include target in
+ filename.
+ * [QTBUG-12617] Fix package header in cases where VERSION doesn't contain all
+ values.
* Fix run and runonphone targets for projects that have TARGET with path.
* Fix QT_LIBINFIX for QT_PLUGINS_BASE_DIR.
- * No longer require PRE_TARGETDEPS items to be absolute for symbian-sbsv2 mkspec.
+ * No longer require PRE_TARGETDEPS items to be absolute for symbian-sbsv2
+ mkspec.
* Do smart command replacement for commands containing $$QMAKE_*
command variables, such as $$QMAKE_COPY, when generating bld.inf
extensions for QMAKE_EXTRA_* variables for symbian-sbsv2 mkspec.
@@ -364,7 +385,8 @@ Qt for Symbian
Check S60_VERSION instead of existence of certain files in bearer plugin.
- Demos & Examples
- * [QTBUG-13461] Remove some .pro statements left behind after IAP usage cleanup
+ * [QTBUG-13461] Remove some .pro statements left behind after IAP usage
+ cleanup.
* [QTBUG-12276] Assigned valid UID3 for fortuneserver example.
Qt for Windows CE
@@ -372,25 +394,21 @@ Qt for Windows CE
- Gui
* [QTBUG-8408] Show the [X] button on Windows mobile when maximizing.
+
****************************************************************************
* Tools *
****************************************************************************
- - Designer
-
- uic
- * Improve warnings and error reports
+ * Improve warnings and error reports.
- moc
- * Show an error if NOTIFY refer to a wrong signal in Q_PROPERTY
+ * Show an error if NOTIFY refer to a wrong signal in Q_PROPERTY.
- QML Viewer
- * [QTBUG-13347] Paused orientation sensors in Qml Viewer when the application window is not active to save device battery
- * [QTBUG-11019] Add a menu option to open remote files in the QML viewer
- * QML Viewer is deployed under QtDemos folder instead of QtExamples folder in Symbian application menu
-
-****************************************************************************
-* Important Behavior Changes *
-****************************************************************************
-
+ * [QTBUG-13347] Paused orientation sensors in Qml Viewer when the
+ application window is not active to save device battery.
+ * [QTBUG-11019] Add a menu option to open remote files in the QML viewer.
+ * QML Viewer is deployed under QtDemos folder instead of QtExamples
+ folder in Symbian application menu.
diff --git a/dist/changes-4.7.2 b/dist/changes-4.7.2
new file mode 100644
index 0000000..49bdd8e
--- /dev/null
+++ b/dist/changes-4.7.2
@@ -0,0 +1,158 @@
+Qt 4.7.2 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 4.7.0. For more details,
+refer to the online documentation included in this distribution. The
+documentation is also available online:
+
+ http://qt.nokia.com/doc/4.7
+
+The Qt version 4.7 series is binary compatible with the 4.6.x series.
+Applications compiled for 4.6 will continue to run with 4.7.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker or the Merge Request queue
+of the public source repository.
+
+Qt Bug Tracker: http://bugreports.qt.nokia.com
+Merge Request: http://qt.gitorious.org
+
+****************************************************************************
+* General *
+****************************************************************************
+
+New features
+------------
+
+ - SomeClass, SomeOtherClass
+ * New classes for foo, bar and baz
+
+Optimizations
+-------------
+
+ - Optimized foo in QSomeClass
+ * See list of Important Behavior Changes below
+
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+QtCore
+------
+
+ - foo
+ * bar
+
+QtGui
+-----
+
+ - foo
+ * bar
+
+QtDBus
+------
+
+ - foo
+ * bar
+
+QtNetwork
+---------
+
+ - foo
+ * bar
+
+QtOpenGL
+--------
+
+ - foo
+ * bar
+
+QtScript
+--------
+
+ - foo
+ * bar
+
+QtSql
+-----
+
+ - foo
+ * bar
+
+QtXml
+-----
+
+ - foo
+ * bar
+
+Qt Plugins
+----------
+
+ - foo
+ * bar
+
+Third party components
+----------------------
+
+ - Updated foo to version 2.3.9.
+
+ - Updated bar to the latest version from baz.org.
+
+
+****************************************************************************
+* Platform Specific Changes *
+****************************************************************************
+
+Qt for Unix (X11 and Mac OS X)
+------------------------------
+
+ -
+
+Qt for Linux/X11
+----------------
+
+ -
+
+Qt for Windows
+--------------
+
+ -
+
+Qt for Mac OS X
+---------------
+
+ -
+
+Qt for Embedded Linux
+---------------------
+
+ -
+
+DirectFB
+--------
+
+ -
+
+Qt for Windows CE
+-----------------
+
+ -
+
+****************************************************************************
+* Tools *
+****************************************************************************
+
+ - Designer
+ * foo
+
+ - qdoc3
+ * bar
+
+ - Linguist
+ * baz
+
+****************************************************************************
+* Important Behavior Changes *
+****************************************************************************
+
+ -
+
diff --git a/dist/changes-4.8.0 b/dist/changes-4.8.0
index f8ca4bc..c55faf6 100644
--- a/dist/changes-4.8.0
+++ b/dist/changes-4.8.0
@@ -37,6 +37,8 @@ Third party components
QtCore
------
- Removed support for QT_NO_THREAD define for QHostInfo.
+ - Optimized plugin loading on ELF platforms.
+ Print failure reason at runtime with QT_DEBUG_PLUGINS=1 in environment.
QtGui
-----
diff --git a/doc/src/bughowto.qdoc b/doc/src/bughowto.qdoc
index a833e00..1793fce 100644
--- a/doc/src/bughowto.qdoc
+++ b/doc/src/bughowto.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -34,7 +34,7 @@
about it so that we can fix it.
Before reporting a bug, please check the \l{FAQs}, \l{Platform
- Notes}, and the \l{Qt Bug Tracker} on the Qt website to see
+ and Compiler Notes}, and the \l{Qt Bug Tracker} on the Qt website to see
if the issue is already known.
The first thing you should do is to sign up for an account for
@@ -51,7 +51,7 @@
compiled with
\o Reliable and clear description on how to reproduce the problem
\endlist
-
+
If possible, please provide a test written using the QtTest module
as this will improve the procedure of reproducing your problem and
allow the developers to address the issue in a more efficient way.
diff --git a/doc/src/classes.qdoc b/doc/src/classes.qdoc
index b3f8869..66009f5 100644
--- a/doc/src/classes.qdoc
+++ b/doc/src/classes.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/classes/exportedfunctions.qdoc b/doc/src/classes/exportedfunctions.qdoc
index b3fd5a0..ac6a970 100644
--- a/doc/src/classes/exportedfunctions.qdoc
+++ b/doc/src/classes/exportedfunctions.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/classes/phonon-api.qdoc b/doc/src/classes/phonon-api.qdoc
index 6fe0223..6c9c8de 100644
--- a/doc/src/classes/phonon-api.qdoc
+++ b/doc/src/classes/phonon-api.qdoc
@@ -4114,6 +4114,13 @@
*/
/*!
+ \fn Phonon::VideoWidget::snapshot() const
+ \since 4.7
+
+ Returns a snapshot of the current frame shown in the widget.
+*/
+
+/*!
\enum Phonon::VideoWidget::ScaleMode
The ScaleMode enum describes how to treat aspect ratio during
@@ -4305,6 +4312,22 @@
*/
/*!
+ \class Phonon::VideoWidgetInterface44
+ \inmodule Phonon
+ \since 4.7
+*/
+
+/*!
+ \fn Phonon::VideoWidgetInterface44::snapshot() const
+*/
+
+/*!
+ \typedef Phonon::VideoWidgetInterfaceLatest
+ \inmodule Phonon
+ \since 4.7
+*/
+
+/*!
\class Phonon::PlatformPlugin
\inmodule Phonon
\since 4.4
@@ -5021,3 +5044,103 @@
\internal
*/
+/*!
+ \class Phonon::PulseSupport
+ \inmodule Phonon
+ \since 4.7
+ \internal
+*/
+
+/*!
+ \class Phonon::AudioDataOutput
+ \inmodule Phonon
+ \since 4.7
+
+ \brief The AudioDataOutput class provides access to audio data.
+
+ This class is used to obtain audio data, typically for the purpose of
+ visualizing it.
+
+ Although it is not designed for realtime performance, the latencies
+ associated with accessing the data should be low enough for applications
+ that provide visualizations of the data. This class can also be used to
+ save the audio data for further processing.
+*/
+
+/*!
+ \enum Phonon::AudioDataOutput::Channel
+
+ This enum describes the channel audio data belongs to.
+
+ \value LeftChannel
+ \value RightChannel
+ \value CenterChannel
+ \value LeftSurroundChannel
+ \value RightSurroundChannel
+ \value SubwooferChannel
+*/
+
+/*!
+ \property Phonon::AudioDataOutput::dataSize
+ \brief the number of samples passed via the dataReady() signal.
+*/
+
+/*!
+ \fn int Phonon::AudioDataOutput::sampleRate() const
+
+ Returns the sample rate measured in Hertz, as reported by the backend.
+ If the backend is unavailable -1 is returned.
+*/
+
+/*!
+ \fn void Phonon::AudioDataOutput::endOfMedia(int remainingSamples)
+
+ This signal is emitted before the final dataReady() signal is emitted for
+ a media. The \a remainingSamples value sent by the signal contains the
+ number of samples that will be sent in the final dataReady() signal for
+ the media.
+*/
+
+/*!
+ \fn Phonon::AudioDataOutput::dataReady(const QMap<Phonon::AudioDataOutput::Channel, QVector<qint16> > &data)
+
+ This signal is emitted whenever there is data available to read. The
+ \a data sent by the signal is supplied in the form of a map that holds the
+ data for different output channels.
+*/
+
+/*!
+ \fn Phonon::AudioDataOutputPrivate::AudioDataOutputPrivate()
+ \internal
+*/
+
+/*!
+ \fn Phonon::AudioDataOutputInterface::~AudioDataOutputInterface()
+
+ Destroys the data interface.
+*/
+
+/*!
+ \fn Phonon::AudioDataOutputInterface::frontendObject() const
+ \internal
+*/
+
+/*!
+ \fn Phonon::AudioDataOutputInterface::setFrontendObject(AudioDataOutput *)
+ \internal
+*/
+
+/*!
+ \fn Phonon::GlobalConfigPrivate::GlobalConfigPrivate()
+ \internal
+*/
+
+/*!
+ \fn Phonon::GlobalConfigPrivate::~GlobalConfigPrivate()
+ \internal
+*/
+
+/*!
+ \fn Phonon::SwiftSlider::~SwiftSlider()
+ \internal
+*/
diff --git a/doc/src/classes/phonon-namespace.qdoc b/doc/src/classes/phonon-namespace.qdoc
index 282c96f..c53f69b 100644
--- a/doc/src/classes/phonon-namespace.qdoc
+++ b/doc/src/classes/phonon-namespace.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/credits.qdoc b/doc/src/credits.qdoc
index 2f1d76e..20aa366 100644
--- a/doc/src/credits.qdoc
+++ b/doc/src/credits.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/declarative/advtutorial.qdoc b/doc/src/declarative/advtutorial.qdoc
index 2ca9418..04d7f07 100644
--- a/doc/src/declarative/advtutorial.qdoc
+++ b/doc/src/declarative/advtutorial.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/declarative/anchor-layout.qdoc b/doc/src/declarative/anchor-layout.qdoc
index 99f7777..b77ce36 100644
--- a/doc/src/declarative/anchor-layout.qdoc
+++ b/doc/src/declarative/anchor-layout.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/declarative/animation.qdoc b/doc/src/declarative/animation.qdoc
index 53a0c55..208a1c4 100644
--- a/doc/src/declarative/animation.qdoc
+++ b/doc/src/declarative/animation.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/declarative/basictypes.qdoc b/doc/src/declarative/basictypes.qdoc
index e327d4a..8ab06ab 100644
--- a/doc/src/declarative/basictypes.qdoc
+++ b/doc/src/declarative/basictypes.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -156,8 +156,10 @@
Example:
\qml
Rectangle { color: "steelblue" }
+ Rectangle { color: "transparent" }
Rectangle { color: "#FF0000" }
Rectangle { color: "#800000FF" }
+ Rectangle { color: "#00000000" } // ARGB fully transparent
\endqml
Or with the \l{QML:Qt::rgba()}{Qt.rgba()}, \l{QML:Qt::hsla()}{Qt.hsla()}, \l{QML:Qt::darker()}{Qt.darker()},
@@ -353,9 +355,11 @@
\brief A list of objects.
- A list of objects. While not technically a basic type, QML also
- supports lists of object types. When used from QML, the engine
- automatically appends each value to the list.
+ A list type contains a list of objects. While not technically
+ a basic type, QML supports lists of object types. When used
+ from QML, the engine automatically appends each value to the list.
+ Items in the list can be accessed by index using the usual
+ \c listName[index] syntax.
For example, the \l Item class contains a list property named
children that can be used like this:
@@ -364,14 +368,87 @@
Item {
children: [
Item { id: child1 },
- Rectangle { id: child2 },
+ Rectangle { id: child2; width: 200 },
Text { id: child3 }
]
+
+ Component.onCompleted: {
+ console.log("Width of child rectangle:", children[1].width)
+ }
}
\endqml
- \c child1, \c child2 and \c child3 will all be added to the children list
+ \c child1, \c child2 and \c child3 will be added to the children list
in the order in which they appear.
+ List \l {Adding new properties}{properties} can be created as a
+ \c variant type, or as a \c list<Type> type, where \c Type is the
+ type of the object in the list:
+
+ \qml
+ Item {
+ property variant values: [ 10, 20, 'abc', 'xyz' ]
+
+ property list<Rectangle> rects: [
+ Rectangle { width: 100; height: 100},
+ Rectangle { width: 200; height: 200}
+ ]
+ }
+ \endqml
+
+ A \c variant list can contain values of any of the \l {QML Basic Types}{basic QML types}
+ such as numbers, strings, etc. while a \c list<Type> list can only contain values
+ that match (or are derived from) the specified \c Type.
+
+ A list property can be cleared by setting it to an empty list:
+
+ \qml
+ Item {
+ children: []
+ }
+ \endqml
+
+ A list property cannot be modified in any other way. Items cannot be dynamically added to
+ or removed from the list through JavaScript operations; any \c push() operations on the
+ list only modify a \e copy of the list and not the actual list. (These current limitations
+ are due to restrictions on \l {Property Binding} where lists are involved.)
+
+ To create a modifiable list, create an array object from within a \c .js JavaScript file,
+ or implement a custom list element in C++. Here is a QML element that modifies the list in a
+ JavaScript file:
+
+ \table
+ \row
+ \o
+ \qml
+ // QML
+ import "script.js" as Script
+
+ Item {
+ Component.onCompleted: {
+ Script.addItem('abc')
+ console.log("Added:", Script.getList()[0])
+ }
+ }
+ \endqml
+
+ \o
+ \code
+ // script.js
+ var myArray = new Array()
+
+ function getList() {
+ return myArray
+ }
+
+ function addItem(item) {
+ myArray.push(item)
+ }
+ \endcode
+ \endtable
+
+ However, note that a JavaScript list should not be used as a QML \c property value,
+ as the property is not updated when the list changes.
+
\sa {QML Basic Types}
*/
diff --git a/doc/src/declarative/codingconventions.qdoc b/doc/src/declarative/codingconventions.qdoc
index aa4feef..ba789e0 100644
--- a/doc/src/declarative/codingconventions.qdoc
+++ b/doc/src/declarative/codingconventions.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc
index a8df4b1..28a8a70 100644
--- a/doc/src/declarative/declarativeui.qdoc
+++ b/doc/src/declarative/declarativeui.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/declarative/dynamicobjects.qdoc b/doc/src/declarative/dynamicobjects.qdoc
index e735bce..daf2ae1 100644
--- a/doc/src/declarative/dynamicobjects.qdoc
+++ b/doc/src/declarative/dynamicobjects.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -173,7 +173,11 @@ component. Each instance runs a NumberAnimation, and when the animation has fini
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:
+Note that it is safe to call destroy() on an object within that object. Objects are not destroyed the
+instant destroy() is called, but are cleaned up sometime between the end of that script block and the next frame
+(unless you specified a non-zero delay).
+
+Note also that if a \c SelfDestroyingRect instance was created statically like this:
\qml
Item {
diff --git a/doc/src/declarative/elements.qdoc b/doc/src/declarative/elements.qdoc
index 252b964..54f07a2 100644
--- a/doc/src/declarative/elements.qdoc
+++ b/doc/src/declarative/elements.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -37,8 +37,110 @@
To see the QML elements listed by functional area, see the
\l{Groups Of Related QML Elements} page.
- \generatelist qmlclasses
-
+ \table
+ \header \o {2,1} \bold {Basic Visual Items}
+ \row \o \l {Item} \o Basic item element inherited by all visual items in QML
+ \row \o \l {Rectangle} \o Basic visual rectangle element
+ \row \o \l {Gradient} \o Defines a gradient between two or more colors
+ \row \o \l {GradientStop} \o Defines a color used in a \l {Gradient}
+ \row \o \l {Image} \o Allows the use of bitmaps to a scene
+ \row \o \l {BorderImage} (Item-specific) \o Defines an image as a border
+ \row \o \l {AnimatedImage} \o For playing animations stored as a series of frames
+ \row \o \l {Text} \o Allows the use of formatted text in a scene
+ \row \o \l {TextInput} \o Displays an editable line of text
+ \row \o \l {IntValidator} \o Validator for integer values
+ \row \o \l {DoubleValidator} \o Validator for non-integer values
+ \row \o \l {RegExpValidator} \o Validator for string regular expressions
+ \row \o \l {TextEdit} \o Displays multiple lines of editable formatted text
+
+ \header \o {2,1} \bold {Basic Interaction Items}
+ \row \o \l {MouseArea} \o Handles mouse interactions
+ \row \o \l {FocusScope} \o For keyboard focus handling
+ \row \o \l {Flickable} \o Provides a surface that can be "flicked"
+ \row \o \l {Flipable} \o Provides a surface that produces flipping effects
+ \row \o \l {GestureArea} (experimental) \o Enables simple gesture handling
+
+ \header \o {2,1} \bold {States}
+ \row \o \l {State} \o Defines sets of configurations of objects and properties
+ \row \o \l {PropertyChanges} \o Describes property changes within a state
+ \row \o \l {StateGroup} \o Contains a set of states and state transitions
+ \row \o \l {StateChangeScript} \o Allows script binding in a state
+ \row \o \l {ParentChange} (Item-specific) \o Re-parent an Item in a state change
+ \row \o \l {AnchorChanges} \o Change the anchors of an item in a state
+
+ \header \o {2,1} \bold {Animation and Transitions}
+ \row \o \l {Behavior} \o Specifies a default animation for property changes
+ \row \o \l {SequentialAnimation} \o Runs animations sequentially
+ \row \o \l {ParallelAnimation} \o Runs animations in parallel
+ \row \o \l {PropertyAnimation} \o Animates property changes
+ \row \o \l {NumberAnimation} \o Animates properties of type qreal
+ \row \o \l {Vector3dAnimation} \o Animates properties of type QVector3d
+ \row \o \l {ColorAnimation} \o Animates color changes
+ \row \o \l {RotationAnimation} \o Animates rotations
+ \row \o \l {ParentAnimation} \o Animates parent changes
+ \row \o \l {AnchorAnimation} \o Animates anchor changes
+ \row \o \l {PauseAnimation} \o Pauses an animation
+ \row \o \l {SmoothedAnimation} \o Allows a property to smoothly track a value
+ \row \o \l {SpringAnimation} \o Allows a property to track a value in a spring-like motion
+ \row \o \l {PropertyAction} \o Sets immediate property changes during animation
+ \row \o \l {ScriptAction} \o Runs scripts during an animation
+ \row \o \l {Transition} \o Animates transitions during state changes
+
+ \header \o {2,1} \bold {Working with Data}
+ \row \o \l {Binding} \o Binds any value to any property
+ \row \o \l {ListModel} \o Defines a list of data
+ \row \o \l {ListElement} \o Defines a data item in a \l {ListModel}
+ \row \o \l {VisualItemModel} \o Contains items that already defines its own visual delegate
+ \row \o \l {VisualDataModel} \o Encapsulates a model and a delegate
+ \row \o \l {Package} \o Collection that enables sharing of items within different views
+ \row \o \l {XmlListModel} \o Specifies a model using XPath expressions
+ \row \o \l {XmlRole} \o Specifies a role for an \l {XmlListModel}
+
+ \header \o {2,1} \bold {Views}
+ \row \o \l {ListView} \o Provides a list visualization of a model
+ \row \o \l {GridView} \o Provides a grid visualization of a model
+ \row \o \l {PathView} \o Visualizes a model's contents along a path
+ \row \o \l {Path} \o Defines a path used by \l {PathView}
+ \row \o \l {PathLine} \o Defines a line in \l {Path}
+ \row \o \l {PathQuad} \o Defines a quadratic Bezier curve in a \l {Path}
+ \row \o \l {PathCubic} \o Defines a cubic Bezier curve in a \l {Path}
+ \row \o \l {PathAttribute} \o Allows the setting of attributes along a \l {Path}
+ \row \o \l {PathPercent} \o Modifies the item distribution along a \l {Path}
+ \row \o \l {WebView} \o Allows the addition of web content to a canvas
+
+ \header \o {2,1} \bold {Positioners}
+ \row \o \l {Column} \o Arranges its children vertically
+ \row \o \l {Row} \o Arranges its children horizontally
+ \row \o \l {Grid} \o Positions its children in a grid
+ \row \o \l {Flow} \o Positions its children with wrapping support
+
+ \header \o {2,1} \bold {Utility}
+ \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 {QML:QtObject} {QtObject} \o Basic element containing only the objectName property
+ \row \o \l {QML:Qt} {Qt} \o The QML global Qt object provides useful enums and functions from Qt.
+ \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
+ \row \o \l {SystemPalette} \o Provides access to the Qt palettes
+ \row \o \l {FontLoader} \o Loads fonts by name or URL
+ \row \o \l {LayoutItem} \o Allows declarative UI elements inside Qt's Graphics View layouts
+
+ \header \o {2,1} \bold {Transforms}
+ \row \o \l {Scale} \o Assigns item scaling behaviors
+ \row \o \l {Rotation} \o Assigns item rotation behaviors
+ \row \o \l {Translate} \o Assigns item translation behaviors
+
+ \header \o {2,1} \bold {Effects}
+ \row \o \l {Particles} (experimental) \o Generates and animates particles
+ \row \o \l {ParticleMotionLinear} \o Adds linear motion behavior to \l {Particles}
+ \row \o \l {ParticleMotionGravity} \o Adds gravitational motion to \l {Particles}
+ \row \o \l {ParticleMotionWander} \o Adds varied motions to \l {Particles}
+ \endtable
+
+
+
*/
diff --git a/doc/src/declarative/example-slideswitch.qdoc b/doc/src/declarative/example-slideswitch.qdoc
index 09b6006..bad8bbf 100644
--- a/doc/src/declarative/example-slideswitch.qdoc
+++ b/doc/src/declarative/example-slideswitch.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/declarative/examples.qdoc b/doc/src/declarative/examples.qdoc
index 3f075bb..224d346 100644
--- a/doc/src/declarative/examples.qdoc
+++ b/doc/src/declarative/examples.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/declarative/extending-tutorial.qdoc b/doc/src/declarative/extending-tutorial.qdoc
index 349ac30..2bfe62e 100644
--- a/doc/src/declarative/extending-tutorial.qdoc
+++ b/doc/src/declarative/extending-tutorial.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -260,49 +260,39 @@ custom QML types may see unexpected behavior if bindings are not implemented.
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:
+int-type property to store an identifier for each chart:
\code
// C++
class PieChart : public QDeclarativeItem
{
- Q_ENUMS(DisplayMode)
- Q_PROPERTY(DisplayMode displayMode READ displayMode WRITE setDisplayMode)
+ Q_PROPERTY(int chartId READ chartId WRITE setChartId NOTIFY chartIdChanged)
...
public:
- enum DisplayMode {
- MultiLevel,
- Exploded,
- ThreeDimensional
- };
-
- void setDisplayMode(DisplayMode mode);
- DisplayMode displayMode() const;
+ void setChartId(int chartId);
+ int chartId() const;
...
+
+ signals:
+ void chartIdChanged();
};
// QML
PieChart {
...
- displayMode: PieChart.Exploded
+ chartId: 100
}
\endcode
We can also use various other property types. QML has built-in support for the following
-types:
+types listed in the \l{Extending Types from QML} document, including the following:
\list
-\o bool
-\o unsigned int, int
-\o float, double, qreal
-\o QString
-\o QUrl
-\o QColor
+\o bool, unsigned int, int, float, double, qreal
+\o QString, QUrl, QColor
\o QDate, QTime, QDateTime
-\o QPoint, QPointF
-\o QSize, QSizeF
-\o QRect, QRectF
+\o QPoint, QPointF, QSize, QSizeF, QRect, QRectF
\o QVariant
\endlist
diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc
index df8a1e7..19e9ffc 100644
--- a/doc/src/declarative/extending.qdoc
+++ b/doc/src/declarative/extending.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -80,19 +80,14 @@ Types can be registered by libraries, application code, or by plugins
Once registered, all \l {Qt's Property System}{properties} of the
supported types are available in QML. QML has intrinsic support for
-properties of these types:
+properties of the types listed in the \l{Extending Types from QML}
+document, including the following:
\list
-\o bool
-\o unsigned int, int
-\o float, double, qreal
-\o QString
-\o QUrl
-\o QColor
+\o bool, unsigned int, int, float, double, qreal
+\o QString, QUrl, QColor
\o QDate, QTime, QDateTime
-\o QPoint, QPointF
-\o QSize, QSizeF
-\o QRect, QRectF
+\o QPoint, QPointF, QSize, QSizeF, QRect, QRectF
\o QVariant
\endlist
@@ -432,7 +427,7 @@ on<Property-name>Changed, regardless of the name used for the NOTIFY
signal in C++. We recommend using <property-name>Changed() for the
NOTIFY signal in C++.
-See also \l {Extending types from QML}.
+See also \l {Extending Types from QML}.
\section1 Methods
@@ -640,7 +635,7 @@ public:
/*!
\page qml-extending-types.html
-\title Extending types from QML
+\title Extending Types from QML
Many of the elements available for use in QML are implemented in
\l {Extending QML in C++}{C++}. These types are know as "core types". QML
@@ -652,7 +647,8 @@ language.
\section1 Adding new properties
-New properties can be added to an existing type. These new properties are
+New properties can be added to an existing type using the \c property keyword.
+These new properties are
available for use within QML, and also appear as regular Qt properties on the
C++ object, accessible through the regular property access mechanisms.
@@ -684,8 +680,12 @@ like this:
property list<Item> listOfItemsProperty
\endcode
+Custom types must be registered with qmlRegisterType() to be usable as a property
+type. Also note that list properties cannot be modified like ordinary JavaScript
+arrays; see the \l {list}{list type documentation} for details.
+
QML supports two methods for adding a new property to a type: a new property
-definition, and a property alias.
+definition, and a property alias. These are shown below.
\section2 Property definitions
diff --git a/doc/src/declarative/focus.qdoc b/doc/src/declarative/focus.qdoc
index c3c94c5..2e74fe0 100644
--- a/doc/src/declarative/focus.qdoc
+++ b/doc/src/declarative/focus.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/declarative/globalobject.qdoc b/doc/src/declarative/globalobject.qdoc
index a9aee2f..ffc84f9 100644
--- a/doc/src/declarative/globalobject.qdoc
+++ b/doc/src/declarative/globalobject.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/declarative/integrating.qdoc b/doc/src/declarative/integrating.qdoc
index 2586009..7028585 100644
--- a/doc/src/declarative/integrating.qdoc
+++ b/doc/src/declarative/integrating.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -47,7 +47,7 @@ qmlView->setSource(QUrl::fromLocalFile("myqml.qml"));
QWidget *widget = myExistingWidget();
QVBoxLayout *layout = new QVBoxLayout(widget);
-widget->addWidget(qmlView);
+layout->addWidget(qmlView);
\endcode
The one drawback to this approach is that QDeclarativeView is slower to initialize
diff --git a/doc/src/declarative/javascriptblocks.qdoc b/doc/src/declarative/javascriptblocks.qdoc
index d290690..b6fad5b 100644
--- a/doc/src/declarative/javascriptblocks.qdoc
+++ b/doc/src/declarative/javascriptblocks.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/declarative/modules.qdoc b/doc/src/declarative/modules.qdoc
index 25a61c9..011eb63 100644
--- a/doc/src/declarative/modules.qdoc
+++ b/doc/src/declarative/modules.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/declarative/network.qdoc b/doc/src/declarative/network.qdoc
index 60359de..a19ca6b 100644
--- a/doc/src/declarative/network.qdoc
+++ b/doc/src/declarative/network.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/declarative/positioners.qdoc b/doc/src/declarative/positioners.qdoc
index 8c9b8b7..9265732 100644
--- a/doc/src/declarative/positioners.qdoc
+++ b/doc/src/declarative/positioners.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/declarative/propertybinding.qdoc b/doc/src/declarative/propertybinding.qdoc
index f58d8fe..3bf85de 100644
--- a/doc/src/declarative/propertybinding.qdoc
+++ b/doc/src/declarative/propertybinding.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/declarative/qdeclarativedebugging.qdoc b/doc/src/declarative/qdeclarativedebugging.qdoc
index 26d3b38..9e0a969 100644
--- a/doc/src/declarative/qdeclarativedebugging.qdoc
+++ b/doc/src/declarative/qdeclarativedebugging.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/declarative/qdeclarativedocument.qdoc b/doc/src/declarative/qdeclarativedocument.qdoc
index b6af90b..8af24a6 100644
--- a/doc/src/declarative/qdeclarativedocument.qdoc
+++ b/doc/src/declarative/qdeclarativedocument.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/declarative/qdeclarativei18n.qdoc b/doc/src/declarative/qdeclarativei18n.qdoc
index 620b902..0d5fbcc 100644
--- a/doc/src/declarative/qdeclarativei18n.qdoc
+++ b/doc/src/declarative/qdeclarativei18n.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/declarative/qdeclarativeintro.qdoc b/doc/src/declarative/qdeclarativeintro.qdoc
index c97240c..1d807e3 100644
--- a/doc/src/declarative/qdeclarativeintro.qdoc
+++ b/doc/src/declarative/qdeclarativeintro.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -37,7 +37,7 @@ interface is specified as a tree of objects with properties.
This introduction is meant for those with little or no programming
experience. JavaScript is used as a scripting language in QML, so you may want
-to learn a bit more about it (\l{JavaScript: The Definitive Guide}) before diving
+to learn a bit more about it (\l{Javascript Guide}) before diving
deeper into QML. It's also helpful to have a basic understanding of other web
technologies like HTML and CSS, but it's not required.
@@ -65,8 +65,8 @@ types always begin with a capital letter. In the above example, there are
two objects, a \l Rectangle, and an \l Image. Between the braces, we can specify
information about the object, such as its properties.
-Properties are specified as \c {property: value}. In the above example, we
-can see the Image has a property named \c source, which has been assigned the
+Properties are specified as \c {property: value}. In the above example, we
+can see the Image has a property named \c source, which has been assigned the
value \c "pics/logo.png". The property and its value are separated by a colon.
Properties can be specified one-per-line:
diff --git a/doc/src/declarative/qdeclarativemodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc
index 7548c96..e11cd56 100644
--- a/doc/src/declarative/qdeclarativemodels.qdoc
+++ b/doc/src/declarative/qdeclarativemodels.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/declarative/qdeclarativeperformance.qdoc b/doc/src/declarative/qdeclarativeperformance.qdoc
index 061a71c..ab8759e 100644
--- a/doc/src/declarative/qdeclarativeperformance.qdoc
+++ b/doc/src/declarative/qdeclarativeperformance.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/declarative/qdeclarativereference.qdoc b/doc/src/declarative/qdeclarativereference.qdoc
index 8c5811b..c2c5e91 100644
--- a/doc/src/declarative/qdeclarativereference.qdoc
+++ b/doc/src/declarative/qdeclarativereference.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/declarative/qdeclarativesecurity.qdoc b/doc/src/declarative/qdeclarativesecurity.qdoc
index 7395af3..01d6c56 100644
--- a/doc/src/declarative/qdeclarativesecurity.qdoc
+++ b/doc/src/declarative/qdeclarativesecurity.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/declarative/qdeclarativestates.qdoc b/doc/src/declarative/qdeclarativestates.qdoc
index 148726f..b663d43 100644
--- a/doc/src/declarative/qdeclarativestates.qdoc
+++ b/doc/src/declarative/qdeclarativestates.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/declarative/qml-intro.qdoc b/doc/src/declarative/qml-intro.qdoc
index 18fa439..f891e01 100644
--- a/doc/src/declarative/qml-intro.qdoc
+++ b/doc/src/declarative/qml-intro.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/declarative/qmlruntime.qdoc b/doc/src/declarative/qmlruntime.qdoc
index 51f9e4d..dfc0ad9 100644
--- a/doc/src/declarative/qmlruntime.qdoc
+++ b/doc/src/declarative/qmlruntime.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/declarative/qmlviewer.qdoc b/doc/src/declarative/qmlviewer.qdoc
index 81ad218..82f1fec 100644
--- a/doc/src/declarative/qmlviewer.qdoc
+++ b/doc/src/declarative/qmlviewer.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/declarative/qtbinding.qdoc b/doc/src/declarative/qtbinding.qdoc
index 53db5c7..8a969eb 100644
--- a/doc/src/declarative/qtbinding.qdoc
+++ b/doc/src/declarative/qtbinding.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -30,126 +30,389 @@
\target qtbinding
\title Using QML in C++ Applications
-\tableofcontents
+QML is designed to be easily extensible from C++. The classes in the
+QtDeclarative module allow QML components to be loaded and manipulated from C++, and through
+Qt's \l{The Meta-Object System}{meta-object system}, QML and C++ objects can easily
+communicate through Qt signals and slots. In addition, QML plugins can be written to create
+reusable QML components for distribution.
-The QML API is split into three main classes - QDeclarativeEngine, QDeclarativeComponent and QDeclarativeContext.
-QDeclarativeEngine provides the environment in which QML is run, QDeclarativeComponent encapsulates
-\l {QML Documents}, and QDeclarativeContext allows applications to expose data to QML component instances.
+You may want to mix QML and C++ for a number of reasons. For example:
-QML also includes a convenience API, QDeclarativeView, for applications that simply want to embed QML
-components into a new QGraphicsView. QDeclarativeView covers up many of the details discussed below.
-While QDeclarativeView is mainly intended for rapid prototyping it can have uses in production applications.
+\list
+\o To use functionality defined in a C++ source (for example, when using a C++ Qt-based data model, or
+calling functions in a third-party C++ library)
+\o To access functionality in the QtDeclarative module (for example, to dynamically generate
+images using QDeclarativeImageProvider)
+\o To write your own QML elements (whether for your applications, or for distribution to others)
+\endlist
+
+To use the QtDeclarative module, you must include and link to the module appropriately, as shown on
+the \l {QtDeclarative}{module index page}. The \l {Qt Declarative UI Runtime} documentation
+shows how to build a basic C++ application that uses this module.
+
+
+\section1 Core module classes
-If you are looking at retrofitting an existing Qt application with QML,
-read \l{Integrating QML with existing Qt UI code}.
-\section1 Basic Usage
+The QtDeclarative module provides a set of C++ APIs for extending your QML applications from C++ and
+embedding QML into C++ applications. There are several core classes in the QtDeclarative module
+that provide the essential capabilities for doing this. These are:
-Every application requires at least one QDeclarativeEngine. A QDeclarativeEngine allows the configuration of
-global settings that apply to all the QML component instances - such as the QNetworkAccessManager
-that is used for network communications, and the path used for persistent storage.
-Multiple QDeclarativeEngine's are only needed if the application requires these settings to differ
-between QML component instances.
+\list
+\o QDeclarativeEngine: A QML engine provides the environment for executing QML code. Every
+application requires at least one engine instance.
+\o QDeclarativeComponent: A component encapsulates a \l{QML Documents}{QML document}.
+\o QDeclarativeContext: A context allows an application to expose data to the QML components
+created by an engine.
+\endlist
-\l {QML Documents} are loaded using the QDeclarativeComponent class. Each QDeclarativeComponent instance
-represents a single QML document. A QDeclarativeComponent can be passed a document URL, or raw text
-representing the content of the document. The document URL can be a local filesystem URL, or
-any network URL supported by QNetworkAccessManager.
+A QDeclarativeEngine allows the configuration of global settings that apply to all of its QML
+component instances: for example, the QNetworkAccessManager to be used for network communications,
+and the file path to be used for persistent storage.
-QML component instances can then be created by calling the QDeclarativeComponent::create() method. Here's
-an example of loading a QML document, and creating an object from it.
+QDeclarativeComponent is used to load QML documents. Each QDeclarativeComponent instance represents
+a single document. A component can be created from the URL or file path of a QML document, or the raw
+QML code of the document. Component instances are instatiated through the
+QDeclarativeComponent::create() method, like this:
\code
- QDeclarativeEngine *engine = new QDeclarativeEngine(parent);
- QDeclarativeComponent component(engine, QUrl::fromLocalFile("main.qml"));
- QObject *myObject = component.create();
+QDeclarativeEngine engine;
+QDeclarativeComponent component(&engine, QUrl::fromLocalFile("MyRectangle.qml"));
+QObject *rectangleInstance = component.create();
+
+// ...
+delete rectangleInstance;
\endcode
-\section1 Exposing Data
+QML documents can also be loaded using QDeclarativeView. This class provides a convenient
+QWidget-based view for embedding QML components into QGraphicsView-based applications. (For other
+methods of integrating QML into QWidget-based applications, see \l {Integrating QML with existing Qt
+UI code}.)
+
+
+\section1 Approaches to using QML with C++
+
+There are a number of ways to extend your QML application through C++. For example, you could:
+
+\list
+\o Load a QML component and manipulate it (or its children) from C++
+\o Embed a C++ object and its properties directly into a QML component (for example, to make a
+particular C++ object callable from QML, or to replace a dummy list model data with a real data set)
+\o Define new QML elements (through QObject-based C++ classes) and create them directly from your
+QML code
+\endlist
+
+These methods are shown below. Naturally these approaches are not exclusive; you can mix any of
+these methods throughout your application as appropriate.
+
+
+\section2 Loading QML components from C++
+
+A QML document can be loaded with QDeclarativeComponent or QDeclarativeView. QDeclarativeComponent
+loads a QML component as a C++ object; QDeclarativeView also does this,
+but additionally loads the QML component directly into a QGraphicsView. It is convenient for loading
+a displayable QML component into a QWidget-based application.
+
+For example, suppose there is a \c MyItem.qml file that looks like this:
+
+\snippet doc/src/snippets/declarative/qtbinding/loading/MyItem.qml start
+\snippet doc/src/snippets/declarative/qtbinding/loading/MyItem.qml end
+
+This QML document can be loaded with QDeclarativeComponent or QDeclarativeView with the following
+C++ code. Using a QDeclarativeComponent requires calling QDeclarativeComponent::create() to create
+a new instance of the component, while a QDeclarativeView automatically creates an instance of the
+component, which is accessible via QDeclarativeView::rootObject():
+
+\table
+\row
+\o
+\snippet doc/src/snippets/declarative/qtbinding/loading/main.cpp QDeclarativeComponent-a
+\dots 0
+\snippet doc/src/snippets/declarative/qtbinding/loading/main.cpp QDeclarativeComponent-b
+\o
+\snippet doc/src/snippets/declarative/qtbinding/loading/main.cpp QDeclarativeView
+\endtable
+
+This \c object is the instance of the \c MyItem.qml component that has been created. You can now
+modify the item's properties using QObject::setProperty() or QDeclarativeProperty:
+
+\snippet doc/src/snippets/declarative/qtbinding/loading/main.cpp properties
+
+Alternatively, you can cast the object to its actual type and call functions with compile-time
+safety. In this case the base object of \c MyItem.qml is an \l Item, which is defined by the
+QDeclarativeItem class:
+
+\snippet doc/src/snippets/declarative/qtbinding/loading/main.cpp cast
+
+You can also connect to any signals or call functions defined in the component using
+QMetaObject::invokeMethod() and QObject::connect(). See \l {Exchanging data between QML and C++}
+below for further details.
+
+\section3 Locating child objects
+
+QML components are essentially object trees with children that have siblings and their own children.
+Child objects of QML components can be located using the QObject::objectName property with
+QObject::findChild(). For example, if the root item in \c MyItem.qml had a child \l Rectangle item:
+
+\snippet doc/src/snippets/declarative/qtbinding/loading/MyItem.qml start
+\codeline
+\snippet doc/src/snippets/declarative/qtbinding/loading/MyItem.qml child
+\snippet doc/src/snippets/declarative/qtbinding/loading/MyItem.qml end
+
+The child could be located like this:
+
+\snippet doc/src/snippets/declarative/qtbinding/loading/main.cpp findChild
+
+If \c objectName is used inside a delegate of a ListView, \l Repeater or some other
+element that creates multiple instances of its delegates, there will be multiple children with
+the same \c objectName. In this case, QObject::findChildren() can be used to find all children
+with a matching \c objectName.
+
+\warning While it is possible to use C++ to access and manipulate QML objects deep into the
+object tree, we recommend that you do not take this approach outside of application
+testing and prototyping. One strength of QML and C++ integration is the ability to implement the
+QML user interface separately from the C++ logic and dataset backend, and this strategy breaks if the
+C++ side reaches deep into the QML components to manipulate them directly. This would make it difficult
+to, for example, swap a QML view component for another view, if the new component was missing a
+required \c objectName. It is better for the C++ implementation to know as little as possible about
+the QML user interface implementation and the composition of the QML object tree.
+
+
+\section2 Embedding C++ objects into QML components
+
+When loading a QML scene into a C++ application, it can be useful to directly embed C++ data into
+the QML object. QDeclarativeContext enables this by exposing data to the context of a QML
+component, allowing data to be injected from C++ into QML.
+
+For example, here is a QML item that refers to a \c currentDateTime value that does not exist in
+the current scope:
+
+\snippet doc/src/snippets/declarative/qtbinding/context/MyItem.qml 0
+
+This \c currentDateTime value can be set directly by the C++ application that loads the QML
+component, using QDeclarativeContext::setContextProperty():
+
+\snippet doc/src/snippets/declarative/qtbinding/context/main.cpp 0
+
+Context properties can hold either QVariant or QObject* values. This means custom C++ objects can
+also be injected using this approach, and these objects can be modified and read directly in QML.
+Here, we modify the above example to embed a QObject instance instead of a QDateTime value, and the QML code
+invokes a method on the object instance:
+
+\table
+\row
+\o
+\snippet doc/src/snippets/declarative/qtbinding/context-advanced/applicationdata.h 0
+\codeline
+\snippet doc/src/snippets/declarative/qtbinding/context-advanced/main.cpp 0
+\o
+\snippet doc/src/snippets/declarative/qtbinding/context-advanced/MyItem.qml 0
+\endtable
+
+(Note that date/time values returned from C++ to QML can be formatted through
+\l{QML:Qt::formatDateTime}{Qt.formatDateTime()} and associated functions.)
+
+If the QML item needs to receive signals from the context property, it can connect to them using the
+\l Connections element. For example, if \c ApplicationData has a signal named \c
+dataChanged(), this signal can be connected to using an \c onDataChanged handler within
+a \l Connections object:
+
+\snippet doc/src/snippets/declarative/qtbinding/context-advanced/connections.qml 0
+
+Context properties can be useful for using C++ based data models in a QML view. See the
+\l {declarative/modelviews/stringlistmodel}{String ListModel},
+\l {declarative/modelviews/objectlistmodel}{Object ListModel} and
+\l {declarative/modelviews/abstractitemmodel}{AbstractItemModel} models for
+respective examples on using QStringListModel, QObjectList-based models and QAbstractItemModel
+in QML views.
+
+Also see the QDeclarativeContext documentation for more information.
+
+
+\section2 Defining new QML elements
+
+While new QML elements can be \l {Defining new Components}{defined in QML}, they can also be
+defined by C++ classes; in fact, many of the core \l {QML Elements} are implemented through
+C++ classes. When you create a QML object using one of these elements, you are simply creating an
+instance of a QObject-based C++ class and setting its properties.
+
+For example, here is an \c ImageViewer class with an \c image URL property:
+
+\snippet doc/src/snippets/declarative/qtbinding/newelements/imageviewer.h 0
+
+Aside from the fact that it inherits QDeclarativeItem, this is an ordinary class that could
+exist outside of QML. However, once it is registered with the QML engine using qmlRegisterType():
+
+\snippet doc/src/snippets/declarative/qtbinding/newelements/main.cpp register
+
+Then, any QML code loaded by your C++ application or \l{QDeclarativeExtensionPlugin}{plugin} can create and manipulate
+\c ImageViewer objects:
+
+\snippet doc/src/snippets/declarative/qtbinding/newelements/standalone.qml 0
+
+Note that custom C++ types do not have to inherit from QDeclarativeItem; this is only necessary if it is
+a displayable item. If the item is not displayable, it can simply inherit from QObject.
+
+For more information on defining new QML elements, see the \l {Tutorial: Writing QML extensions with C++}
+{Writing QML extensions with C++} tutorial and the \l {Extending QML in C++} reference
+documentation.
+
+
+
+\section1 Exchanging data between QML and C++
+
+QML and C++ objects can communicate with one another through signals, slots and property
+modifications. For a C++ object, any data that is exposed to Qt's \l{The Meta-Object System}{Meta-Object System}
+- that is, properties, signals, slots and Q_INVOKABLE methods - become available to QML. On
+the QML side, all QML object data is automatically made available to the meta-object system and can
+be accessed from C++.
+
+
+\section2 Calling functions
-QML components are instantiated in a QDeclarativeContext. A context allows the application to expose data
-to the QML component instance. A single QDeclarativeContext can be used to instantiate all the objects
-used by an application, or several QDeclarativeContext can be created for more fine grained control over
-the data exposed to each instance. If a context is not passed to the QDeclarativeComponent::create()
-method, the QDeclarativeEngine's \l {QDeclarativeEngine::rootContext()}{root context} is used. Data exposed through
-the root context is available to all object instances.
+QML functions can be called from C++ and vice-versa.
-\section1 Simple Data
+All QML functions are exposed to the meta-object system and can be called using
+QMetaObject::invokeMethod(). Here is a C++ application that uses this to call a QML function:
-To expose data to a QML component instance, applications set \l {QDeclarativeContext::setContextProperty()}
-{context properties} which are then accessible by name from QML \l {Property Binding}s and JavaScript.
-The following example shows how to expose a background color to a QML file through QDeclarativeView:
+\table
+\row
+\o \snippet doc/src/snippets/declarative/qtbinding/functions-qml/MyItem.qml 0
+\o \snippet doc/src/snippets/declarative/qtbinding/functions-qml/main.cpp 0
+\endtable
+
+Notice the Q_RETURN_ARG() and Q_ARG() arguments for QMetaObject::invokeMethod() must be specified as
+QVariant types, as this is the generic data type used for QML functions and return values.
+
+To call a C++ function from QML, the function must be either a Qt slot, or a function marked with
+the Q_INVOKABLE macro, to be available to QML. In the following example, the QML code invokes
+methods on the \c myObject object, which has been set using QDeclarativeContext::setContextProperty():
+
+\table
+\row
+\o
+\snippet doc/src/snippets/declarative/qtbinding/functions-cpp/MyItem.qml 0
+\o
+\snippet doc/src/snippets/declarative/qtbinding/functions-cpp/myclass.h 0
+\codeline
+\snippet doc/src/snippets/declarative/qtbinding/functions-cpp/main.cpp 0
+\endtable
+
+Note that QML does not support overloaded functions. If a C++ has more than one function with the
+same name, there is no guarantee which overloaded function will be called from QML.
+
+
+\section2 Receiving signals
+
+All QML signals are automatically available to C++, and can be connected to using QObject::connect()
+like any ordinary Qt C++ signal.
+
+Here is a QML component with a signal named \c qmlSignal. This signal is connected to a C++ object's
+slot using QObject::connect():
+
+\table
+\row
+\o
+\snippet doc/src/snippets/declarative/qtbinding/signals-qml/MyItem.qml 0
+\o
+\snippet doc/src/snippets/declarative/qtbinding/signals-qml/myclass.h 0
+\codeline
+\snippet doc/src/snippets/declarative/qtbinding/signals-qml/main.cpp 0
+\endtable
+
+To connect to Qt C++ signals from within QML, use a signal handler with the \c on<SignalName> syntax.
+If the C++ object is directly creatable from within QML (see \l {Defining new QML elements} above)
+then the signal handler can be defined within the object declaration. In the following example, the
+QML code creates a \c ImageViewer object, and the \c imageChanged and \c loadingError signals of the
+C++ object are connected to through \c onImagedChanged and \c onLoadingError signal handlers in QML:
\table
\row
\o
-\c {// main.cpp}
-\snippet doc/src/snippets/declarative/qtbinding/contextproperties/main.cpp 0
+
+\snippet doc/src/snippets/declarative/qtbinding/signals-cpp/imageviewer.h start
+\dots 4
+\snippet doc/src/snippets/declarative/qtbinding/signals-cpp/imageviewer.h end
\o
-\c {// main.qml}
-\snippet doc/src/snippets/declarative/qtbinding/contextproperties/main.qml 0
+\snippet doc/src/snippets/declarative/qtbinding/signals-cpp/standalone.qml 0
+\endtable
+
+(Note that if a signal has been declared as the NOTIFY signal for a property, QML allows it to be
+received with an \c on<Property>Changed handler even if the signal's name does not follow the \c
+<Property>Changed naming convention. In the above example, if the "imageChanged" signal was named
+"imageModified" instead, the \c onImageChanged signal handler would still be called.)
+
+If, however, the object with the signal is not created from within the QML code, and the QML item only has a
+reference to the created object - for example, if the object was set using
+QDeclarativeContext::setContextProperty() - then the \l Connections element can be used
+instead to create the signal handler:
+\table
+\row
+\o \snippet doc/src/snippets/declarative/qtbinding/signals-cpp/main.cpp connections
+\o \snippet doc/src/snippets/declarative/qtbinding/signals-cpp/MyItem.qml 0
\endtable
-Or, if you want \c main.cpp to create the component without showing it in a QDeclarativeView, you could create an instance of QDeclarativeContext using QDeclarativeEngine::rootContext() instead:
-\snippet doc/src/snippets/declarative/qtbinding/contextproperties/main.cpp 1
+\section2 Modifying properties
-Context properties work just like normal properties in QML bindings - if the \c backgroundColor
-context property in this example was changed to red, the component object instances would
-all be automatically updated. Note that it is the responsibility of the creator to delete any
-QDeclarativeContext it constructs. If the \c windowContext is no longer needed when
-the \c window component instantiation is destroyed, the \c windowContext must be destroyed
-explicitly. The simplest way to ensure this is to set \c window as \c windowContext's parent.
+Any properties declared in a QML object are automatically accessible from C++. Given a QML item
+like this:
-QDeclarativeContexts form a tree - each QDeclarativeContext except for the root context has a parent. Child
-QDeclarativeContexts effectively inherit the context properties present in their parents. This gives
-applications more freedom in partitioning the data exposed to different QML object instances.
-If a QDeclarativeContext sets a context property that is also set in one of its parents, the new context
-property shadows that in the parent. In The following example, the \c background context property
-in \c {Context 1} shadows the \c background context property in the root context.
+\snippet doc/src/snippets/declarative/qtbinding/properties-qml/MyItem.qml 0
-\image qml-context-tree.png
+The value of the \c someNumber property can be set and read using QDeclarativeProperty, or
+QObject::setProperty() and QObject::property():
-\section2 Structured Data
+\snippet doc/src/snippets/declarative/qtbinding/properties-qml/main.cpp 0
-Context properties can also be used to expose structured and writable data to QML objects. In
-addition to all the types already supported by QVariant, QObject derived types can be assigned to
-context properties. QObject context properties allow the data exposed to be more structured, and
-allow QML to set values.
+You should always use QObject::setProperty(), QDeclarativeProperty or QMetaProperty::write() to
+change a QML property value, to ensure the QML engine is made aware of the property change. For example,
+say you have a custom element \c PushButton with a \c buttonText property that internally reflects
+the value of a \c m_buttonText member variable. Modifying the member variable directly like this is
+not a good idea:
-The following example creates a \c CustomPalette object, and sets it as the \c palette context
-property.
+\badcode
+// BAD!
+QDeclarativeComponent component(engine, "MyButton.qml");
+PushButton *button = qobject_cast<PushButton*>(component.create());
+button->m_buttonText = "Click me";
+\endcode
-\snippet doc/src/snippets/declarative/qtbinding/custompalette/custompalette.h 0
+Since the value is changed directly, this bypasses Qt's \l{The Meta-Object System}{meta-object system}
+and the QML engine is not made aware of the property change. This means property bindings to
+\c buttonText would not be updated, and any \c onButtonTextChanged handlers would not be called.
-\snippet doc/src/snippets/declarative/qtbinding/custompalette/main.cpp 0
-The QML that follows references the palette object, and its properties, to set the appropriate
-background and text colors. When the window is clicked, the palette's text color is changed, and
-the window text will update accordingly.
+\target properties-cpp
-\snippet doc/src/snippets/declarative/qtbinding/custompalette/main.qml 0
+Any \l {The Property System}{Qt properties} - that is, those declared with the Q_PROPERTY()
+macro - are accessible from QML. Here is a modified version of the \l {Embedding C++ objects into
+QML components}{earlier example} on this page; here, the \c ApplicationData class has a \c backgroundColor
+property. This property can be written to and read from QML:
-To detect when a C++ property value - in this case the \c CustomPalette's \c text property -
-changes, the property must have a corresponding NOTIFY signal. The NOTIFY signal specifies a signal
-that is emitted whenever the property changes value. Implementers should take care to only emit the
-signal if the value \e changes to prevent loops from occurring. Accessing a property from a
-binding that does not have a NOTIFY signal will cause QML to issue a warning at runtime.
+\table
+\row
+\o \snippet doc/src/snippets/declarative/qtbinding/properties-cpp/applicationdata.h 0
+\o \snippet doc/src/snippets/declarative/qtbinding/properties-cpp/MyItem.qml 0
+\endtable
-\section2 Dynamic Structured Data
+Notice the \c backgroundColorChanged signal is declared as the NOTIFY signal for the
+\c backgroundColor property. If a Qt property does not have an associated NOTIFY signal,
+the property cannot be used for \l {Property Binding} in QML, as the QML engine would not be
+notified when the value changes. If you are using custom types in QML, make sure their
+properties have NOTIFY signals so that they can be used in property bindings.
-If an application is too dynamic to structure data as compile-time QObject types, dynamically
-structured data can be constructed at runtime using the QDeclarativePropertyMap class.
+See \l {Tutorial: Writing QML extensions with C++} for further details and examples
+on using Qt properties with QML.
-\section1 Calling C++ methods from QML
+\section1 Supported data types
-It is possible to call methods of QObject derived types by either exposing the
-methods as public slots, or by marking the methods Q_INVOKABLE.
+Any C++ data that is used from QML - whether as custom properties, or parameters for signals or
+functions - must be of a type that is recognizable by QML.
-The C++ methods can also have parameters and return values. QML has support for
-the following types:
+By default, QML recognizes the following data types:
\list
\o bool
@@ -163,102 +426,168 @@ the following types:
\o QSize, QSizeF
\o QRect, QRectF
\o QVariant
+\o QObject*
+\o Enumerations declared with Q_ENUMS()
\endlist
-This example toggles the "Stopwatch" object on/off when the MouseArea is clicked:
+To allow a custom C++ type to be created or used in QML, the C++ class must be registered as a QML
+type using qmlRegisterType(), as shown in the \l {Defining new QML elements} section above.
-\table
-\row
-\o
-\c {// main.cpp}
-\snippet doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.h 0
-\snippet doc/src/snippets/declarative/qtbinding/stopwatch/main.cpp 0
-\o
-\c {// main.qml}
-\snippet doc/src/snippets/declarative/qtbinding/stopwatch/main.qml 0
+\section2 Using enumerations of a custom type
-\endtable
+To use an enumeration from a custom C++ component, the enumeration must be declared with Q_ENUMS() to
+register it with Qt's meta object system. For example, the following C++ type has a \c Status enum:
-Note that in this particular example a better way to achieve the same result
-is to have a "running" property in \c main.qml. This leads to much nicer QML code:
+\snippet doc/src/snippets/declarative/qtbinding/enums/imageviewer.h start
+\snippet doc/src/snippets/declarative/qtbinding/enums/imageviewer.h end
+
+Providing the \c ImageViewer class has been registered using qmlRegisterType(), its \c Status enum can
+now be used from QML:
+
+\snippet doc/src/snippets/declarative/qtbinding/enums/standalone.qml 0
+
+The C++ type must be registered with QML to use its enums. If your C++ type is not instantiable, it
+can be registered using qmlRegisterUncreatableType().
+
+See the \l {Tutorial: Writing QML extensions with C++}{Writing QML extensions with C++} tutorial and
+the \l {Extending QML in C++} reference documentation for more information.
+
+
+\section2 Automatic type conversion
+
+As a convenience, some basic types can be specified in QML using format strings to make it easier to
+pass simple values from QML to C++.
\table
+\header
+\o Type
+\o String format
+\o Example
\row
-\o
-\code
-// main.qml
-import QtQuick 1.0
-
-Rectangle {
- MouseArea {
- anchors.fill: parent
- onClicked: stopwatch.running = !stopwatch.running
- }
-}
-\endcode
+\o QColor
+\o Color name, "#RRGGBB", "#RRGGBBAA"
+\o "red", "#ff0000", "#ff000000"
+\row
+\o QDate
+\o "YYYY-MM-DD"
+\o "2010-05-31"
+\row
+\o QPoint
+\o "x,y"
+\o "10,20"
+\row
+\o QRect
+\o "x,y,WidthxHeight"
+\o "50,50,100x100"
+\row
+\o QSize
+\o "WidthxHeight"
+\o "100x200"
+\row
+\o QTime
+\o "hh:mm:ss"
+\o "14:22:55"
+\row
+\o QUrl
+\o URL string
+\o "http://www.example.com"
+\row
+\o QVector3D
+\o "x,y,z"
+\o "0,1,0"
+\row
+\o Enumeration value
+\o Enum value name
+\o "AlignRight"
\endtable
-Of course, it is also possible to call \l {Adding new methods}{functions declared in QML from C++}.
+(More details on these string formats and types can be found in the
+\l {QML Basic Types}{basic type documentation}.)
+
+These string formats can be used to set QML \c property values and pass arguments to C++
+functions. This is demonstrated by various examples on this page; in the above
+\l{#properties-cpp}{Qt properties example}, the \c ApplicationData class has a \c backgroundColor
+property of a QColor type, which is set from the QML code with the string "red" rather rather
+than an actual QColor object.
+
+If it is preferred to pass an explicitly-typed value rather than a string, the global
+\l{QmlGlobalQtObject}{Qt object} provides convenience functions for creating some of the object
+types listed above. For example, \l{QML:Qt::rgba()}{Qt.rgba()} creates a QColor value from four
+RGBA values. The QColor returned from this function could be used instead of a string to set
+a QColor-type property or to call a C++ function that requires a QColor parameter.
+
+
+\section1 Writing QML plugins
+
+The QtDeclarative module includes the QDeclarativeExtensionPlugin class, which is an abstract
+class for writing QML plugins. This allows QML extension types to be dynamically loaded into
+QML applications.
+
+See the QDeclarativeExtensionPlugin documentation and \l {How to Create Qt Plugins} for more
+details.
+
+
+\section1 Managing resource files with the Qt resource system
+The \l {The Qt Resource System}{Qt resource system} allows resource files to be stored as
+binary files in an application executable. This can be useful when building a mixed
+QML/C++ application as it enables QML files (as well as other resources such as images
+and sound files) to be referred to through the resource system URI scheme rather than
+relative or absolute paths to filesystem resources. Note, however, that if you use the resource
+system, the application executable must be re-compiled whenever a QML source file is changed
+in order to update the resources in the package.
-\section1 Network Components
+To use the resource system in a mixed QML/C++ application:
-If the URL passed to QDeclarativeComponent is a network resource, or if the QML document references a
-network resource, the QDeclarativeComponent has to fetch the network data before it is able to create
-objects. In this case, the QDeclarativeComponent will have a \l {QDeclarativeComponent::Loading}{Loading}
-\l {QDeclarativeComponent::status()}{status}. An application will have to wait until the component
-is \l {QDeclarativeComponent::Ready}{Ready} before calling \l {QDeclarativeComponent::create()}.
+\list
+\o Create a \c .qrc \l {The Qt Resource System}{resource collection file} that lists resource
+ files in XML format
+\o From C++, load the main QML file as a resource using the \c :/ prefix or as a URL with the
+ \c qrc scheme
+\endlist
+
+Once this is done, all files specified by relative paths in QML will be loaded from
+the resource system instead. Use of the resource system is completely transparent to
+the QML layer; this means all QML code should refer to resource files using relative
+paths and should \e not use the \c qrc scheme. This scheme should only be used from
+C++ code for referring to resource files.
-The following example shows how to load a QML file from a network resource. After creating
-the QDeclarativeComponent, it tests whether the component is loading. If it is, it connects to the
-QDeclarativeComponent::statusChanged() signal and otherwise calls the \c {continueLoading()} method
-directly. This test is necessary, even for URLs that are known to be remote, just in case
-the component has been cached and is ready immediately.
+Here is a application packaged using the \l {The Qt Resource System}{Qt resource system}.
+The directory structure looks like this:
\code
-MyApplication::MyApplication()
-{
- // ...
- component = new QDeclarativeComponent(engine, QUrl("http://www.example.com/main.qml"));
- if (component->isLoading())
- QObject::connect(component, SIGNAL(statusChanged(QDeclarativeComponent::Status)),
- this, SLOT(continueLoading()));
- else
- continueLoading();
-}
-
-void MyApplication::continueLoading()
-{
- if (component->isError()) {
- qWarning() << component->errors();
- } else {
- QObject *myObject = component->create();
- }
-}
+project
+ |- example.qrc
+ |- main.qml
+ |- images
+ |- background.png
+ |- main.cpp
+ |- project.pro
\endcode
-\section1 Qt Resources
+The \c main.qml and \c background.png files will be packaged as resource files. This is
+done in the \c example.qrc resource collection file:
-QML content can be loaded from \l {The Qt Resource System} using the \e qrc: URL scheme.
-For example:
+\quotefile doc/src/snippets/declarative/qtbinding/resources/example.qrc
-\c [project/example.qrc]
-\quotefile doc/src/snippets/declarative/qtbinding/resources/example.qrc
+Since \c background.png is a resource file, \c main.qml can refer to it using the relative
+path specified in \c example.qrc:
+
+\snippet doc/src/snippets/declarative/qtbinding/resources/main.qml 0
-\c [project/project.pro]
-\quotefile doc/src/snippets/declarative/qtbinding/resources/resources.pro
+To allow QML to locate resource files correctly, the \c main.cpp loads the main QML
+file, \c main.qml, as a resource file using the \c qrc scheme:
-\c [project/main.cpp]
\snippet doc/src/snippets/declarative/qtbinding/resources/main.cpp 0
-\c [project/main.qml]
-\snippet doc/src/snippets/declarative/qtbinding/resources/main.qml 0
+Finally \c project.pro uses the RESOURCES variable to indicate that \c example.qrc should
+be used to build the application resources:
+
+\quotefile doc/src/snippets/declarative/qtbinding/resources/resources.pro
+
+See \l {The Qt Resource System} for more information.
-Note that the resource system cannot be accessed from QML directly. If the main QML file is
-loaded as a resource, all files specified as relative paths in QML will also be loaded from
-the resource system. Using the resource system is completely transparent to the QML layer.
-This also means that if the main QML file is not loaded as a resource then files in the resource
-system cannot be accessed from QML.
*/
+
diff --git a/doc/src/declarative/qtdeclarative.qdoc b/doc/src/declarative/qtdeclarative.qdoc
index 5232841..7ecdc53 100644
--- a/doc/src/declarative/qtdeclarative.qdoc
+++ b/doc/src/declarative/qtdeclarative.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/declarative/qtprogrammers.qdoc b/doc/src/declarative/qtprogrammers.qdoc
index 69e6358..0c14093 100644
--- a/doc/src/declarative/qtprogrammers.qdoc
+++ b/doc/src/declarative/qtprogrammers.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/declarative/scope.qdoc b/doc/src/declarative/scope.qdoc
index 17f8632..7e75380 100644
--- a/doc/src/declarative/scope.qdoc
+++ b/doc/src/declarative/scope.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/declarative/tutorial.qdoc b/doc/src/declarative/tutorial.qdoc
index f913d44..8467478 100644
--- a/doc/src/declarative/tutorial.qdoc
+++ b/doc/src/declarative/tutorial.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/declarative/whatsnew.qdoc b/doc/src/declarative/whatsnew.qdoc
index f8d1d0e..df0e999 100644
--- a/doc/src/declarative/whatsnew.qdoc
+++ b/doc/src/declarative/whatsnew.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/affine.qdoc b/doc/src/demos/affine.qdoc
index b4bd5d6..f8b3fd2 100644
--- a/doc/src/demos/affine.qdoc
+++ b/doc/src/demos/affine.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/anomaly.qdoc b/doc/src/demos/anomaly.qdoc
index ab00757..403a516 100644
--- a/doc/src/demos/anomaly.qdoc
+++ b/doc/src/demos/anomaly.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/arthurplugin.qdoc b/doc/src/demos/arthurplugin.qdoc
index 2345fdd..1c28bfe 100644
--- a/doc/src/demos/arthurplugin.qdoc
+++ b/doc/src/demos/arthurplugin.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/books.qdoc b/doc/src/demos/books.qdoc
index 8fbeb0a..f712fb2 100644
--- a/doc/src/demos/books.qdoc
+++ b/doc/src/demos/books.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/boxes.qdoc b/doc/src/demos/boxes.qdoc
index bae6a70..67657ce 100644
--- a/doc/src/demos/boxes.qdoc
+++ b/doc/src/demos/boxes.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/browser.qdoc b/doc/src/demos/browser.qdoc
index 722e28b..6286f76 100644
--- a/doc/src/demos/browser.qdoc
+++ b/doc/src/demos/browser.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/chip.qdoc b/doc/src/demos/chip.qdoc
index bfe9cec..7573b2e 100644
--- a/doc/src/demos/chip.qdoc
+++ b/doc/src/demos/chip.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/composition.qdoc b/doc/src/demos/composition.qdoc
index 7bf0caa..b642abc 100644
--- a/doc/src/demos/composition.qdoc
+++ b/doc/src/demos/composition.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/deform.qdoc b/doc/src/demos/deform.qdoc
index e516c2b..6e7938f 100644
--- a/doc/src/demos/deform.qdoc
+++ b/doc/src/demos/deform.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/desktopservices.qdoc b/doc/src/demos/desktopservices.qdoc
index b281bdf..1da3244 100644
--- a/doc/src/demos/desktopservices.qdoc
+++ b/doc/src/demos/desktopservices.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/digiflip.qdoc b/doc/src/demos/digiflip.qdoc
index f275797..174c337 100644
--- a/doc/src/demos/digiflip.qdoc
+++ b/doc/src/demos/digiflip.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/embeddeddialogs.qdoc b/doc/src/demos/embeddeddialogs.qdoc
index db331dd..3be0e65 100644
--- a/doc/src/demos/embeddeddialogs.qdoc
+++ b/doc/src/demos/embeddeddialogs.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/embeddedsvgviewer.qdoc b/doc/src/demos/embeddedsvgviewer.qdoc
index 9df35a8..a866ef5 100644
--- a/doc/src/demos/embeddedsvgviewer.qdoc
+++ b/doc/src/demos/embeddedsvgviewer.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/flickable.qdoc b/doc/src/demos/flickable.qdoc
index 9b2db8c..1e1cb33 100644
--- a/doc/src/demos/flickable.qdoc
+++ b/doc/src/demos/flickable.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/flightinfo.qdoc b/doc/src/demos/flightinfo.qdoc
index af4448b..f31d298 100644
--- a/doc/src/demos/flightinfo.qdoc
+++ b/doc/src/demos/flightinfo.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/fluidlauncher.qdoc b/doc/src/demos/fluidlauncher.qdoc
index eabeaaa..9619077 100644
--- a/doc/src/demos/fluidlauncher.qdoc
+++ b/doc/src/demos/fluidlauncher.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/gradients.qdoc b/doc/src/demos/gradients.qdoc
index 7552c54..de79b8c 100644
--- a/doc/src/demos/gradients.qdoc
+++ b/doc/src/demos/gradients.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/interview.qdoc b/doc/src/demos/interview.qdoc
index 40e6369..ea4ff9f 100644
--- a/doc/src/demos/interview.qdoc
+++ b/doc/src/demos/interview.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/lightmaps.qdoc b/doc/src/demos/lightmaps.qdoc
index 2234893..02a3362 100644
--- a/doc/src/demos/lightmaps.qdoc
+++ b/doc/src/demos/lightmaps.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/macmainwindow.qdoc b/doc/src/demos/macmainwindow.qdoc
index 28ccf7c..dd95530 100644
--- a/doc/src/demos/macmainwindow.qdoc
+++ b/doc/src/demos/macmainwindow.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/mainwindow.qdoc b/doc/src/demos/mainwindow.qdoc
index 9bd301c..97ebf84 100644
--- a/doc/src/demos/mainwindow.qdoc
+++ b/doc/src/demos/mainwindow.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/mediaplayer.qdoc b/doc/src/demos/mediaplayer.qdoc
index 8d2fc9a..b20cb5d 100644
--- a/doc/src/demos/mediaplayer.qdoc
+++ b/doc/src/demos/mediaplayer.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/pathstroke.qdoc b/doc/src/demos/pathstroke.qdoc
index deaa660..ecb442d 100644
--- a/doc/src/demos/pathstroke.qdoc
+++ b/doc/src/demos/pathstroke.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/qtdemo.qdoc b/doc/src/demos/qtdemo.qdoc
index 04fd548..65afa51 100644
--- a/doc/src/demos/qtdemo.qdoc
+++ b/doc/src/demos/qtdemo.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/raycasting.qdoc b/doc/src/demos/raycasting.qdoc
index 9ad4ca5..5cbf55d 100644
--- a/doc/src/demos/raycasting.qdoc
+++ b/doc/src/demos/raycasting.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/spectrum.qdoc b/doc/src/demos/spectrum.qdoc
index d5a3f85..0d3823b 100644
--- a/doc/src/demos/spectrum.qdoc
+++ b/doc/src/demos/spectrum.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/spreadsheet.qdoc b/doc/src/demos/spreadsheet.qdoc
index 496425d..a77ba9e 100644
--- a/doc/src/demos/spreadsheet.qdoc
+++ b/doc/src/demos/spreadsheet.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/sqlbrowser.qdoc b/doc/src/demos/sqlbrowser.qdoc
index 88eead6..57e7bc2 100644
--- a/doc/src/demos/sqlbrowser.qdoc
+++ b/doc/src/demos/sqlbrowser.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/styledemo.qdoc b/doc/src/demos/styledemo.qdoc
index 1a6ba9c..21e2381 100644
--- a/doc/src/demos/styledemo.qdoc
+++ b/doc/src/demos/styledemo.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/sub-attaq.qdoc b/doc/src/demos/sub-attaq.qdoc
index 42b6b45..1d53a18 100644
--- a/doc/src/demos/sub-attaq.qdoc
+++ b/doc/src/demos/sub-attaq.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/textedit.qdoc b/doc/src/demos/textedit.qdoc
index e7b628f..40410c7 100644
--- a/doc/src/demos/textedit.qdoc
+++ b/doc/src/demos/textedit.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/undo.qdoc b/doc/src/demos/undo.qdoc
index fd31ba1..c66def9 100644
--- a/doc/src/demos/undo.qdoc
+++ b/doc/src/demos/undo.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/demos/weatherinfo.qdoc b/doc/src/demos/weatherinfo.qdoc
index bc43a97..8e7bd67 100644
--- a/doc/src/demos/weatherinfo.qdoc
+++ b/doc/src/demos/weatherinfo.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/deployment/deployment-plugins.qdoc b/doc/src/deployment/deployment-plugins.qdoc
index 7bb14ff..0885163 100644
--- a/doc/src/deployment/deployment-plugins.qdoc
+++ b/doc/src/deployment/deployment-plugins.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/deployment/deployment.qdoc b/doc/src/deployment/deployment.qdoc
index f2908bd..c078316 100644
--- a/doc/src/deployment/deployment.qdoc
+++ b/doc/src/deployment/deployment.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -756,6 +756,7 @@
\snippet doc/src/snippets/code/doc_src_deployment.qdoc 21
to your .pro file. The \c embed_manifest_dll option is enabled by default.
+ The \c embed_manifest_exe option is NOT enabled by default.
You can find more information about manifest files and side-by-side
assemblies at the
diff --git a/doc/src/deployment/qt-conf.qdoc b/doc/src/deployment/qt-conf.qdoc
index 48d688b..920eba6 100644
--- a/doc/src/deployment/qt-conf.qdoc
+++ b/doc/src/deployment/qt-conf.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/deployment/qtconfig.qdoc b/doc/src/deployment/qtconfig.qdoc
index 8c3658c..e429599 100644
--- a/doc/src/deployment/qtconfig.qdoc
+++ b/doc/src/deployment/qtconfig.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/development/activeqt-dumpcpp.qdoc b/doc/src/development/activeqt-dumpcpp.qdoc
index 5d689eb..843d40d 100644
--- a/doc/src/development/activeqt-dumpcpp.qdoc
+++ b/doc/src/development/activeqt-dumpcpp.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/development/activeqt-dumpdoc.qdoc b/doc/src/development/activeqt-dumpdoc.qdoc
index 3ecc2c9..26450e3 100644
--- a/doc/src/development/activeqt-dumpdoc.qdoc
+++ b/doc/src/development/activeqt-dumpdoc.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/development/activeqt-idc.qdoc b/doc/src/development/activeqt-idc.qdoc
index 60ac079..7a0ff66 100644
--- a/doc/src/development/activeqt-idc.qdoc
+++ b/doc/src/development/activeqt-idc.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/development/activeqt-testcon.qdoc b/doc/src/development/activeqt-testcon.qdoc
index 35fe5df..86d4097 100644
--- a/doc/src/development/activeqt-testcon.qdoc
+++ b/doc/src/development/activeqt-testcon.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/development/assistant-manual.qdoc b/doc/src/development/assistant-manual.qdoc
index 677e8d0..9dc973d 100644
--- a/doc/src/development/assistant-manual.qdoc
+++ b/doc/src/development/assistant-manual.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/development/debug.qdoc b/doc/src/development/debug.qdoc
index 9e881d1..91a83cf 100644
--- a/doc/src/development/debug.qdoc
+++ b/doc/src/development/debug.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/development/designer-manual.qdoc b/doc/src/development/designer-manual.qdoc
index 01229ad..df82fba 100644
--- a/doc/src/development/designer-manual.qdoc
+++ b/doc/src/development/designer-manual.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -1769,37 +1769,54 @@ pixmap property in the property editor.
\title Using a Designer UI File in Your Application
- With Qt's integrated build tools, \l{qmake Manual}{qmake} and \l uic, the
- code for user interface components created with \QD is automatically
- generated when the rest of your application is built. Forms can be included
- and used directly from your application. Alternatively, you can use them to
- extend subclasses of standard widgets. These forms can be processed at
- compile time or at run time, depending on the approach used.
+ Qt Designer UI files represent the widget tree of the form in XML format. The
+ forms can be processed:
+ \list
+ \o \l{Compile Time Form Processing}{At compile time}, which means that forms
+ are converted to C++ code that can be compiled.
+ \o \l{Run Time Form Processing}{At runtime}, which means that forms are processed
+ by the QUiLoader class that dynamically constructs the widget tree while
+ parsing the XML file.
+ \endlist
\tableofcontents
\section1 Compile Time Form Processing
+ You create user interface components with \QD and use Qt's integrated build tools,
+ \l{qmake Manual}{qmake} and \l{User Interface Compiler (uic)}{uic}, to generate code
+ for them when the application is built. The generated code contains the form's user
+ interface object. It is a C++ struct that contains:
+
+ \list
+ \o Pointers to the form's widgets, layouts, layout items,
+ button groups, and actions.
+ \o A member function called \c setupUi() to build the widget tree
+ on the parent widget.
+ \o A member function called \c retranslateUi() that handles the
+ translation of the string properties of the form. For more information,
+ see \l{Reacting to Language Changes}.
+ \endlist
+
+ The generated code can be included in your application and used directly from
+ it. Alternatively, you can use it to extend subclasses of standard widgets.
+
A compile time processed form can be used in your application with one of
the following approaches:
\list
- \o The Direct Approach: you construct a widget to use as a placeholder
+ \o \l{The Direct Approach}: you construct a widget to use as a placeholder
for the component, and set up the user interface inside it.
- \o The Single Inheritance Approach: you subclass the form's base class
+ \o \l{The Single Inheritance Approach}: you subclass the form's base class
(QWidget or QDialog, for example), and include a private instance
of the form's user interface object.
- \o The MultipleInheritance Approach: you subclass both the form's base
+ \o \l{The Multiple Inheritance Approach}: you subclass both the form's base
class and the form's user interface object. This allows the widgets
defined in the form to be used directly from within the scope of
the subclass.
\endlist
-
- \section2 The Direct Approach
-
- To demonstrate how to use user interface (UI) files straight from
- \QD, we create a simple Calculator Form application. This is based on the
+ To demonstrate, we create a simple Calculator Form application. It is based on the
original \l{Calculator Form Example}{Calculator Form} example.
The application consists of one source file, \c main.cpp and a UI
@@ -1817,15 +1834,18 @@ pixmap property in the property editor.
The special feature of this file is the \c FORMS declaration that tells
\c qmake which files to process with \c uic. In this case, the
\c calculatorform.ui file is used to create a \c ui_calculatorform.h file
- that can be used by any file listed in the \c SOURCES declaration. To
- ensure that \c qmake generates the \c ui_calculatorform.h file, we need to
- include it in a file listed in \c SOURCES. Since we only have \c main.cpp,
- we include it there:
+ that can be used by any file listed in the \c SOURCES declaration.
- \snippet doc/src/snippets/uitools/calculatorform/main.cpp 0
+ \note You can use Qt Creator to create the Calculator Form project. It
+ automatically generates the main.cpp, UI, and .pro files, which you can
+ then modify.
+
+ \section2 The Direct Approach
- This include is an additional check to ensure that we do not generate code
- for UI files that are not used.
+ To use the direct approach, we include the \c ui_calculatorform.h file
+ directly in \c main.cpp:
+
+ \snippet doc/src/snippets/uitools/calculatorform/main.cpp 0
The \c main function creates the calculator widget by constructing a
standard QWidget that we use to host the user interface described by the
@@ -1837,23 +1857,33 @@ pixmap property in the property editor.
from the \c ui_calculatorform.h file that sets up all the dialog's widgets
and the connections between its signals and slots.
- This approach provides a quick and easy way to use simple, self-contained
- components in your applications, but many componens created with \QD will
+ The direct approach provides a quick and easy way to use simple, self-contained
+ components in your applications. However, componens created with \QD often
require close integration with the rest of the application code. For
instance, the \c CalculatorForm code provided above will compile and run,
but the QSpinBox objects will not interact with the QLabel as we need a
custom slot to carry out the add operation and display the result in the
- QLabel. To achieve this, we need to subclass a standard Qt widget (known as
- the single inheritance approach).
-
+ QLabel. To achieve this, we need to use the single inheritance approach.
\section2 The Single Inheritance Approach
+ To use the single inheritance approach, we subclass a standard Qt widget and
+ include a private instance of the form's user interface object. This can take
+ the form of:
+
+ \list
+ \o A member variable
+ \o A pointer member variable
+ \endlist
+
+ \section3 Using a Member Variable
+
In this approach, we subclass a Qt widget and set up the user interface
from within the constructor. Components used in this way expose the widgets
and layouts used in the form to the Qt widget subclass, and provide a
standard system for making signal and slot connections between the user
interface and other objects in your application.
+ The generated \c{Ui::CalculatorForm} structure is a member of the class.
This approach is used in the \l{Calculator Form Example}{Calculator Form}
example.
@@ -1893,6 +1923,52 @@ pixmap property in the property editor.
them. This approach can be used to create individual tabs from existing
forms, for example.
+ \section3 Using a Pointer Member Variable
+
+ Alternatively, the \c{Ui::CalculatorForm} structure can be made a pointer
+ member of the class. The header then looks as follows:
+
+ \code
+
+ namespace Ui {
+ class CalculatorForm;
+ }
+
+ class CalculatorForm : public QWidget
+ ...
+ virtual ~CalculatorForm();
+ ...
+ private:
+ Ui::CalculatorForm *ui;
+ ...
+
+ \endcode
+
+ The corresponding source file looks as follows:
+
+ \code
+ #include "ui_calculatorform.h"
+
+ CalculatorForm::CalculatorForm(QWidget *parent) :
+ QWidget(parent), ui(new Ui::CalculatorForm)
+ {
+ ui->setupUi(this);
+ }
+
+ CalculatorForm::~CalculatorForm()
+ {
+ delete ui;
+ }
+ \endcode
+
+ The advantage of this approach is that the user interface object can be
+ forward-declared, which means that we do not have to include the generated
+ \c ui_calculatorform.h file in the header. The form can then be changed without
+ recompiling the dependent source files. This is particularly important if the
+ class is subject to binary compatibility restrictions.
+
+ We generally recommend this approach for libraries and large applications.
+ For more information, see \l{Creating Shared Libraries}.
\section2 The Multiple Inheritance Approach
@@ -1906,13 +1982,14 @@ pixmap property in the property editor.
{Multiple Inheritance} example.
We need to include the header file that \c uic generates from the
- \c calculatorform.ui file:
+ \c calculatorform.ui file, as follows:
\snippet examples/uitools/multipleinheritance/calculatorform.h 0
The class is defined in a similar way to the one used in the
\l{The Single Inheritance Approach}{single inheritance approach}, except that
- this time we inherit from \e{both} QWidget and \c{Ui::CalculatorForm}:
+ this time we inherit from \e{both} QWidget and \c{Ui::CalculatorForm},
+ as follows:
\snippet examples/uitools/multipleinheritance/calculatorform.h 1
@@ -1931,11 +2008,26 @@ pixmap property in the property editor.
same say as a widget created in code by hand. We no longer require the
\c{ui} prefix to access them.
- Subclassing using multiple inheritance gives us more direct access to the
- contents of the form, is slightly cleaner than the single inheritance
- approach, but does not conveniently support composition of multiple user
- interfaces.
+ \section2 Reacting to Language Changes
+
+ Qt notifies applications if the user interface language changes by sending an
+ event of the type QEvent::LanguageChange. To call the member function
+ \c retranslateUi() of the user interface object, we reimplement
+ \c QWidget::changeEvent() in the form class, as follows:
+ \code
+ void CalculatorForm::changeEvent(QEvent *e)
+ {
+ QWidget::changeEvent(e);
+ switch (e->type()) {
+ case QEvent::LanguageChange:
+ ui->retranslateUi(this);
+ break;
+ default:
+ break;
+ }
+ }
+ \endcode
\section1 Run Time Form Processing
diff --git a/doc/src/development/developing-on-mac.qdoc b/doc/src/development/developing-on-mac.qdoc
index ab2ed70..5ea4d22 100644
--- a/doc/src/development/developing-on-mac.qdoc
+++ b/doc/src/development/developing-on-mac.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/development/developing-with-qt.qdoc b/doc/src/development/developing-with-qt.qdoc
index b88fe3f..6793abd 100644
--- a/doc/src/development/developing-with-qt.qdoc
+++ b/doc/src/development/developing-with-qt.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -81,8 +81,8 @@
\o \l {Compiler Notes}
\o \l {Developing Qt Applications for Mac OS X}
\o \l {Known Issues}
- \o \l {Platform Notes}
- \o \l {Platform Notes - Symbian}
+ \o \l {Platform and Compiler Notes}
+ \o \l {Platform and Compiler Notes - Symbian}
\o \l {ActiveX in Qt}
\o \l {Qt for Embedded Linux Classes}
\o \l {Qt for Embedded Platforms}
@@ -112,4 +112,4 @@
\endtable
-*/ \ No newline at end of file
+*/
diff --git a/doc/src/development/moc.qdoc b/doc/src/development/moc.qdoc
index bbcaf3f..6ecaf09 100644
--- a/doc/src/development/moc.qdoc
+++ b/doc/src/development/moc.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc
index 588a9cc..1230af3 100644
--- a/doc/src/development/qmake-manual.qdoc
+++ b/doc/src/development/qmake-manual.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -939,7 +939,9 @@
\snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 130
- The default values depend on the version of the Symbian SDK you're using.
+ The default values depend on the version of the Symbian SDK you're using,
+ however, the Qt toolchain sets this to the maximum possible value and this
+ should not be changed.
\section2 Compiler specific options
@@ -958,23 +960,30 @@
Symbian applications may have unique identifiers attached to them.
Here is how to define them in a project file:
- There are four types of IDs supported: \c UID2, \c UID3, \c SID, and \c VID. They
+ There are four available types of IDs supported: \c UID2, \c UID3, \c SID, and \c VID. They
are specified like this:
\snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 132
- If \c UID2 is not specified, it defaults to the same value as \c UID3.
+ If \c SID is not specified, it defaults to the same value as \c UID3.
If \c UID3 is not specified, qmake will automatically generate a \c UID3
suitable for development and debugging. This value should be manually
specified for applications that are to be released. In order to obtain
- an official UID, please contact Nokia. Both \c SID and \c VID default to empty values.
-
- For more information about unique identifiers and their meaning for
- Symbian applications, please refer to the Symbian SDK documentation.
-
+ an official UID, please contact \l{Symbian}{http:\\www.symbiansigned.com}.
+ Both \c SID and \c VID default to empty values.
+
+ There exists one UID1 too, but this should not be touched by any application.
+
+ The UID2 has a specific value for different types of files - e.g. apps/exes
+ are always 0x100039CE. The toolchain will set this for value for the most common file types like,
+ EXE/APP and shared library DLL.
+
+ For more information about unique identifiers and their meaning for Symbian applications,
+ please refer to the \l{Symbian SDK documentation}{http://developer.symbian.org/main/documentation/reference/s3/pdk/GUID-380A8C4F-3EB6-5E1C-BCFB-ED5B866136D9.html}
+
\section2 Capabilities
- Capabilities define extra priviledges for the application, such as the
+ Capabilities define extra privileges for the application, such as the
ability to list all files on the file system. Capabilities are defined
in the project file like this:
diff --git a/doc/src/development/qmsdev.qdoc b/doc/src/development/qmsdev.qdoc
index ab99719..07b77cf 100644
--- a/doc/src/development/qmsdev.qdoc
+++ b/doc/src/development/qmsdev.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/development/qtestlib.qdoc b/doc/src/development/qtestlib.qdoc
index a83c27e..e53957f 100644
--- a/doc/src/development/qtestlib.qdoc
+++ b/doc/src/development/qtestlib.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -32,7 +32,7 @@
\ingroup frameworks-technologies
\ingroup qt-basic-concepts
-
+
\keyword qtestlib
The QTestLib framework, provided by Nokia, is a tool for unit
@@ -40,10 +40,6 @@
all the functionality commonly found in unit testing frameworks as
well as extensions for testing graphical user interfaces.
- Table of contents:
-
- \tableofcontents
-
\section1 QTestLib Features
QTestLib is designed to ease the writing of unit tests for Qt
@@ -88,6 +84,10 @@
\o Custom types can easily be added to the test data and test output.
\endtable
+ \note For higher-level GUI and application testing needs, please
+ see the \l{Partner Directory} for Qt testing products provided by
+ Nokia partners.
+
\section1 QTestLib API
@@ -213,17 +213,17 @@
\endlist
\section2 Creating a Benchmark
-
+
To create a benchmark, follow the instructions for creating a test and then add a
QBENCHMARK macro to the test function that you want to benchmark.
-
+
\snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 12
-
+
The code inside the QBENCHMARK macro will be measured, and possibly also repeated
several times in order to get an accurate measurement. This depends on the selected
measurement back-end. Several back-ends are available. They can be selected on the
command line:
-
+
\target testlib-benchmarking-measurement
\table
@@ -243,7 +243,7 @@
\o -eventcounter
\o All platforms
\endtable
-
+
In short, walltime is always available but requires many repetitions to
get a useful result.
Tick counters are usually available and can provide
@@ -255,7 +255,7 @@
Event counting is available on all platforms and it provides the number of events
that were received by the event loop before they are sent to their corresponding
targets (this might include non-Qt events).
-
+
\note Depending on the device configuration, Tick counters on the
Windows CE platform may not be as fine-grained, compared to other platforms.
Devices that do not support high-resolution timers default to
@@ -320,7 +320,7 @@
host computer and the device. Thus header files and libraries are needed to compile
cetest and QtRemote successfully.
- Prior to \l{Installing Qt on Windows CE}{installation} of Qt, you need to set your
+ Prior to \l{Installing Qt for Windows CE}{installation} of Qt, you need to set your
\c INCLUDE and \c LIB environment variables properly.
A default installation of Windows Mobile 5 for Pocket PC can be obtained by:
@@ -334,7 +334,7 @@
The CPU tick counters used for benchmarking is licensed under the following
license: (from src/testlib/3rdparty/cycle.h)
-
+
\legalese
Copyright (c) 2003, 2006 Matteo Frigo\br
Copyright (c) 2003, 2006 Massachusetts Institute of Technology
@@ -365,6 +365,7 @@
\brief A short introduction to testing with QTestLib.
\contentspage QTestLib Manual
\nextpage {Chapter 1: Writing a Unit Test}{Chapter 1}
+ \ingroup best-practices
\title QTestLib Tutorial
@@ -749,9 +750,10 @@
\section1 External Tools
Tools for handling and visualizing test data are available as part of
- the \l{qtestlib-tools} project on the Qt Labs Web site. These include
- a tool for comparing performance data obtained from test runs and a
- utility to generate Web-based graphs of performance data.
+ the qtestlib-tools project on the
+ \l{http://labs.qt.nokia.com/}{http://labs.qt.nokia.com/}Qt Labs Web site.
+ These include a tool for comparing performance data obtained from test
+ runs and a utility to generate Web-based graphs of performance data.
See the \l{qtestlib-tools Announcement} for more information on these
tools and a simple graphing example.
diff --git a/doc/src/development/rcc.qdoc b/doc/src/development/rcc.qdoc
index 5b3c6c7..2bbac6a 100644
--- a/doc/src/development/rcc.qdoc
+++ b/doc/src/development/rcc.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/development/tools-list.qdoc b/doc/src/development/tools-list.qdoc
index 4f6945d..c362bdf 100644
--- a/doc/src/development/tools-list.qdoc
+++ b/doc/src/development/tools-list.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/development/uic.qdoc b/doc/src/development/uic.qdoc
index edeb64a..ec8b3d6 100644
--- a/doc/src/development/uic.qdoc
+++ b/doc/src/development/uic.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/2dpainting.qdoc b/doc/src/examples/2dpainting.qdoc
index b349c83..079fa13 100644
--- a/doc/src/examples/2dpainting.qdoc
+++ b/doc/src/examples/2dpainting.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/activeqt/comapp.qdoc b/doc/src/examples/activeqt/comapp.qdoc
index 1355cb5..f1884ef 100644
--- a/doc/src/examples/activeqt/comapp.qdoc
+++ b/doc/src/examples/activeqt/comapp.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/activeqt/dotnet.qdoc b/doc/src/examples/activeqt/dotnet.qdoc
index f523830..55853d9 100644
--- a/doc/src/examples/activeqt/dotnet.qdoc
+++ b/doc/src/examples/activeqt/dotnet.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/activeqt/hierarchy.qdoc b/doc/src/examples/activeqt/hierarchy.qdoc
index 71e21cf..7905e8a 100644
--- a/doc/src/examples/activeqt/hierarchy.qdoc
+++ b/doc/src/examples/activeqt/hierarchy.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/activeqt/menus.qdoc b/doc/src/examples/activeqt/menus.qdoc
index 7310e97..ed91a3e 100644
--- a/doc/src/examples/activeqt/menus.qdoc
+++ b/doc/src/examples/activeqt/menus.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/activeqt/multiple.qdoc b/doc/src/examples/activeqt/multiple.qdoc
index aae93b0..036f80e 100644
--- a/doc/src/examples/activeqt/multiple.qdoc
+++ b/doc/src/examples/activeqt/multiple.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/activeqt/opengl.qdoc b/doc/src/examples/activeqt/opengl.qdoc
index caf9361..2c55e1e 100644
--- a/doc/src/examples/activeqt/opengl.qdoc
+++ b/doc/src/examples/activeqt/opengl.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/activeqt/qutlook.qdoc b/doc/src/examples/activeqt/qutlook.qdoc
index 9ceb6b6..845305f 100644
--- a/doc/src/examples/activeqt/qutlook.qdoc
+++ b/doc/src/examples/activeqt/qutlook.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/activeqt/simple.qdoc b/doc/src/examples/activeqt/simple.qdoc
index 72f99e8..9860326 100644
--- a/doc/src/examples/activeqt/simple.qdoc
+++ b/doc/src/examples/activeqt/simple.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/activeqt/webbrowser.qdoc b/doc/src/examples/activeqt/webbrowser.qdoc
index 051a26f..3b66c57 100644
--- a/doc/src/examples/activeqt/webbrowser.qdoc
+++ b/doc/src/examples/activeqt/webbrowser.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/activeqt/wrapper.qdoc b/doc/src/examples/activeqt/wrapper.qdoc
index 2cb0981..4bf7901 100644
--- a/doc/src/examples/activeqt/wrapper.qdoc
+++ b/doc/src/examples/activeqt/wrapper.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/addressbook.qdoc b/doc/src/examples/addressbook.qdoc
index 18211e9..8de1778 100644
--- a/doc/src/examples/addressbook.qdoc
+++ b/doc/src/examples/addressbook.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/analogclock.qdoc b/doc/src/examples/analogclock.qdoc
index fe39cda..45e78c3 100644
--- a/doc/src/examples/analogclock.qdoc
+++ b/doc/src/examples/analogclock.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/animatedtiles.qdoc b/doc/src/examples/animatedtiles.qdoc
index 329f3fb..5a99d21 100644
--- a/doc/src/examples/animatedtiles.qdoc
+++ b/doc/src/examples/animatedtiles.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/appchooser.qdoc b/doc/src/examples/appchooser.qdoc
index 940b207..f9c4a8d 100644
--- a/doc/src/examples/appchooser.qdoc
+++ b/doc/src/examples/appchooser.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/application.qdoc b/doc/src/examples/application.qdoc
index 699d40c..b69009f 100644
--- a/doc/src/examples/application.qdoc
+++ b/doc/src/examples/application.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/arrowpad.qdoc b/doc/src/examples/arrowpad.qdoc
index 0fa7c40..647f20e 100644
--- a/doc/src/examples/arrowpad.qdoc
+++ b/doc/src/examples/arrowpad.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/audiodevices.qdoc b/doc/src/examples/audiodevices.qdoc
index 4bf65ee..aa04f60 100644
--- a/doc/src/examples/audiodevices.qdoc
+++ b/doc/src/examples/audiodevices.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/audioinput.qdoc b/doc/src/examples/audioinput.qdoc
index d224423..b7f390b 100644
--- a/doc/src/examples/audioinput.qdoc
+++ b/doc/src/examples/audioinput.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/audiooutput.qdoc b/doc/src/examples/audiooutput.qdoc
index 429cff2..618db27 100644
--- a/doc/src/examples/audiooutput.qdoc
+++ b/doc/src/examples/audiooutput.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/basicdrawing.qdoc b/doc/src/examples/basicdrawing.qdoc
index 0e8cc69..d0b5294 100644
--- a/doc/src/examples/basicdrawing.qdoc
+++ b/doc/src/examples/basicdrawing.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/basicgraphicslayouts.qdoc b/doc/src/examples/basicgraphicslayouts.qdoc
index 335506a..5951873 100644
--- a/doc/src/examples/basicgraphicslayouts.qdoc
+++ b/doc/src/examples/basicgraphicslayouts.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/basiclayouts.qdoc b/doc/src/examples/basiclayouts.qdoc
index 03cd590..cbc9297 100644
--- a/doc/src/examples/basiclayouts.qdoc
+++ b/doc/src/examples/basiclayouts.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -66,7 +66,7 @@
horizontal layout. Next we use the \c createGridGroupBox() function
to create a group box containing several line edits and a small text
editor which are displayed in a grid layout. Finally, we use the
- \c createFormGroupBox() function to createa a group box with
+ \c createFormGroupBox() function to create a group box with
three labels and three input fields: a line edit, a combo box and
a spin box.
diff --git a/doc/src/examples/basicsortfiltermodel.qdoc b/doc/src/examples/basicsortfiltermodel.qdoc
index 176a77d..8d00e03 100644
--- a/doc/src/examples/basicsortfiltermodel.qdoc
+++ b/doc/src/examples/basicsortfiltermodel.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/bearercloud.qdoc b/doc/src/examples/bearercloud.qdoc
index 7a61bac..bf5da41 100644
--- a/doc/src/examples/bearercloud.qdoc
+++ b/doc/src/examples/bearercloud.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/bearermonitor.qdoc b/doc/src/examples/bearermonitor.qdoc
index 5295488..1a15bc3 100644
--- a/doc/src/examples/bearermonitor.qdoc
+++ b/doc/src/examples/bearermonitor.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/blockingfortuneclient.qdoc b/doc/src/examples/blockingfortuneclient.qdoc
index 9545823..be8a9ba 100644
--- a/doc/src/examples/blockingfortuneclient.qdoc
+++ b/doc/src/examples/blockingfortuneclient.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/blurpicker.qdoc b/doc/src/examples/blurpicker.qdoc
index 0edcfdd..7be5863 100644
--- a/doc/src/examples/blurpicker.qdoc
+++ b/doc/src/examples/blurpicker.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/borderlayout.qdoc b/doc/src/examples/borderlayout.qdoc
index 47414f7..5ccc95f 100644
--- a/doc/src/examples/borderlayout.qdoc
+++ b/doc/src/examples/borderlayout.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/broadcastreceiver.qdoc b/doc/src/examples/broadcastreceiver.qdoc
index b40f7c0..13555e7 100644
--- a/doc/src/examples/broadcastreceiver.qdoc
+++ b/doc/src/examples/broadcastreceiver.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/broadcastsender.qdoc b/doc/src/examples/broadcastsender.qdoc
index 0e88a88..b7140b9 100644
--- a/doc/src/examples/broadcastsender.qdoc
+++ b/doc/src/examples/broadcastsender.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/cachedtable.qdoc b/doc/src/examples/cachedtable.qdoc
index efbcee1..31cc40f 100644
--- a/doc/src/examples/cachedtable.qdoc
+++ b/doc/src/examples/cachedtable.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/calculator.qdoc b/doc/src/examples/calculator.qdoc
index bda369b..a85e0b0 100644
--- a/doc/src/examples/calculator.qdoc
+++ b/doc/src/examples/calculator.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/calculatorbuilder.qdoc b/doc/src/examples/calculatorbuilder.qdoc
index dae70be..03acb93 100644
--- a/doc/src/examples/calculatorbuilder.qdoc
+++ b/doc/src/examples/calculatorbuilder.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/calculatorform.qdoc b/doc/src/examples/calculatorform.qdoc
index 5c36589..9ee6e3c 100644
--- a/doc/src/examples/calculatorform.qdoc
+++ b/doc/src/examples/calculatorform.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/calendar.qdoc b/doc/src/examples/calendar.qdoc
index 27ef538..1395a3f 100644
--- a/doc/src/examples/calendar.qdoc
+++ b/doc/src/examples/calendar.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/calendarwidget.qdoc b/doc/src/examples/calendarwidget.qdoc
index 3338f22..a65145f 100644
--- a/doc/src/examples/calendarwidget.qdoc
+++ b/doc/src/examples/calendarwidget.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/capabilitiesexample.qdoc b/doc/src/examples/capabilitiesexample.qdoc
index 59a30e5..2eab2c0 100644
--- a/doc/src/examples/capabilitiesexample.qdoc
+++ b/doc/src/examples/capabilitiesexample.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/charactermap.qdoc b/doc/src/examples/charactermap.qdoc
index 9dd69ca..b9dd0c0 100644
--- a/doc/src/examples/charactermap.qdoc
+++ b/doc/src/examples/charactermap.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/chart.qdoc b/doc/src/examples/chart.qdoc
index 78b3295..4021d46 100644
--- a/doc/src/examples/chart.qdoc
+++ b/doc/src/examples/chart.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/classwizard.qdoc b/doc/src/examples/classwizard.qdoc
index d81084f..18da08e 100644
--- a/doc/src/examples/classwizard.qdoc
+++ b/doc/src/examples/classwizard.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/codecs.qdoc b/doc/src/examples/codecs.qdoc
index a0699bf..fc948e8 100644
--- a/doc/src/examples/codecs.qdoc
+++ b/doc/src/examples/codecs.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/codeeditor.qdoc b/doc/src/examples/codeeditor.qdoc
index 9dc176c..6c7b914 100644
--- a/doc/src/examples/codeeditor.qdoc
+++ b/doc/src/examples/codeeditor.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/collidingmice-example.qdoc b/doc/src/examples/collidingmice-example.qdoc
index 7a19575..af364ff 100644
--- a/doc/src/examples/collidingmice-example.qdoc
+++ b/doc/src/examples/collidingmice-example.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/coloreditorfactory.qdoc b/doc/src/examples/coloreditorfactory.qdoc
index 2229869..5a419e4 100644
--- a/doc/src/examples/coloreditorfactory.qdoc
+++ b/doc/src/examples/coloreditorfactory.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/combowidgetmapper.qdoc b/doc/src/examples/combowidgetmapper.qdoc
index 3621419..3a396c9 100644
--- a/doc/src/examples/combowidgetmapper.qdoc
+++ b/doc/src/examples/combowidgetmapper.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/completer.qdoc b/doc/src/examples/completer.qdoc
index 0237475..d56f4e6 100644
--- a/doc/src/examples/completer.qdoc
+++ b/doc/src/examples/completer.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/complexpingpong.qdoc b/doc/src/examples/complexpingpong.qdoc
index c99095f..a49568d 100644
--- a/doc/src/examples/complexpingpong.qdoc
+++ b/doc/src/examples/complexpingpong.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/concentriccircles.qdoc b/doc/src/examples/concentriccircles.qdoc
index 3594736..03fb5ec 100644
--- a/doc/src/examples/concentriccircles.qdoc
+++ b/doc/src/examples/concentriccircles.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/configdialog.qdoc b/doc/src/examples/configdialog.qdoc
index d05fd81..1c936b9 100644
--- a/doc/src/examples/configdialog.qdoc
+++ b/doc/src/examples/configdialog.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/containerextension.qdoc b/doc/src/examples/containerextension.qdoc
index c4c108f..64c607e 100644
--- a/doc/src/examples/containerextension.qdoc
+++ b/doc/src/examples/containerextension.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/context2d.qdoc b/doc/src/examples/context2d.qdoc
index d9b30ea..9501cc0 100644
--- a/doc/src/examples/context2d.qdoc
+++ b/doc/src/examples/context2d.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/contextsensitivehelp.qdoc b/doc/src/examples/contextsensitivehelp.qdoc
index d88356c..79baf3c 100644
--- a/doc/src/examples/contextsensitivehelp.qdoc
+++ b/doc/src/examples/contextsensitivehelp.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/contiguouscache.qdoc b/doc/src/examples/contiguouscache.qdoc
index 2236fc4..cb8bd08 100644
--- a/doc/src/examples/contiguouscache.qdoc
+++ b/doc/src/examples/contiguouscache.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/customcompleter.qdoc b/doc/src/examples/customcompleter.qdoc
index 415abaa..9f49780 100644
--- a/doc/src/examples/customcompleter.qdoc
+++ b/doc/src/examples/customcompleter.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/customsortfiltermodel.qdoc b/doc/src/examples/customsortfiltermodel.qdoc
index 16b3bb6..98fcd05 100644
--- a/doc/src/examples/customsortfiltermodel.qdoc
+++ b/doc/src/examples/customsortfiltermodel.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/customtype.qdoc b/doc/src/examples/customtype.qdoc
index 0765c5f..dbd4f37 100644
--- a/doc/src/examples/customtype.qdoc
+++ b/doc/src/examples/customtype.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/customtypesending.qdoc b/doc/src/examples/customtypesending.qdoc
index 2c32154..83f0e85 100644
--- a/doc/src/examples/customtypesending.qdoc
+++ b/doc/src/examples/customtypesending.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -34,10 +34,6 @@
\image customtypesending-example.png
- Contents:
-
- \tableofcontents
-
\section1 Overview
In the \l{Custom Type Example}, we showed how to integrate custom types
@@ -51,7 +47,7 @@
a \c Window class containing signals and slots whose signatures include
\c Message arguments.
- \section1 The Window Class Definition
+ \section1 The Window and Message Class Definitions
We define a simple \c Window class with a signal and public slot that
allow a \c Message object to be sent via a signal-slot connection:
@@ -64,6 +60,17 @@
instance in the \c thisMessage private variable which holds the actual
message to be sent.
+ The \c Message class is defined in the following way:
+
+ \snippet examples/tools/customtypesending/message.h custom type definition
+
+ The type is declared to the meta-type system with the Q_DECLARE_METATYPE()
+ macro:
+
+ \snippet examples/tools/customtypesending/message.h custom type meta-type declaration
+
+ This will make the type available for use in direct signal-slot connections.
+
\section1 The Window Class Implementation
The \c Window constructor sets up a user interface containing a text
diff --git a/doc/src/examples/customwidgetplugin.qdoc b/doc/src/examples/customwidgetplugin.qdoc
index 05a2255..c0c6180 100644
--- a/doc/src/examples/customwidgetplugin.qdoc
+++ b/doc/src/examples/customwidgetplugin.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/dbscreen.qdoc b/doc/src/examples/dbscreen.qdoc
index c3c4def..36c7bde 100644
--- a/doc/src/examples/dbscreen.qdoc
+++ b/doc/src/examples/dbscreen.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/dbus-chat.qdoc b/doc/src/examples/dbus-chat.qdoc
index 593a340..1627593 100644
--- a/doc/src/examples/dbus-chat.qdoc
+++ b/doc/src/examples/dbus-chat.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/dbus-listnames.qdoc b/doc/src/examples/dbus-listnames.qdoc
index b163910..0f634d3 100644
--- a/doc/src/examples/dbus-listnames.qdoc
+++ b/doc/src/examples/dbus-listnames.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/dbus-pingpong.qdoc b/doc/src/examples/dbus-pingpong.qdoc
index e1aea2a..47f624d 100644
--- a/doc/src/examples/dbus-pingpong.qdoc
+++ b/doc/src/examples/dbus-pingpong.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/dbus-remotecontrolledcar.qdoc b/doc/src/examples/dbus-remotecontrolledcar.qdoc
index b7ffd08..93179e6 100644
--- a/doc/src/examples/dbus-remotecontrolledcar.qdoc
+++ b/doc/src/examples/dbus-remotecontrolledcar.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/defaultprototypes.qdoc b/doc/src/examples/defaultprototypes.qdoc
index c3c056a..d4075db 100644
--- a/doc/src/examples/defaultprototypes.qdoc
+++ b/doc/src/examples/defaultprototypes.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/delayedencoding.qdoc b/doc/src/examples/delayedencoding.qdoc
index e3f00dc..f674dcb 100644
--- a/doc/src/examples/delayedencoding.qdoc
+++ b/doc/src/examples/delayedencoding.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/diagramscene.qdoc b/doc/src/examples/diagramscene.qdoc
index 7c643c2..98bc983 100644
--- a/doc/src/examples/diagramscene.qdoc
+++ b/doc/src/examples/diagramscene.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/digitalclock.qdoc b/doc/src/examples/digitalclock.qdoc
index 7495b7d..e550a52 100644
--- a/doc/src/examples/digitalclock.qdoc
+++ b/doc/src/examples/digitalclock.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/dirview.qdoc b/doc/src/examples/dirview.qdoc
index 0fdebf5..b36d81f 100644
--- a/doc/src/examples/dirview.qdoc
+++ b/doc/src/examples/dirview.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/dockwidgets.qdoc b/doc/src/examples/dockwidgets.qdoc
index 8ded28c..1f31a12 100644
--- a/doc/src/examples/dockwidgets.qdoc
+++ b/doc/src/examples/dockwidgets.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/dombookmarks.qdoc b/doc/src/examples/dombookmarks.qdoc
index 1ff0e03..5cb6777 100644
--- a/doc/src/examples/dombookmarks.qdoc
+++ b/doc/src/examples/dombookmarks.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/domtraversal.qdoc b/doc/src/examples/domtraversal.qdoc
index 83c79e7..66546df 100644
--- a/doc/src/examples/domtraversal.qdoc
+++ b/doc/src/examples/domtraversal.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/draganddroppuzzle.qdoc b/doc/src/examples/draganddroppuzzle.qdoc
index 0038b5d..8f99c93 100644
--- a/doc/src/examples/draganddroppuzzle.qdoc
+++ b/doc/src/examples/draganddroppuzzle.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/dragdroprobot.qdoc b/doc/src/examples/dragdroprobot.qdoc
index 59d9f10..7e4c06f 100644
--- a/doc/src/examples/dragdroprobot.qdoc
+++ b/doc/src/examples/dragdroprobot.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/draggableicons.qdoc b/doc/src/examples/draggableicons.qdoc
index 7d5a936..589ba27 100644
--- a/doc/src/examples/draggableicons.qdoc
+++ b/doc/src/examples/draggableicons.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/draggabletext.qdoc b/doc/src/examples/draggabletext.qdoc
index f1cf63b..2195a8f 100644
--- a/doc/src/examples/draggabletext.qdoc
+++ b/doc/src/examples/draggabletext.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/drilldown.qdoc b/doc/src/examples/drilldown.qdoc
index 56ac538..8160bed 100644
--- a/doc/src/examples/drilldown.qdoc
+++ b/doc/src/examples/drilldown.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/dropsite.qdoc b/doc/src/examples/dropsite.qdoc
index 2767a35..7145c0e 100644
--- a/doc/src/examples/dropsite.qdoc
+++ b/doc/src/examples/dropsite.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/dynamiclayouts.qdoc b/doc/src/examples/dynamiclayouts.qdoc
index 46a996c..f691321 100644
--- a/doc/src/examples/dynamiclayouts.qdoc
+++ b/doc/src/examples/dynamiclayouts.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/easing.qdoc b/doc/src/examples/easing.qdoc
index 70237fe..8116791 100644
--- a/doc/src/examples/easing.qdoc
+++ b/doc/src/examples/easing.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/echoplugin.qdoc b/doc/src/examples/echoplugin.qdoc
index a3c3772..dec85be 100644
--- a/doc/src/examples/echoplugin.qdoc
+++ b/doc/src/examples/echoplugin.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/editabletreemodel.qdoc b/doc/src/examples/editabletreemodel.qdoc
index c6cd824..fc0743a 100644
--- a/doc/src/examples/editabletreemodel.qdoc
+++ b/doc/src/examples/editabletreemodel.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/elasticnodes.qdoc b/doc/src/examples/elasticnodes.qdoc
index bdc807f..c33a4a1 100644
--- a/doc/src/examples/elasticnodes.qdoc
+++ b/doc/src/examples/elasticnodes.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/eventtransitions.qdoc b/doc/src/examples/eventtransitions.qdoc
index b07b227..cf59e1b 100644
--- a/doc/src/examples/eventtransitions.qdoc
+++ b/doc/src/examples/eventtransitions.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/extension.qdoc b/doc/src/examples/extension.qdoc
index daa4433..23c1eb4 100644
--- a/doc/src/examples/extension.qdoc
+++ b/doc/src/examples/extension.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/factorial.qdoc b/doc/src/examples/factorial.qdoc
index f4ea022..085d469 100644
--- a/doc/src/examples/factorial.qdoc
+++ b/doc/src/examples/factorial.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/fademessage.qdoc b/doc/src/examples/fademessage.qdoc
index 5735a54..15f7ce4 100644
--- a/doc/src/examples/fademessage.qdoc
+++ b/doc/src/examples/fademessage.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/fancybrowser.qdoc b/doc/src/examples/fancybrowser.qdoc
index ae8e7fa..44683a3 100644
--- a/doc/src/examples/fancybrowser.qdoc
+++ b/doc/src/examples/fancybrowser.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/fetchmore.qdoc b/doc/src/examples/fetchmore.qdoc
index 85040f3..8781d61 100644
--- a/doc/src/examples/fetchmore.qdoc
+++ b/doc/src/examples/fetchmore.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/filetree.qdoc b/doc/src/examples/filetree.qdoc
index b0e947a..11492e6 100644
--- a/doc/src/examples/filetree.qdoc
+++ b/doc/src/examples/filetree.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/findfiles.qdoc b/doc/src/examples/findfiles.qdoc
index e10329e..a46dda0 100644
--- a/doc/src/examples/findfiles.qdoc
+++ b/doc/src/examples/findfiles.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/fingerpaint.qdoc b/doc/src/examples/fingerpaint.qdoc
index 4b62570..264a226 100644
--- a/doc/src/examples/fingerpaint.qdoc
+++ b/doc/src/examples/fingerpaint.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/flowlayout.qdoc b/doc/src/examples/flowlayout.qdoc
index c9ab554..c786b13 100644
--- a/doc/src/examples/flowlayout.qdoc
+++ b/doc/src/examples/flowlayout.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/fontsampler.qdoc b/doc/src/examples/fontsampler.qdoc
index 1b05f77..7b38f58 100644
--- a/doc/src/examples/fontsampler.qdoc
+++ b/doc/src/examples/fontsampler.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/formextractor.qdoc b/doc/src/examples/formextractor.qdoc
index af5977a..b199b70 100644
--- a/doc/src/examples/formextractor.qdoc
+++ b/doc/src/examples/formextractor.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/fortuneclient.qdoc b/doc/src/examples/fortuneclient.qdoc
index ecfb4be..fa75e3e 100644
--- a/doc/src/examples/fortuneclient.qdoc
+++ b/doc/src/examples/fortuneclient.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/fortuneserver.qdoc b/doc/src/examples/fortuneserver.qdoc
index 92c67ca..3708146 100644
--- a/doc/src/examples/fortuneserver.qdoc
+++ b/doc/src/examples/fortuneserver.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/framebufferobject.qdoc b/doc/src/examples/framebufferobject.qdoc
index 9f2d984..9f5d2dc 100644
--- a/doc/src/examples/framebufferobject.qdoc
+++ b/doc/src/examples/framebufferobject.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/framebufferobject2.qdoc b/doc/src/examples/framebufferobject2.qdoc
index f8936ba..0b2dbe9 100644
--- a/doc/src/examples/framebufferobject2.qdoc
+++ b/doc/src/examples/framebufferobject2.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/fridgemagnets.qdoc b/doc/src/examples/fridgemagnets.qdoc
index 2ba5cc7..ac67b55 100644
--- a/doc/src/examples/fridgemagnets.qdoc
+++ b/doc/src/examples/fridgemagnets.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/frozencolumn.qdoc b/doc/src/examples/frozencolumn.qdoc
index 4ee0ef6..e8deddd 100644
--- a/doc/src/examples/frozencolumn.qdoc
+++ b/doc/src/examples/frozencolumn.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/ftp.qdoc b/doc/src/examples/ftp.qdoc
index 30746a4..087ac5a 100644
--- a/doc/src/examples/ftp.qdoc
+++ b/doc/src/examples/ftp.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/globalVariables.qdoc b/doc/src/examples/globalVariables.qdoc
index 18363fb..8468abb 100644
--- a/doc/src/examples/globalVariables.qdoc
+++ b/doc/src/examples/globalVariables.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/googlechat.qdoc b/doc/src/examples/googlechat.qdoc
index 9a6999c..a751ae5 100644
--- a/doc/src/examples/googlechat.qdoc
+++ b/doc/src/examples/googlechat.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/googlesuggest.qdoc b/doc/src/examples/googlesuggest.qdoc
index 579124b..63fabf8 100644
--- a/doc/src/examples/googlesuggest.qdoc
+++ b/doc/src/examples/googlesuggest.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/grabber.qdoc b/doc/src/examples/grabber.qdoc
index 7555f08..19501a5 100644
--- a/doc/src/examples/grabber.qdoc
+++ b/doc/src/examples/grabber.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/graphicsview-anchorlayout.qdoc b/doc/src/examples/graphicsview-anchorlayout.qdoc
index dbf512c..61e7f55 100644
--- a/doc/src/examples/graphicsview-anchorlayout.qdoc
+++ b/doc/src/examples/graphicsview-anchorlayout.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/graphicsview-flowlayout.qdoc b/doc/src/examples/graphicsview-flowlayout.qdoc
index 5b9d763..6320780 100644
--- a/doc/src/examples/graphicsview-flowlayout.qdoc
+++ b/doc/src/examples/graphicsview-flowlayout.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/graphicsview-simpleanchorlayout.qdoc b/doc/src/examples/graphicsview-simpleanchorlayout.qdoc
index 22192a0..c8d332b 100644
--- a/doc/src/examples/graphicsview-simpleanchorlayout.qdoc
+++ b/doc/src/examples/graphicsview-simpleanchorlayout.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/graphicsview-weatheranchorlayout.qdoc b/doc/src/examples/graphicsview-weatheranchorlayout.qdoc
index de0ebac..f77e3f5 100644
--- a/doc/src/examples/graphicsview-weatheranchorlayout.qdoc
+++ b/doc/src/examples/graphicsview-weatheranchorlayout.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/groupbox.qdoc b/doc/src/examples/groupbox.qdoc
index 28af11c..f8a1ffd 100644
--- a/doc/src/examples/groupbox.qdoc
+++ b/doc/src/examples/groupbox.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/hellogl.qdoc b/doc/src/examples/hellogl.qdoc
index 97410c7..c8b82b3 100644
--- a/doc/src/examples/hellogl.qdoc
+++ b/doc/src/examples/hellogl.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/hellogl_es.qdoc b/doc/src/examples/hellogl_es.qdoc
index 4a38b2a..d96d3de 100644
--- a/doc/src/examples/hellogl_es.qdoc
+++ b/doc/src/examples/hellogl_es.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/helloscript.qdoc b/doc/src/examples/helloscript.qdoc
index 2e7b60f..842e393 100644
--- a/doc/src/examples/helloscript.qdoc
+++ b/doc/src/examples/helloscript.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/hellotr.qdoc b/doc/src/examples/hellotr.qdoc
index 5cd9743..5d794c6 100644
--- a/doc/src/examples/hellotr.qdoc
+++ b/doc/src/examples/hellotr.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/htmlinfo.qdoc b/doc/src/examples/htmlinfo.qdoc
index d25219b..a4e11bd 100644
--- a/doc/src/examples/htmlinfo.qdoc
+++ b/doc/src/examples/htmlinfo.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/http.qdoc b/doc/src/examples/http.qdoc
index 087a7e5..2c86edd 100644
--- a/doc/src/examples/http.qdoc
+++ b/doc/src/examples/http.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/i18n.qdoc b/doc/src/examples/i18n.qdoc
index 361123d..0698dbe 100644
--- a/doc/src/examples/i18n.qdoc
+++ b/doc/src/examples/i18n.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/icons.qdoc b/doc/src/examples/icons.qdoc
index e445374..21a308d 100644
--- a/doc/src/examples/icons.qdoc
+++ b/doc/src/examples/icons.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/imagecomposition.qdoc b/doc/src/examples/imagecomposition.qdoc
index 3bf6e7f..f2b6083 100644
--- a/doc/src/examples/imagecomposition.qdoc
+++ b/doc/src/examples/imagecomposition.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/imagegestures.qdoc b/doc/src/examples/imagegestures.qdoc
index 3d4e467..8bdfaf4 100644
--- a/doc/src/examples/imagegestures.qdoc
+++ b/doc/src/examples/imagegestures.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/imageviewer.qdoc b/doc/src/examples/imageviewer.qdoc
index 3d1dc6f..8cf16d7 100644
--- a/doc/src/examples/imageviewer.qdoc
+++ b/doc/src/examples/imageviewer.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/inputpanel.qdoc b/doc/src/examples/inputpanel.qdoc
index fe6c665..ea83171 100644
--- a/doc/src/examples/inputpanel.qdoc
+++ b/doc/src/examples/inputpanel.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/itemviewspuzzle.qdoc b/doc/src/examples/itemviewspuzzle.qdoc
index 0a3f3cd..ed5e736 100644
--- a/doc/src/examples/itemviewspuzzle.qdoc
+++ b/doc/src/examples/itemviewspuzzle.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/licensewizard.qdoc b/doc/src/examples/licensewizard.qdoc
index 3719a4c..b29abb7 100644
--- a/doc/src/examples/licensewizard.qdoc
+++ b/doc/src/examples/licensewizard.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/lighting.qdoc b/doc/src/examples/lighting.qdoc
index 6277c1f..3e222e1 100644
--- a/doc/src/examples/lighting.qdoc
+++ b/doc/src/examples/lighting.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/lineedits.qdoc b/doc/src/examples/lineedits.qdoc
index 8d94ee3..fc38bf9 100644
--- a/doc/src/examples/lineedits.qdoc
+++ b/doc/src/examples/lineedits.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/localfortuneclient.qdoc b/doc/src/examples/localfortuneclient.qdoc
index 33f40d7..295b8c8 100644
--- a/doc/src/examples/localfortuneclient.qdoc
+++ b/doc/src/examples/localfortuneclient.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/localfortuneserver.qdoc b/doc/src/examples/localfortuneserver.qdoc
index 7ee36cf..4bfc20c 100644
--- a/doc/src/examples/localfortuneserver.qdoc
+++ b/doc/src/examples/localfortuneserver.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/loopback.qdoc b/doc/src/examples/loopback.qdoc
index b58b786..0e2e808 100644
--- a/doc/src/examples/loopback.qdoc
+++ b/doc/src/examples/loopback.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/mandelbrot.qdoc b/doc/src/examples/mandelbrot.qdoc
index d4c17aa..44e8e66 100644
--- a/doc/src/examples/mandelbrot.qdoc
+++ b/doc/src/examples/mandelbrot.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/masterdetail.qdoc b/doc/src/examples/masterdetail.qdoc
index b3a673f..5bfdb4d 100644
--- a/doc/src/examples/masterdetail.qdoc
+++ b/doc/src/examples/masterdetail.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/mdi.qdoc b/doc/src/examples/mdi.qdoc
index 9e42ba2..ea388db 100644
--- a/doc/src/examples/mdi.qdoc
+++ b/doc/src/examples/mdi.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/menus.qdoc b/doc/src/examples/menus.qdoc
index d925745..9e82da3 100644
--- a/doc/src/examples/menus.qdoc
+++ b/doc/src/examples/menus.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/mousecalibration.qdoc b/doc/src/examples/mousecalibration.qdoc
index 71eecf3..bb9301c 100644
--- a/doc/src/examples/mousecalibration.qdoc
+++ b/doc/src/examples/mousecalibration.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/moveblocks.qdoc b/doc/src/examples/moveblocks.qdoc
index 48d6d60..eee5ac3 100644
--- a/doc/src/examples/moveblocks.qdoc
+++ b/doc/src/examples/moveblocks.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/movie.qdoc b/doc/src/examples/movie.qdoc
index 4d7b3e0..478104ef 100644
--- a/doc/src/examples/movie.qdoc
+++ b/doc/src/examples/movie.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/multipleinheritance.qdoc b/doc/src/examples/multipleinheritance.qdoc
index 83a4d29..54c2ba4 100644
--- a/doc/src/examples/multipleinheritance.qdoc
+++ b/doc/src/examples/multipleinheritance.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/musicplayerexample.qdoc b/doc/src/examples/musicplayerexample.qdoc
index eaee747..9805bbb 100644
--- a/doc/src/examples/musicplayerexample.qdoc
+++ b/doc/src/examples/musicplayerexample.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/network-chat.qdoc b/doc/src/examples/network-chat.qdoc
index ba78f79..c5dba3f 100644
--- a/doc/src/examples/network-chat.qdoc
+++ b/doc/src/examples/network-chat.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/network-download.qdoc b/doc/src/examples/network-download.qdoc
index c1ab652..ecd45e6 100644
--- a/doc/src/examples/network-download.qdoc
+++ b/doc/src/examples/network-download.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/network-downloadmanager.qdoc b/doc/src/examples/network-downloadmanager.qdoc
index 6013e56..fbd3bca 100644
--- a/doc/src/examples/network-downloadmanager.qdoc
+++ b/doc/src/examples/network-downloadmanager.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/openvg-star.qdoc b/doc/src/examples/openvg-star.qdoc
index f3eee57..7b6193e 100644
--- a/doc/src/examples/openvg-star.qdoc
+++ b/doc/src/examples/openvg-star.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/orderform.qdoc b/doc/src/examples/orderform.qdoc
index b287f96..e78790a 100644
--- a/doc/src/examples/orderform.qdoc
+++ b/doc/src/examples/orderform.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/overpainting.qdoc b/doc/src/examples/overpainting.qdoc
index 36002ed..f930d6b 100644
--- a/doc/src/examples/overpainting.qdoc
+++ b/doc/src/examples/overpainting.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/padnavigator.qdoc b/doc/src/examples/padnavigator.qdoc
index 9f471a8..2bdad8d 100644
--- a/doc/src/examples/padnavigator.qdoc
+++ b/doc/src/examples/padnavigator.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/painterpaths.qdoc b/doc/src/examples/painterpaths.qdoc
index 981a30e..dbc3563 100644
--- a/doc/src/examples/painterpaths.qdoc
+++ b/doc/src/examples/painterpaths.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/pbuffers.qdoc b/doc/src/examples/pbuffers.qdoc
index 331a194..a8257e1 100644
--- a/doc/src/examples/pbuffers.qdoc
+++ b/doc/src/examples/pbuffers.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/pbuffers2.qdoc b/doc/src/examples/pbuffers2.qdoc
index 230bf27..5a0bba3 100644
--- a/doc/src/examples/pbuffers2.qdoc
+++ b/doc/src/examples/pbuffers2.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/pinchzoom.qdoc b/doc/src/examples/pinchzoom.qdoc
index 198cbb3..60fac29 100644
--- a/doc/src/examples/pinchzoom.qdoc
+++ b/doc/src/examples/pinchzoom.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/pingpong.qdoc b/doc/src/examples/pingpong.qdoc
index fc0580f..2b27db7 100644
--- a/doc/src/examples/pingpong.qdoc
+++ b/doc/src/examples/pingpong.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/pixelator.qdoc b/doc/src/examples/pixelator.qdoc
index f631b0b..d40316e 100644
--- a/doc/src/examples/pixelator.qdoc
+++ b/doc/src/examples/pixelator.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/plugandpaint.qdoc b/doc/src/examples/plugandpaint.qdoc
index 0bd3edb..19053da 100644
--- a/doc/src/examples/plugandpaint.qdoc
+++ b/doc/src/examples/plugandpaint.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/portedasteroids.qdoc b/doc/src/examples/portedasteroids.qdoc
index 17f9ccf..6307931 100644
--- a/doc/src/examples/portedasteroids.qdoc
+++ b/doc/src/examples/portedasteroids.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/portedcanvas.qdoc b/doc/src/examples/portedcanvas.qdoc
index acfca12..9e4b004 100644
--- a/doc/src/examples/portedcanvas.qdoc
+++ b/doc/src/examples/portedcanvas.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/previewer.qdoc b/doc/src/examples/previewer.qdoc
index 61660da..c7140f7 100644
--- a/doc/src/examples/previewer.qdoc
+++ b/doc/src/examples/previewer.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/qml-calculator.qdoc b/doc/src/examples/qml-calculator.qdoc
index 5c52575..1bc5f79 100644
--- a/doc/src/examples/qml-calculator.qdoc
+++ b/doc/src/examples/qml-calculator.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/qml-examples.qdoc b/doc/src/examples/qml-examples.qdoc
index 745baa3..ca24c66 100644
--- a/doc/src/examples/qml-examples.qdoc
+++ b/doc/src/examples/qml-examples.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -236,6 +236,37 @@
This example shows how to enable text translation in QML.
\image qml-i18n-example.png
+
+ \section1 Introduction
+
+ The QML runtime automatically loads a translation from the i18n subdirectory
+ of the root QML file, based on the system language. The translations are
+ held in QM files that must be generated from TS files.
+
+ \section1 Updating Translations
+
+ The \c{.ts} files are created and updated by running:
+
+ \code
+ lupdate i18n.qml -ts i18n/base.ts
+ \endcode
+
+ If no translation file exists, one will be created. If a file already exists,
+ it will be updated to contain the latest strings from the QML file.
+
+ Translations for new languages are created by copying \c{i18n/base.ts} to
+ \c{i18n/qml_<lang>.ts} The TS files can then be edited with
+ \l{Qt Linguist Manual}{Qt Linguist}:
+
+ \code
+ linguist i18n/qml_fr.ts
+ \endcode
+
+ The run-time translation files are then generated by running:
+
+ \code
+ lrelease i18n/*.ts
+ \endcode
*/
/*!
diff --git a/doc/src/examples/qml-extending.qdoc b/doc/src/examples/qml-extending.qdoc
index 21ec3bb..789b8f6 100644
--- a/doc/src/examples/qml-extending.qdoc
+++ b/doc/src/examples/qml-extending.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/qml-flickr.qdoc b/doc/src/examples/qml-flickr.qdoc
index 5ebd1ea..6d47675 100644
--- a/doc/src/examples/qml-flickr.qdoc
+++ b/doc/src/examples/qml-flickr.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/qml-folderlistmodel.qdoc b/doc/src/examples/qml-folderlistmodel.qdoc
index 666d2dd..1592d7b 100644
--- a/doc/src/examples/qml-folderlistmodel.qdoc
+++ b/doc/src/examples/qml-folderlistmodel.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/qml-minehunt.qdoc b/doc/src/examples/qml-minehunt.qdoc
index e1ff22f..6e7ce4f 100644
--- a/doc/src/examples/qml-minehunt.qdoc
+++ b/doc/src/examples/qml-minehunt.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/qml-photoviewer.qdoc b/doc/src/examples/qml-photoviewer.qdoc
index e54d4af..032284e 100644
--- a/doc/src/examples/qml-photoviewer.qdoc
+++ b/doc/src/examples/qml-photoviewer.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/qml-rssnews.qdoc b/doc/src/examples/qml-rssnews.qdoc
index 5a6696c..e7da263 100644
--- a/doc/src/examples/qml-rssnews.qdoc
+++ b/doc/src/examples/qml-rssnews.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/qml-samegame.qdoc b/doc/src/examples/qml-samegame.qdoc
index 1248fc1..588a51c 100644
--- a/doc/src/examples/qml-samegame.qdoc
+++ b/doc/src/examples/qml-samegame.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/qml-snake.qdoc b/doc/src/examples/qml-snake.qdoc
index eaea128..c4c1125 100644
--- a/doc/src/examples/qml-snake.qdoc
+++ b/doc/src/examples/qml-snake.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/qml-twitter.qdoc b/doc/src/examples/qml-twitter.qdoc
index c3182a0..73e3f49 100644
--- a/doc/src/examples/qml-twitter.qdoc
+++ b/doc/src/examples/qml-twitter.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/qml-webbrowser.qdoc b/doc/src/examples/qml-webbrowser.qdoc
index a3cef66..a7d543f 100644
--- a/doc/src/examples/qml-webbrowser.qdoc
+++ b/doc/src/examples/qml-webbrowser.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/qobjectxmlmodel.qdoc b/doc/src/examples/qobjectxmlmodel.qdoc
index 8054ae2..cddc1d1 100644
--- a/doc/src/examples/qobjectxmlmodel.qdoc
+++ b/doc/src/examples/qobjectxmlmodel.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/qtconcurrent-imagescaling.qdoc b/doc/src/examples/qtconcurrent-imagescaling.qdoc
index df6d84b..4ee7e75 100644
--- a/doc/src/examples/qtconcurrent-imagescaling.qdoc
+++ b/doc/src/examples/qtconcurrent-imagescaling.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/qtconcurrent-map.qdoc b/doc/src/examples/qtconcurrent-map.qdoc
index b605137..ee4608a 100644
--- a/doc/src/examples/qtconcurrent-map.qdoc
+++ b/doc/src/examples/qtconcurrent-map.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/qtconcurrent-progressdialog.qdoc b/doc/src/examples/qtconcurrent-progressdialog.qdoc
index b5e9dde..b5e01ed 100644
--- a/doc/src/examples/qtconcurrent-progressdialog.qdoc
+++ b/doc/src/examples/qtconcurrent-progressdialog.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/qtconcurrent-runfunction.qdoc b/doc/src/examples/qtconcurrent-runfunction.qdoc
index 33fbb38..5b431cf 100644
--- a/doc/src/examples/qtconcurrent-runfunction.qdoc
+++ b/doc/src/examples/qtconcurrent-runfunction.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/qtconcurrent-wordcount.qdoc b/doc/src/examples/qtconcurrent-wordcount.qdoc
index a5df4a9..b02017e 100644
--- a/doc/src/examples/qtconcurrent-wordcount.qdoc
+++ b/doc/src/examples/qtconcurrent-wordcount.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/qtscriptcalculator.qdoc b/doc/src/examples/qtscriptcalculator.qdoc
index a35ea4b..590f56c 100644
--- a/doc/src/examples/qtscriptcalculator.qdoc
+++ b/doc/src/examples/qtscriptcalculator.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/qtscriptcustomclass.qdoc b/doc/src/examples/qtscriptcustomclass.qdoc
index 3918ba9..71d0ace 100644
--- a/doc/src/examples/qtscriptcustomclass.qdoc
+++ b/doc/src/examples/qtscriptcustomclass.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/qtscripttetrix.qdoc b/doc/src/examples/qtscripttetrix.qdoc
index 3bab93b..c308b1b 100644
--- a/doc/src/examples/qtscripttetrix.qdoc
+++ b/doc/src/examples/qtscripttetrix.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/querymodel.qdoc b/doc/src/examples/querymodel.qdoc
index 2aa1c2e..ff538dc 100644
--- a/doc/src/examples/querymodel.qdoc
+++ b/doc/src/examples/querymodel.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/queuedcustomtype.qdoc b/doc/src/examples/queuedcustomtype.qdoc
index ed65bda..fec1600 100644
--- a/doc/src/examples/queuedcustomtype.qdoc
+++ b/doc/src/examples/queuedcustomtype.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/qxmlstreambookmarks.qdoc b/doc/src/examples/qxmlstreambookmarks.qdoc
index 87258d1..e3c5ccb 100644
--- a/doc/src/examples/qxmlstreambookmarks.qdoc
+++ b/doc/src/examples/qxmlstreambookmarks.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/recentfiles.qdoc b/doc/src/examples/recentfiles.qdoc
index 5bd8fd3..501d12e 100644
--- a/doc/src/examples/recentfiles.qdoc
+++ b/doc/src/examples/recentfiles.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/recipes.qdoc b/doc/src/examples/recipes.qdoc
index e47e2f0..f01eaf4 100644
--- a/doc/src/examples/recipes.qdoc
+++ b/doc/src/examples/recipes.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/regexp.qdoc b/doc/src/examples/regexp.qdoc
index d160172..1759394 100644
--- a/doc/src/examples/regexp.qdoc
+++ b/doc/src/examples/regexp.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/relationaltablemodel.qdoc b/doc/src/examples/relationaltablemodel.qdoc
index f4883f2..68c2d37 100644
--- a/doc/src/examples/relationaltablemodel.qdoc
+++ b/doc/src/examples/relationaltablemodel.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/remotecontrol.qdoc b/doc/src/examples/remotecontrol.qdoc
index a2241d4..f148cb2 100644
--- a/doc/src/examples/remotecontrol.qdoc
+++ b/doc/src/examples/remotecontrol.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/rogue.qdoc b/doc/src/examples/rogue.qdoc
index a1c41e9..5b49a50 100644
--- a/doc/src/examples/rogue.qdoc
+++ b/doc/src/examples/rogue.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/rsslisting.qdoc b/doc/src/examples/rsslisting.qdoc
index 95e579a..878ad49 100644
--- a/doc/src/examples/rsslisting.qdoc
+++ b/doc/src/examples/rsslisting.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/samplebuffers.qdoc b/doc/src/examples/samplebuffers.qdoc
index cab66a2..a000f06 100644
--- a/doc/src/examples/samplebuffers.qdoc
+++ b/doc/src/examples/samplebuffers.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/saxbookmarks.qdoc b/doc/src/examples/saxbookmarks.qdoc
index 7656846..6b8aa02 100644
--- a/doc/src/examples/saxbookmarks.qdoc
+++ b/doc/src/examples/saxbookmarks.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/schema.qdoc b/doc/src/examples/schema.qdoc
index 47171ac..abe0f63 100644
--- a/doc/src/examples/schema.qdoc
+++ b/doc/src/examples/schema.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/screenshot.qdoc b/doc/src/examples/screenshot.qdoc
index 878f959..1bc5092 100644
--- a/doc/src/examples/screenshot.qdoc
+++ b/doc/src/examples/screenshot.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/scribble.qdoc b/doc/src/examples/scribble.qdoc
index d827e0e..cfb36e6 100644
--- a/doc/src/examples/scribble.qdoc
+++ b/doc/src/examples/scribble.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/script-marshal.qdoc b/doc/src/examples/script-marshal.qdoc
index 1dba23c..279036d 100644
--- a/doc/src/examples/script-marshal.qdoc
+++ b/doc/src/examples/script-marshal.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/script-qscript.qdoc b/doc/src/examples/script-qscript.qdoc
index caf2bce..0ec0d01 100644
--- a/doc/src/examples/script-qscript.qdoc
+++ b/doc/src/examples/script-qscript.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/script-qsdbg.qdoc b/doc/src/examples/script-qsdbg.qdoc
index bc95fdb..50b52f7 100644
--- a/doc/src/examples/script-qsdbg.qdoc
+++ b/doc/src/examples/script-qsdbg.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/sdi.qdoc b/doc/src/examples/sdi.qdoc
index 30bd89a..75c063f 100644
--- a/doc/src/examples/sdi.qdoc
+++ b/doc/src/examples/sdi.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/securesocketclient.qdoc b/doc/src/examples/securesocketclient.qdoc
index 69f444b..2356e86 100644
--- a/doc/src/examples/securesocketclient.qdoc
+++ b/doc/src/examples/securesocketclient.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/semaphores.qdoc b/doc/src/examples/semaphores.qdoc
index 6f749d2..d315c19 100644
--- a/doc/src/examples/semaphores.qdoc
+++ b/doc/src/examples/semaphores.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/settingseditor.qdoc b/doc/src/examples/settingseditor.qdoc
index 9f99f28..8429bcd 100644
--- a/doc/src/examples/settingseditor.qdoc
+++ b/doc/src/examples/settingseditor.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/shapedclock.qdoc b/doc/src/examples/shapedclock.qdoc
index 769c9eb..adb4441 100644
--- a/doc/src/examples/shapedclock.qdoc
+++ b/doc/src/examples/shapedclock.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/sharedmemory.qdoc b/doc/src/examples/sharedmemory.qdoc
index 6e13b96..6fd0947 100644
--- a/doc/src/examples/sharedmemory.qdoc
+++ b/doc/src/examples/sharedmemory.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/simpledecoration.qdoc b/doc/src/examples/simpledecoration.qdoc
index 021a4d3..74d6c0e 100644
--- a/doc/src/examples/simpledecoration.qdoc
+++ b/doc/src/examples/simpledecoration.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/simpledommodel.qdoc b/doc/src/examples/simpledommodel.qdoc
index d10f6a7..82ecac5 100644
--- a/doc/src/examples/simpledommodel.qdoc
+++ b/doc/src/examples/simpledommodel.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/simpleselector.qdoc b/doc/src/examples/simpleselector.qdoc
index 1e68699..f66ced5 100644
--- a/doc/src/examples/simpleselector.qdoc
+++ b/doc/src/examples/simpleselector.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/simpletextviewer.qdoc b/doc/src/examples/simpletextviewer.qdoc
index e5c887a..50ced54 100644
--- a/doc/src/examples/simpletextviewer.qdoc
+++ b/doc/src/examples/simpletextviewer.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/simpletreemodel.qdoc b/doc/src/examples/simpletreemodel.qdoc
index 7d1f8fe..c09c216 100644
--- a/doc/src/examples/simpletreemodel.qdoc
+++ b/doc/src/examples/simpletreemodel.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/simplewidgetmapper.qdoc b/doc/src/examples/simplewidgetmapper.qdoc
index 413ad2b..686263a 100644
--- a/doc/src/examples/simplewidgetmapper.qdoc
+++ b/doc/src/examples/simplewidgetmapper.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/sipdialog.qdoc b/doc/src/examples/sipdialog.qdoc
index 25ae7eb..16081f0 100644
--- a/doc/src/examples/sipdialog.qdoc
+++ b/doc/src/examples/sipdialog.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/sliders.qdoc b/doc/src/examples/sliders.qdoc
index f44fabb..5d878fe 100644
--- a/doc/src/examples/sliders.qdoc
+++ b/doc/src/examples/sliders.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/spinboxdelegate.qdoc b/doc/src/examples/spinboxdelegate.qdoc
index 44308ca..61eff51 100644
--- a/doc/src/examples/spinboxdelegate.qdoc
+++ b/doc/src/examples/spinboxdelegate.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/spinboxes.qdoc b/doc/src/examples/spinboxes.qdoc
index 34a95c7..865335e 100644
--- a/doc/src/examples/spinboxes.qdoc
+++ b/doc/src/examples/spinboxes.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/sqlwidgetmapper.qdoc b/doc/src/examples/sqlwidgetmapper.qdoc
index db48f9c..d642909 100644
--- a/doc/src/examples/sqlwidgetmapper.qdoc
+++ b/doc/src/examples/sqlwidgetmapper.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/standarddialogs.qdoc b/doc/src/examples/standarddialogs.qdoc
index 368b713..dbe21b9 100644
--- a/doc/src/examples/standarddialogs.qdoc
+++ b/doc/src/examples/standarddialogs.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/stardelegate.qdoc b/doc/src/examples/stardelegate.qdoc
index 6e5e371..c895667 100644
--- a/doc/src/examples/stardelegate.qdoc
+++ b/doc/src/examples/stardelegate.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/states.qdoc b/doc/src/examples/states.qdoc
index 24362a2..573cda0 100644
--- a/doc/src/examples/states.qdoc
+++ b/doc/src/examples/states.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/stickman.qdoc b/doc/src/examples/stickman.qdoc
index 08450aa..46301a8 100644
--- a/doc/src/examples/stickman.qdoc
+++ b/doc/src/examples/stickman.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/styleplugin.qdoc b/doc/src/examples/styleplugin.qdoc
index 85cad0f..9d84a14 100644
--- a/doc/src/examples/styleplugin.qdoc
+++ b/doc/src/examples/styleplugin.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/styles.qdoc b/doc/src/examples/styles.qdoc
index fc243e7..b9f48da 100644
--- a/doc/src/examples/styles.qdoc
+++ b/doc/src/examples/styles.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/stylesheet.qdoc b/doc/src/examples/stylesheet.qdoc
index 348e3f3..d08c2a4 100644
--- a/doc/src/examples/stylesheet.qdoc
+++ b/doc/src/examples/stylesheet.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/svgalib.qdoc b/doc/src/examples/svgalib.qdoc
index 86681e6..3e3e4d5 100644
--- a/doc/src/examples/svgalib.qdoc
+++ b/doc/src/examples/svgalib.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/svggenerator.qdoc b/doc/src/examples/svggenerator.qdoc
index 622cbbe..ae968b9 100644
--- a/doc/src/examples/svggenerator.qdoc
+++ b/doc/src/examples/svggenerator.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/svgviewer.qdoc b/doc/src/examples/svgviewer.qdoc
index 674b796..e528054 100644
--- a/doc/src/examples/svgviewer.qdoc
+++ b/doc/src/examples/svgviewer.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/syntaxhighlighter.qdoc b/doc/src/examples/syntaxhighlighter.qdoc
index 2162702..722dcca 100644
--- a/doc/src/examples/syntaxhighlighter.qdoc
+++ b/doc/src/examples/syntaxhighlighter.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/systray.qdoc b/doc/src/examples/systray.qdoc
index 469642a..8b9de81 100644
--- a/doc/src/examples/systray.qdoc
+++ b/doc/src/examples/systray.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/tabdialog.qdoc b/doc/src/examples/tabdialog.qdoc
index 3db9caa..da447c4 100644
--- a/doc/src/examples/tabdialog.qdoc
+++ b/doc/src/examples/tabdialog.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/tablemodel.qdoc b/doc/src/examples/tablemodel.qdoc
index 9934023..04a13cc 100644
--- a/doc/src/examples/tablemodel.qdoc
+++ b/doc/src/examples/tablemodel.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/tablet.qdoc b/doc/src/examples/tablet.qdoc
index adc49bf..58af376 100644
--- a/doc/src/examples/tablet.qdoc
+++ b/doc/src/examples/tablet.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/taskmenuextension.qdoc b/doc/src/examples/taskmenuextension.qdoc
index 8d9d843..d89b68c 100644
--- a/doc/src/examples/taskmenuextension.qdoc
+++ b/doc/src/examples/taskmenuextension.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/tetrix.qdoc b/doc/src/examples/tetrix.qdoc
index 177f592..ec46507 100644
--- a/doc/src/examples/tetrix.qdoc
+++ b/doc/src/examples/tetrix.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/textfinder.qdoc b/doc/src/examples/textfinder.qdoc
index ead950d..a04df00 100644
--- a/doc/src/examples/textfinder.qdoc
+++ b/doc/src/examples/textfinder.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/textobject.qdoc b/doc/src/examples/textobject.qdoc
index ce7431f..e655206 100644
--- a/doc/src/examples/textobject.qdoc
+++ b/doc/src/examples/textobject.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/textures.qdoc b/doc/src/examples/textures.qdoc
index 03e481e..d18268b 100644
--- a/doc/src/examples/textures.qdoc
+++ b/doc/src/examples/textures.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/threadedfortuneserver.qdoc b/doc/src/examples/threadedfortuneserver.qdoc
index cb18872..c0c4815 100644
--- a/doc/src/examples/threadedfortuneserver.qdoc
+++ b/doc/src/examples/threadedfortuneserver.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/tooltips.qdoc b/doc/src/examples/tooltips.qdoc
index 351eaf9..f7737b9 100644
--- a/doc/src/examples/tooltips.qdoc
+++ b/doc/src/examples/tooltips.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/torrent.qdoc b/doc/src/examples/torrent.qdoc
index 8488787..3c0d108 100644
--- a/doc/src/examples/torrent.qdoc
+++ b/doc/src/examples/torrent.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/touch-dials.qdoc b/doc/src/examples/touch-dials.qdoc
index 552d752..c6fc326 100644
--- a/doc/src/examples/touch-dials.qdoc
+++ b/doc/src/examples/touch-dials.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/touch-knobs.qdoc b/doc/src/examples/touch-knobs.qdoc
index deb4c28..08c2d0c 100644
--- a/doc/src/examples/touch-knobs.qdoc
+++ b/doc/src/examples/touch-knobs.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/trafficinfo.qdoc b/doc/src/examples/trafficinfo.qdoc
index bc06178..e60c1cd 100644
--- a/doc/src/examples/trafficinfo.qdoc
+++ b/doc/src/examples/trafficinfo.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/trafficlight.qdoc b/doc/src/examples/trafficlight.qdoc
index f1498a9..3d381d9 100644
--- a/doc/src/examples/trafficlight.qdoc
+++ b/doc/src/examples/trafficlight.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/transformations.qdoc b/doc/src/examples/transformations.qdoc
index 3c949b7..e60ab39 100644
--- a/doc/src/examples/transformations.qdoc
+++ b/doc/src/examples/transformations.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/treemodelcompleter.qdoc b/doc/src/examples/treemodelcompleter.qdoc
index 17bbd2c..b473831 100644
--- a/doc/src/examples/treemodelcompleter.qdoc
+++ b/doc/src/examples/treemodelcompleter.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/trivialwizard.qdoc b/doc/src/examples/trivialwizard.qdoc
index 2632560..381d969 100644
--- a/doc/src/examples/trivialwizard.qdoc
+++ b/doc/src/examples/trivialwizard.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/trollprint.qdoc b/doc/src/examples/trollprint.qdoc
index b9c9c56..d08b047 100644
--- a/doc/src/examples/trollprint.qdoc
+++ b/doc/src/examples/trollprint.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/twowaybutton.qdoc b/doc/src/examples/twowaybutton.qdoc
index bcecbd5..5fffe6d 100644
--- a/doc/src/examples/twowaybutton.qdoc
+++ b/doc/src/examples/twowaybutton.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/undoframework.qdoc b/doc/src/examples/undoframework.qdoc
index ef6a6a0..c497acc 100644
--- a/doc/src/examples/undoframework.qdoc
+++ b/doc/src/examples/undoframework.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/videographicsitem.qdoc b/doc/src/examples/videographicsitem.qdoc
index 587298c..3bb1f9a 100644
--- a/doc/src/examples/videographicsitem.qdoc
+++ b/doc/src/examples/videographicsitem.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/videowidget.qdoc b/doc/src/examples/videowidget.qdoc
index 66c2555..ab1a1c1 100644
--- a/doc/src/examples/videowidget.qdoc
+++ b/doc/src/examples/videowidget.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/waitconditions.qdoc b/doc/src/examples/waitconditions.qdoc
index 15565e9..75f60bd 100644
--- a/doc/src/examples/waitconditions.qdoc
+++ b/doc/src/examples/waitconditions.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/webkit-bridge-imageanalyzer.qdoc b/doc/src/examples/webkit-bridge-imageanalyzer.qdoc
new file mode 100644
index 0000000..cee2659
--- /dev/null
+++ b/doc/src/examples/webkit-bridge-imageanalyzer.qdoc
@@ -0,0 +1,160 @@
+/****************************************************************************
+**
+** 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$
+** 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 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$
+**
+****************************************************************************/
+
+/*!
+ \example webkit/imageanalyzer
+ \startpage {index.html}{Qt Reference Documentation}
+ \title The Webkit Bridge Tutorial - Hybrid Client Application
+
+ In this example, we will show how to write a hybrid application using
+\l{The QtWebKit Bridge}{QtWebKit Bridge}, which distinguishes itself from a
+thin client in that it performs heavy calculations on the client side in C++,
+like a native application, but presents nothing more than a \c QWebView for its
+user interface, displaying web content written in HTML/JavaScript. The
+application uses QtConcurrent to distribute its work across as many CPU cores as
+are available from the system, so it can process each image in parallel.
+
+For the full reference documentation of QtWebKit hybrid development, see
+\l{qtwebkit-bridge.html}{The QtWebKit Bridge}.
+
+Initially, you will see a user interface with an empty list of images. Clicking
+on some of the images in the lower pane below adds them to the list view above,
+as shown in the screenshot below.
+
+ \image webkit-imageanalyzer-screenshot.png
+
+Now, we can click on \bold Analyze, and each image is analyzed using some
+computationally intensive C++ function, in parallel and on different cores.
+Progress is shown while the analysis is proceeding.
+
+ \image webkit-imageanalyzer-progress.png
+
+and in the end, we will see something like this, where the average RGB values of
+each image are shown.
+
+ \image webkit-imageanalyzer-complete.png
+
+The MainWindow is defined in C++, and creates a \l QNetworkDiskCache and a
+\l QWebView, and tells the \l QWebView to load the starting page, providing us
+with a user interface for the client.
+
+ \snippet examples/webkit/imageanalyzer/mainwindow.cpp MainWindow - constructor
+
+In this example, the sample content is addressed with the \tt qrc:/index.html
+URL. \tt qrc:/ indicates that the file is stored as a Qt resource (attached to
+the executable). In a real-world application, the content and images would
+likely be retrieved from the network rather than from resources.
+
+We wish to initialize an object reference in the JavaScript web page to point
+to our \tt ImageAnalyzer before any other scripts are run. To do this, we
+connect the \l{QWebFrame::}{javaScriptWindowObjectCleared()} signal to a slot
+which does the object creation and handoff to JavaScript.
+
+ \snippet examples/webkit/imageanalyzer/mainwindow.cpp MainWindow - addJSObject
+
+The ImageAnalyzer object is created and added to a JavaScript object on the web
+page's mainFrame with \c addToJavaScriptWindowObject().
+
+ The start page is resources/index.html.
+ In one of its <div> regions, we have images, each
+ with an \c onClick() handler that calls \c addImage().
+
+ \snippet examples/webkit/imageanalyzer/resources/index.html sample images
+
+Clicking an image adds it to an images list.
+
+ \snippet examples/webkit/imageanalyzer/resources/index.html addImage
+
+The \bold {Analyze} button at the bottom of the image list is clicked when we
+want to start the analysis:
+
+ \snippet examples/webkit/imageanalyzer/resources/index.html images list
+
+When the user clicks the \bold {Analyze} button, \c analyzeImages() is called,
+another regular JavaScript method, shown below.
+Notice it assumes the \c imageAnalyzer object is already defined and initialized
+in JavaScript space, but we guaranteed that by connecting our setup slot to the
+appropriate signal, \l{QWebFrame::}{javaScriptWindowObjectCleared()}.
+
+ \snippet examples/webkit/imageanalyzer/resources/index.html analyzeImages
+
+The only methods on \c ImageAnalyzer that we can or do call from JavaScript are
+those which are exposed through \{The Meta-Object System}{Qt's MetaObject}
+system: \l{The Property System}{property} getter/setter methods,
+\c public \l {Signals & Slots}{signals and slots}, and other
+\l{Q_INVOKABLE}{Q_INVOKABLE} functions.
+
+\snippet examples/webkit/imageanalyzer/imageanalyzer.h ImageAnalyzer - public interface
+\dots
+\snippet examples/webkit/imageanalyzer/imageanalyzer.h ImageAnalyzer - private members
+
+Most of the members are set up in the constructor:
+
+\snippet examples/webkit/imageanalyzer/imageanalyzer.cpp ImageAnalyzer - Constructor
+
+Back on the JavaScript side, we want to connect signals from this object to
+JavaScript functions on our web page, after the web page is loaded, but before
+the images are analyzed.
+
+From \c connectSlots(), we can see how to connect signals from the imageAnalyzer
+object to regular JavaScript functions, which can also behave like slots. We use
+this to monitor and display progress from the C++ side.
+
+ \snippet examples/webkit/imageanalyzer/resources/index.html connect slots
+
+The only public slot is \c startAnalysis(), called to place
+a list of URLs into the image analyzer's QtConcurrent processing queue
+from JavaScript space.
+
+\snippet examples/webkit/imageanalyzer/imageanalyzer.cpp ImageAnalyzer - startAnalysis
+
+The images need to be loaded again now, which is why fetchURLs first checks the
+cache to see if we can save an extra network get.
+
+\snippet examples/webkit/imageanalyzer/imageanalyzer.cpp ImageAnalyzer - fetchURLs
+
+For the images that were not in the cache, \c handleReply()
+will load them into a QImage when the data is ready.
+
+\snippet examples/webkit/imageanalyzer/imageanalyzer.cpp ImageAnalyzer - handleReply
+
+After the images are loaded, they are queued up in preparation to be
+sent in a batch for analysis to a \l QFutureWatcher, which will distribute the
+processing across multiple threads and cores, depending on how many are available.
+
+\snippet examples/webkit/imageanalyzer/imageanalyzer.cpp ImageAnalyzer - queueImage
+
+The function that gets performed on each image is \c averageRGB(),
+as specified in argument 2 to the \l{QtConcurrent::mapped()} function.
+Notice it repeats the same calculations 100 times on each pixel to keep the CPU
+very busy. This is done only for the purposes of the demo so that the analysis
+takes a noticeable time to complete.
+
+\snippet examples/webkit/imageanalyzer/imageanalyzer.cpp ImageAnalyzer - averageRGB
+
+*/
+
diff --git a/doc/src/examples/webkit-framecapture.qdoc b/doc/src/examples/webkit-framecapture.qdoc
index a3d9f1b..96e70d5 100644
--- a/doc/src/examples/webkit-framecapture.qdoc
+++ b/doc/src/examples/webkit-framecapture.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/widgets-softkeys.qdoc b/doc/src/examples/widgets-softkeys.qdoc
index dde1778..1958872 100644
--- a/doc/src/examples/widgets-softkeys.qdoc
+++ b/doc/src/examples/widgets-softkeys.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/widgets-validators.qdoc b/doc/src/examples/widgets-validators.qdoc
index 78054bb..c6b3711 100644
--- a/doc/src/examples/widgets-validators.qdoc
+++ b/doc/src/examples/widgets-validators.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/wiggly.qdoc b/doc/src/examples/wiggly.qdoc
index bd02900..1b3f1ff 100644
--- a/doc/src/examples/wiggly.qdoc
+++ b/doc/src/examples/wiggly.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/windowflags.qdoc b/doc/src/examples/windowflags.qdoc
index bc4f979..cfee598 100644
--- a/doc/src/examples/windowflags.qdoc
+++ b/doc/src/examples/windowflags.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/worldtimeclockbuilder.qdoc b/doc/src/examples/worldtimeclockbuilder.qdoc
index a70cbe7..27d846f 100644
--- a/doc/src/examples/worldtimeclockbuilder.qdoc
+++ b/doc/src/examples/worldtimeclockbuilder.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/worldtimeclockplugin.qdoc b/doc/src/examples/worldtimeclockplugin.qdoc
index 0157b68..d485ec3 100644
--- a/doc/src/examples/worldtimeclockplugin.qdoc
+++ b/doc/src/examples/worldtimeclockplugin.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/examples/xmlstreamlint.qdoc b/doc/src/examples/xmlstreamlint.qdoc
index 3e25dbe..fa05874 100644
--- a/doc/src/examples/xmlstreamlint.qdoc
+++ b/doc/src/examples/xmlstreamlint.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/external-resources.qdoc b/doc/src/external-resources.qdoc
index 61620f5..8eeaeb1 100644
--- a/doc/src/external-resources.qdoc
+++ b/doc/src/external-resources.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -436,7 +436,12 @@
/*!
\externalpage https://developer.mozilla.org/en/JavaScript
- \title JavaScript
+ \title JavaScript Resources
+*/
+
+/*!
+ \externalpage https://developer.mozilla.org/en/JavaScript/Guide
+ \title JavaScript Guide
*/
/*!
diff --git a/doc/src/files-and-resources/datastreamformat.qdoc b/doc/src/files-and-resources/datastreamformat.qdoc
index 060aee6..d014f20 100644
--- a/doc/src/files-and-resources/datastreamformat.qdoc
+++ b/doc/src/files-and-resources/datastreamformat.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/files-and-resources/resources.qdoc b/doc/src/files-and-resources/resources.qdoc
index f0cb130..0376d0c 100644
--- a/doc/src/files-and-resources/resources.qdoc
+++ b/doc/src/files-and-resources/resources.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/frameworks-technologies/accessible.qdoc b/doc/src/frameworks-technologies/accessible.qdoc
index cbc1558..eb14310 100644
--- a/doc/src/frameworks-technologies/accessible.qdoc
+++ b/doc/src/frameworks-technologies/accessible.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/frameworks-technologies/activeqt-container.qdoc b/doc/src/frameworks-technologies/activeqt-container.qdoc
index 736bca3..4e11abd 100644
--- a/doc/src/frameworks-technologies/activeqt-container.qdoc
+++ b/doc/src/frameworks-technologies/activeqt-container.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/frameworks-technologies/activeqt-server.qdoc b/doc/src/frameworks-technologies/activeqt-server.qdoc
index 924856f..0f683f7 100644
--- a/doc/src/frameworks-technologies/activeqt-server.qdoc
+++ b/doc/src/frameworks-technologies/activeqt-server.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/frameworks-technologies/activeqt.qdoc b/doc/src/frameworks-technologies/activeqt.qdoc
index e3fb3a7..c49dcad 100644
--- a/doc/src/frameworks-technologies/activeqt.qdoc
+++ b/doc/src/frameworks-technologies/activeqt.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/frameworks-technologies/animation.qdoc b/doc/src/frameworks-technologies/animation.qdoc
index 3763cb3..f78162d 100644
--- a/doc/src/frameworks-technologies/animation.qdoc
+++ b/doc/src/frameworks-technologies/animation.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/frameworks-technologies/containers.qdoc b/doc/src/frameworks-technologies/containers.qdoc
index cf5fe73..aa618d6 100644
--- a/doc/src/frameworks-technologies/containers.qdoc
+++ b/doc/src/frameworks-technologies/containers.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/frameworks-technologies/dbus-adaptors.qdoc b/doc/src/frameworks-technologies/dbus-adaptors.qdoc
index f193a67..3132d2d 100644
--- a/doc/src/frameworks-technologies/dbus-adaptors.qdoc
+++ b/doc/src/frameworks-technologies/dbus-adaptors.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/frameworks-technologies/dbus-intro.qdoc b/doc/src/frameworks-technologies/dbus-intro.qdoc
index 9d4cd95..2f7fa12 100644
--- a/doc/src/frameworks-technologies/dbus-intro.qdoc
+++ b/doc/src/frameworks-technologies/dbus-intro.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/frameworks-technologies/desktop-integration.qdoc b/doc/src/frameworks-technologies/desktop-integration.qdoc
index 6c117e8..d48f8c7 100644
--- a/doc/src/frameworks-technologies/desktop-integration.qdoc
+++ b/doc/src/frameworks-technologies/desktop-integration.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/frameworks-technologies/dnd.qdoc b/doc/src/frameworks-technologies/dnd.qdoc
index ebfa39e..356bf9b 100644
--- a/doc/src/frameworks-technologies/dnd.qdoc
+++ b/doc/src/frameworks-technologies/dnd.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -44,7 +44,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 & drop with item views} and \l{Graphics View
+ \l{Using drag and drop with item views} and \l{Graphics View
Framework}.
\section1 Drag and Drop Classes
diff --git a/doc/src/frameworks-technologies/eventsandfilters.qdoc b/doc/src/frameworks-technologies/eventsandfilters.qdoc
index fb14a3b..fb51976 100644
--- a/doc/src/frameworks-technologies/eventsandfilters.qdoc
+++ b/doc/src/frameworks-technologies/eventsandfilters.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/frameworks-technologies/gestures.qdoc b/doc/src/frameworks-technologies/gestures.qdoc
index f7c8312..06d3431 100644
--- a/doc/src/frameworks-technologies/gestures.qdoc
+++ b/doc/src/frameworks-technologies/gestures.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/frameworks-technologies/graphicsview.qdoc b/doc/src/frameworks-technologies/graphicsview.qdoc
index 20bb750..21d3f42 100644
--- a/doc/src/frameworks-technologies/graphicsview.qdoc
+++ b/doc/src/frameworks-technologies/graphicsview.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/frameworks-technologies/implicit-sharing.qdoc b/doc/src/frameworks-technologies/implicit-sharing.qdoc
index d62824e..fcfcf7f 100644
--- a/doc/src/frameworks-technologies/implicit-sharing.qdoc
+++ b/doc/src/frameworks-technologies/implicit-sharing.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/frameworks-technologies/ipc.qdoc b/doc/src/frameworks-technologies/ipc.qdoc
index 775243a..e73f649 100644
--- a/doc/src/frameworks-technologies/ipc.qdoc
+++ b/doc/src/frameworks-technologies/ipc.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/frameworks-technologies/model-view-programming.qdoc b/doc/src/frameworks-technologies/model-view-programming.qdoc
index 7a1fb40..cc98432 100644
--- a/doc/src/frameworks-technologies/model-view-programming.qdoc
+++ b/doc/src/frameworks-technologies/model-view-programming.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -32,7 +32,7 @@
/*!
\page model-view-programming.html
- \ingroup qt-basic-concepts
+ \ingroup qt-basic-concepts
\title Model/View Programming
\brief A guide to Qt's extensible model/view architecture.
@@ -1635,7 +1635,7 @@
contain the text given in the search string. This pattern can also be
used in the list and table widgets.
- \section1 Using drag & drop with item views
+ \section1 Using Drag and 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
@@ -1715,7 +1715,7 @@
of QAbstractItemModel::removeRows(), either directly or by inheriting the
implementation from its base class.
- \section3 Enabling drag & drop for items
+ \section3 Enabling drag and 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
@@ -2154,7 +2154,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 & drop support and MIME type handling
+ \section2 Drag and 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
@@ -2283,7 +2283,7 @@
\endlist
For more information about drag and drop with item views, refer to
- \l{Using drag & drop with item views}.
+ \l{Using drag and drop with item views}.
\section3 Convenience views
@@ -2294,7 +2294,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 & drop with item views}.
+ you can see \l{Using drag and 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 5119638..9620136 100644
--- a/doc/src/frameworks-technologies/phonon.qdoc
+++ b/doc/src/frameworks-technologies/phonon.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -524,24 +524,5 @@
the QtOpenGL shared library. If this is not what you want, it is
possible to configure Qt without OpenGL support. In that case, you
need to run \c configure with the \c -no-opengl option.
-
- \section1 Work in Progress
-
- Phonon and its Qt backends, though fully functional for
- multimedia playback, are still under development. Functionality to
- come is the possibility to capture media and more processors for
- both music and video files.
-
- Another important consideration is to implement support for
- storing media to files; i.e., not playing back media directly.
-
- We also hope in the future to be able to support direct
- manipulation of media streams. This will give the programmer more
- freedom to manipulate streams than just through processors.
-
- Currently, the multimedia framework supports one input source. It will be
- possible to include several sources. This is useful in, for example, audio
- mixer applications where several audio sources can be sent, processed and
- output as a single audio stream.
*/
diff --git a/doc/src/frameworks-technologies/plugins-howto.qdoc b/doc/src/frameworks-technologies/plugins-howto.qdoc
index 5103bdc..8e4cbe4 100644
--- a/doc/src/frameworks-technologies/plugins-howto.qdoc
+++ b/doc/src/frameworks-technologies/plugins-howto.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/frameworks-technologies/qthelp.qdoc b/doc/src/frameworks-technologies/qthelp.qdoc
index 2342e40..14874ef 100644
--- a/doc/src/frameworks-technologies/qthelp.qdoc
+++ b/doc/src/frameworks-technologies/qthelp.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/frameworks-technologies/qundo.qdoc b/doc/src/frameworks-technologies/qundo.qdoc
index bc050d8..08ed0e4 100644
--- a/doc/src/frameworks-technologies/qundo.qdoc
+++ b/doc/src/frameworks-technologies/qundo.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/frameworks-technologies/richtext.qdoc b/doc/src/frameworks-technologies/richtext.qdoc
index a9ee0b2..f065531 100644
--- a/doc/src/frameworks-technologies/richtext.qdoc
+++ b/doc/src/frameworks-technologies/richtext.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/frameworks-technologies/statemachine.qdoc b/doc/src/frameworks-technologies/statemachine.qdoc
index 714483a..a0cd005 100644
--- a/doc/src/frameworks-technologies/statemachine.qdoc
+++ b/doc/src/frameworks-technologies/statemachine.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/frameworks-technologies/templates.qdoc b/doc/src/frameworks-technologies/templates.qdoc
index 97b5a87..346f043 100644
--- a/doc/src/frameworks-technologies/templates.qdoc
+++ b/doc/src/frameworks-technologies/templates.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/frameworks-technologies/threads.qdoc b/doc/src/frameworks-technologies/threads.qdoc
index 405997a..3ef617c 100644
--- a/doc/src/frameworks-technologies/threads.qdoc
+++ b/doc/src/frameworks-technologies/threads.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -324,10 +324,6 @@
post events to objects that "live" in other threads. This is
possible because each thread is allowed to have its own event
loop.
-
- Topics:
-
- \tableofcontents
\section1 QObject Reentrancy
diff --git a/doc/src/frameworks-technologies/unicode.qdoc b/doc/src/frameworks-technologies/unicode.qdoc
index 2ad8947..061b61e 100644
--- a/doc/src/frameworks-technologies/unicode.qdoc
+++ b/doc/src/frameworks-technologies/unicode.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/getting-started/demos.qdoc b/doc/src/getting-started/demos.qdoc
index f52fc92..2fe39a2 100644
--- a/doc/src/getting-started/demos.qdoc
+++ b/doc/src/getting-started/demos.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc
index 596cc01..5230b7e 100644
--- a/doc/src/getting-started/examples.qdoc
+++ b/doc/src/getting-started/examples.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -32,11 +32,11 @@
Qt includes a set of examples that cover nearly every aspect of Qt
development. They aren't meant to be impressive when you run them,
but in each case the source code has been carefully written to
- illustrate one or more best Qt programming practices.
+ illustrate one or more best Qt programming practices.
You can run the examples from the \l{Examples and Demos Launcher}
application (except see \l{QML Examples and Demos} {QML Examples}
- for special instructions for running thos examples).
+ for special instructions for running those examples).
The examples are listed below by functional area. Each example
listed in a particular functional area is meant to illustrate how
@@ -53,7 +53,8 @@
deliberately show off Qt's features. You might want to look at
these as well.
- These examples are provided under the terms of the \l{BSD License}.
+ These examples are provided under the terms of the
+ \l{New and Modified BSD Licenses}{Modified BSD License}.
\section1 Examples by Functional Area
@@ -766,6 +767,9 @@
\row \o \l{webkit/googlechat}{Google Chat}
\o A real-world example that shows how an existing Web-based service can be accessed
using QtWebKit.
+ \row \o \l{webkit/imageanalyzer}{Image Analyzer}\raisedaster
+ \o A \l{The QtWebKit Bridge}{QtWebKit bridge} application which contains a
+ web interface and client-side processing.
\row \o \l{webkit/previewer}{Previewer}\raisedaster
\o Shows how to make a simple Web page previewer by using Qt's text input widgets
together with a QWebView widget.
@@ -778,7 +782,7 @@
*/
/*!
- \page examples-helpsystem.html
+ \page examples-helpsystem.html
\ingroup all-examples
\title Help System Examples
\brief Adding interactive help to your Qt application.
diff --git a/doc/src/getting-started/gettingstarted.qdoc b/doc/src/getting-started/gettingstarted.qdoc
index e58305a..162dba1 100644
--- a/doc/src/getting-started/gettingstarted.qdoc
+++ b/doc/src/getting-started/gettingstarted.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/getting-started/gettingstartedqml.qdoc b/doc/src/getting-started/gettingstartedqml.qdoc
index a6159c3..54fa098 100644
--- a/doc/src/getting-started/gettingstartedqml.qdoc
+++ b/doc/src/getting-started/gettingstartedqml.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -35,6 +35,16 @@
After reading this guide, you should be ready to develop your own applications
using QML and Qt C++.
+ \section1 Installation
+
+ First, we would need to install the latest version of Qt that includes \l{Qt
+ Quick}, which is Qt 4.7. The \l{Installation} {installation} guide contains
+ installation instructions and requirements for different platforms.
+
+ Qt Quick includes a declarative language called
+ \l{Introduction to the QML language}{QML}, the \l{QtDeclarative Module}, and
+ \l{QML Viewer}.
+
\section1 QML to Build User Interfaces
The application we are building is a simple text editor that will load, save,
@@ -48,7 +58,12 @@
\image qml-texteditor5_editmenu.png
- To run the QML example code, merely provide the included \l{QML Viewer}{qmlviewer}
+ The final source code is in the \c{examples/tutorials/gettingStarted/gsQml}
+ directory. You may need to compile the C++ plugin in the
+ \c{examples/tutorials/gettingStarted/gsQml/} first. This will put the
+ C++ plugin in a directory where the QML files may find it.
+
+ To launch the text editor, merely provide the included \l{QML Viewer}{qmlviewer}
tool with the QML file as the argument. The C++ portion of this tutorial assumes
that the reader possesses basic knowledge of Qt's compilation procedures.
@@ -68,10 +83,10 @@
We start our text editor by building a button. Functionally, a button has a mouse
sensitive area and a label. Buttons perform actions when a user presses the button.
- In QML, the basic visual item is the \l {Rectangle}{Rectangle} element. The
- \c Rectangle element has properties to control the element's appearance and location.
+ In QML, the basic visual item is the \l {Rectangle}{Rectangle} element. The
+ \c Rectangle element has properties to control the element's appearance and location.
- \snippet examples/tutorials/gettingStarted/gsQml/part0/Button.qml document
+ \snippet examples/tutorials/gettingStarted/gsQml/parts/part0/Button.qml document
First, the \c { import QtQuick 1.0 } allows the qmlviewer tool to import the QML elements
we will later use. This line must exist for every QML file. Notice that the version
@@ -88,7 +103,7 @@
\c text property. The label is contained within the Rectangle and in order to center
it in the middle, we assign the \c anchors of the Text element to its parent, which
is called \c simplebutton. Anchors may bind to other items' anchors, allowing layout
- assignments simpler.
+ assignments simpler.
We shall save this code as \c SimpleButton.qml. Running qmlviewer with the file as the
argument will display the grey rectangle with a text label.
@@ -104,7 +119,7 @@
id:simplebutton
...
- MouseArea{
+ MouseArea{
id: buttonMouseArea
anchors.fill: parent //anchor all sides of the mouse area to the rectangle's anchors
@@ -126,7 +141,7 @@
whenever the acceptable mouse button is clicked, the left click being the default. We
can bind actions to the onClicked handler. In our example, \c console.log() outputs text
whenever the mouse area is clicked. The function \c console.log() is a useful tool for
- debugging purposes and for outputting text.
+ debugging purposes and for outputting text.
The code in \c SimpleButton.qml is sufficient to display a button on the screen and
output text whenever it is clicked with a mouse.
@@ -136,7 +151,7 @@
id:Button
...
- property color buttonColor: "lightblue"
+ property color buttonColor: "lightblue"
property color onHoverColor: "gold"
property color borderColor: "white"
@@ -145,8 +160,8 @@
console.log(buttonLabel.text + " clicked" )
}
- MouseArea{
- onClicked: buttonClick()
+ MouseArea{
+ onClicked: buttonClick()
hoverEnabled: true
onEntered: parent.border.color = onHoverColor
onExited: parent.border.color = borderColor
@@ -210,12 +225,12 @@
\code
import QtQuick 1.0 \\import the main Qt QML module
- import "folderName" \\import the contents of the folder
+ import "folderName" \\import the contents of the folder
import "script.js" as Script \\import a Javascript file and name it as Script
\endcode
The syntax shown above shows how to use the \c import keyword. This is required to
- use JavaScript files, or QML files that are not within the same directory. Since
+ use JavaScript files, or QML files that are not within the same directory. Since
\c Button.qml is in the same directory as \c FileMenu.qml, we do not need to import
the \c Button.qml file to use it. We can directly create a \c Button element by declaring
\c Button{}, similar to a \c Rectangle{} declaration.
@@ -242,7 +257,7 @@
label: "Exit"
buttonColor: "darkgrey"
- onButtonClick: Qt.quit()
+ onButtonClick: Qt.quit()
}
}
\endcode
@@ -266,7 +281,7 @@
The declaration of the edit menu is very similar at this stage. The menu has
buttons that have the labels: \c Copy, \c Paste, and \c {Select All}.
- \image qml-texteditor1_editmenu.png
+ \image qml-texteditor1_editmenu.png
Armed with our knowledge of importing and customizing previously made
components, we may now combine these menu pages to create a menu bar,
@@ -333,7 +348,7 @@
//control the movement of the menu switching
snapMode: ListView.SnapOneItem
orientation: ListView.Horizontal
- boundsBehavior: Flickable.StopAtBounds
+ boundsBehavior: Flickable.StopAtBounds
flickDeceleration: 5000
highlightFollowsCurrentItem: true
highlightMoveDuration:240
@@ -346,7 +361,7 @@
code above sets \c Flickable properties to create the desired flicking movement
to our view. In particular,the property \c highlightMoveDuration changes the
duration of the flick transition. A higher \c highlightMoveDuration value
- results in slower menu switching.
+ results in slower menu switching.
The \c ListView maintains the model items through an \c index and each visual
item in the model is accessible through the \c index, in the order of the
@@ -380,7 +395,7 @@
id: editButton
label: "Edit"
...
- onButtonClick: menuListView.currentIndex = 1
+ onButtonClick: menuListView.currentIndex = 1
}
}
}
@@ -389,7 +404,7 @@
The menu bar we just created can be flicked to access the menus or by clicking
on the menu names at the top. Switching menu screens feel intuitive and responsive.
- \image qml-texteditor2_menubar.png
+ \image qml-texteditor2_menubar.png
\section1 Building a Text Editor
@@ -402,7 +417,7 @@
\code
TextEdit{
- id: textEditor
+ id: textEditor
anchors.fill:parent
width:parent.width; height:parent.height
color:"midnightblue"
@@ -475,14 +490,14 @@
that already have defined behaviors. Using this approach, application layouts
and UI components can be created easily.
- \image qml-texteditor3_texteditor.png
+ \image qml-texteditor3_texteditor.png
\section1 Decorating the Text Editor
\section2 Implementing a Drawer Interface
Our text editor looks simple and we need to decorate it. Using QML, we can declare
transitions and animate our text editor. Our menu bar is occupying one-third of the
- screen and it would be nice to have it only appear when we want it.
+ screen and it would be nice to have it only appear when we want it.
We can add a drawer interface, that will contract or expand the menu bar when clicked.
In our implementation, we have a thin rectangle that responds to mouse clicks. The
@@ -537,7 +552,7 @@
the item's \c transitions property. Our text editor has a state transition whenever
the state changes to either \c DRAWER_OPEN or \c DRAWER_CLOSED. Importantly, the
transition needs a \c from and a \c to state but for our transitions, we can use
- the wild card \c * symbol to denote that the transition applies to all state changes.
+ the wild card \c * symbol to denote that the transition applies to all state changes.
During transitions, we can assign animations to the property changes. Our
\c menuBar switches position from \c {y:0} to \c {y:-partition} and we can animate
@@ -561,7 +576,7 @@
Behavior{
NumberAnimation{property: "rotation";easing.type: Easing.OutExpo }
- }
+ }
\endcode
Going back to our components with knowledge of states and animations, we can improve
@@ -607,9 +622,9 @@
We are finished building the user interface of a very simple text editor.
Going forward, the user interface is complete, and we can implement the
application logic using regular Qt and C++. QML works nicely as a prototyping
- tool, separating the application logic away from the UI design.
+ tool, separating the application logic away from the UI design.
- \image qml-texteditor4_texteditor.png
+ \image qml-texteditor4_texteditor.png
\section2 Extending QML using Qt C++
@@ -622,7 +637,7 @@
we shall implement the load and save functions in C++ and export it as a plugin.
This way, we only need to load the QML file directly instead of running an executable.
- \section3 Exposing C++ Classes to QML
+ \section3 Exposing C++ Classes to QML
We will be implementing file loading and saving using Qt and C++. C++ classes
and functions can be used in QML by registering them. The class also needs to be
@@ -645,7 +660,7 @@
directory.
\code
- In cppPlugins.pro:
+ In filedialog.pro:
TEMPLATE = lib
CONFIG += qt plugin
@@ -762,7 +777,7 @@
Similarly, we have the other properties declared according to their uses. The
\c filesCount property indicates the number of files in a directory. The filename
property is set to the currently selected file's name and the loaded/saved file
- content is stored in \c fileContent property.
+ content is stored in \c fileContent property.
\code
Q_PROPERTY(QDeclarativeListProperty<File> files READ files CONSTANT )
@@ -811,10 +826,10 @@
Regular C++ functions are also accessible from QML. The file loading and saving
functions are implemented in C++ and declared using the
\l {Q_INVOKABLE}{Q_INVOKABLE} macro. Alternatively, we can declare the functions
- as a \c slot and the functions will be accessible from QML.
+ as a \c slot and the functions will be accessible from QML.
\code
- In Directory.h:
+ In Directory.h:
Q_INVOKABLE void saveFile();
Q_INVOKABLE void loadFile();
@@ -848,9 +863,9 @@
The constructor passes pointers to functions that will append the list, count
the list, retrieve the item using an index, and empty the list. Only the append
function is mandatory. Note that the function pointers must match the definition
- of \l {QDeclarativeListProperty::AppendFunction}{AppendFunction},
- \l {QDeclarativeListProperty::CountFunction}{CountFunction},
- \l {QDeclarativeListProperty::AtFunction}{AtFunction}, or
+ of \l {QDeclarativeListProperty::AppendFunction}{AppendFunction},
+ \l {QDeclarativeListProperty::CountFunction}{CountFunction},
+ \l {QDeclarativeListProperty::AtFunction}{AtFunction}, or
\l {QDeclarativeListProperty::ClearFunction}{ClearFunction}.
\code
@@ -871,7 +886,7 @@
text files is in the application directory, get the file's name and content as a
string, and be notified whenever there are changes in the directory contents.
- To build the plugin, run \c qmake on the \c cppPlugins.pro project file, then run
+ To build the plugin, run \c qmake on the \c filedialog.pro project file, then run
\c make to build and transfer the plugin to the \c plugins directory.
@@ -883,7 +898,7 @@
plugins and other resources.
\code
- In qmldir:
+ In qmldir:
Button ./Button.qml
FileDialog ./FileDialog.qml
@@ -895,7 +910,7 @@
\endcode
The plugin we just created is called \c FileDialog, as indicated by the
- \c TARGET field in the project file. The compiled plugin is in the \c plugins directory.
+ \c TARGET field in the project file. The compiled plugin is in the \c plugins directory.
\section3 Integrating a File Dialog into the File Menu
@@ -910,7 +925,7 @@
\c FileDialog element that the directory refreshed its contents. This notification
is performed in the signal handler, \c onDirectoryChanged.
- \code
+ \code
In FileMenu.qml:
Directory{
@@ -922,7 +937,7 @@
Keeping with the simplicity of our application, the file dialog will always be
visible and will not display invalid text files, which do not have a \c .txt
- extension to their filenames.
+ extension to their filenames.
\code
In FileDialog.qml:
@@ -981,10 +996,10 @@
will transfer the text from the \c TextEdit onto the directory's \c fileContent
property, then copy its file name from the editable text input. Finally, the button
calls the \c saveFile() function, saving the file. The \c loadButton has a similar
- execution. Also, the \c New action will empty the contents of the \c TextEdit.
+ execution. Also, the \c New action will empty the contents of the \c TextEdit.
Further, the \c EditMenu buttons are connected to the \c TextEdit functions to copy,
- paste, and select all the text in the text editor.
+ paste, and select all the text in the text editor.
\image qml-texteditor5_filemenu.png
@@ -995,4 +1010,14 @@
The application can function as a simple text editor, able to accept text
and save the text into a file. The text editor can also load from a file and
perform text manipulation.
+
+ \section1 Running the Text Editor
+
+ We need to compile the file dialog C++ plugin before the text editor can run.
+ To compile, enter the \c gsQml directory, then run \c qmake and compile
+ using \c make or \c nmake, depending on your platform. To run, launch
+ qmlviewer and open the \c texteditor.qml file.
+
+ The source code is in the \c{examples/tutorials/gettingStarted/gsQml}
+ directory.
*/
diff --git a/doc/src/getting-started/gettingstartedqt.qdoc b/doc/src/getting-started/gettingstartedqt.qdoc
index 25d0ccd..945d7c3 100644
--- a/doc/src/getting-started/gettingstartedqt.qdoc
+++ b/doc/src/getting-started/gettingstartedqt.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/getting-started/how-to-learn-qt.qdoc b/doc/src/getting-started/how-to-learn-qt.qdoc
index 8ca1735..e9f462c 100644
--- a/doc/src/getting-started/how-to-learn-qt.qdoc
+++ b/doc/src/getting-started/how-to-learn-qt.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc
index bc0128c..a68310c 100644
--- a/doc/src/getting-started/installation.qdoc
+++ b/doc/src/getting-started/installation.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -40,7 +40,7 @@ for your platform from the following list.
*/
/*! \page install-x11.html
-\title Installing Qt on X11 Platforms
+\title Installing Qt for X11 Platforms
\ingroup installation
\brief How to install Qt on platforms with X11.
\previouspage Installation
@@ -151,7 +151,7 @@ for your platform from the following list.
/*!
\page install-win.html
-\title Installing Qt on Windows
+\title Installing Qt for Windows
\ingroup installation
\brief How to install Qt on Windows.
\previouspage Installation
@@ -269,7 +269,7 @@ for your platform from the following list.
*/
/*! \page install-mac.html
-\title Installing Qt on Mac OS X
+\title Installing Qt for Mac OS X
\ingroup installation
\brief How to install Qt on Mac OS X.
\previouspage Installation
@@ -392,10 +392,10 @@ must be run as root.
*/
/*! \page install-wince.html
-\title Installing Qt on Windows CE
+\title Installing Qt for Windows CE
\ingroup installation
\ingroup qtce
-\brief How to install Qt on Windows CE.
+\brief How to install Qt for Windows CE.
\previouspage Installation
\tableofcontents
@@ -492,9 +492,9 @@ in the \l{Qt for Windows CE Requirements} document.
*/
/*! \page install-Symbian-installer.html
-\title Installing Qt on the Symbian platform from a Binary Package
+\title Installing Qt for the Symbian platform from a Binary Package
\ingroup qtsymbian
-\brief How to install Qt on the Symbian platform from a binary package.
+\brief How to install Qt for the Symbian platform from a binary package.
\previouspage Installation
\tableofcontents
@@ -551,10 +551,10 @@ Symbian platform,
*/
/*! \page install-Symbian.html
-\title Installing Qt on the Symbian platform
+\title Installing Qt for the Symbian platform
\ingroup installation
\ingroup qtsymbian
-\brief How to install Qt on the Symbian platform.
+\brief How to install Qt for the Symbian platform.
\previouspage Installation
\tableofcontents
@@ -563,7 +563,7 @@ in the \l{Qt for the Symbian platform Requirements} document.
This document describes how to install and configure Qt for
the Symbian platform from scratch. If you are using pre-built binaries, follow
-the instructions given in the \l{Installing Qt on the Symbian platform from a
+the instructions given in the \l{Installing Qt for the Symbian platform from a
Binary Package} document.
\section1 Step 1: Set Up the Development Environment
@@ -685,10 +685,10 @@ Binary Package} document.
*/
/*! \page install-Symbian-linux.html
-\title Installing Qt on the Symbian platform using Linux (experimental)
+\title Installing Qt for the Symbian platform using Linux (experimental)
\ingroup installation
\ingroup qtsymbian
-\brief How to install Qt on the Symbian platform using Linux.
+\brief How to install Qt for the Symbian platform using Linux.
\previouspage Installation
\tableofcontents
@@ -697,187 +697,224 @@ the Symbian platform from scratch, using Linux as the build host.
Qt for Symbian binaries can be downloaded directly so development of
applications using Qt for Symbian can start right away.
-\section1 Step 1: Setup the development environment
+\section1 Step 1: Setup the Development Environment
+
+Qt for the Symbian platform has some requirements on the development
+platform. The Symbian SDK for Linux as well as a cross compiler for the ARM
+processor used on Symbian devices should be present on the development
+machine.
+
+See \l{http://qt.gitorious.org/qt/pages/QtCreatorSymbianLinux} for more details.
+
- Qt for the Symbian platform has some requirements on the development
- platform. The Symbian SDK for Linux as well as a cross compiler for the ARM
- processor used on Symbian devices should be present on the development
- machine.
-
- See \l{http://qt.gitorious.org/qt/pages/QtCreatorSymbianLinux} for more details.
\section1 Step 2: Unpack the Archive
- Uncompress the \l{http://qt.nokia.com/downloads}{downloaded} source package into the
- directory you want Qt installed, e.g. \c{/home/user/qt/%VERSION%}.
+Uncompress the \l{http://qt.nokia.com/downloads}{downloaded} source package into the
+directory you want Qt installed, e.g. \c{/home/user/qt/%VERSION%}.
+
\section1 Step 3: Set the Environment Variables
- In order to build and use Qt, the \c PATH environment variable needs
- to be extended to fine Qt tools and also to find the Symbian platform tools:
+In order to build and use Qt, the \c PATH environment variable needs
+to be extended to fine Qt tools and also to find the Symbian platform tools:
- First you need to set the \c EPOCROOT environment variable to point to the
- location of your S60 SDK:
+First you need to set the \c EPOCROOT environment variable to point to the
+location of your S60 SDK:
\snippet doc/src/snippets/code/doc_src_installation.qdoc 36
- Then you can update the PATH variable;
+Then you can update the PATH variable;
+
+\snippet doc/src/snippets/code/doc_src_installation.qdoc 37
- \snippet doc/src/snippets/code/doc_src_installation.qdoc 37
\section1 Step 4: Configure Qt
- To configure Qt for the Symbian platform, do:
+To configure Qt for the Symbian platform, do:
\snippet doc/src/snippets/code/doc_src_installation.qdoc 38
- to build the libraries using RVCT or
+
+to build the libraries using RVCT or
\snippet doc/src/snippets/code/doc_src_installation.qdoc 39
- to build the libraries using GCCE.
+
+to build the libraries using GCCE.
+
\section1 Step 5: Build Qt
- To build Qt for the device, type:
+To build Qt for the device, type:
\snippet doc/src/snippets/code/doc_src_installation.qdoc 40
- Congratulations, Qt is now ready to use.
+Congratulations, Qt is now ready to use.
-\section1 Step 6: Building Qt packages for the Device
- To run any application or demo on a real device, you need to install it
- on the device. To do this you first have to create a a package for the
- device, containing the libraries:
+\section1 Step 6: Building Qt Packages for the Device
- \bold{Building a Qt package without a certificate}
+To run any application or demo on a real device, you need to install it
+on the device. To do this you first have to create a a package for the
+device, containing the libraries:
- If you have no certificate, build a self signed Qt:
+\bold{Building a Qt package without a certificate}
- \snippet doc/src/snippets/code/doc_src_installation.qdoc 41
+If you have no certificate, build a self signed Qt:
- The Qt libraries are built with "All -Tcb" capability, so that
- they can support all types of applications. However, these
- capabilities are automatically lowered if you make a self-signed
- package.
+\snippet doc/src/snippets/code/doc_src_installation.qdoc 41
- \bold{Building a Qt package with a Symbian developer certificate}
+The Qt libraries are built with "All -Tcb" capability, so that
+they can support all types of applications. However, these
+capabilities are automatically lowered if you make a self-signed
+package.
- If you have a symbian-signed developer certificate, specify the
- capabilities you can sign for, for example:
+\bold{Building a Qt package with a Symbian developer certificate}
- \snippet doc/src/snippets/code/doc_src_installation.qdoc 42
-
- \section2 Installing Qt packages to the device.
+If you have a Symbian-signed developer certificate, specify the
+capabilities you can sign for, for example:
- It is possible to install packages to a phone in Linux by putting
- the package on the phone memory card and then installing manually
- from the phone menu. However, this is tedious and will not work
- on phones without a memory card, so the method recommended by Qt is
- to use the App TRK tool.
+\snippet doc/src/snippets/code/doc_src_installation.qdoc 42
- \section3 Obtaining the App TRK package.
+\section2 Installing Qt Packages to the Device.
- Download the package from the following location.
+It is possible to install packages to a phone in Linux by putting
+the package on the phone memory card and then installing manually
+from the phone menu. However, this is tedious and will not work
+on phones without a memory card, so the method recommended by Qt is
+to use the App TRK tool.
- \list
- \o \l{http://tools.ext.nokia.com/trk/}{Application TRK}.
- Choose the correct installation package based on the
- S60 version of your device
- (\c{S60_<S60-version>_app_trk_<TRK-version>.sisx}).
- \endlist
+\section3 Obtaining the App TRK package.
- This package currently has to be installed by putting the
- package on the memory card and installing from the phone
- menu, or using a Windows PC for doing the install. However,
- the installation only has to be done once.
+Download the package from the following location.
- \section3 Configuring App TRK on the phone.
+\list
+\o \l{http://tools.ext.nokia.com/trk/}{Application TRK}.
+ Choose the correct installation package based on the
+ S60 version of your device
+ (\c{S60_<S60-version>_app_trk_<TRK-version>.sisx}).
+\endlist
- When App TRK is installed, connect the phone to the PC using
- the USB cable. Select "PCSuite" as connection type. Then run
- App TRK on the phone, and make sure that the connection type is
- USB. This can be changed under
- the \c Settings menu entry. If necessary, choose \c Connect
- from the menu.
+This package currently has to be installed by putting the
+package on the memory card and installing from the phone
+menu, or using a Windows PC for doing the install. However,
+the installation only has to be done once.
- \section3 Configuring the USB serial driver on the Linux system.
+\section3 Configuring App TRK on the Phone
- On Linux, phone should appear as the \c /dev/ttyUSB1 device,
- however if you are running an old kernel, you may need to
- force the USB module to be loaded correctly before the device
- will appear:
+When App TRK is installed, connect the phone to the PC using
+the USB cable. Select "PCSuite" as connection type. Then run
+App TRK on the phone, and make sure that the connection type is
+USB. This can be changed under the \c Settings menu entry.
+If necessary, choose \c Connect from the menu.
- \snippet doc/src/snippets/code/doc_src_installation.qdoc 43
+\section3 Configuring the USB Serial Driver on the Linux System
- Note the identifier on the line where your Symbian device
- appears. Then execute the following, using the first and
- second part of the identifier in place of \c XXX,
- respectively.
+On Linux, phone should appear as the \c /dev/ttyUSB1 device,
+however if you are running an old kernel, you may need to
+force the USB module to be loaded correctly before the device
+will appear:
- \snippet doc/src/snippets/code/doc_src_installation.qdoc 44
+\snippet doc/src/snippets/code/doc_src_installation.qdoc 43
- The \c rmmod step may fail if the module is not already
- loaded, but that is harmless.
+Note the identifier on the line where your Symbian device
+appears. Then execute the following, using the first and
+second part of the identifier in place of \c XXX,
+respectively.
- \section3 Building the \c runonphone tool.
+\snippet doc/src/snippets/code/doc_src_installation.qdoc 44
- Note that building the \c runonphone tool requires a separate
- installation of Qt for Linux. If there is a version of Qt
- installed by your distribution's package mechanism, that that
- should do fine. Some distributions separate the libraries from
- the development setup which includes qmake. Make sure you have
- both installed.
+The \c rmmod step may fail if the module is not already
+loaded, but that is harmless.
- First make sure that the \c qmake you use is taken from the
- Linux installation of Qt. The easiest way to make sure of this
- is to open a new shell and run the following command:
+\section3 Building the runonphone Tool.
- \snippet doc/src/snippets/code/doc_src_installation.qdoc 45
+Note that building the \c runonphone tool requires a separate
+installation of Qt for Linux. If there is a version of Qt
+installed by your distribution's package mechanism, that that
+should do fine. Some distributions separate the libraries from
+the development setup which includes \c qmake. Make sure you
+have both installed.
- \c qmake will tell you where it is installed.
+You will also need the \l{libusb} libraries and header files
+installed. Usually, installing a development package such as
+\c{libusb-dev} will ensure that you have all the necessary
+dependencies installed.
- Copy the \c{%QTDIR%/tools/runonphone} folder to a place outside
- of the Qt tree. Then go to the folder in a shell and build it:
+First, make sure that the \c qmake you use is taken from the
+Linux installation of Qt. The easiest way to make sure of this
+is to open a new shell and run the following command:
- \snippet doc/src/snippets/code/doc_src_installation.qdoc 46
+\snippet doc/src/snippets/code/doc_src_installation.qdoc 45
- Copy the resulting executable to a folder which is in your
- \c PATH environment variable.
+\c qmake will tell you where it is installed.
- \section3 Installing the built package onto the phone.
+Copy the \c{%QTDIR%/tools/runonphone} folder to a place outside
+of the Qt tree. Then go to the folder in a shell and build it:
- Return to the root of the Qt tree configured for Symbian. Then
- install the Qt libraries by running the following:
+\snippet doc/src/snippets/code/doc_src_installation.qdoc 46
- \snippet doc/src/snippets/code/doc_src_installation.qdoc 47
+Copy the resulting executable to a folder which is in your
+\c PATH environment variable.
- \note If the installation fails, please make sure that there is
- no previously installed version of Qt on the phone.
+\section3 Installing the Built Package onto the Phone
- Qt requires some dependent packages to be installed on the device,
- they are shipped in the Symbian SDK and can be installed using the
- runonphone tool as well.
- The packages can be found in the EPOCROOT at the following locations;
+\note Before starting, please make sure that there is no previously
+installed version of Qt on the phone.
- \snippet doc/src/snippets/code/doc_src_installation.qdoc 50
+Return to the root of the Qt tree configured for Symbian. Then
+install the Qt libraries by running the following:
-\section1 Running Qt demos
+\snippet doc/src/snippets/code/doc_src_installation.qdoc 47
- We've included a subset of the Qt demos in this package for you
- to try out. An excellent starting point is the "fluidlauncher"
- demo.
+You may need to supply the path of the serial device file using
+the \c{-p} option:
- Install and run the demo by using the following commands:
+\snippet doc/src/snippets/code/doc_src_installation.qdoc runonphone with device file path
- \snippet doc/src/snippets/code/doc_src_installation.qdoc 48
+If the installation fails, please make sure that there is
+no previously installed version of Qt on the phone.
- The same command can be used for other applications:
+Qt requires some dependent packages to be installed on the device,
+they are shipped in the Symbian SDK and can be installed using the
+runonphone tool as well.
+The packages can be found in the EPOCROOT at the following locations;
- \snippet doc/src/snippets/code/doc_src_installation.qdoc 49
+\snippet doc/src/snippets/code/doc_src_installation.qdoc 50
- For more information about building and running Qt programs on the
- Symbian platform, see \l{The Symbian platform - Introduction to Qt}.
+It is also possible to install packages onto the device using the
+\c runonphone build rule that \c qmake automatically generates for
+each Qt project. Options can be supplied to the \c runonphone tool
+that is invoked begind the scenes:
- We hope you will enjoy using Qt.
+\snippet doc/src/snippets/code/doc_src_installation.qdoc make runonphone with options
+
+If you are running \c runonphone or invoking the \c runonphone
+build rule often, it is possible to set the \c QT_RUN_ON_PHONE_OPTIONS
+environment variable with the options you normally use:
+
+\snippet doc/src/snippets/code/doc_src_installation.qdoc make runonphone with preset environment variable
+
+This makes installation of packages onto a device easier and less
+error-prone.
+
+
+\section1 Running Qt Demos
+
+We've included a subset of the Qt demos in this package for you
+to try out. An excellent starting point is the "fluidlauncher"
+demo.
+
+Install and run the demo by using the following commands:
+
+\snippet doc/src/snippets/code/doc_src_installation.qdoc 48
+
+The same command can be used for other applications:
+
+\snippet doc/src/snippets/code/doc_src_installation.qdoc 49
+
+For more information about building and running Qt programs on the
+Symbian platform, see \l{The Symbian platform - Introduction to Qt}.
+
+We hope you will enjoy using Qt.
*/
/*!
diff --git a/doc/src/getting-started/known-issues.qdoc b/doc/src/getting-started/known-issues.qdoc
index 942c41d..d0044f3 100644
--- a/doc/src/getting-started/known-issues.qdoc
+++ b/doc/src/getting-started/known-issues.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/getting-started/tutorials.qdoc b/doc/src/getting-started/tutorials.qdoc
index 46a5808..2c5ebaf 100644
--- a/doc/src/getting-started/tutorials.qdoc
+++ b/doc/src/getting-started/tutorials.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/howtos/HWacceleration.qdoc b/doc/src/howtos/HWacceleration.qdoc
index 1932b6d..3eb1e74 100644
--- a/doc/src/howtos/HWacceleration.qdoc
+++ b/doc/src/howtos/HWacceleration.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/howtos/accelerators.qdoc b/doc/src/howtos/accelerators.qdoc
index 2aae38a..68d2a85 100644
--- a/doc/src/howtos/accelerators.qdoc
+++ b/doc/src/howtos/accelerators.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/howtos/appicon.qdoc b/doc/src/howtos/appicon.qdoc
index 55524d8..9b9fedc 100644
--- a/doc/src/howtos/appicon.qdoc
+++ b/doc/src/howtos/appicon.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/howtos/custom-types.qdoc b/doc/src/howtos/custom-types.qdoc
index 9910f2e..086a1d7 100644
--- a/doc/src/howtos/custom-types.qdoc
+++ b/doc/src/howtos/custom-types.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/howtos/exceptionsafety.qdoc b/doc/src/howtos/exceptionsafety.qdoc
index bf85c2a..49d99de 100644
--- a/doc/src/howtos/exceptionsafety.qdoc
+++ b/doc/src/howtos/exceptionsafety.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/howtos/guibooks.qdoc b/doc/src/howtos/guibooks.qdoc
index 515f81f..d74f08f 100644
--- a/doc/src/howtos/guibooks.qdoc
+++ b/doc/src/howtos/guibooks.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/howtos/openvg.qdoc b/doc/src/howtos/openvg.qdoc
index dc7a34a..de3c1e1 100644
--- a/doc/src/howtos/openvg.qdoc
+++ b/doc/src/howtos/openvg.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/howtos/qtdesigner.qdoc b/doc/src/howtos/qtdesigner.qdoc
index 7fd008f..ab7e26b 100644
--- a/doc/src/howtos/qtdesigner.qdoc
+++ b/doc/src/howtos/qtdesigner.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/howtos/restoring-geometry.qdoc b/doc/src/howtos/restoring-geometry.qdoc
index 0f82182..c6b7e37 100644
--- a/doc/src/howtos/restoring-geometry.qdoc
+++ b/doc/src/howtos/restoring-geometry.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/howtos/session.qdoc b/doc/src/howtos/session.qdoc
index b48a591..7980cde 100644
--- a/doc/src/howtos/session.qdoc
+++ b/doc/src/howtos/session.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/howtos/sharedlibrary.qdoc b/doc/src/howtos/sharedlibrary.qdoc
index 6980a41..04364eb 100644
--- a/doc/src/howtos/sharedlibrary.qdoc
+++ b/doc/src/howtos/sharedlibrary.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/howtos/timers.qdoc b/doc/src/howtos/timers.qdoc
index 585e53b..22270c1 100644
--- a/doc/src/howtos/timers.qdoc
+++ b/doc/src/howtos/timers.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/howtos/unix-signal-handlers.qdoc b/doc/src/howtos/unix-signal-handlers.qdoc
index 2893439..ca34bfb 100644
--- a/doc/src/howtos/unix-signal-handlers.qdoc
+++ b/doc/src/howtos/unix-signal-handlers.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -78,7 +78,7 @@
In your Unix signal handlers, you write a byte to the \e write end
of a socket pair and return. This will cause the corresponding
QSocketNotifier to emit its activated() signal, which will in turn
- cause the appropriate Qt slott function to run.
+ cause the appropriate Qt slot function to run.
\snippet doc/src/snippets/code/doc_src_unix-signal-handlers.qdoc 3
diff --git a/doc/src/images/webkit-imageanalyzer-complete.png b/doc/src/images/webkit-imageanalyzer-complete.png
new file mode 100644
index 0000000..47c0ee1
--- /dev/null
+++ b/doc/src/images/webkit-imageanalyzer-complete.png
Binary files differ
diff --git a/doc/src/images/webkit-imageanalyzer-progress.png b/doc/src/images/webkit-imageanalyzer-progress.png
new file mode 100644
index 0000000..5bab890
--- /dev/null
+++ b/doc/src/images/webkit-imageanalyzer-progress.png
Binary files differ
diff --git a/doc/src/images/webkit-imageanalyzer-screenshot.png b/doc/src/images/webkit-imageanalyzer-screenshot.png
new file mode 100644
index 0000000..c96371a
--- /dev/null
+++ b/doc/src/images/webkit-imageanalyzer-screenshot.png
Binary files differ
diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc
index 77856ec..57fc18a 100644
--- a/doc/src/index.qdoc
+++ b/doc/src/index.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -45,7 +45,7 @@
<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="all-examples.html">Examples</a></li>
- <li><a href="qt4-7-intro.html">Whats new in Qt 4.7</a></li>
+ <li><a href="qt4-7-intro.html">What's new in Qt 4.7</a></li>
</ul>
</div>
</div>
diff --git a/doc/src/internationalization/i18n.qdoc b/doc/src/internationalization/i18n.qdoc
index 8b6e337..c58cc91 100644
--- a/doc/src/internationalization/i18n.qdoc
+++ b/doc/src/internationalization/i18n.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/internationalization/linguist-manual.qdoc b/doc/src/internationalization/linguist-manual.qdoc
index fa992af..57b98b8 100644
--- a/doc/src/internationalization/linguist-manual.qdoc
+++ b/doc/src/internationalization/linguist-manual.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/ja_JP/development/designer-manual.qdoc b/doc/src/ja_JP/development/designer-manual.qdoc
index e90e056..f71da3c 100644
--- a/doc/src/ja_JP/development/designer-manual.qdoc
+++ b/doc/src/ja_JP/development/designer-manual.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/ja_JP/development/qmake-manual.qdoc b/doc/src/ja_JP/development/qmake-manual.qdoc
index 217814b..699fa93 100644
--- a/doc/src/ja_JP/development/qmake-manual.qdoc
+++ b/doc/src/ja_JP/development/qmake-manual.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/ja_JP/development/qtestlib.qdoc b/doc/src/ja_JP/development/qtestlib.qdoc
index b7bb066..f0ff60d 100644
--- a/doc/src/ja_JP/development/qtestlib.qdoc
+++ b/doc/src/ja_JP/development/qtestlib.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/ja_JP/examples/arrowpad.qdoc b/doc/src/ja_JP/examples/arrowpad.qdoc
index bbeb7fe..3cb798b 100644
--- a/doc/src/ja_JP/examples/arrowpad.qdoc
+++ b/doc/src/ja_JP/examples/arrowpad.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/ja_JP/examples/hellotr.qdoc b/doc/src/ja_JP/examples/hellotr.qdoc
index 8c33584..b0ed8e8 100644
--- a/doc/src/ja_JP/examples/hellotr.qdoc
+++ b/doc/src/ja_JP/examples/hellotr.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/ja_JP/examples/trollprint.qdoc b/doc/src/ja_JP/examples/trollprint.qdoc
index 66d9fa3..b0397a3 100644
--- a/doc/src/ja_JP/examples/trollprint.qdoc
+++ b/doc/src/ja_JP/examples/trollprint.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/ja_JP/getting-started/tutorials.qdoc b/doc/src/ja_JP/getting-started/tutorials.qdoc
index cc4fb13..fc461ba 100644
--- a/doc/src/ja_JP/getting-started/tutorials.qdoc
+++ b/doc/src/ja_JP/getting-started/tutorials.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/ja_JP/tutorials/addressbook.qdoc b/doc/src/ja_JP/tutorials/addressbook.qdoc
index 238ecb1..522aeb2 100644
--- a/doc/src/ja_JP/tutorials/addressbook.qdoc
+++ b/doc/src/ja_JP/tutorials/addressbook.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/ja_JP/tutorials/widgets-tutorial.qdoc b/doc/src/ja_JP/tutorials/widgets-tutorial.qdoc
index 42f6687..a5c3e18 100644
--- a/doc/src/ja_JP/tutorials/widgets-tutorial.qdoc
+++ b/doc/src/ja_JP/tutorials/widgets-tutorial.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/legal/3rdparty.qdoc b/doc/src/legal/3rdparty.qdoc
index db6ff7c..8b3d5f2 100644
--- a/doc/src/legal/3rdparty.qdoc
+++ b/doc/src/legal/3rdparty.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/legal/commercialeditions.qdoc b/doc/src/legal/commercialeditions.qdoc
index 8a2583d..c3a5d60 100644
--- a/doc/src/legal/commercialeditions.qdoc
+++ b/doc/src/legal/commercialeditions.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/legal/editions.qdoc b/doc/src/legal/editions.qdoc
index 60a8736..7be33b3 100644
--- a/doc/src/legal/editions.qdoc
+++ b/doc/src/legal/editions.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/legal/gpl.qdoc b/doc/src/legal/gpl.qdoc
index 504b451..31a8855 100644
--- a/doc/src/legal/gpl.qdoc
+++ b/doc/src/legal/gpl.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/legal/licenses.qdoc b/doc/src/legal/licenses.qdoc
index 12aca6b..631ff40 100644
--- a/doc/src/legal/licenses.qdoc
+++ b/doc/src/legal/licenses.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/legal/opensourceedition.qdoc b/doc/src/legal/opensourceedition.qdoc
index c02fde7..602e6d3 100644
--- a/doc/src/legal/opensourceedition.qdoc
+++ b/doc/src/legal/opensourceedition.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -46,7 +46,7 @@
that are compatible with these free software licenses.
Additionally, the \l{Qt Examples}{examples} included with Qt are provided under
- the terms of the \l{BSD License}.
+ the terms of the \l{New and Modified BSD Licenses}{Modified BSD License}.
The support of open source with the Open Source Versions of Qt has enabled large
successful software projects like KDE to thrive, with thousands of developers
diff --git a/doc/src/legal/trademarks.qdoc b/doc/src/legal/trademarks.qdoc
index f6ffae1..3bf783f 100644
--- a/doc/src/legal/trademarks.qdoc
+++ b/doc/src/legal/trademarks.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -33,20 +33,20 @@
\brief Information about trademarks owned by Nokia and other organisations.
Nokia, the Nokia logo, Qt, and the Qt logo are trademarks of Nokia
-  Corporation and/or its subsidiaries in Finland and other countries.
+ Corporation and/or its subsidiaries in Finland and other countries.
\list
\o Intel, Intel Inside (logos), MMX and Pentium are \reg trademarks of
Intel Corporation in the United States, other countries, or both.
- \o Java and all Java-based trademarks are trademarks of Sun Microsystems,
- Inc. in the United States, other countries, or both.
+ \o Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+ Other names may be trademarks of their respective owners.
\o Linux is a \reg trademark of Linus Torvalds in the United States, other
countries or both.
\o Mac, Mac OS and Macintosh are \reg trademarks of Apple Computer, Inc.,
registered in the U.S. and other countries.
- \o Microsoft, Windows, Windows NT, XP, Visual Studio and the Windows logo
- are \reg trademarks of Microsoft Corporation in the United States, other
- countries, or both.
+ \o Microsoft, Windows, Windows NT, XP, Windows Vista, Visual Studio and the
+ Windows logo are \reg trademarks of Microsoft Corporation in the United
+ States, other countries, or both.
\o Motif is a registered trademark of The Open Group in the United States,
other countries, or both.
\o OpenGL is a \reg trademark of Silicon Graphics, Inc. in the United States
diff --git a/doc/src/modules.qdoc b/doc/src/modules.qdoc
index d3c33d9..f781f81 100644
--- a/doc/src/modules.qdoc
+++ b/doc/src/modules.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -665,6 +665,10 @@
\brief The QtHelp module provides classes for integrating
online documentation in applications.
+ The classes and tools supplied with Qt to enable developers to include
+ online help and documentation in their applications are described in
+ more detail in \l{The Qt Help Framework} overview document.
+
To include the definitions of the module's classes, use the
following directive:
diff --git a/doc/src/network-programming/bearermanagement.qdoc b/doc/src/network-programming/bearermanagement.qdoc
index bc016df..98de5bf 100644
--- a/doc/src/network-programming/bearermanagement.qdoc
+++ b/doc/src/network-programming/bearermanagement.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/network-programming/qtnetwork.qdoc b/doc/src/network-programming/qtnetwork.qdoc
index fce12a7..6fd58fe 100644
--- a/doc/src/network-programming/qtnetwork.qdoc
+++ b/doc/src/network-programming/qtnetwork.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/network-programming/ssl.qdoc b/doc/src/network-programming/ssl.qdoc
index 3586971..85ea7ef 100644
--- a/doc/src/network-programming/ssl.qdoc
+++ b/doc/src/network-programming/ssl.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/objectmodel/metaobjects.qdoc b/doc/src/objectmodel/metaobjects.qdoc
index 0597cd6..1fd3f52 100644
--- a/doc/src/objectmodel/metaobjects.qdoc
+++ b/doc/src/objectmodel/metaobjects.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/objectmodel/object.qdoc b/doc/src/objectmodel/object.qdoc
index 5bb39d6..95492e6 100644
--- a/doc/src/objectmodel/object.qdoc
+++ b/doc/src/objectmodel/object.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/objectmodel/objecttrees.qdoc b/doc/src/objectmodel/objecttrees.qdoc
index 3a4aef7..ef20694 100644
--- a/doc/src/objectmodel/objecttrees.qdoc
+++ b/doc/src/objectmodel/objecttrees.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/objectmodel/properties.qdoc b/doc/src/objectmodel/properties.qdoc
index 2cb7c04..c960366 100644
--- a/doc/src/objectmodel/properties.qdoc
+++ b/doc/src/objectmodel/properties.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/objectmodel/signalsandslots.qdoc b/doc/src/objectmodel/signalsandslots.qdoc
index c12ca78..01f42f6 100644
--- a/doc/src/objectmodel/signalsandslots.qdoc
+++ b/doc/src/objectmodel/signalsandslots.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/overviews.qdoc b/doc/src/overviews.qdoc
index 2dd44f6..b9bd3b4 100644
--- a/doc/src/overviews.qdoc
+++ b/doc/src/overviews.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -54,7 +54,7 @@
\brief The Qt components for constructing native look & feel desktop UI's.
These pages are about Qt's traditional set of GUI components for
- building both native look ^ feel and custom UI's for the desktop
+ building both native look & feel and custom UI's for the desktop
environment. Use \l{Qt Quick} for building UI's for mobile devices.
\generatelist {related}
diff --git a/doc/src/painting-and-printing/coordsys.qdoc b/doc/src/painting-and-printing/coordsys.qdoc
index 07ced35..0bae71b 100644
--- a/doc/src/painting-and-printing/coordsys.qdoc
+++ b/doc/src/painting-and-printing/coordsys.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/painting-and-printing/paintsystem.qdoc b/doc/src/painting-and-printing/paintsystem.qdoc
index deb9c8b..0aaca46 100644
--- a/doc/src/painting-and-printing/paintsystem.qdoc
+++ b/doc/src/painting-and-printing/paintsystem.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/painting-and-printing/printing.qdoc b/doc/src/painting-and-printing/printing.qdoc
index 97cd92f..6750864 100644
--- a/doc/src/painting-and-printing/printing.qdoc
+++ b/doc/src/painting-and-printing/printing.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/platforms/atomic-operations.qdoc b/doc/src/platforms/atomic-operations.qdoc
index 4d3499e..6a6dde2 100644
--- a/doc/src/platforms/atomic-operations.qdoc
+++ b/doc/src/platforms/atomic-operations.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/platforms/compiler-notes.qdoc b/doc/src/platforms/compiler-notes.qdoc
index bcf7cb4..fb534df 100644
--- a/doc/src/platforms/compiler-notes.qdoc
+++ b/doc/src/platforms/compiler-notes.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -31,273 +31,14 @@
\title Compiler Notes
\brief Information about the C++ compilers and tools used to build Qt.
- This page contains information about the C++ compilers and tools used
- to build Qt on various platforms.
+ This page used to contain information about the C++ compilers and tools
+ used to build Qt on various platforms. This information is now maintained
+ in the \l{Platform and Compiler Notes} for each platform.
- \tableofcontents
-
- Please refer to the \l{Platform Notes} for information on the platforms
- Qt is currently known to run on, and see the \l{Supported Platforms}
- page for information about the status of each platform.
+ Please refer to the \l{Supported Platforms} page for information about the
+ status of each platform.
If you have anything to add to this list or any of the platform or
compiler-specific pages, please submit it via the \l{Bug Report Form}
or through the \l{Public Qt Repository}.
-
- \section1 Supported Features
-
- Not all compilers used to build Qt are able to compile all modules. The following table
- shows the compiler support for five modules that are not uniformly available for all
- platforms and compilers.
-
- \table
- \header \o Compiler \o{5,1} Features
- \header \o \o Concurrent \o XmlPatterns \o WebKit(*) \o CLucene \o Phonon
- \row \o g++ 3.3 \o \o \bold{X} \o \o \bold{X} \o \bold{X}
- \row \o g++ 3.4 and up \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X}
- \row
- \row \o SunCC 5.5 \o \o \o \o \bold{X} \o \bold{X}
- \row
- \row \o aCC series 3 \o \o \o \o \bold{X} \o \bold{X}
- \row \o aCC series 6 \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X}
- \row \o xlC 6 \o \o \o \o \bold{X} \o \bold{X}
- \row \o Intel CC 10 \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X}
- \row
- \row \o MSVC 2003 \o \bold{X} \o \bold{X} \o \o \bold{X} \o \bold{X}
- \row \o MSVC 2005 and up \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X}
- \endtable
-
- * WebKit is only supported as a dynamically built library. Static linkage is not supported.
-
- \target GCC
- \section1 GCC
-
- \section2 GCC on Windows (MinGW)
-
- We have tested Qt with this compiler on Windows XP.
- The minimal version of MinGW supported is:
-
- \list
- \o GCC 3.4.2
- \o MinGW runtime 3.7
- \o win32api 3.2
- \o binutils 2.15.91
- \o mingw32-make 3.80.0-3
- \endlist
-
- \note For users of the MinGW binary package: This package is now
- based on MinGW 4.4. The installer no longer offers to download
- MinGW for you, but rather offers to use a version of MinGW that
- you already have installed on your machine. You just tell the
- installer which directory MinGW is installed in. If you don't
- already have MinGW 4.4 installed, you can download a .zip archive
- from our \l{ftp://ftp.trolltech.com/misc/MinGW-gcc440_1.zip} {ftp
- site}. This archive provides fixes to MinGW and support for
- missing API, See the _patches directory in the archive for
- details.
-
- \note A MinGW installation is only needed to build against the
- binary pacakge, not to run the pre-compiled binaries that are in
- the package.
-
- \section2 GCC 4.0.0
-
- The released package of the compiler has some bugs that lead to
- miscompilations. We recommend using GCC 4.0.1 or later, or to use
- a recent CVS snapshot of the GCC 4.0 branch. The version of GCC
- 4.0.0 that is shipped with Mac OS X 10.4 "Tiger" is known to work
- with Qt for Mac OS X.
-
- \section2 HP-UX
-
- The hpux-g++ platform is tested with GCC 3.4.4.
-
- \section2 Solaris
-
- Please use GCC 3.4.2 or later.
- Please not that WebKit is not supported for Solaris, regardless of which compiler is used.
-
- \section2 Mac OS X
-
- Please use the latest GCC 3.3 from Apple or a later version of GCC 3.
- The gcc 3.3 that is provided with Xcode 1.5 is known to generate bad code.
- Use the November 2004 GCC 3.3 updater \l{http://connect.apple.com}{available from Apple}.
-
- \section2 GCC 3.4.6 (Debian 3.4.6-5) on AMD64 (x86_64)
-
- This compiler is known to miscompile some parts of Qt when doing a
- release build. There are several workarounds:
-
- \list 1
- \o Use a debug build instead.
- \o For each miscompilation encountered, recompile the file, removing the -O2 option.
- \o Add -fno-gcse to the QMAKE_CXXFLAGS_RELEASE.
- \endlist
-
- \section1 HP ANSI C++ (aCC)
-
- The hpux-acc-32 and hpux-acc-64 platforms are tested with aCC A.03.57. The
- hpuxi-acc-32 and hpuxi-acc-64 platforms are tested with aCC A.06.10.
-
- \section1 Intel C++ Compiler
-
- Qt supports the Intel C++ compiler on both Windows and Linux.
- However, there are a few issues on Linux (see the following
- section).
-
- \section2 Intel C++ Compiler for Linux
-
- Nokia currently tests the following compilers:
-
- \list
-
- \o Intel(R) C++ Compiler for applications running on IA-32,
- Version 10.1 Build 20080602 Package ID: l_cc_p_10.1.017
-
- \o Intel(R) C++ Compiler for applications running on Intel(R) 64,
- Version 10.1 Build 20080602 Package ID: l_cc_p_10.1.017
-
- \endlist
-
- We do not currently test the IA-64 (Itanium) compiler.
-
- \section2 Known Issues with Intel C++ Compiler for Linux
-
- \list
-
- \o Precompiled header support does not work in version 10.0.025
- and older. For these compilers, you should configure Qt with
- -no-pch. Precompiled header support works properly in version
- 10.0.026 and later.
- \o Version 10.0.026 for Intel 64 is known to miscompile qmake when
- building in release mode. For now, configure Qt with
- -debug. Version 10.1.008 and later can compile qmake in release
- mode.
- \o Versions 10.1.008 to 10.1.015 for both IA-32 and Intel 64 are
- known crash with "(0): internal error: 0_47021" when compiling
- QtXmlPatterns, QtWebKit, and Designer in release mode. Version
- 10.1.017 compiles these modules correctly in release mode.
- \endlist
-
- \section2 Intel C++ Compiler (Windows, Altix)
-
- Qt 4 has been tested successfully with:
-
- \list
- \o Windows - Intel(R) C++ Compiler for 32-bit applications,
- Version 9.1.040.
- \o Altix - Intel(R) C++ Itanium(R) Compiler for Itanium(R)-based
- applications Version 8.1 Build 20050406 Package ID: l_cc_pc_8.1.030
- \endlist
-
- We currently only test the Intel compiler on 32-bit Windows versions.
-
- \section1 MIPSpro (IRIX)
-
- \bold{IRIX is an unsupported platform. See the \l{Supported Platforms} page
- and Qt's Software's online \l{Platform Support Policy} page for details.}
-
- Qt 4.4.x requires MIPSpro version 7.4.2m.
-
- Note that MIPSpro version 7.4.4m is currently not supported, since it has
- introduced a number of problems that have not yet been resolved.
- We recommend using 7.4.2m for Qt development. However, please note the
- unsupported status of this platform.
-
- \target Sun Studio
- \section1 Forte Developer / Sun Studio (Solaris)
-
- \section2 Sun Studio
-
- Qt is tested using Sun Studio 12 (Sun CC 5.9). Go to
- \l{Sun Studio Patches} page on Sun's Web site to download
- the latest patches for your Sun compiler.
-
- Please note that Qt 4.6 is stricter in its STL requirements and
- that the default STL implementation used by Sun CC does not pass
- those requirements. This does not affect binary compatibility and
- you can continue to use STL in your own code, but Qt's
- STL-compatibility functions will be disabled.
-
- Sun CC ships with a secondary STL implementation (called stlport4)
- which is standards-compliant and can be used by Qt. You can enable
- it by passing the -library=stlport4 option to the compiler. Note
- that this does not affect Qt's binary compatibility, but it may
- affect that of other libraries and programs that use STL.
-
- \section2 Sun WorkShop 5.0
-
- Sun WorkShop 5.0 is not supported with Qt 4.
-
- \section1 Visual Studio (Windows)
-
- We do most of our Windows development on Windows XP, using Microsoft
- Visual Studio .NET 2005 and Visual Studio 2008 (both the 32- and 64-bit
- versions).
-
- Qt works with the Standard Edition, the Professional Edition and Team
- System Edition of Visual Studio 2005.
-
- In order to use Qt with the Visual Studio 2005/2008 Express Edition you need
- to download and install the platform SDK. Due to limitations in the
- Express Edition it is not possible for us to install the Qt Visual
- Studio Integration. You will need to use our command line tools to
- build Qt applications with this edition.
-
- The Visual C++ Linker doesn't understand filenames with spaces (as in
- \c{C:\Program files\Qt\}) so you will have to move it to another place,
- or explicitly set the path yourself; for example:
-
- \snippet doc/src/snippets/code/doc_src_compiler-notes.qdoc 0
-
- If you are experiencing strange problems with using special flags that
- modify the alignment of structure and union members (such as \c{/Zp2})
- then you will need to recompile Qt with the flags set for the
- application as well.
-
- If you're using Visual Studio .NET (2002) Standard Edition, you should be
- using the Qt binary package provided, and not the source package.
- As the Standard Edition does not optimize compiled code, your compiled
- version of Qt would perform suboptimally with respect to speed.
-
- With Visual Studio 2005 Service Pack 1 a bug was introduced which
- causes Qt not to compile, this has been fixed with a hotfix available
- from Microsoft. See this
- \l{http://qt.nokia.com/developer/faqs/faq.2006-12-18.3281869860}{Knowledge Base entry}
- for more information.
-
- There currently is a problem when compiling Qt with Visual Studio 2010 for 64-bit.
- Its optimizer causes trouble and generates code that crashes for the release builds.
- To avoid the crashes, You need to apply the hotfix in the following article
- http://support.microsoft.com/kb/2280741.
-
- \section1 IBM xlC (AIX)
-
- The makeC++SharedLib utility must be in your PATH and be up to date to
- build shared libraries. From IBM's
- \l{http://www.redbooks.ibm.com/abstracts/sg245674.html}{C and C++ Application Development on AIX}
- Redbook:
-
- \list
- \o "The second step is to use the makeC++SharedLib command to create the
- shared object. The command has many optional arguments, but in its
- simplest form, can be used as follows:"
- \snippet doc/src/snippets/code/doc_src_compiler-notes.qdoc 1
- \o "The full path name to the command is not required; however, to avoid
- this, you will have to add the directory in which it is located to
- your PATH environment variable. The command is located in the
- /usr/vacpp/bin directory with the VisualAge C++ Professional for AIX,
- Version 5 compiler."
- \endlist
-
- \section2 VisualAge C++ for AIX, Version 6.0
-
- Make sure you have the
- \l{http://www-1.ibm.com/support/search.wss?rs=32&amp;tc=SSEP5D&amp;dc=D400}{latest upgrades}
- installed.
-
- \section2 GCCE (Symbian)
-
- GCCE cannot be used to compile Qt libaries for the Symbian platform, but GCCE is supported
- when compiling Qt applications for Symbian platform.
*/
diff --git a/doc/src/platforms/emb-HwAcc-LinuxEmbedded.qdoc b/doc/src/platforms/emb-HwAcc-LinuxEmbedded.qdoc
index b9dc151..2cde4ba 100644
--- a/doc/src/platforms/emb-HwAcc-LinuxEmbedded.qdoc
+++ b/doc/src/platforms/emb-HwAcc-LinuxEmbedded.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/platforms/emb-HwAcc-WinCE.qdoc b/doc/src/platforms/emb-HwAcc-WinCE.qdoc
index 00f85a1..5dda1c3 100644
--- a/doc/src/platforms/emb-HwAcc-WinCE.qdoc
+++ b/doc/src/platforms/emb-HwAcc-WinCE.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/platforms/emb-accel.qdoc b/doc/src/platforms/emb-accel.qdoc
index 8d7f029..c8854f7 100644
--- a/doc/src/platforms/emb-accel.qdoc
+++ b/doc/src/platforms/emb-accel.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/platforms/emb-architecture.qdoc b/doc/src/platforms/emb-architecture.qdoc
index f75beee..dcaa319 100644
--- a/doc/src/platforms/emb-architecture.qdoc
+++ b/doc/src/platforms/emb-architecture.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/platforms/emb-charinput.qdoc b/doc/src/platforms/emb-charinput.qdoc
index 5a94267..03cc340 100644
--- a/doc/src/platforms/emb-charinput.qdoc
+++ b/doc/src/platforms/emb-charinput.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/platforms/emb-crosscompiling.qdoc b/doc/src/platforms/emb-crosscompiling.qdoc
index 13ccb65..f28ea7a 100644
--- a/doc/src/platforms/emb-crosscompiling.qdoc
+++ b/doc/src/platforms/emb-crosscompiling.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/platforms/emb-deployment.qdoc b/doc/src/platforms/emb-deployment.qdoc
index 473cafc..9a36097 100644
--- a/doc/src/platforms/emb-deployment.qdoc
+++ b/doc/src/platforms/emb-deployment.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -58,7 +58,7 @@
directory relative to the path set using the \c -prefix parameter
when running the \c configure script; ensure that this is a
sensible path in the target device environment. See the
- \l {Installing Qt on Embedded Linux#Step 3: Building the
+ \l {Installing Qt for Embedded Linux#Step 3: Building the
Library}{installation} documentation for more details.
\section1 Environment Variables
diff --git a/doc/src/platforms/emb-differences.qdoc b/doc/src/platforms/emb-differences.qdoc
index 642738e..e9aa0eb 100644
--- a/doc/src/platforms/emb-differences.qdoc
+++ b/doc/src/platforms/emb-differences.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/platforms/emb-directfb-EmbLinux.qdoc b/doc/src/platforms/emb-directfb-EmbLinux.qdoc
index f416819..dbe6c14 100644
--- a/doc/src/platforms/emb-directfb-EmbLinux.qdoc
+++ b/doc/src/platforms/emb-directfb-EmbLinux.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/platforms/emb-displaymanagement.qdoc b/doc/src/platforms/emb-displaymanagement.qdoc
index 6ed2c49..bba594f 100644
--- a/doc/src/platforms/emb-displaymanagement.qdoc
+++ b/doc/src/platforms/emb-displaymanagement.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/platforms/emb-envvars.qdoc b/doc/src/platforms/emb-envvars.qdoc
index 2421da9..1d109b4 100644
--- a/doc/src/platforms/emb-envvars.qdoc
+++ b/doc/src/platforms/emb-envvars.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/platforms/emb-features.qdoc b/doc/src/platforms/emb-features.qdoc
index 1e7b585..a362867 100644
--- a/doc/src/platforms/emb-features.qdoc
+++ b/doc/src/platforms/emb-features.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/platforms/emb-fonts.qdoc b/doc/src/platforms/emb-fonts.qdoc
index f7fed13..04aa4e4 100644
--- a/doc/src/platforms/emb-fonts.qdoc
+++ b/doc/src/platforms/emb-fonts.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/platforms/emb-framebuffer-howto.qdoc b/doc/src/platforms/emb-framebuffer-howto.qdoc
index ab00b88..f8b7ff9 100644
--- a/doc/src/platforms/emb-framebuffer-howto.qdoc
+++ b/doc/src/platforms/emb-framebuffer-howto.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/platforms/emb-hardwareacceleration.qdocinc b/doc/src/platforms/emb-hardwareacceleration.qdocinc
index fb00e09..83ecef5 100644
--- a/doc/src/platforms/emb-hardwareacceleration.qdocinc
+++ b/doc/src/platforms/emb-hardwareacceleration.qdocinc
@@ -1,140 +1,140 @@
- \section1 Hardware Acceleration
-
- When designing applications for embedded devices there is often a
- compromise between graphics effects and performance. On most
- devices, you cannot have both simply because the hardware needed
- for such operations just is not there. With a growing number of
- devices that use hardware dedicated to graphics operations there is
- less need to compromise.
-
- In addition to enabling dynamic graphics effects, there are two
- other benefits to using graphics acceleration. One is that graphics
- acceleration hardware is more power efficient than using the CPU.
- The reason for this is that the CPU might require a clock speed
- that is up to 20 times higher than the GPU, achieving the same
- results. E.g. a typical hardware accelerated mobile graphics unit
- can rasterize one or two bilinear texture fetches in one cycle,
- while a software implementation takes easily more than 20 cycles.
- Typical \e {System-on-a-chip} (SoC) graphics hardware generally have
- a much lower clock speed and memory bandwidth, and different level
- of acceleration than desktop GPUs. One example is that many GPUs
- leave out transformation and lighting from the graphics pipeline
- and only implements rasterization.
-
- Another reason to use a GPU is to offload the main CPU, either for
- power saving or to perform other operations in parallel. Often
- drawing speed with a GPU is not that much faster than a CPU but
- the clear benefit of using the GPU is to free up the CPU to perform
- other tasks which can be used to create a more responsive use
- experience.
-
- The key to writing good applications for devices is therefore to
- limit the wow factor down to what the target hardware can handle,
- and to take advantage of any graphics dedicated hardware. Qt
- provides several ways to both render advanced effects on the screen
- and speed up your application using hardware accelerated graphics.
-
- \tableofcontents
-
- \section2 Qt for Embedded Graphics pipeline
-
- Qt uses QPainter for all graphics operations. By using the same API
- regardless of platform, the code can be reused on different devices.
- QPainter use different paint engines implemented in the QPaintEngine API to
- do the actual painting.
-
- The QPaintEngine API provides paint engines for each window system and
- painting framework supported by Qt. In regards to Qt for Embedded, this
- also includes implementations for OpenGL ES versions 1.1 and 2.0, as well
- as OpenVG and DirectFB(Embedded Linux only).
-
- By using one of these paint engines, you will be able to improve the
- graphics performance of your Qt application. However, if the graphics
- operations used are not supported, this might as well be a trap, slowing
- down your application significantly. This all depends on what kind of
- graphics operations that are supported by the target devices hardware
- configuration.
-
- \image platformHWAcc.png
-
- The paint engine will direct all graphics operations supported by the
- devices hardware to the GPU, and from there they are sent to the
- framebuffer. Unsupported graphics operations falls back to the
- QRasterPaintEngine and are handled by the CPU before sent to the
- framebuffer. In the end, the operating system sends the paint updates off
- to the screen/display. The fallback operation is quite expensive in regards
- to memory consumption, and should be avoided.
-
- \section2 Hardware configuration requirements
-
- Before implementing any application using hardware acceleration, it is wise
- to get an overview of what kind of hardware accelerated graphics operations
- that are available for the target device.
-
- \note On devices with no hardware acceleration, Qt will use
- QRasterPaintEngine, which handles the acceleration using software. On
- devices supporting OpenGL ES, OpenVG or DirectFB(not supported by Windows
- CE), Qt will use the
- respective paint engines to accelerate painting. However, hardware
- configurations that only support a limited set of hardware acceleration
- features, might slow the application graphics down rather than speeding it
- up when using unsupported operations that must fall back to the raster
- engine.
-
- \section3 Different architectures
-
- Based on the architecture used in a device we can make a recommendation on
- which hardware acceleration techniques to use. There are mainly two
- different architectures on embedded devices. These are devices with a
- Unified Memory Architecture (UMA), and devices with dedicated graphics
- memory. Generally, high-end devices will have dedicated graphics memory.
- Low-end devices will just use system memory, sometimes reserving a memory
- region and sometimes not.
-
- In addition to this, we can categorize the devices into five types based on
- the different graphics operations supported by their hardware.
-
- \list 1
- \o No support for graphics acceleration.
- \o Support for blitter and alpha blending.
- \o Support for path based 2D vector graphics.
- \o Support for fixed function 3D graphics.
- \o Support for programmable 3D graphics.
- \endlist
-
- Based on these characteristics the table below recommends which paint
- engines to use with the different types of hardware configurations.
-
- \section3 Recommended use of hardware acceleration based on hardware
-
- \table
- \header
- \o Type
- \o UMA
- \o Non-UMA
- \row
- \o \bold {None}
- \o Qt Raster Engine
- \o Qt Raster Engine
- \row
- \o \bold {Blitter}
- \o DirectFB
- \o DirectFB
- \row
- \o \bold {2D Vector}
- \o OpenVG
- \o OpenVG
- \row
- \o \bold {Fixed 3D}
- \o OpenGL (ES) 1.x
- \o OpenGL (ES) 1.x
- \row
- \o \bold {Programmable 3D}
- \o OpenGL (ES) 2.x
- \o OpenGL (ES) 2.x
- \endtable
-
- \note Since the DirectFB API is quite primitive, the raster paint engine
- handles most of the operations.
-
- \note Blitter and Alpha blending is currently not supported on Windows CE.
+\section1 Hardware Acceleration
+
+When designing applications for embedded devices there is often a
+compromise between graphics effects and performance. On most
+devices, you cannot have both simply because the hardware needed
+for such operations just is not there. With a growing number of
+devices that use hardware dedicated to graphics operations there is
+less need to compromise.
+
+In addition to enabling dynamic graphics effects, there are two
+other benefits to using graphics acceleration. One is that graphics
+acceleration hardware is more power efficient than using the CPU.
+The reason for this is that the CPU might require a clock speed
+that is up to 20 times higher than the GPU, achieving the same
+results. E.g. a typical hardware accelerated mobile graphics unit
+can rasterize one or two bilinear texture fetches in one cycle,
+while a software implementation takes easily more than 20 cycles.
+Typical \e {System-on-a-chip} (SoC) graphics hardware generally have
+a much lower clock speed and memory bandwidth, and different level
+of acceleration than desktop GPUs. One example is that many GPUs
+leave out transformation and lighting from the graphics pipeline
+and only implements rasterization.
+
+Another reason to use a GPU is to offload the main CPU, either for
+power saving or to perform other operations in parallel. Often
+drawing speed with a GPU is not that much faster than a CPU but
+the clear benefit of using the GPU is to free up the CPU to perform
+other tasks which can be used to create a more responsive use
+experience.
+
+The key to writing good applications for devices is therefore to
+limit the wow factor down to what the target hardware can handle,
+and to take advantage of any graphics dedicated hardware. Qt
+provides several ways to both render advanced effects on the screen
+and speed up your application using hardware accelerated graphics.
+
+\tableofcontents
+
+\section2 Qt for Embedded Graphics pipeline
+
+Qt uses QPainter for all graphics operations. By using the same API
+regardless of platform, the code can be reused on different devices.
+QPainter use different paint engines implemented in the QPaintEngine API to
+do the actual painting.
+
+The QPaintEngine API provides paint engines for each window system and
+painting framework supported by Qt. In regards to Qt for Embedded, this
+also includes implementations for OpenGL ES versions 1.1 and 2.0, as well
+as OpenVG and DirectFB(Embedded Linux only).
+
+By using one of these paint engines, you will be able to improve the
+graphics performance of your Qt application. However, if the graphics
+operations used are not supported, this might as well be a trap, slowing
+down your application significantly. This all depends on what kind of
+graphics operations that are supported by the target devices hardware
+configuration.
+
+\image platformHWAcc.png
+
+The paint engine will direct all graphics operations supported by the
+devices hardware to the GPU, and from there they are sent to the
+framebuffer. Unsupported graphics operations falls back to the
+QRasterPaintEngine and are handled by the CPU before sent to the
+framebuffer. In the end, the operating system sends the paint updates off
+to the screen/display. The fallback operation is quite expensive in regards
+to memory consumption, and should be avoided.
+
+\section2 Hardware configuration requirements
+
+Before implementing any application using hardware acceleration, it is wise
+to get an overview of what kind of hardware accelerated graphics operations
+that are available for the target device.
+
+\note On devices with no hardware acceleration, Qt will use
+QRasterPaintEngine, which handles the acceleration using software. On
+devices supporting OpenGL ES, OpenVG or DirectFB(not supported by Windows
+CE), Qt will use the
+respective paint engines to accelerate painting. However, hardware
+configurations that only support a limited set of hardware acceleration
+features, might slow the application graphics down rather than speeding it
+up when using unsupported operations that must fall back to the raster
+engine.
+
+\section3 Different architectures
+
+Based on the architecture used in a device we can make a recommendation on
+which hardware acceleration techniques to use. There are mainly two
+different architectures on embedded devices. These are devices with a
+Unified Memory Architecture (UMA), and devices with dedicated graphics
+memory. Generally, high-end devices will have dedicated graphics memory.
+Low-end devices will just use system memory, sometimes reserving a memory
+region and sometimes not.
+
+In addition to this, we can categorize the devices into five types based on
+the different graphics operations supported by their hardware.
+
+\list 1
+ \o No support for graphics acceleration.
+ \o Support for blitter and alpha blending.
+ \o Support for path based 2D vector graphics.
+ \o Support for fixed function 3D graphics.
+ \o Support for programmable 3D graphics.
+\endlist
+
+Based on these characteristics the table below recommends which paint
+engines to use with the different types of hardware configurations.
+
+\section3 Recommended use of hardware acceleration based on hardware
+
+\table
+ \header
+ \o Type
+ \o UMA
+ \o Non-UMA
+ \row
+ \o \bold {None}
+ \o Qt Raster Engine
+ \o Qt Raster Engine
+ \row
+ \o \bold {Blitter}
+ \o DirectFB
+ \o DirectFB
+ \row
+ \o \bold {2D Vector}
+ \o OpenVG
+ \o OpenVG
+ \row
+ \o \bold {Fixed 3D}
+ \o OpenGL (ES) 1.x
+ \o OpenGL (ES) 1.x
+ \row
+ \o \bold {Programmable 3D}
+ \o OpenGL (ES) 2.x
+ \o OpenGL (ES) 2.x
+\endtable
+
+\note Since the DirectFB API is quite primitive, the raster paint engine
+handles most of the operations.
+
+\note Blitter and Alpha blending is currently not supported on Windows CE.
diff --git a/doc/src/platforms/emb-install.qdoc b/doc/src/platforms/emb-install.qdoc
index 26b6475..b5b408a 100644
--- a/doc/src/platforms/emb-install.qdoc
+++ b/doc/src/platforms/emb-install.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -28,10 +28,10 @@
/*!
\page qt-embedded-install.html
- \title Installing Qt on Embedded Linux
+ \title Installing Qt for Embedded Linux
\ingroup qt-embedded-linux
\ingroup installation
- \brief How to install Qt on Embedded Linux.
+ \brief How to install Qt for Embedded Linux.
This document describes how to install \l{Qt for Embedded Linux} in your
development environment:
@@ -152,7 +152,7 @@
\endlist
Note that the virtual framebuffer requires a Qt for X11
- installation. See \l {Installing Qt on X11 Platforms} for details.
+ installation. See \l {Installing Qt for X11 Platforms} for details.
The Linux framebuffer, on the other hand, is enabled by default on
all modern Linux distributions. For information on older versions,
diff --git a/doc/src/platforms/emb-kmap2qmap.qdoc b/doc/src/platforms/emb-kmap2qmap.qdoc
index 23c3c92..91983ef 100644
--- a/doc/src/platforms/emb-kmap2qmap.qdoc
+++ b/doc/src/platforms/emb-kmap2qmap.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/platforms/emb-makeqpf.qdoc b/doc/src/platforms/emb-makeqpf.qdoc
index 6cf9d26..af24d7e 100644
--- a/doc/src/platforms/emb-makeqpf.qdoc
+++ b/doc/src/platforms/emb-makeqpf.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/platforms/emb-opengl-EmbLinux.qdoc b/doc/src/platforms/emb-opengl-EmbLinux.qdoc
index 649349d..c53c3af 100644
--- a/doc/src/platforms/emb-opengl-EmbLinux.qdoc
+++ b/doc/src/platforms/emb-opengl-EmbLinux.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/platforms/emb-openvg-EmbLinux.qdoc b/doc/src/platforms/emb-openvg-EmbLinux.qdoc
index 16dd51e..267eada 100644
--- a/doc/src/platforms/emb-openvg-EmbLinux.qdoc
+++ b/doc/src/platforms/emb-openvg-EmbLinux.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/platforms/emb-performance.qdoc b/doc/src/platforms/emb-performance.qdoc
index e6edf59..368b06e 100644
--- a/doc/src/platforms/emb-performance.qdoc
+++ b/doc/src/platforms/emb-performance.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/platforms/emb-pointer.qdoc b/doc/src/platforms/emb-pointer.qdoc
index b8ec167..81e532f 100644
--- a/doc/src/platforms/emb-pointer.qdoc
+++ b/doc/src/platforms/emb-pointer.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -186,8 +186,11 @@
device file. Some drivers also require write access to the device file.
For instance, if you have specified the mouse driver with
\snippet doc/src/snippets/code/doc_src_emb-pointer.qdoc 11
- then examine the permissions of the device file by entering the following
- command in a console:
+ then examine the permissions of the device file by entering the
+ following command in a console:
+ \snippet doc/src/snippets/code/doc_src_emb-pointer.qdoc show permissions
+ Change the permissions of the device file, if necessary, in the following
+ way:
\snippet doc/src/snippets/code/doc_src_emb-pointer.qdoc 12
If the device file is actually a symbolic link to another file, you must
diff --git a/doc/src/platforms/emb-porting.qdoc b/doc/src/platforms/emb-porting.qdoc
index b7640ef..8b1f5f0 100644
--- a/doc/src/platforms/emb-porting.qdoc
+++ b/doc/src/platforms/emb-porting.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/platforms/emb-qvfb.qdoc b/doc/src/platforms/emb-qvfb.qdoc
index 5a35bc9..418d2d2 100644
--- a/doc/src/platforms/emb-qvfb.qdoc
+++ b/doc/src/platforms/emb-qvfb.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -40,8 +40,8 @@
QVFb is an X11 application supplied with Qt for X11 that provides
a virtual framebuffer for Qt for Embedded Linux to use. To use it,
- you need to \l{Installing Qt on X11 Platforms}{configure and
- install Qt on X11 platforms} appropriately. Further requirements
+ you need to \l{Installing Qt for X11 Platforms}{configure and
+ install Qt for X11 platforms} appropriately. Further requirements
can be found in the \l{Qt for Embedded Linux Requirements}
document.
diff --git a/doc/src/platforms/emb-running.qdoc b/doc/src/platforms/emb-running.qdoc
index 20893c9..12222a6 100644
--- a/doc/src/platforms/emb-running.qdoc
+++ b/doc/src/platforms/emb-running.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -63,7 +63,7 @@
\row
\o
Provided that the environment variables are adjusted properly
- during the \l {Installing Qt on Embedded Linux}{installation process}, you
+ during the \l {Installing Qt for Embedded Linux}{installation process}, you
should see the \l {Text Edit} demo appear.
It might be that the hardware drivers must be specified explicitly
diff --git a/doc/src/platforms/emb-vnc.qdoc b/doc/src/platforms/emb-vnc.qdoc
index 47e8dcd..45b47d9 100644
--- a/doc/src/platforms/emb-vnc.qdoc
+++ b/doc/src/platforms/emb-vnc.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/platforms/mac-differences.qdoc b/doc/src/platforms/mac-differences.qdoc
index 2501656..8436043 100644
--- a/doc/src/platforms/mac-differences.qdoc
+++ b/doc/src/platforms/mac-differences.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -32,7 +32,7 @@
\ingroup platform-specific
This file outlines known issues and possible workarounds when
- using Qt on Mac OS X. Contact Qt's technical support team if you find
+ using Qt for Mac OS X. Contact Qt's technical support team if you find
additional issues which are not covered here. (See also the
document \l{qtmac-as-native.html} {Qt is Mac OS X Native}.)
diff --git a/doc/src/platforms/platform-notes-rtos.qdoc b/doc/src/platforms/platform-notes-rtos.qdoc
index 41b6ae7..8c30701 100644
--- a/doc/src/platforms/platform-notes-rtos.qdoc
+++ b/doc/src/platforms/platform-notes-rtos.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -27,8 +27,8 @@
/*!
\page platform-notes-vxworks.html
- \title Platform Notes - VxWorks
- \contentspage Platform Notes
+ \title Platform and Compiler Notes - VxWorks
+ \contentspage Platform and Compiler Notes
\target VxWorks
\note VxWorks is a community supported platform. See the
@@ -143,8 +143,8 @@
/*!
\page platform-notes-qnx.html
- \title Platform Notes - QNX
- \contentspage Platform Notes
+ \title Platform and Compiler Notes - QNX
+ \contentspage Platform and Compiler Notes
\target QNX
\note QNX is a community supported platform. See the
diff --git a/doc/src/platforms/platform-notes.qdoc b/doc/src/platforms/platform-notes.qdoc
index 6f533ae..9c5f3c8 100644
--- a/doc/src/platforms/platform-notes.qdoc
+++ b/doc/src/platforms/platform-notes.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -39,35 +39,91 @@
/*!
\page platform-notes.html
\ingroup platform-specific
- \title Platform Notes
+ \title Platform and Compiler Notes
\brief Information about the platforms on which Qt can be used.
This page contains information about the platforms Qt is currently known
to run on, with links to platform-specific notes, including any known bugs
or incompatibilities.
+ Information about the combinations of platforms and compilers
+ supported by Qt can be found on the \l{Supported Platforms} page.
+
\list
- \o \l{Platform Notes - X11}
- \tableofcontents{1 Platform Notes - X11}
- \o \l{Platform Notes - Windows}
- \tableofcontents{1 Platform Notes - Windows}
- \o \l{Platform Notes - Mac OS X}
- \tableofcontents{1 Platform Notes - Mac OS X}
- \o \l{Platform Notes - Symbian}
- \tableofcontents{1 Platform Notes - Symbian}
- \o \l{Platform Notes - Embedded Linux}
- \tableofcontents{1 Platform Notes - Embedded Linux}
- \o \l{Platform Notes - Windows CE}
- \tableofcontents{1 Platform Notes - Windows CE}
- \o \l{Platform Notes - QNX}
- \tableofcontents{1 Platform Notes - QNX}
- \o \l{Platform Notes - VxWorks}
- \tableofcontents{1 Platform Notes - VxWorks}
+ \o \l{Platform and Compiler Notes - X11}
+ \tableofcontents{1 Platform and Compiler Notes - X11}
+ \o \l{Platform and Compiler Notes - Windows}
+ \tableofcontents{1 Platform and Compiler Notes - Windows}
+ \o \l{Platform and Compiler Notes - Mac OS X}
+ \tableofcontents{1 Platform and Compiler Notes - Mac OS X}
+ \o \l{Platform and Compiler Notes - Symbian}
+ \tableofcontents{1 Platform and Compiler Notes - Symbian}
+ \o \l{Platform and Compiler Notes - Embedded Linux}
+ \tableofcontents{1 Platform and Compiler Notes - Embedded Linux}
+ \o \l{Platform and Compiler Notes - Windows CE}
+ \tableofcontents{1 Platform and Compiler Notes - Windows CE}
+ \o \l{Platform and Compiler Notes - QNX}
+ \tableofcontents{1 Platform and Compiler Notes - QNX}
+ \o \l{Platform and Compiler Notes - VxWorks}
+ \tableofcontents{1 Platform and Compiler Notes - VxWorks}
\endlist
- See also the \l{Compiler Notes} for information about compiler-specific
- build issues. Information about the combinations of platforms and compilers
- supported by Qt can be found on the \l{Supported Platforms} page.
+ \section1 General Compiler Notes
+
+ \section2 Supported Features
+
+ Not all compilers used to build Qt are able to compile all modules. The following table
+ shows the compiler support for five modules that are not uniformly available for all
+ platforms and compilers.
+
+ \table
+ \header \o Compiler \o{5,1} Features
+ \header \o \o Concurrent \o XmlPatterns \o WebKit(*) \o CLucene \o Phonon
+ \row \o g++ 3.3 \o \o \bold{X} \o \o \bold{X} \o \bold{X}
+ \row \o g++ 3.4 and up \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X}
+ \row
+ \row \o SunCC 5.5 \o \o \o \o \bold{X} \o \bold{X}
+ \row
+ \row \o aCC series 3 \o \o \o \o \bold{X} \o \bold{X}
+ \row \o aCC series 6 \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X}
+ \row \o xlC 6 \o \o \o \o \bold{X} \o \bold{X}
+ \row \o Intel CC 10 \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X}
+ \row
+ \row \o MSVC 2003 \o \bold{X} \o \bold{X} \o \o \bold{X} \o \bold{X}
+ \row \o MSVC 2005 and up \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X}
+ \endtable
+
+ * WebKit is only supported as a dynamically built library. Static linkage is not supported.
+
+ \section2 GCC 3.4.6 (Debian 3.4.6-5) on AMD64 (x86_64)
+
+ This compiler is known to miscompile some parts of Qt when doing a
+ release build. There are several workarounds:
+
+ \list 1
+ \o Use a debug build instead.
+ \o For each miscompilation encountered, recompile the file, removing the \c{-O2} option.
+ \o Add \c{-fno-gcse} to the
+ \l{qmake Variable Reference#QMAKE_CXXFLAGS_RELEASE}{QMAKE_CXXFLAGS_RELEASE} qmake
+ variable.
+ \endlist
+
+ \section2 GCC 4.0.0
+
+ The released package of the compiler has some bugs that lead to
+ miscompilations. We recommend using GCC 4.0.1 or later, or to use
+ a recent CVS snapshot of the GCC 4.0 branch. The version of GCC
+ 4.0.0 that is shipped with Mac OS X 10.4 "Tiger" is known to work
+ with Qt for Mac OS X.
+
+ \section2 Intel C++ Compiler
+
+ Qt supports the Intel C++ compiler on both Windows and Linux.
+ However, there are a few issues on Linux; see
+ \l{Platform and Compiler Notes - X11#Intel C++ Compiler for Linux}{Intel C++ Compiler for Linux}
+ for details.
+
+ \section1 Feedback and Corrections
If you have anything to add to this list or any of the platform or
compiler-specific pages, please submit it via the \l{Bug Report Form}
@@ -76,8 +132,8 @@
/*!
\page platform-notes-x11.html
- \title Platform Notes - X11
- \contentspage Platform Notes
+ \title Platform and Compiler Notes - X11
+ \contentspage Platform and Compiler Notes
This page contains information about the X11 platforms Qt is currently
known to run on, with links to platform-specific notes. More information
@@ -89,8 +145,7 @@
\target AIX
\section1 AIX - 5.2
- Qt has been tested on AIX 5.2, using the
- \l{Compiler Notes#IBM xlC (AIX)}{xlC} compiler.
+ Qt has been tested on AIX 5.2, using the xlC compiler.
\table
\header \o Compiler \o Notes
@@ -113,13 +168,38 @@
either \c{-no-stl} or \c{-no-largefile}.
\endtable
+ \section2 IBM xlC
+
+ The makeC++SharedLib utility must be in your PATH and be up to date to
+ build shared libraries. From IBM's
+ \l{http://www.redbooks.ibm.com/abstracts/sg245674.html}{C and C++ Application Development on AIX}
+ Redbook:
+
+ \list
+ \o "The second step is to use the makeC++SharedLib command to create the
+ shared object. The command has many optional arguments, but in its
+ simplest form, can be used as follows:"
+ \snippet doc/src/snippets/code/doc_src_compiler-notes.qdoc 1
+ \o "The full path name to the command is not required; however, to avoid
+ this, you will have to add the directory in which it is located to
+ your PATH environment variable. The command is located in the
+ /usr/vacpp/bin directory with the VisualAge C++ Professional for AIX,
+ Version 5 compiler."
+ \endlist
+
+ \section2 VisualAge C++ for AIX, Version 6.0
+
+ Make sure you have the
+ \l{http://www-1.ibm.com/support/search.wss?rs=32&amp;tc=SSEP5D&amp;dc=D400}{latest upgrades}
+ installed.
+
\target FreeBSD
\section1 FreeBSD - 6.0-RELEASE
\note FreeBSD is a community supported platform. See the
\l{Supported Platforms} page for more information.
- The system compiler on FreeBSD 4.x is gcc 2.95.4, which is not
+ The system compiler on FreeBSD 4.x is GCC 2.95.4, which is not
officially supported by Qt 4. We develop using and recommend
ports/lang/gcc34. You will need to run configure with the
\c{-platform freebsd-g++34} arguments. Optionally, you may use
@@ -132,7 +212,6 @@
Note that we do not actively test FreeBSD 4.x and 5.x. Our developers
migrated to 6.x after the Qt 4 launch. FreeBSD-CURRENT is not supported.
- \target HP-UX
\section1 HP-UX
Qt supports HP-UX on both PA-RISC and the Itanium (IA64) architectures.
@@ -140,17 +219,26 @@
\section2 PA-RISC - B.11.11 or later
You can configure Qt for aCC in 32 and 64 bit mode (hpux-acc-64 or
- hpux-acc-32), or gcc in 32 bit mode (hpux-g++). The default platform is
+ hpux-acc-32), or GCC in 32 bit mode (hpux-g++). The default platform is
hpux-acc-32. The minimum required version for aCC (HP ANSI C++) on PA-RISC
- is A.03.57. The supported gcc compiler is gcc 3.4.3.
+ is A.03.57. The supported GCC compiler is GCC 3.4.3.
\section2 Itanium - B.11.23 or later
You can configure Qt for aCC in 32 and 64 bit mode (hpuxi-acc-64 or
- hpuxi-acc-32). gcc is currently unsupported. The default platform is
+ hpuxi-acc-32). GCC is currently unsupported. The default platform is
hpuxi-acc-64. The minimum required version for aCC (HP ANSI C++) on
Itanium is A.06.12.
+ \section2 HP ANSI C++ (aCC)
+
+ The hpux-acc-32 and hpux-acc-64 platforms are tested with aCC A.03.57. The
+ hpuxi-acc-32 and hpuxi-acc-64 platforms are tested with aCC A.06.10.
+
+ \section2 GCC
+
+ The hpux-g++ platform is tested with GCC 3.4.4.
+
\section2 OpenGL Support
Qt's \l{QtOpenGL}{OpenGL} module requires GLX 1.3 or later to be installed.
@@ -161,20 +249,29 @@
\target IRIX
\section1 IRIX - 6.5.x
- \bold{IRIX is an unsupported platform - please see Qt's online
- \l{Platform Support Policy} for details.}
+ \bold{IRIX is an unsupported platform. See the \l{Supported Platforms} page
+ and Qt's Software's online \l{Platform Support Policy} page for details.}
Unpackaging and IRIX tar:
Because of long filenames some files will be cut off incorrectly with IRIX
tar. Please use GNU tar to unpack Qt packages.
+ \section2 MIPSpro
+
+ Qt 4.4.x requires MIPSpro version 7.4.2m.
+
+ Note that MIPSpro version 7.4.4m is currently not supported, since it has
+ introduced a number of problems that have not yet been resolved.
+ We recommend using 7.4.2m for Qt development. However, please note the
+ unsupported status of this platform.
+
\section1 Linux
There are no known problems with using Qt on production versions of
Linux/x86, Linux/ppc, Linux/amd64 and Linux/ia64 (including Altix(R)).
- For the gcc/g++ compiler, please also see the relevant
- \l{Compiler Notes#GCC}{compiler page}.
+ For the GCC compiler, please also see the relevant
+ \l{Platform and Compiler Notes#General Compiler Notes}{General Compiler Notes}.
\section2 Installation problems
@@ -198,6 +295,40 @@
"Failed Dependency". Use the \c{--nodeps} option to \c rpm to workaround
this problem.
+ \section2 Intel C++ Compiler for Linux
+
+ Nokia currently tests the following compilers:
+
+ \list
+
+ \o Intel(R) C++ Compiler for applications running on IA-32,
+ Version 10.1 Build 20080602 Package ID: l_cc_p_10.1.017
+
+ \o Intel(R) C++ Compiler for applications running on Intel(R) 64,
+ Version 10.1 Build 20080602 Package ID: l_cc_p_10.1.017
+
+ \endlist
+
+ We do not currently test the IA-64 (Itanium) compiler.
+
+ \section2 Known Issues with Intel C++ Compiler for Linux
+
+ \list
+
+ \o Precompiled header support does not work in version 10.0.025
+ and older. For these compilers, you should configure Qt with
+ -no-pch. Precompiled header support works properly in version
+ 10.0.026 and later.
+ \o Version 10.0.026 for Intel 64 is known to miscompile qmake when
+ building in release mode. For now, configure Qt with
+ -debug. Version 10.1.008 and later can compile qmake in release
+ mode.
+ \o Versions 10.1.008 to 10.1.015 for both IA-32 and Intel 64 are
+ known crash with "(0): internal error: 0_47021" when compiling
+ QtXmlPatterns, QtWebKit, and Designer in release mode. Version
+ 10.1.017 compiles these modules correctly in release mode.
+ \endlist
+
\target Solaris
\section1 Solaris - 9 or later
@@ -207,25 +338,50 @@
to truncate long filenames. We recommend using star instead
(http://star.berlios.de).
- \section2 CC on Solaris
+ Please note that WebKit is not supported for Solaris, regardless of
+ which compiler is used.
+
+ \section2 CC
- Be sure to check our \l{Compiler Notes#Sun Studio}{Forte Developer / Sun Studio}
- notes.
+ See the notes for \l{Forte Developer / Sun Studio}.
- \section2 GCC on Solaris
+ \section2 GCC
+
+ Please use GCC 3.4.2 or later.
- Be sure to check the installation notes for \l{GCC on Solaris}.
Do not use GCC with Sun's assembler/linker, this will result in link-time
errors in shared libraries. Use GNU binutils instead.
GCC 3.2.* is known to miscompile Qt due to an optimizer bug that will
- cause the resulting binaries to hang. Please use GCC 3.4.2 or later.
+ cause the resulting binaries to hang.
+
+ \section2 Forte Developer / Sun Studio
+
+ Qt is tested using Sun Studio 12 (Sun CC 5.9). Go to
+ \l{Sun Studio Patches} page on Sun's Web site to download
+ the latest patches for your Sun compiler.
+
+ Please note that Qt 4.6 is stricter in its STL requirements and
+ that the default STL implementation used by Sun CC does not pass
+ those requirements. This does not affect binary compatibility and
+ you can continue to use STL in your own code, but Qt's
+ STL-compatibility functions will be disabled.
+
+ Sun CC ships with a secondary STL implementation (called stlport4)
+ which is standards-compliant and can be used by Qt. You can enable
+ it by passing the -library=stlport4 option to the compiler. Note
+ that this does not affect Qt's binary compatibility, but it may
+ affect that of other libraries and programs that use STL.
+
+ \section2 Sun WorkShop 5.0
+
+ Sun WorkShop 5.0 is not supported with Qt 4.
*/
/*!
\page platform-notes-windows.html
- \title Platform Notes - Windows
- \contentspage Platform Notes
+ \title Platform and Compiler Notes - Windows
+ \contentspage Platform and Compiler Notes
This page contains information about the Windows platforms Qt is currently
known to run on, with links to platform-specific notes. More information
@@ -255,12 +411,87 @@
and other applications that require screen grabbing while direct
rendering is enabled. Other GL-applications may not work as expected,
unless direct rendering is disabled.
+
+ \section2 GCC (MinGW)
+
+ We have tested Qt with this compiler on Windows XP.
+ The minimal version of MinGW supported is GCC 4.4.
+
+ \note For users of the MinGW binary package: This package is now
+ based on MinGW 4.4. The installer no longer offers to download
+ MinGW for you, but rather offers to use a version of MinGW that
+ you already have installed on your machine. You just tell the
+ installer which directory MinGW is installed in. If you don't
+ already have MinGW 4.4 installed, you can download a .zip archive
+ from our \l{ftp://ftp.trolltech.com/misc/MinGW-gcc440_1.zip}{FTP
+ site}. This archive provides fixes to MinGW and support for
+ missing API, See the _patches directory in the archive for
+ details.
+
+ \note A MinGW installation is only needed to build against the
+ binary pacakge, not to run the pre-compiled binaries that are in
+ the package.
+
+ \section2 Intel C++ Compiler (Windows, Altix)
+
+ Qt 4 has been tested successfully with:
+
+ \list
+ \o Windows - Intel(R) C++ Compiler for 32-bit applications,
+ Version 9.1.040.
+ \o Altix - Intel(R) C++ Itanium(R) Compiler for Itanium(R)-based
+ applications Version 8.1 Build 20050406 Package ID: l_cc_pc_8.1.030
+ \endlist
+
+ We currently only test the Intel compiler on 32-bit Windows versions.
+
+ \section2 Visual Studio (Windows)
+
+ We do most of our Windows development on Windows XP, using Microsoft
+ Visual Studio .NET 2005 and Visual Studio 2008 (both the 32- and 64-bit
+ versions).
+
+ Qt works with the Standard Edition, the Professional Edition and Team
+ System Edition of Visual Studio 2005.
+
+ In order to use Qt with the Visual Studio 2005/2008 Express Edition you need
+ to download and install the platform SDK. Due to limitations in the
+ Express Edition it is not possible for us to install the Qt Visual
+ Studio Integration. You will need to use our command line tools to
+ build Qt applications with this edition.
+
+ The Visual C++ Linker doesn't understand filenames with spaces (as in
+ \c{C:\Program files\Qt\}) so you will have to move it to another place,
+ or explicitly set the path yourself; for example:
+
+ \snippet doc/src/snippets/code/doc_src_compiler-notes.qdoc 0
+
+ If you are experiencing strange problems with using special flags that
+ modify the alignment of structure and union members (such as \c{/Zp2})
+ then you will need to recompile Qt with the flags set for the
+ application as well.
+
+ If you're using Visual Studio .NET (2002) Standard Edition, you should be
+ using the Qt binary package provided, and not the source package.
+ As the Standard Edition does not optimize compiled code, your compiled
+ version of Qt would perform suboptimally with respect to speed.
+
+ With Visual Studio 2005 Service Pack 1 a bug was introduced which
+ causes Qt not to compile, this has been fixed with a hotfix available
+ from Microsoft. See this
+ \l{http://qt.nokia.com/developer/faqs/faq.2006-12-18.3281869860}{Knowledge Base entry}
+ for more information.
+
+ There currently is a problem when compiling Qt with Visual Studio 2010 for 64-bit.
+ Its optimizer causes trouble and generates code that crashes for the release builds.
+ To avoid the crashes, You need to apply the hotfix in the following article
+ http://support.microsoft.com/kb/2280741.
*/
/*!
\page platform-notes-mac.html
- \title Platform Notes - Mac OS X
- \contentspage Platform Notes
+ \title Platform and Compiler Notes - Mac OS X
+ \contentspage Platform and Compiler Notes
This page contains information about the Mac OS X versions Qt is currently
known to run on, with links to platform-specific notes. More information
@@ -287,11 +518,15 @@
\section2 Required GCC version
- Apple's gcc 4 that is shipped with the Xcode Tools for both Mac OS X 10.4
- and 10.5 will compile Qt. There is preliminary support for gcc 4.2 which
+ Apple's GCC 4 that is shipped with the Xcode Tools for both Mac OS X 10.4
+ and 10.5 will compile Qt. There is preliminary support for GCC 4.2 which
is included with Xcode Tools 3.1+ (configurable with
\c{-platform macx-g++42}).
+ Please use the latest GCC 3.3 from Apple or a later version of GCC 3.
+ The GCC 3.3 that is provided with Xcode 1.5 is known to generate bad code.
+ Use the November 2004 GCC 3.3 updater \l{http://connect.apple.com}{available from Apple}.
+
\section2 Binary Package
The binary package requires that you have your .qt-license file in your
@@ -300,7 +535,7 @@
this file in the email they receive.
The binary package was built on Mac OS X 10.4 with Xcode Tools 2.1
- (gcc 4.0.0) for Qt 4.1.0, Xcode Tools 2.2 (gcc 4.0.1) for Qt 4.1.1-4.1.4
+ (GCC 4.0.0) for Qt 4.1.0, Xcode Tools 2.2 (GCC 4.0.1) for Qt 4.1.1-4.1.4
and Xcode Tools 2.3 for 4.2.0. It will only link executables built
against 10.4 (or a 10.4 SDK). You should be able to run applications
linked against these frameworks on Mac OS X 10.3.9 and Mac OS X 10.4+.
@@ -374,8 +609,8 @@
/*!
\page platform-notes-windows-ce.html
- \title Platform Notes - Windows CE
- \contentspage Platform Notes
+ \title Platform and Compiler Notes - Windows CE
+ \contentspage Platform and Compiler Notes
This page contains information about the Windows CE and Windows Mobile
platforms Qt is currently known to run on, with links to platform-specific
@@ -385,8 +620,8 @@
/*!
\page platform-notes-symbian.html
- \title Platform Notes - Symbian
- \contentspage Platform Notes
+ \title Platform and Compiler Notes - Symbian
+ \contentspage Platform and Compiler Notes
\ingroup platform-specific
\brief Information about the state of support for the Symbian platform.
@@ -468,6 +703,13 @@
for Phonon.
\endtable
+ \section1 Compiler Notes
+
+ \section2 GCCE (Symbian)
+
+ GCCE cannot be used to compile Qt libaries for the Symbian platform, but GCCE is supported
+ when compiling Qt applications for the Symbian platform.
+
\section1 Known Issues
Known issues can be found by visiting the
@@ -497,6 +739,9 @@
\o \c AllFiles when \l{http://developer.symbian.org/wiki/index.php/Capabilities_%28Symbian_Signed%29/AllFiles_Capability}{accessing specific areas.}
\row \o QtNetwork
\o \c NetworkServices is basically always required for this module.
+ \o \c ReadUserData is required to include all the phone's SSL certificates in the system's default CA certificate list
+ (for example those added by the user or stored in the SIM card),
+ without this capability only the CA certs built into the phone are used.
\row \o QtMultiMedia
\o \c UserEnvironment if QAudioInput is used.
\endtable
@@ -580,8 +825,8 @@
/*!
\page platform-notes-embedded-linux.html
- \title Platform Notes - Embedded Linux
- \contentspage Platform Notes
+ \title Platform and Compiler Notes - Embedded Linux
+ \contentspage Platform and Compiler Notes
This page contains information about the Embedded Linux platforms Qt is
currently known to run on, with links to platform-specific notes. More
diff --git a/doc/src/platforms/qt-embedded-linux.qdoc b/doc/src/platforms/qt-embedded-linux.qdoc
index 988472d..cd20917 100644
--- a/doc/src/platforms/qt-embedded-linux.qdoc
+++ b/doc/src/platforms/qt-embedded-linux.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -67,7 +67,7 @@
\o
\list
\o \l {Qt for Embedded Linux Architecture}{Architecture Overview}
- \o \l {Installing Qt on Embedded Linux}{Installation}
+ \o \l {Installing Qt for Embedded Linux}{Installation}
\o \l {Running Qt for Embedded Linux Applications}{Running Applications}
\o \l {Qt for Embedded Linux Examples}{Examples}
\endlist
diff --git a/doc/src/platforms/qt-embedded.qdoc b/doc/src/platforms/qt-embedded.qdoc
index a3d11c6..8beb59d 100644
--- a/doc/src/platforms/qt-embedded.qdoc
+++ b/doc/src/platforms/qt-embedded.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/platforms/qtmac-as-native.qdoc b/doc/src/platforms/qtmac-as-native.qdoc
index 5bb0d10..61acebb 100644
--- a/doc/src/platforms/qtmac-as-native.qdoc
+++ b/doc/src/platforms/qtmac-as-native.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/platforms/supported-platforms.qdoc b/doc/src/platforms/supported-platforms.qdoc
index 83cd89b..3a7d590 100644
--- a/doc/src/platforms/supported-platforms.qdoc
+++ b/doc/src/platforms/supported-platforms.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -44,9 +44,8 @@
\tableofcontents
- Information about the specific platforms Qt runs on can be found on the
- \l{Platform Notes} page. Information about the compilers used on each platform
- can be found on the \l{Compiler Notes} page.
+ Information about the specific platforms Qt runs on, and the compilers used
+ on each platform, can be found on the \l{Platform and Compiler Notes} page.
\section1 Tier 1 Platforms
@@ -115,14 +114,16 @@
\o gcc (\l{http://www.scratchbox.org/}{Scratchbox)}
\row \o Windows CE 5.0 (ARMv4i, x86, MIPS)
\o MSVC 2005 WinCE 5.0 Standard (x86, pocket, smart, mipsii)
- \row \o Windows CE 6.0 (ARMv4i, x86, MIPS)
- \o MSVC 2008 WinCE 6.0 Professional
+ \row \o Windows Embedded CE 6.0 (ARMv4i, x86, MIPS)
+ \o MSVC 2008 WinCE Embedded 6.0 Professional
\row \o Maemo 5(Linux, ARM, X11)
\o gcc (\l{http://www.scratchbox.org/}{Scratchbox)}
\row \o Symbian (Symbian/S60 3.1, 3.2)
\o RVCT 2.2 [build 686 or later], WINSCW 3.2.5 [build 482 or later], GCCE (for applications)
\endtable
+ \note The PPC architecture on Mac has been downgraded from tier 1 to tier 2 for 4.7.
+
\section1 Tier 3 Platforms (Not supported by Nokia)
All platforms not specifically listed above are not supported by Nokia. Nokia does
diff --git a/doc/src/platforms/symbian-exceptionsafety.qdoc b/doc/src/platforms/symbian-exceptionsafety.qdoc
index 03d223b..ffbf117 100644
--- a/doc/src/platforms/symbian-exceptionsafety.qdoc
+++ b/doc/src/platforms/symbian-exceptionsafety.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/platforms/symbian-introduction.qdoc b/doc/src/platforms/symbian-introduction.qdoc
index 9bf5c72..7bc5303 100644
--- a/doc/src/platforms/symbian-introduction.qdoc
+++ b/doc/src/platforms/symbian-introduction.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -29,7 +29,7 @@
\group qtsymbian
\title Qt for the Symbian platform
\ingroup qt-embedded
- \brief Documents related to Qt on the Symbian platform
+ \brief Documents related to Qt for the Symbian platform
Qt for Symbian is a C++ framework for GUI and application development
for embedded devices running Symbian. Qt for Symbian provides all
@@ -42,14 +42,14 @@
\o
\list
\o \l {Qt for the Symbian platform Requirements}
- \o \l {Installing Qt on the Symbian platform from a Binary Package}
- \o \l {Installing Qt on the Symbian platform}
+ \o \l {Installing Qt for the Symbian platform from a Binary Package}
+ \o \l {Installing Qt for the Symbian platform}
\o \l {The Symbian platform - Introduction to Qt}{Introduction to using Qt}
\endlist
\o
\list
\o \l {Exception Safety with Symbian}
- \o \l {Platform Notes - Symbian} {Qt for the Symbian platform - state of support}
+ \o \l {Platform and Compiler 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
@@ -93,10 +93,10 @@
\section1 Installing Qt and Running Demos
- Follow the instructions found in \l{Installing Qt on the Symbian platform from a Binary Package}
+ Follow the instructions found in \l{Installing Qt for the Symbian platform from a Binary Package}
to learn how to install Qt using a binary package and how to build and run Qt demos.
- Follow the instructions found in \l{Installing Qt on the Symbian platform} to learn how to install Qt using
+ Follow the instructions found in \l{Installing Qt for the Symbian platform} to learn how to install Qt using
using source package and how to build and run the Qt demos.
\section1 Building Your Own Applications
diff --git a/doc/src/platforms/wince-customization.qdoc b/doc/src/platforms/wince-customization.qdoc
index 5509d44..b3b9170 100644
--- a/doc/src/platforms/wince-customization.qdoc
+++ b/doc/src/platforms/wince-customization.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -33,7 +33,7 @@
When working with a custom SDK for Windows CE, Qt provides an easy way
to add support for it to your development environment. The following is
- a tutorial that covers how to create a specification for Qt on Windows
+ a tutorial that covers how to create a specification for Qt for Windows
CE platforms.
\tableofcontents
diff --git a/doc/src/platforms/wince-introduction.qdoc b/doc/src/platforms/wince-introduction.qdoc
index b3de5fe..2e9da59 100644
--- a/doc/src/platforms/wince-introduction.qdoc
+++ b/doc/src/platforms/wince-introduction.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -29,7 +29,7 @@
\group qtce
\title Qt for Windows CE
\ingroup qt-embedded
- \brief Documents related to Qt on Windows CE
+ \brief Documents related to Qt for Windows CE
Qt for Windows CE is a C++ framework for GUI and application development
for embedded devices running Windows CE. It runs on a variety of processors,
@@ -41,7 +41,7 @@
\o
\list
\o \l {Qt for Windows CE Requirements}
- \o \l {Installing Qt on Windows CE}
+ \o \l {Installing Qt for Windows CE}
\o \l {Windows CE - Introduction to using Qt}{Introduction to using Qt}
\endlist
\o
@@ -81,7 +81,7 @@
\section1 Installing Qt
- Follow the instructions found in \l{Installing Qt on Windows CE}.
+ Follow the instructions found in \l{Installing Qt for Windows CE}.
\section1 Building your own applications
diff --git a/doc/src/platforms/wince-opengl.qdoc b/doc/src/platforms/wince-opengl.qdoc
index f9921f5..a33e9f6 100644
--- a/doc/src/platforms/wince-opengl.qdoc
+++ b/doc/src/platforms/wince-opengl.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/platforms/wince-openvg.qdoc b/doc/src/platforms/wince-openvg.qdoc
index aebd5ef..c15b1bd 100644
--- a/doc/src/platforms/wince-openvg.qdoc
+++ b/doc/src/platforms/wince-openvg.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/platforms/wince-signing.qdoc b/doc/src/platforms/wince-signing.qdoc
index d1fa6da..49e11a0 100644
--- a/doc/src/platforms/wince-signing.qdoc
+++ b/doc/src/platforms/wince-signing.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/platforms/winsystem.qdoc b/doc/src/platforms/winsystem.qdoc
index 71c93a5..64e35c5 100644
--- a/doc/src/platforms/winsystem.qdoc
+++ b/doc/src/platforms/winsystem.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -44,8 +44,8 @@
\tableofcontents
For information about which platforms are supported by Qt, see the
- \l{Platform Notes}. For information on distributing Qt applications, see
- \l{Deploying Qt Applications}.
+ \l{Platform and Compiler Notes}. For information on distributing Qt
+ applications, see \l{Deploying Qt Applications}.
\target x11
\section1 Qt for X11
diff --git a/doc/src/platforms/x11overlays.qdoc b/doc/src/platforms/x11overlays.qdoc
index 949a500..7a35cd2 100644
--- a/doc/src/platforms/x11overlays.qdoc
+++ b/doc/src/platforms/x11overlays.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/porting/porting-qsa.qdoc b/doc/src/porting/porting-qsa.qdoc
index 153f015..93a83f4 100644
--- a/doc/src/porting/porting-qsa.qdoc
+++ b/doc/src/porting/porting-qsa.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/porting/porting4-canvas.qdoc b/doc/src/porting/porting4-canvas.qdoc
index 4031917..d9e58ba 100644
--- a/doc/src/porting/porting4-canvas.qdoc
+++ b/doc/src/porting/porting4-canvas.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/porting/porting4-designer.qdoc b/doc/src/porting/porting4-designer.qdoc
index aa42b68..0de6cf0 100644
--- a/doc/src/porting/porting4-designer.qdoc
+++ b/doc/src/porting/porting4-designer.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/porting/porting4-dnd.qdoc b/doc/src/porting/porting4-dnd.qdoc
index 1828ebc..66403d0 100644
--- a/doc/src/porting/porting4-dnd.qdoc
+++ b/doc/src/porting/porting4-dnd.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/porting/porting4-overview.qdoc b/doc/src/porting/porting4-overview.qdoc
index 39a7cb9..f949460 100644
--- a/doc/src/porting/porting4-overview.qdoc
+++ b/doc/src/porting/porting4-overview.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/porting/porting4.qdoc b/doc/src/porting/porting4.qdoc
index 69bf877..ab0762a 100644
--- a/doc/src/porting/porting4.qdoc
+++ b/doc/src/porting/porting4.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/porting/qt3to4.qdoc b/doc/src/porting/qt3to4.qdoc
index e833b57..26eeee4 100644
--- a/doc/src/porting/qt3to4.qdoc
+++ b/doc/src/porting/qt3to4.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/porting/qt4-accessibility.qdoc b/doc/src/porting/qt4-accessibility.qdoc
index 0abcfed..634dda4 100644
--- a/doc/src/porting/qt4-accessibility.qdoc
+++ b/doc/src/porting/qt4-accessibility.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/porting/qt4-arthur.qdoc b/doc/src/porting/qt4-arthur.qdoc
index f657c83..1d6819d 100644
--- a/doc/src/porting/qt4-arthur.qdoc
+++ b/doc/src/porting/qt4-arthur.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/porting/qt4-designer.qdoc b/doc/src/porting/qt4-designer.qdoc
index 36881df..ea5147a 100644
--- a/doc/src/porting/qt4-designer.qdoc
+++ b/doc/src/porting/qt4-designer.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -36,18 +36,14 @@
\QD has been completely re-written based on our experience with
the previous versions of the product for Qt 3. One of the main new
- ideas behind this new version is to release the application as a
+ ideas is to release the application as a
collection of interchangeable components that include the property
editor, the widget box, and other useful tools for creating
graphical user interfaces with Qt. These components can either be
used together in the \QD application, or independently integrated
into other systems. As a result, certain features such as the
project editor and code editor have been removed from the version
- included with this release.
-
- The current version of \QD is near feature complete and can be used for
- many tasks. However, it is still under continuous development. This
- document will explain what is already in place.
+ included with release 4.
See also the \l{Qt Designer Manual}.
@@ -128,7 +124,7 @@
\row
\i \bold{Widget Editing Mode}
- The new \QD allows widgets to be dropped into existing layouts on
+ \QD now allows widgets to be dropped into existing layouts on
the form. Previously, it was necessary to break layouts in order
to add new widgets to them.
@@ -189,7 +185,7 @@
\row
\i \bold{The Resource Editor}
- The new \QD fully supports The Qt Resource System, and provide the
+ \QD now fully supports The Qt Resource System, and provides the
Resource Editor to help designers and developers manage the
resources that are needed by their applications.
@@ -210,8 +206,8 @@
\i \inlineimage designer-action-editor.png
\i \bold{The Action Editor}
- With the release of Qt 4.1, \QD introduces the Action Editor
- simplifying the management of actions when creating main window
+ With the release of Qt 4.1, \QD the Action Editor was introduced
+ to simplify the management of actions when creating main window
applications.
When creating a main window, you can add a menu bar and toolbars
@@ -261,7 +257,7 @@
\section1 Run-Time Support for Forms
- With the Qt 4.1 release, the new QtUiTools module is introduced to
+ With the Qt 4.1 release, the new QtUiTools module was introduced to
provide classes handling forms created with \QD.
Currently the module only contains the QUiLoader class.
diff --git a/doc/src/porting/qt4-interview.qdoc b/doc/src/porting/qt4-interview.qdoc
index f2dab2f..973740a 100644
--- a/doc/src/porting/qt4-interview.qdoc
+++ b/doc/src/porting/qt4-interview.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/porting/qt4-mainwindow.qdoc b/doc/src/porting/qt4-mainwindow.qdoc
index b160d63..73c9b2b 100644
--- a/doc/src/porting/qt4-mainwindow.qdoc
+++ b/doc/src/porting/qt4-mainwindow.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/porting/qt4-network.qdoc b/doc/src/porting/qt4-network.qdoc
index f622b5a..52afb6a 100644
--- a/doc/src/porting/qt4-network.qdoc
+++ b/doc/src/porting/qt4-network.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/porting/qt4-scribe.qdoc b/doc/src/porting/qt4-scribe.qdoc
index 0a9596e..0ab1edf 100644
--- a/doc/src/porting/qt4-scribe.qdoc
+++ b/doc/src/porting/qt4-scribe.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/porting/qt4-sql.qdoc b/doc/src/porting/qt4-sql.qdoc
index 36ca4ef..b2de58f 100644
--- a/doc/src/porting/qt4-sql.qdoc
+++ b/doc/src/porting/qt4-sql.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/porting/qt4-styles.qdoc b/doc/src/porting/qt4-styles.qdoc
index d52a9ce..4eb06c9 100644
--- a/doc/src/porting/qt4-styles.qdoc
+++ b/doc/src/porting/qt4-styles.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/porting/qt4-threads.qdoc b/doc/src/porting/qt4-threads.qdoc
index b389c6c..3dd3594 100644
--- a/doc/src/porting/qt4-threads.qdoc
+++ b/doc/src/porting/qt4-threads.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/porting/qt4-tulip.qdoc b/doc/src/porting/qt4-tulip.qdoc
index 333af84..48d2a9e 100644
--- a/doc/src/porting/qt4-tulip.qdoc
+++ b/doc/src/porting/qt4-tulip.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/qt-resources.qdoc b/doc/src/qt-resources.qdoc
index 9a6637f..70a8c79 100644
--- a/doc/src/qt-resources.qdoc
+++ b/doc/src/qt-resources.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/qt-webpages.qdoc b/doc/src/qt-webpages.qdoc
index 5d9b41b..05817df 100644
--- a/doc/src/qt-webpages.qdoc
+++ b/doc/src/qt-webpages.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -46,8 +46,8 @@
*/
/*!
- \externalpage http://qt.nokia.com/products/add-on-products/add-on-products/
- \title Third-Party Tools
+ \externalpage http://qt.nokia.com/services-partners/partners/partner-directory
+ \title Partner Directory
*/
/*!
diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc
index 919bb88..2384051 100644
--- a/doc/src/qt4-intro.qdoc
+++ b/doc/src/qt4-intro.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -157,7 +157,7 @@
\l{QtUiTools}{dynamic user interface building}.
\o New \l{Proxy Models}{proxy models} to enable view-specific sorting and
filtering of data displayed using item views.
- \o Support for \l{Installing Qt on Mac OS X}{universal binaries} on Mac OS X.
+ \o Support for \l{Installing Qt for Mac OS X}{universal binaries} on Mac OS X.
\o Additional features for developers using \l{QtOpenGL}{OpenGL}, such as
support for pixel and sample buffers.
\o A flexible \l{QSyntaxHighlighter}{syntax highlighting class} based on the
diff --git a/doc/src/scripting/ecmascript.qdoc b/doc/src/scripting/ecmascript.qdoc
index 508bf3b..b08c3ae 100644
--- a/doc/src/scripting/ecmascript.qdoc
+++ b/doc/src/scripting/ecmascript.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/scripting/qtscriptdebugger-manual.qdoc b/doc/src/scripting/qtscriptdebugger-manual.qdoc
index 0b1f0f4..a19d8d4 100644
--- a/doc/src/scripting/qtscriptdebugger-manual.qdoc
+++ b/doc/src/scripting/qtscriptdebugger-manual.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/scripting/qtscriptextensions.qdoc b/doc/src/scripting/qtscriptextensions.qdoc
index 8aa8b4f..5825c0a 100644
--- a/doc/src/scripting/qtscriptextensions.qdoc
+++ b/doc/src/scripting/qtscriptextensions.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/scripting/scripting.qdoc b/doc/src/scripting/scripting.qdoc
index 70a17cf..a5f3d76 100644
--- a/doc/src/scripting/scripting.qdoc
+++ b/doc/src/scripting/scripting.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/snippets/code/doc_src_emb-pointer.qdoc b/doc/src/snippets/code/doc_src_emb-pointer.qdoc
index d333c90..b051a98 100644
--- a/doc/src/snippets/code/doc_src_emb-pointer.qdoc
+++ b/doc/src/snippets/code/doc_src_emb-pointer.qdoc
@@ -104,6 +104,10 @@ QWS_MOUSE_PROTO=IntelliMouse:/dev/input/mouse0
//! [11]
+//! [show permissions]
+ls -l /dev/input/mouse0
+//! [show permissions]
+
//! [12]
chmod a+rw /dev/input/mouse0
//! [12]
diff --git a/doc/src/snippets/code/doc_src_fdl.qdoc b/doc/src/snippets/code/doc_src_fdl.qdoc
index 3c15dfe..b55e663 100644
--- a/doc/src/snippets/code/doc_src_fdl.qdoc
+++ b/doc/src/snippets/code/doc_src_fdl.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/snippets/code/doc_src_installation.qdoc b/doc/src/snippets/code/doc_src_installation.qdoc
index 0593567..bd23462 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
+./configure -platform linux-g++ -xplatform symbian-armcc
//! [38]
//! [39]
cd /home/user/qt/%VERSION%
-./configure -platform linux-g++ -xplatform symbian/linux-gcce -no-webkit
+./configure -platform linux-g++ -xplatform symbian-gcce -no-webkit
//! [39]
//! [40]
@@ -301,11 +301,24 @@ make
runonphone -s lib/Qt.sis
//! [47]
+//! [runonphone with device file path]
+runonphone -s lib/Qt.sis -p /dev/ttyUSB1
+//! [runonphone with device file path]
+
//! [48]
cd demos/embedded/fluidlauncher
runonphone -s fluidlauncher.sis fluidlauncher.exe
//! [48]
+//! [make runonphone with options]
+make runonphone "QT_RUN_ON_PHONE_OPTIONS=-p /dev/ttyUSB1"
+//! [make runonphone with options]
+
+//! [make runonphone with preset environment variable]
+export QT_RUN_ON_PHONE_OPTIONS="-p /dev/ttyUSB1"
+make runonphone
+//! [make runonphone with preset environment variable]
+
//! [49]
cd myapp
qmake
diff --git a/doc/src/snippets/code/doc_src_linguist-manual.qdoc b/doc/src/snippets/code/doc_src_linguist-manual.qdoc
index db99120..294afe0 100644
--- a/doc/src/snippets/code/doc_src_linguist-manual.qdoc
+++ b/doc/src/snippets/code/doc_src_linguist-manual.qdoc
@@ -92,8 +92,15 @@ Options:
Usage:
lrelease [options] project-file
lrelease [options] ts-files [-qm qm-file]
+
+lrelease is part of Qt's Linguist tool chain. It can be used as a
+stand-alone tool to convert XML-based translations files in the TS
+format into the 'compiled' QM format used by QTranslator objects.
+
Options:
-help Display this information and exit
+ -idbased
+ Use IDs instead of source strings for message keying
-compress
Compress the QM files
-nounfinished
@@ -101,6 +108,9 @@ Options:
-removeidentical
If the translated text is the same as
the source text, do not include the message
+ -markuntranslated <prefix>
+ If a message has no real translation, use the source text
+ prefixed with the given string instead
-silent
Do not explain what is being done
-version
diff --git a/doc/src/snippets/code/doc_src_qmake-manual.qdoc b/doc/src/snippets/code/doc_src_qmake-manual.qdoc
index 4f74e9c..ab67a3d 100644
--- a/doc/src/snippets/code/doc_src_qmake-manual.qdoc
+++ b/doc/src/snippets/code/doc_src_qmake-manual.qdoc
@@ -193,15 +193,15 @@ DEFINES += USE_MY_STUFF QT_DLL
//! [28]
-myFiles.sources = path\*.png
+myFiles.files = path\*.png
DEPLOYMENT += myFiles
//! [28]
//! [29]
-myFiles.sources = path\file1.ext1 path2\file2.ext1 path3\*
+myFiles.files = path\file1.ext1 path2\file2.ext1 path3\*
myFiles.path = \some\path\on\device
-someother.sources = C:\additional\files\*
+someother.files = C:\additional\files\*
someother.path = \myFiles\path2
DEPLOYMENT += myFiles someother
//! [29]
@@ -849,12 +849,12 @@ CONFIG(debug, debug|release) {
//! [127]
//! [128]
-customplugin.sources = customimageplugin.dll
-customplugin.sources += c:\myplugins\othercustomimageplugin.dll
+customplugin.files = customimageplugin.dll
+customplugin.files += c:\myplugins\othercustomimageplugin.dll
customplugin.path = imageformats
-dynamiclibrary.sources = mylib.dll helper.exe
+dynamiclibrary.files = mylib.dll helper.exe
dynamiclibrary.path = \sys\bin
-globalplugin.sources = someglobalimageplugin.dll
+globalplugin.files = someglobalimageplugin.dll
globalplugin.path = \resource\qt\plugins\imageformats
DEPLOYMENT += customplugin dynamiclibrary globalplugin
//! [128]
@@ -923,7 +923,7 @@ MMP_RULES += myIfdefBlock
//! [139]
//! [140]
-somelib.sources = somelib.dll
+somelib.files = somelib.dll
somelib.path = \sys\bin
somelib.pkg_prerules = "(0x12345678), 2, 2, 0, {\"Some Package\"}" \
"(0x87654321), 1, *, * ~ 2, 2, 0, {\"Some Other Package\"}"
@@ -1021,7 +1021,7 @@ DEPLOYMENT -= default_bin_deployment default_resource_deployment default_reg_dep
//! [155]
default_bin_deployment.flags += FILERUN RUNINSTALL
-dep_note.sources = install_note.txt
+dep_note.files = install_note.txt
dep_note.flags = FILETEXT TEXTEXIT
DEPLOYMENT += dep_note
//! [155]
diff --git a/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp b/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp
index 59e6ae0..07ff2a0 100644
--- a/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp
+++ b/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp
@@ -86,3 +86,38 @@ beginMoveRows(parent, 2, 2, parent, 0);
//! [9]
beginMoveRows(parent, 2, 2, parent, 4);
//! [9]
+
+
+//! [10]
+class CustomDataProxy : public QSortFilterProxyModel
+{
+ Q_OBJECT
+public:
+ CustomDataProxy(QObject *parent)
+ : QSortFilterProxyModel(parent)
+ {
+ }
+
+ ...
+
+ QVariant data(const QModelIndex &index, int role)
+ {
+ if (role != Qt::BackgroundRole)
+ return QSortFilterProxyModel::data(index, role);
+
+ if (m_customData.contains(index.row()))
+ return m_customData.value(index.row());
+ return QSortFilterProxyModel::data(index, role);
+ }
+
+private slots:
+ void resetInternalData()
+ {
+ m_customData.clear();
+ }
+
+private:
+ QHash<int, QVariant> m_customData;
+};
+//! [10]
+
diff --git a/doc/src/snippets/code/src_qtestlib_qtestcase.cpp b/doc/src/snippets/code/src_qtestlib_qtestcase.cpp
index c9bda61..adb0c34 100644
--- a/doc/src/snippets/code/src_qtestlib_qtestcase.cpp
+++ b/doc/src/snippets/code/src_qtestlib_qtestcase.cpp
@@ -48,7 +48,7 @@ QVERIFY(1 + 1 == 2);
//! [1]
-QVERIFY2(1 + 1 == 2, "A breach in basic arithmetic occured.");
+QVERIFY2(1 + 1 == 2, "A breach in basic arithmetic occurred.");
//! [1]
@@ -230,5 +230,21 @@ widget.show();
QTest::qWaitForWindowShown(&widget);
//! [24]
+//! [25]
+QWidget widget;
+
+QTest::touchEvent(&widget)
+ .press(0, QPoint(10, 10));
+QTest::touchEvent(&widget)
+ .stationary(0)
+ .press(1, QPoint(40, 10));
+QTest::touchEvent(&widget)
+ .move(0, QPoint(12, 12))
+ .move(1, QPoint(45, 5));
+QTest::touchEvent(&widget)
+ .release(0)
+ .release(1);
+//! [25]
+
}
diff --git a/doc/src/snippets/declarative/borderimage/borderimage-defaults.qml b/doc/src/snippets/declarative/borderimage/borderimage-defaults.qml
new file mode 100644
index 0000000..1888f4e
--- /dev/null
+++ b/doc/src/snippets/declarative/borderimage/borderimage-defaults.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 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$
+**
+****************************************************************************/
+
+import QtQuick 1.0
+
+Rectangle {
+ id: page
+ color: "white"
+ width: 180; height: 180
+
+//! [tiled border image]
+BorderImage {
+ width: 180; height: 180
+ border { left: 30; top: 30; right: 30; bottom: 30 }
+ source: "pics/borderframe.png"
+}
+//! [tiled border image]
+}
diff --git a/doc/src/snippets/declarative/flipable/flipable.qml b/doc/src/snippets/declarative/flipable/flipable.qml
index cd5da4b..8d48bd9 100644
--- a/doc/src/snippets/declarative/flipable/flipable.qml
+++ b/doc/src/snippets/declarative/flipable/flipable.qml
@@ -46,26 +46,27 @@ Flipable {
width: 240
height: 240
- property int angle: 0
property bool flipped: false
- front: Image { source: "front.png" }
- back: Image { source: "back.png" }
+ front: Image { source: "front.png"; anchors.centerIn: parent }
+ back: Image { source: "back.png"; anchors.centerIn: parent }
transform: Rotation {
- origin.x: flipable.width/2; origin.y: flipable.height/2
- axis.x: 0; axis.y: 1; axis.z: 0 // rotate around y-axis
- angle: flipable.angle
+ id: rotation
+ origin.x: flipable.width/2
+ origin.y: flipable.height/2
+ axis.x: 0; axis.y: 1; axis.z: 0 // set axis.y to 1 to rotate around y-axis
+ angle: 0 // the default angle
}
states: State {
name: "back"
- PropertyChanges { target: flipable; angle: 180 }
+ PropertyChanges { target: rotation; angle: 180 }
when: flipable.flipped
}
transitions: Transition {
- NumberAnimation { properties: "angle"; duration: 1000 }
+ NumberAnimation { target: rotation; property: "angle"; duration: 4000 }
}
MouseArea {
diff --git a/doc/src/snippets/declarative/keys/keys-handler.qml b/doc/src/snippets/declarative/keys/keys-handler.qml
new file mode 100644
index 0000000..be0eedb
--- /dev/null
+++ b/doc/src/snippets/declarative/keys/keys-handler.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 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$
+**
+****************************************************************************/
+
+import QtQuick 1.0
+
+Item {
+ width: 400; height: 400
+
+//! [key item]
+Item {
+ anchors.fill: parent
+ focus: true
+ Keys.onLeftPressed: console.log("move left")
+}
+//! [key item]
+
+Text {
+ anchors.fill: parent
+ text: "Press a cursor key"
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+}
+}
diff --git a/doc/src/snippets/declarative/keys/keys-pressed.qml b/doc/src/snippets/declarative/keys/keys-pressed.qml
new file mode 100644
index 0000000..90a4e37
--- /dev/null
+++ b/doc/src/snippets/declarative/keys/keys-pressed.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 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$
+**
+****************************************************************************/
+
+import QtQuick 1.0
+
+Item {
+ width: 400; height: 400
+
+//! [key item]
+Item {
+ anchors.fill: parent
+ focus: true
+ Keys.onPressed: {
+ if (event.key == Qt.Key_Left) {
+ console.log("move left");
+ event.accepted = true;
+ }
+ }
+}
+//! [key item]
+
+Text {
+ anchors.fill: parent
+ text: "Press a cursor key"
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+}
+}
diff --git a/doc/src/snippets/declarative/loader/sizeitem.qml b/doc/src/snippets/declarative/loader/sizeitem.qml
new file mode 100644
index 0000000..6ace8d6
--- /dev/null
+++ b/doc/src/snippets/declarative/loader/sizeitem.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 documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+//![0]
+import QtQuick 1.0
+
+Item {
+ width: 200; height: 200
+
+ Loader {
+ // position the Loader in the center of the parent
+ anchors.centerIn: parent
+ sourceComponent: rect
+ }
+
+ Component {
+ id: rect
+ Rectangle {
+ width: 50
+ height: 50
+ color: "red"
+ }
+ }
+}
+//![0]
diff --git a/doc/src/snippets/declarative/loader/sizeloader.qml b/doc/src/snippets/declarative/loader/sizeloader.qml
new file mode 100644
index 0000000..eac7d57
--- /dev/null
+++ b/doc/src/snippets/declarative/loader/sizeloader.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 documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+//![0]
+import QtQuick 1.0
+
+Item {
+ width: 200; height: 200
+
+ Loader {
+ // Explicitly set the size of the Loader to the parent item's size
+ anchors.fill: parent
+ sourceComponent: rect
+ }
+
+ Component {
+ id: rect
+ Rectangle {
+ width: 50
+ height: 50
+ color: "red"
+ }
+ }
+}
+//![0]
diff --git a/doc/src/snippets/declarative/qtbinding/context-advanced/MyItem.qml b/doc/src/snippets/declarative/qtbinding/context-advanced/MyItem.qml
new file mode 100644
index 0000000..607651a
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/context-advanced/MyItem.qml
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+//![0]
+// MyItem.qml
+import QtQuick 1.0
+
+Text { text: applicationData.getCurrentDateTime() }
+//![0]
+
diff --git a/doc/src/snippets/declarative/qtbinding/context-advanced/applicationdata.h b/doc/src/snippets/declarative/qtbinding/context-advanced/applicationdata.h
new file mode 100644
index 0000000..930e381
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/context-advanced/applicationdata.h
@@ -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 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 <QObject>
+#include <QDateTime>
+
+//![0]
+class ApplicationData : public QObject
+{
+ Q_OBJECT
+public:
+ Q_INVOKABLE QDateTime getCurrentDateTime() const {
+ return QDateTime::currentDateTime();
+ }
+};
+//![0]
diff --git a/doc/src/snippets/declarative/qtbinding/context-advanced/connections.qml b/doc/src/snippets/declarative/qtbinding/context-advanced/connections.qml
new file mode 100644
index 0000000..749bea3
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/context-advanced/connections.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 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$
+**
+****************************************************************************/
+import QtQuick 1.0
+
+//![0]
+Text {
+ text: applicationData.getCurrentDateTime()
+
+ Connections {
+ target: applicationData
+ onDataChanged: console.log("The application data changed!")
+ }
+}
+//![0]
+
diff --git a/doc/src/snippets/declarative/qtbinding/context-advanced/context-advanced.pro b/doc/src/snippets/declarative/qtbinding/context-advanced/context-advanced.pro
new file mode 100644
index 0000000..188a9fb
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/context-advanced/context-advanced.pro
@@ -0,0 +1,3 @@
+QT += declarative
+SOURCES += main.cpp
+HEADERS += applicationdata.h
diff --git a/doc/src/snippets/declarative/qtbinding/context-advanced/main.cpp b/doc/src/snippets/declarative/qtbinding/context-advanced/main.cpp
new file mode 100644
index 0000000..b92215b
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/context-advanced/main.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 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 <QtCore>
+#include <QtDeclarative>
+
+#include "applicationdata.h"
+
+//![0]
+int main(int argc, char *argv[]) {
+ QApplication app(argc, argv);
+
+ QDeclarativeView view;
+
+ ApplicationData data;
+ view.rootContext()->setContextProperty("applicationData", &data);
+
+ view.setSource(QUrl::fromLocalFile("MyItem.qml"));
+ view.show();
+
+ return app.exec();
+}
+//![0]
+
diff --git a/doc/src/snippets/declarative/qtbinding/context/MyItem.qml b/doc/src/snippets/declarative/qtbinding/context/MyItem.qml
new file mode 100644
index 0000000..faa42dc
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/context/MyItem.qml
@@ -0,0 +1,45 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+//![0]
+// MyItem.qml
+import QtQuick 1.0
+
+Text { text: currentDateTime }
+//![0]
diff --git a/doc/src/snippets/declarative/qtbinding/contextproperties/contextproperties.pro b/doc/src/snippets/declarative/qtbinding/context/context.pro
index 68eeaf2..68eeaf2 100644
--- a/doc/src/snippets/declarative/qtbinding/contextproperties/contextproperties.pro
+++ b/doc/src/snippets/declarative/qtbinding/context/context.pro
diff --git a/doc/src/snippets/declarative/qtbinding/context/main.cpp b/doc/src/snippets/declarative/qtbinding/context/main.cpp
new file mode 100644
index 0000000..bbe9956
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/context/main.cpp
@@ -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 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 <QtCore>
+#include <QtDeclarative>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+//![0]
+QDeclarativeView view;
+view.rootContext()->setContextProperty("currentDateTime", QDateTime::currentDateTime());
+view.setSource(QUrl::fromLocalFile("MyItem.qml"));
+view.show();
+//![0]
+
+ return app.exec();
+}
+
diff --git a/doc/src/snippets/declarative/qtbinding/contextproperties/main.cpp b/doc/src/snippets/declarative/qtbinding/contextproperties/main.cpp
deleted file mode 100644
index 6887e8f..0000000
--- a/doc/src/snippets/declarative/qtbinding/contextproperties/main.cpp
+++ /dev/null
@@ -1,78 +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 <QDeclarativeComponent>
-#include <QDeclarativeEngine>
-
-//![0]
-#include <QApplication>
-#include <QDeclarativeView>
-#include <QDeclarativeContext>
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- QDeclarativeView view;
- QDeclarativeContext *context = view.rootContext();
- context->setContextProperty("backgroundColor",
- QColor(Qt::yellow));
-
- view.setSource(QUrl::fromLocalFile("main.qml"));
- view.show();
-
- return app.exec();
-}
-//![0]
-
-static void alternative()
-{
- // Alternatively, if we don't actually want to display main.qml:
-//![1]
- QDeclarativeEngine engine;
- QDeclarativeContext *windowContext = new QDeclarativeContext(engine.rootContext());
- windowContext->setContextProperty("backgroundColor", QColor(Qt::yellow));
-
- QDeclarativeComponent component(&engine, "main.qml");
- QObject *window = component.create(windowContext);
-//![1]
-}
-
-
diff --git a/doc/src/snippets/declarative/qtbinding/contextproperties/main.qml b/doc/src/snippets/declarative/qtbinding/contextproperties/main.qml
deleted file mode 100644
index 425346d..0000000
--- a/doc/src/snippets/declarative/qtbinding/contextproperties/main.qml
+++ /dev/null
@@ -1,55 +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$
-**
-****************************************************************************/
-
-//![0]
-import QtQuick 1.0
-
-Rectangle {
- width: 300
- height: 300
-
- color: backgroundColor
-
- Text {
- anchors.centerIn: parent
- text: "Hello Yellow World!"
- }
-}
-//![0]
diff --git a/doc/src/snippets/declarative/qtbinding/custompalette/custompalette.h b/doc/src/snippets/declarative/qtbinding/custompalette/custompalette.h
deleted file mode 100644
index 7e84bd4..0000000
--- a/doc/src/snippets/declarative/qtbinding/custompalette/custompalette.h
+++ /dev/null
@@ -1,79 +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 <QObject>
-#include <QColor>
-
-//![0]
-class CustomPalette : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QColor background READ background WRITE setBackground NOTIFY backgroundChanged)
- Q_PROPERTY(QColor text READ text WRITE setText NOTIFY textChanged)
-
-public:
- CustomPalette() : m_background(Qt::white), m_text(Qt::black) {}
-
- QColor background() const { return m_background; }
- void setBackground(const QColor &c) {
- if (c != m_background) {
- m_background = c;
- emit backgroundChanged();
- }
- }
-
- QColor text() const { return m_text; }
- void setText(const QColor &c) {
- if (c != m_text) {
- m_text = c;
- emit textChanged();
- }
- }
-
-signals:
- void textChanged();
- void backgroundChanged();
-
-private:
- QColor m_background;
- QColor m_text;
-};
-
-//![0]
diff --git a/doc/src/snippets/declarative/qtbinding/custompalette/custompalette.pro b/doc/src/snippets/declarative/qtbinding/custompalette/custompalette.pro
deleted file mode 100644
index e6af0d0..0000000
--- a/doc/src/snippets/declarative/qtbinding/custompalette/custompalette.pro
+++ /dev/null
@@ -1,3 +0,0 @@
-QT += declarative
-HEADERS += custompalette.h
-SOURCES += main.cpp
diff --git a/doc/src/snippets/declarative/qtbinding/custompalette/main.cpp b/doc/src/snippets/declarative/qtbinding/custompalette/main.cpp
deleted file mode 100644
index 7481b75..0000000
--- a/doc/src/snippets/declarative/qtbinding/custompalette/main.cpp
+++ /dev/null
@@ -1,61 +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 <QApplication>
-#include <QDeclarativeView>
-#include <QDeclarativeContext>
-
-#include "custompalette.h"
-
-//![0]
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- QDeclarativeView view;
- view.rootContext()->setContextProperty("palette", new CustomPalette);
-
- view.setSource(QUrl::fromLocalFile("main.qml"));
- view.show();
-
- return app.exec();
-}
-//![0]
-
diff --git a/doc/src/snippets/declarative/qtbinding/custompalette/main.qml b/doc/src/snippets/declarative/qtbinding/custompalette/main.qml
deleted file mode 100644
index a20d9e0..0000000
--- a/doc/src/snippets/declarative/qtbinding/custompalette/main.qml
+++ /dev/null
@@ -1,62 +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$
-**
-****************************************************************************/
-
-//![0]
-import QtQuick 1.0
-
-Rectangle {
- width: 240
- height: 320
- color: palette.background
-
- Text {
- anchors.centerIn: parent
- color: palette.text
- text: "Click me to change color!"
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: {
- palette.text = "blue";
- }
- }
-}
-//![0]
diff --git a/doc/src/snippets/declarative/qtbinding/enums/enums.pro b/doc/src/snippets/declarative/qtbinding/enums/enums.pro
new file mode 100644
index 0000000..82bc123
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/enums/enums.pro
@@ -0,0 +1,3 @@
+QT += declarative
+SOURCES += main.cpp
+HEADERS += imageviewer.h
diff --git a/doc/src/snippets/declarative/qtbinding/enums/imageviewer.h b/doc/src/snippets/declarative/qtbinding/enums/imageviewer.h
new file mode 100644
index 0000000..8aaddee
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/enums/imageviewer.h
@@ -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 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 <QtCore>
+#include <QtDeclarative>
+
+//![start]
+class ImageViewer : public QDeclarativeItem
+{
+ Q_OBJECT
+ Q_ENUMS(Status)
+ Q_PROPERTY(Status status READ status NOTIFY statusChanged)
+public:
+ enum Status {
+ Ready,
+ Loading,
+ Error
+ };
+
+ Status status() const;
+//![start]
+
+ ImageViewer(QDeclarativeItem *parent = 0);
+
+public slots:
+ void emitSignals();
+
+//![end]
+signals:
+ void statusChanged();
+};
+//![end]
diff --git a/doc/src/snippets/declarative/qtbinding/enums/main.cpp b/doc/src/snippets/declarative/qtbinding/enums/main.cpp
new file mode 100644
index 0000000..9243f4b
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/enums/main.cpp
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** 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 <QtCore>
+#include <QtDeclarative>
+
+#include "imageviewer.h"
+
+ImageViewer::ImageViewer(QDeclarativeItem *parent)
+ : QDeclarativeItem(parent)
+{
+ QTimer::singleShot(0, this, SLOT(emitSignals()));
+}
+
+ImageViewer::Status ImageViewer::status() const
+{
+ return Ready;
+}
+
+void ImageViewer::emitSignals()
+{
+ emit statusChanged();
+}
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ qmlRegisterType<ImageViewer>("MyLibrary", 1, 0, "ImageViewer");
+
+ QDeclarativeView view;
+ view.setSource(QUrl::fromLocalFile("standalone.qml"));
+ view.show();
+
+ return app.exec();
+}
+
diff --git a/doc/src/snippets/declarative/qtbinding/enums/standalone.qml b/doc/src/snippets/declarative/qtbinding/enums/standalone.qml
new file mode 100644
index 0000000..ad6c14c
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/enums/standalone.qml
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+import MyLibrary 1.0
+
+//![0]
+ImageViewer {
+ onStatusChanged: {
+ if (status == ImageViewer.Ready)
+ console.log("Image viewer is ready!")
+ }
+}
+//![0]
diff --git a/doc/src/snippets/declarative/qtbinding/functions-cpp/MyItem.qml b/doc/src/snippets/declarative/qtbinding/functions-cpp/MyItem.qml
new file mode 100644
index 0000000..8d8cd56
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/functions-cpp/MyItem.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 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$
+**
+****************************************************************************/
+//![0]
+// MyItem.qml
+import QtQuick 1.0
+
+Item {
+ width: 100; height: 100
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ myObject.cppMethod("Hello from QML")
+ myObject.cppSlot(12345)
+ }
+ }
+}
+//![0]
diff --git a/doc/src/snippets/declarative/qtbinding/functions-cpp/functions-qml.pro b/doc/src/snippets/declarative/qtbinding/functions-cpp/functions-qml.pro
new file mode 100644
index 0000000..01066c1
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/functions-cpp/functions-qml.pro
@@ -0,0 +1,3 @@
+QT += declarative
+SOURCES += main.cpp
+HEADERS += myclass.h
diff --git a/doc/src/snippets/declarative/qtbinding/functions-cpp/main.cpp b/doc/src/snippets/declarative/qtbinding/functions-cpp/main.cpp
new file mode 100644
index 0000000..91d6aec
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/functions-cpp/main.cpp
@@ -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 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 <QtCore>
+#include <QtDeclarative>
+
+#include "myclass.h"
+
+//![0]
+int main(int argc, char *argv[]) {
+ QApplication app(argc, argv);
+
+ QDeclarativeView view;
+ MyClass myClass;
+ view.rootContext()->setContextProperty("myObject", &myClass);
+
+ view.setSource(QUrl::fromLocalFile("MyItem.qml"));
+ view.show();
+
+ return app.exec();
+}
+//![0]
+
diff --git a/doc/src/snippets/declarative/qtbinding/functions-cpp/myclass.h b/doc/src/snippets/declarative/qtbinding/functions-cpp/myclass.h
new file mode 100644
index 0000000..76c628e
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/functions-cpp/myclass.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 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 <QObject>
+#include <QDebug>
+
+//![0]
+class MyClass : public QObject
+{
+ Q_OBJECT
+public:
+ Q_INVOKABLE void cppMethod(const QString &msg) {
+ qDebug() << "Called the C++ method with" << msg;
+ }
+
+public slots:
+ void cppSlot(int number) {
+ qDebug() << "Called the C++ slot with" << number;
+ }
+};
+//![0]
diff --git a/doc/src/snippets/declarative/qtbinding/functions-qml/MyItem.qml b/doc/src/snippets/declarative/qtbinding/functions-qml/MyItem.qml
new file mode 100644
index 0000000..6161d6e
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/functions-qml/MyItem.qml
@@ -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 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$
+**
+****************************************************************************/
+//![0]
+// MyItem.qml
+import QtQuick 1.0
+
+Item {
+ function myQmlFunction(msg) {
+ console.log("Got message:", msg)
+ return "some return value"
+ }
+}
+//![0]
diff --git a/doc/src/snippets/declarative/qtbinding/functions-qml/functions-qml.pro b/doc/src/snippets/declarative/qtbinding/functions-qml/functions-qml.pro
new file mode 100644
index 0000000..68eeaf2
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/functions-qml/functions-qml.pro
@@ -0,0 +1,2 @@
+QT += declarative
+SOURCES += main.cpp
diff --git a/doc/src/snippets/declarative/qtbinding/functions-qml/main.cpp b/doc/src/snippets/declarative/qtbinding/functions-qml/main.cpp
new file mode 100644
index 0000000..3e9e51e
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/functions-qml/main.cpp
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the 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 <QtCore>
+#include <QtDeclarative>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+//![0]
+// main.cpp
+QDeclarativeEngine engine;
+QDeclarativeComponent component(&engine, "MyItem.qml");
+QObject *object = component.create();
+
+QVariant returnedValue;
+QVariant msg = "Hello from C++";
+QMetaObject::invokeMethod(object, "myQmlFunction",
+ Q_RETURN_ARG(QVariant, returnedValue),
+ Q_ARG(QVariant, msg));
+
+qDebug() << "QML function returned:" << returnedValue.toString();
+delete object;
+//![0]
+}
+
diff --git a/doc/src/snippets/declarative/qtbinding/loading/MyItem.qml b/doc/src/snippets/declarative/qtbinding/loading/MyItem.qml
new file mode 100644
index 0000000..40138f6
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/loading/MyItem.qml
@@ -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 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$
+**
+****************************************************************************/
+//![start]
+import QtQuick 1.0
+
+Item {
+ width: 100; height: 100
+//![start]
+
+//![child]
+ Rectangle {
+ anchors.fill: parent
+ objectName: "rect"
+ }
+//![child]
+
+//![end]
+}
+//![end]
diff --git a/doc/src/snippets/declarative/qtbinding/loading/loading.pro b/doc/src/snippets/declarative/qtbinding/loading/loading.pro
new file mode 100644
index 0000000..68eeaf2
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/loading/loading.pro
@@ -0,0 +1,2 @@
+QT += declarative
+SOURCES += main.cpp
diff --git a/doc/src/snippets/declarative/qtbinding/loading/main.cpp b/doc/src/snippets/declarative/qtbinding/loading/main.cpp
new file mode 100644
index 0000000..bd400b0
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/loading/main.cpp
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** 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 <QtCore>
+#include <QtDeclarative>
+
+static void withComponent()
+{
+//![QDeclarativeComponent-a]
+// Using QDeclarativeComponent
+QDeclarativeEngine engine;
+QDeclarativeComponent component(&engine,
+ QUrl::fromLocalFile("MyItem.qml"));
+QObject *object = component.create();
+//![QDeclarativeComponent-a]
+}
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+//![QDeclarativeView]
+// Using QDeclarativeView
+QDeclarativeView view;
+view.setSource(QUrl::fromLocalFile("MyItem.qml"));
+view.show();
+QObject *object = view.rootObject();
+//![QDeclarativeView]
+
+//![properties]
+object->setProperty("width", 500);
+QDeclarativeProperty(object, "width").write(500);
+//![properties]
+
+//![cast]
+QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(object);
+item->setWidth(500);
+//![cast]
+
+//![findChild]
+QObject *rect = object->findChild<QObject*>("rect");
+if (rect)
+ rect->setProperty("color", "red");
+//![findChild]
+
+//![QDeclarativeComponent-b]
+delete object;
+//![QDeclarativeComponent-b]
+
+withComponent();
+
+ return app.exec();
+}
+
diff --git a/doc/src/snippets/declarative/qtbinding/newelements/imageviewer.h b/doc/src/snippets/declarative/qtbinding/newelements/imageviewer.h
new file mode 100644
index 0000000..fd9db5e
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/newelements/imageviewer.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 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 <QtCore>
+#include <QtDeclarative>
+
+//![0]
+class ImageViewer : public QDeclarativeItem
+{
+ Q_OBJECT
+ Q_PROPERTY(QUrl image READ image WRITE setImage NOTIFY imageChanged)
+
+public:
+ void setImage(const QUrl &url);
+ QUrl image() const;
+
+signals:
+ void imageChanged();
+};
+//![0]
diff --git a/doc/src/snippets/declarative/qtbinding/newelements/main.cpp b/doc/src/snippets/declarative/qtbinding/newelements/main.cpp
new file mode 100644
index 0000000..57994ca
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/newelements/main.cpp
@@ -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 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 <QtCore>
+#include <QtDeclarative>
+
+#include "imageviewer.h"
+
+void ImageViewer::setImage(const QUrl &url) {}
+QUrl ImageViewer::image() const { return QUrl(); }
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ //![register]
+ qmlRegisterType<ImageViewer>("MyLibrary", 1, 0, "ImageViewer");
+ //![register]
+
+ QDeclarativeView view;
+ view.setSource(QUrl::fromLocalFile("standalone.qml"));
+ view.show();
+
+ return app.exec();
+}
+
diff --git a/doc/src/snippets/declarative/qtbinding/newelements/newelements.pro b/doc/src/snippets/declarative/qtbinding/newelements/newelements.pro
new file mode 100644
index 0000000..82bc123
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/newelements/newelements.pro
@@ -0,0 +1,3 @@
+QT += declarative
+SOURCES += main.cpp
+HEADERS += imageviewer.h
diff --git a/doc/src/snippets/declarative/qtbinding/newelements/standalone.qml b/doc/src/snippets/declarative/qtbinding/newelements/standalone.qml
new file mode 100644
index 0000000..7345f21
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/newelements/standalone.qml
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+//![0]
+import MyLibrary 1.0
+
+ImageViewer { image: "smile.png" }
+//![0]
diff --git a/doc/src/snippets/declarative/qtbinding/properties-cpp/MyItem.qml b/doc/src/snippets/declarative/qtbinding/properties-cpp/MyItem.qml
new file mode 100644
index 0000000..9db4b93
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/properties-cpp/MyItem.qml
@@ -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 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$
+**
+****************************************************************************/
+//![0]
+// MyItem.qml
+import QtQuick 1.0
+
+Rectangle {
+ width: 100; height: 100
+ color: applicationData.backgroundColor
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: applicationData.backgroundColor = "red"
+ }
+}
+//![0]
+
diff --git a/doc/src/snippets/declarative/qtbinding/properties-cpp/applicationdata.h b/doc/src/snippets/declarative/qtbinding/properties-cpp/applicationdata.h
new file mode 100644
index 0000000..763a451
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/properties-cpp/applicationdata.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the 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 <QObject>
+#include <QColor>
+
+//![0]
+class ApplicationData : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QColor backgroundColor
+ READ backgroundColor
+ WRITE setBackgroundColor
+ NOTIFY backgroundColorChanged)
+
+public:
+ void setBackgroundColor(const QColor &c) {
+ if (c != m_color) {
+ m_color = c;
+ emit backgroundColorChanged();
+ }
+ }
+
+ QColor backgroundColor() const {
+ return m_color;
+ }
+
+signals:
+ void backgroundColorChanged();
+
+private:
+ QColor m_color;
+};
+//![0]
diff --git a/doc/src/snippets/declarative/qtbinding/properties-cpp/main.cpp b/doc/src/snippets/declarative/qtbinding/properties-cpp/main.cpp
new file mode 100644
index 0000000..36b508d
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/properties-cpp/main.cpp
@@ -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 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 <QtCore>
+#include <QtDeclarative>
+
+#include "applicationdata.h"
+
+int main(int argc, char *argv[]) {
+ QApplication app(argc, argv);
+
+ QDeclarativeView view;
+
+ ApplicationData data;
+ view.rootContext()->setContextProperty("applicationData", &data);
+
+ view.setSource(QUrl::fromLocalFile("MyItem.qml"));
+ view.show();
+
+ return app.exec();
+}
+
diff --git a/doc/src/snippets/declarative/qtbinding/properties-cpp/properties-cpp.pro b/doc/src/snippets/declarative/qtbinding/properties-cpp/properties-cpp.pro
new file mode 100644
index 0000000..188a9fb
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/properties-cpp/properties-cpp.pro
@@ -0,0 +1,3 @@
+QT += declarative
+SOURCES += main.cpp
+HEADERS += applicationdata.h
diff --git a/doc/src/snippets/declarative/qtbinding/properties-qml/MyItem.qml b/doc/src/snippets/declarative/qtbinding/properties-qml/MyItem.qml
new file mode 100644
index 0000000..a43ded8
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/properties-qml/MyItem.qml
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+//![0]
+// MyItem.qml
+import QtQuick 1.0
+
+Item {
+ property int someNumber: 100
+}
+//![0]
diff --git a/doc/src/snippets/declarative/qtbinding/properties-qml/main.cpp b/doc/src/snippets/declarative/qtbinding/properties-qml/main.cpp
new file mode 100644
index 0000000..d8daff8
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/properties-qml/main.cpp
@@ -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 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 <QtCore>
+#include <QtDeclarative>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+//![0]
+QDeclarativeEngine engine;
+QDeclarativeComponent component(&engine, "MyItem.qml");
+QObject *object = component.create();
+
+qDebug() << "Property value:" << QDeclarativeProperty::read(object, "someNumber").toInt();
+QDeclarativeProperty::write(object, "someNumber", 5000);
+
+qDebug() << "Property value:" << object->property("someNumber").toInt();
+object->setProperty("someNumber", 100);
+//![0]
+
+ return app.exec();
+}
+
diff --git a/doc/src/snippets/declarative/qtbinding/properties-qml/properties-qml.pro b/doc/src/snippets/declarative/qtbinding/properties-qml/properties-qml.pro
new file mode 100644
index 0000000..68eeaf2
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/properties-qml/properties-qml.pro
@@ -0,0 +1,2 @@
+QT += declarative
+SOURCES += main.cpp
diff --git a/doc/src/snippets/declarative/qtbinding/resources/main.qml b/doc/src/snippets/declarative/qtbinding/resources/main.qml
index 644d963..43029cf 100644
--- a/doc/src/snippets/declarative/qtbinding/resources/main.qml
+++ b/doc/src/snippets/declarative/qtbinding/resources/main.qml
@@ -39,9 +39,8 @@
****************************************************************************/
//![0]
+// main.qml
import QtQuick 1.0
-Image {
- source: "images/background.png"
-}
+Image { source: "images/background.png" }
//![0]
diff --git a/doc/src/snippets/declarative/qtbinding/signals-cpp/MyItem.qml b/doc/src/snippets/declarative/qtbinding/signals-cpp/MyItem.qml
new file mode 100644
index 0000000..d900830
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/signals-cpp/MyItem.qml
@@ -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 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$
+**
+****************************************************************************/
+//![0]
+// MyItem.qml
+import QtQuick 1.0
+
+Item {
+ Connections {
+ target: imageViewer
+ onImageChanged: console.log("Image has changed!")
+ }
+}
+//![0]
diff --git a/doc/src/snippets/declarative/qtbinding/signals-cpp/imageviewer.h b/doc/src/snippets/declarative/qtbinding/signals-cpp/imageviewer.h
new file mode 100644
index 0000000..7288d11
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/signals-cpp/imageviewer.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 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 <QtCore>
+#include <QtDeclarative>
+
+//![start]
+class ImageViewer : public QDeclarativeItem
+{
+ Q_OBJECT
+ Q_PROPERTY(QUrl image READ image WRITE setImage NOTIFY imageChanged)
+public:
+//![start]
+ ImageViewer(QDeclarativeItem *item = 0);
+
+ void setImage(const QUrl &url) {}
+ QUrl image() const { return QUrl(); }
+
+public slots:
+ void emitSignals();
+
+//![end]
+signals:
+ void imageChanged();
+ void loadingError(const QString &errorMsg);
+};
+//![end]
+
diff --git a/doc/src/snippets/declarative/qtbinding/signals-cpp/main.cpp b/doc/src/snippets/declarative/qtbinding/signals-cpp/main.cpp
new file mode 100644
index 0000000..e5dd33c
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/signals-cpp/main.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 <QtCore>
+#include <QtDeclarative>
+
+#include "imageviewer.h"
+
+
+ImageViewer::ImageViewer(QDeclarativeItem *item)
+ : QDeclarativeItem(item)
+{
+ QTimer::singleShot(0, this, SLOT(emitSignals()));
+}
+
+void ImageViewer::emitSignals()
+{
+ emit imageChanged();
+ emit loadingError("some error message");
+}
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ qmlRegisterType<ImageViewer>("MyLibrary", 1, 0, "ImageViewer");
+
+ QDeclarativeView standalone;
+ standalone.setSource(QUrl::fromLocalFile("standalone.qml"));
+ standalone.show();
+
+//![connections]
+ImageViewer viewer;
+
+QDeclarativeView view;
+view.rootContext()->setContextProperty("imageViewer", &viewer);
+
+view.setSource(QUrl::fromLocalFile("MyItem.qml"));
+view.show();
+//![connections]
+
+ return app.exec();
+}
+
+
diff --git a/doc/src/snippets/declarative/qtbinding/signals-cpp/signals-cpp.pro b/doc/src/snippets/declarative/qtbinding/signals-cpp/signals-cpp.pro
new file mode 100644
index 0000000..9aa8702
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/signals-cpp/signals-cpp.pro
@@ -0,0 +1,3 @@
+QT += declarative
+SOURCES += main.cpp
+HEADERS += "imageviewer.h"
diff --git a/doc/src/snippets/declarative/qtbinding/signals-cpp/standalone.qml b/doc/src/snippets/declarative/qtbinding/signals-cpp/standalone.qml
new file mode 100644
index 0000000..4027b19
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/signals-cpp/standalone.qml
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+import MyLibrary 1.0
+
+//![0]
+ImageViewer {
+ onImageChanged: console.log("Image changed!")
+ onLoadingError: console.log("Image failed to load:", errorMsg)
+}
+//![0]
+
diff --git a/doc/src/snippets/declarative/qtbinding/signals-qml/MyItem.qml b/doc/src/snippets/declarative/qtbinding/signals-qml/MyItem.qml
new file mode 100644
index 0000000..e4b6ced
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/signals-qml/MyItem.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 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$
+**
+****************************************************************************/
+//![0]
+// MyItem.qml
+import QtQuick 1.0
+
+Item {
+ id: item
+ width: 100; height: 100
+
+ signal qmlSignal(string msg)
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: item.qmlSignal("Hello from QML")
+ }
+}
+//![0]
diff --git a/doc/src/snippets/declarative/qtbinding/signals-qml/main.cpp b/doc/src/snippets/declarative/qtbinding/signals-qml/main.cpp
new file mode 100644
index 0000000..f1d03c4
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/signals-qml/main.cpp
@@ -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 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 <QtCore>
+#include <QtDeclarative>
+
+//![0]
+int main(int argc, char *argv[]) {
+ QApplication app(argc, argv);
+
+ QDeclarativeView view(QUrl::fromLocalFile("MyItem.qml"));
+ QObject *item = view.rootObject();
+
+ MyClass myClass;
+ QObject::connect(item, SIGNAL(qmlSignal(QString)),
+ &myClass, SLOT(cppSlot(QString)));
+
+ view.show();
+ return app.exec();
+}
+//![0]
+
+#include "moc_main.cpp"
diff --git a/doc/src/snippets/declarative/qtbinding/signals-qml/myclass.h b/doc/src/snippets/declarative/qtbinding/signals-qml/myclass.h
new file mode 100644
index 0000000..c326a54
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/signals-qml/myclass.h
@@ -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 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 <QObject>
+#include <QDebug>
+//![0]
+class MyClass : public QObject
+{
+ Q_OBJECT
+public slots:
+ void cppSlot(const QString &msg) {
+ qDebug() << "Called the C++ slot with message:" << msg;
+ }
+};
+//![0]
diff --git a/doc/src/snippets/declarative/qtbinding/signals-qml/signals-qml.pro b/doc/src/snippets/declarative/qtbinding/signals-qml/signals-qml.pro
new file mode 100644
index 0000000..01066c1
--- /dev/null
+++ b/doc/src/snippets/declarative/qtbinding/signals-qml/signals-qml.pro
@@ -0,0 +1,3 @@
+QT += declarative
+SOURCES += main.cpp
+HEADERS += myclass.h
diff --git a/doc/src/snippets/declarative/qtbinding/stopwatch/main.cpp b/doc/src/snippets/declarative/qtbinding/stopwatch/main.cpp
deleted file mode 100644
index 12481da..0000000
--- a/doc/src/snippets/declarative/qtbinding/stopwatch/main.cpp
+++ /dev/null
@@ -1,62 +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 "stopwatch.h"
-
-#include <QDeclarativeView>
-#include <QDeclarativeContext>
-#include <QApplication>
-
-//![0]
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- QDeclarativeView view;
- view.rootContext()->setContextProperty("stopwatch",
- new Stopwatch);
-
- view.setSource(QUrl::fromLocalFile("main.qml"));
- view.show();
-
- return app.exec();
-}
-//![0]
-
diff --git a/doc/src/snippets/declarative/qtbinding/stopwatch/main.qml b/doc/src/snippets/declarative/qtbinding/stopwatch/main.qml
deleted file mode 100644
index f894f71..0000000
--- a/doc/src/snippets/declarative/qtbinding/stopwatch/main.qml
+++ /dev/null
@@ -1,58 +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$
-**
-****************************************************************************/
-
-//![0]
-import QtQuick 1.0
-
-Rectangle {
- width: 300
- height: 300
-
- MouseArea {
- anchors.fill: parent
- onClicked: {
- if (stopwatch.isRunning())
- stopwatch.stop()
- else
- stopwatch.start();
- }
- }
-}
-//![0]
diff --git a/doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.cpp b/doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.cpp
deleted file mode 100644
index 124422f..0000000
--- a/doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.cpp
+++ /dev/null
@@ -1,62 +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 "stopwatch.h"
-
-Stopwatch::Stopwatch()
- : m_running(false)
-{
-}
-
-bool Stopwatch::isRunning() const
-{
- return m_running;
-}
-
-void Stopwatch::start()
-{
- m_running = true;
-}
-
-void Stopwatch::stop()
-{
- m_running = false;
-}
-
diff --git a/doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.h b/doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.h
deleted file mode 100644
index fd65916..0000000
--- a/doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.h
+++ /dev/null
@@ -1,61 +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 <QObject>
-
-//![0]
-class Stopwatch : public QObject
-{
- Q_OBJECT
-public:
- Stopwatch();
-
- Q_INVOKABLE bool isRunning() const;
-
-public slots:
- void start();
- void stop();
-
-private:
- bool m_running;
-};
-
-//![0]
-
diff --git a/doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.pro b/doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.pro
deleted file mode 100644
index d803e6a..0000000
--- a/doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.pro
+++ /dev/null
@@ -1,3 +0,0 @@
-QT += declarative
-HEADERS += stopwatch.h
-SOURCES += main.cpp stopwatch.cpp
diff --git a/doc/src/snippets/sqldatabase/sqldatabase.cpp b/doc/src/snippets/sqldatabase/sqldatabase.cpp
index abe2a67..a027a84 100644
--- a/doc/src/snippets/sqldatabase/sqldatabase.cpp
+++ b/doc/src/snippets/sqldatabase/sqldatabase.cpp
@@ -280,7 +280,7 @@ QVariant MyModel::data(const QModelIndex &item, int role) const
void QSqlTableModel_snippets()
{
//! [24]
- QSqlTableModel *model = new QSqlTableModel;
+ QSqlTableModel *model = new QSqlTableModel(parentObject, database);
model->setTable("employee");
model->setEditStrategy(QSqlTableModel::OnManualSubmit);
model->select();
diff --git a/doc/src/sql-programming/qsqldatatype-table.qdoc b/doc/src/sql-programming/qsqldatatype-table.qdoc
index 45ee944..3ec2fea 100644
--- a/doc/src/sql-programming/qsqldatatype-table.qdoc
+++ b/doc/src/sql-programming/qsqldatatype-table.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/sql-programming/sql-driver.qdoc b/doc/src/sql-programming/sql-driver.qdoc
index 350777a..9c99ad2 100644
--- a/doc/src/sql-programming/sql-driver.qdoc
+++ b/doc/src/sql-programming/sql-driver.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -153,7 +153,7 @@
\snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 3
- After installing Qt, as described in the \l{Installing Qt on X11
+ After installing Qt, as described in the \l{Installing Qt for X11
Platforms} document, you also need to install the plugin in the
standard location:
@@ -478,7 +478,7 @@
\snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 13
- After installing Qt, as described in the \l{Installing Qt on X11 Platforms} document,
+ After installing Qt, as described in the \l{Installing Qt for X11 Platforms} document,
you also need to install the plugin in the standard location:
\snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 14
@@ -565,7 +565,7 @@
\snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 18
- After installing Qt, as described in the \l{Installing Qt on X11 Platforms} document,
+ After installing Qt, as described in the \l{Installing Qt for X11 Platforms} document,
you also need to install the plugin in the standard location:
\snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 19
@@ -638,7 +638,7 @@
\snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 21
- After installing Qt, as described in the \l{Installing Qt on X11 Platforms} document,
+ After installing Qt, as described in the \l{Installing Qt for X11 Platforms} document,
you also need to install the plugin in the standard location:
\snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 22
diff --git a/doc/src/sql-programming/sql-programming.qdoc b/doc/src/sql-programming/sql-programming.qdoc
index 35b286c..3624d1e 100644
--- a/doc/src/sql-programming/sql-programming.qdoc
+++ b/doc/src/sql-programming/sql-programming.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/template/scripts/functions.js b/doc/src/template/scripts/functions.js
index 47539d2..62bc535 100755
--- a/doc/src/template/scripts/functions.js
+++ b/doc/src/template/scripts/functions.js
@@ -105,17 +105,17 @@ function processNokiaData(response){
/* start a new list element */
full_li_element = '<li';
/* if the pageType element reads APIPage, add class name api */
- if (propertyTags[j].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'APIPage') {
+ if (propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'APIPage') {
full_li_element += ' class="api"';
apiCount++;
}
/* if the pageType element reads Article, add class name article */
- else if (propertyTags[j].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'Article') {
+ else if (propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'Article') {
full_li_element += ' class="article"';
articleCount++;
}
/* if the pageType element reads Example, add class name example */
- else if (propertyTags[j].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'Example') {
+ else if (propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'Example') {
full_li_element += ' class="example"';
exampleCount++;
}
diff --git a/doc/src/template/style/narrow.css b/doc/src/template/style/narrow.css
index c1e3f61..fbb0752 100644
--- a/doc/src/template/style/narrow.css
+++ b/doc/src/template/style/narrow.css
@@ -223,6 +223,7 @@
float: right;
margin: 15px 40px 0 0;
font-size: 11px;
+ position: relative;
}
.narrow #narrowmenu {
diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css
index c07385c..16bc9ed 100755
--- a/doc/src/template/style/style.css
+++ b/doc/src/template/style/style.css
@@ -101,7 +101,7 @@
}
a
{
- color: #00732f;
+ color: #00732F;
text-decoration: none;
}
hr
@@ -650,7 +650,7 @@
margin-top: 5px;
_margin: 0 0 0 -20px;
padding: 10px;
- width: 220px;
+ width: 30%;
_width: 196px;
height: 250px;
overflow: auto;
@@ -660,12 +660,31 @@
-webkit-box-shadow: 0 4px 6px 0 rgba(0,0,0,.2);
-moz-box-shadow: 0 4px 6px 0 rgba(0,0,0,.2);
box-shadow: 0 4px 6px 0 rgba(0,0,0,.2);
+ font-size: 11px;
+ }
+
+ #resultdialog a
+ {
+ color: #00732f;
}
#resultdialog.active {
display: block;
}
+ .narrow #resultdialog {
+ width: 60%;
+ _width: 360px;
+ }
+
+ .narrow #resultdialog.active {
+ right: 10px;
+ *left: auto;
+ _left: auto;
+ _right: -20px;
+ }
+
+
#resultdialog #resultclose {
float: right;
}
@@ -778,6 +797,7 @@
margin-right: 15px;
font-weight: bold;
color: #B0ADAB;
+ font: bold 10px/1.2 Verdana;
}
.toolbuttons #print
@@ -891,7 +911,6 @@
}
.wrap .content h2
{
- border-bottom:1px solid #DDDDDD;
font:600 16px/1.2 Arial;
margin-top:15px;
width:100%;
@@ -925,6 +944,15 @@
color: #4c0033;
text-decoration: underline;
}
+ descr p a
+ {
+ text-decoration: underline;
+ }
+
+ .descr p a:visited
+ {
+ text-decoration: underline;
+ }
.feedback
{
float: none;
@@ -980,9 +1008,9 @@
/*display:inline-block;*/
margin-left:10px;
min-width:250px;
- line-height: 1.2;
+ line-height: 1.5;
min-width:100%;
-
+ min-height:15px;
}
.flowList dd a{
@@ -1269,6 +1297,10 @@
background-color: #E6E7E8;
margin: 0;
}
+ .small
+ {
+ font: normal 9px/1 Verdana;
+ }
/* end footer elements */
@@ -1443,7 +1475,7 @@
}
- .creator .header, .footer, .wrapper
+ .creator .header, .creator .footer, .creator .wrapper
{
max-width: 1500px;
margin: 0px;
@@ -1648,6 +1680,58 @@
}
/* end of creator spec*/
+ .item {
+ float: left;
+ position: relative;
+ width: 100%;
+ overflow: hidden;
+ }
+
+
+ .item .primary {
+ margin-right: 220px;
+ position: relative;
+ }
+
+ .item hr {
+ margin-left: -220px;
+ }
+
+ .item .secondary {
+ float: right;
+ width: 200px;
+ position: relative;
+ }
+
+ .item .cols {
+ clear: both;
+ display: block;
+ }
+
+ .item .cols .col {
+ float: left;
+ margin-left: 1.5%;
+ }
+
+ .item .cols .col.first {
+ margin-left: 0;
+ }
+
+ .item .cols.two .col {
+ width: 45%;
+ }
+
+ .item .box {
+ margin: 0 0 10px 0;
+ }
+
+ .item .box h3 {
+ margin: 0 0 10px 0;
+ }
+
+ .cols.unclear {
+ clear:none;
+ }
}
/* end of screen media */
diff --git a/doc/src/tutorials/addressbook-fr.qdoc b/doc/src/tutorials/addressbook-fr.qdoc
index d40d939..fe27488 100644
--- a/doc/src/tutorials/addressbook-fr.qdoc
+++ b/doc/src/tutorials/addressbook-fr.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/tutorials/addressbook.qdoc b/doc/src/tutorials/addressbook.qdoc
index d39a804..1c71f97 100644
--- a/doc/src/tutorials/addressbook.qdoc
+++ b/doc/src/tutorials/addressbook.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/tutorials/modelview.qdoc b/doc/src/tutorials/modelview.qdoc
index e47fe83..a355e43 100644
--- a/doc/src/tutorials/modelview.qdoc
+++ b/doc/src/tutorials/modelview.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/tutorials/widgets-tutorial.qdoc b/doc/src/tutorials/widgets-tutorial.qdoc
index a708311..df911a5 100644
--- a/doc/src/tutorials/widgets-tutorial.qdoc
+++ b/doc/src/tutorials/widgets-tutorial.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/widgets-and-layouts/focus.qdoc b/doc/src/widgets-and-layouts/focus.qdoc
index f1ff2f8..9948782 100644
--- a/doc/src/widgets-and-layouts/focus.qdoc
+++ b/doc/src/widgets-and-layouts/focus.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/widgets-and-layouts/gallery-cde.qdoc b/doc/src/widgets-and-layouts/gallery-cde.qdoc
index e52f77c..c783399 100644
--- a/doc/src/widgets-and-layouts/gallery-cde.qdoc
+++ b/doc/src/widgets-and-layouts/gallery-cde.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/widgets-and-layouts/gallery-cleanlooks.qdoc b/doc/src/widgets-and-layouts/gallery-cleanlooks.qdoc
index dfc498d..d03adc8 100644
--- a/doc/src/widgets-and-layouts/gallery-cleanlooks.qdoc
+++ b/doc/src/widgets-and-layouts/gallery-cleanlooks.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/widgets-and-layouts/gallery-gtk.qdoc b/doc/src/widgets-and-layouts/gallery-gtk.qdoc
index 503c5c5..b3a6372 100644
--- a/doc/src/widgets-and-layouts/gallery-gtk.qdoc
+++ b/doc/src/widgets-and-layouts/gallery-gtk.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/widgets-and-layouts/gallery-macintosh.qdoc b/doc/src/widgets-and-layouts/gallery-macintosh.qdoc
index 1319ac1..30a78ca 100644
--- a/doc/src/widgets-and-layouts/gallery-macintosh.qdoc
+++ b/doc/src/widgets-and-layouts/gallery-macintosh.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/widgets-and-layouts/gallery-motif.qdoc b/doc/src/widgets-and-layouts/gallery-motif.qdoc
index 455b824..861c22a 100644
--- a/doc/src/widgets-and-layouts/gallery-motif.qdoc
+++ b/doc/src/widgets-and-layouts/gallery-motif.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/widgets-and-layouts/gallery-plastique.qdoc b/doc/src/widgets-and-layouts/gallery-plastique.qdoc
index cd8e382..0ea62ee 100644
--- a/doc/src/widgets-and-layouts/gallery-plastique.qdoc
+++ b/doc/src/widgets-and-layouts/gallery-plastique.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/widgets-and-layouts/gallery-windows.qdoc b/doc/src/widgets-and-layouts/gallery-windows.qdoc
index ff4aa99..d3464a0 100644
--- a/doc/src/widgets-and-layouts/gallery-windows.qdoc
+++ b/doc/src/widgets-and-layouts/gallery-windows.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/widgets-and-layouts/gallery-windowsvista.qdoc b/doc/src/widgets-and-layouts/gallery-windowsvista.qdoc
index c719409..00afd52 100644
--- a/doc/src/widgets-and-layouts/gallery-windowsvista.qdoc
+++ b/doc/src/widgets-and-layouts/gallery-windowsvista.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/widgets-and-layouts/gallery-windowsxp.qdoc b/doc/src/widgets-and-layouts/gallery-windowsxp.qdoc
index 2399114..60c8ff0 100644
--- a/doc/src/widgets-and-layouts/gallery-windowsxp.qdoc
+++ b/doc/src/widgets-and-layouts/gallery-windowsxp.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/widgets-and-layouts/gallery.qdoc b/doc/src/widgets-and-layouts/gallery.qdoc
index 11132fd..201817b 100644
--- a/doc/src/widgets-and-layouts/gallery.qdoc
+++ b/doc/src/widgets-and-layouts/gallery.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/widgets-and-layouts/layout.qdoc b/doc/src/widgets-and-layouts/layout.qdoc
index 4db991a..10077f9 100644
--- a/doc/src/widgets-and-layouts/layout.qdoc
+++ b/doc/src/widgets-and-layouts/layout.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/widgets-and-layouts/styles.qdoc b/doc/src/widgets-and-layouts/styles.qdoc
index 180260b..cd0b86d 100644
--- a/doc/src/widgets-and-layouts/styles.qdoc
+++ b/doc/src/widgets-and-layouts/styles.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/widgets-and-layouts/stylesheet.qdoc b/doc/src/widgets-and-layouts/stylesheet.qdoc
index cc36fa2..6343e6a 100644
--- a/doc/src/widgets-and-layouts/stylesheet.qdoc
+++ b/doc/src/widgets-and-layouts/stylesheet.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/widgets-and-layouts/widgets.qdoc b/doc/src/widgets-and-layouts/widgets.qdoc
index fbce744..6d1d5ee 100644
--- a/doc/src/widgets-and-layouts/widgets.qdoc
+++ b/doc/src/widgets-and-layouts/widgets.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/windows-and-dialogs/dialogs.qdoc b/doc/src/windows-and-dialogs/dialogs.qdoc
index bcf9c0e..fef728f 100644
--- a/doc/src/windows-and-dialogs/dialogs.qdoc
+++ b/doc/src/windows-and-dialogs/dialogs.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/windows-and-dialogs/mainwindow.qdoc b/doc/src/windows-and-dialogs/mainwindow.qdoc
index 9d50495..9d3ac30 100644
--- a/doc/src/windows-and-dialogs/mainwindow.qdoc
+++ b/doc/src/windows-and-dialogs/mainwindow.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/xml-processing/xml-patterns.qdoc b/doc/src/xml-processing/xml-patterns.qdoc
index 9f1917d..006b876 100644
--- a/doc/src/xml-processing/xml-patterns.qdoc
+++ b/doc/src/xml-processing/xml-patterns.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/xml-processing/xml-processing.qdoc b/doc/src/xml-processing/xml-processing.qdoc
index dcdd8d1..85f3c7b 100644
--- a/doc/src/xml-processing/xml-processing.qdoc
+++ b/doc/src/xml-processing/xml-processing.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/xml-processing/xquery-introduction.qdoc b/doc/src/xml-processing/xquery-introduction.qdoc
index b5356f7..5f9743a 100644
--- a/doc/src/xml-processing/xquery-introduction.qdoc
+++ b/doc/src/xml-processing/xquery-introduction.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/zh_CN/bughowto.qdoc b/doc/src/zh_CN/bughowto.qdoc
index 05c8403..13f5c70 100644
--- a/doc/src/zh_CN/bughowto.qdoc
+++ b/doc/src/zh_CN/bughowto.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc b/doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc
index b43b53e..d942ee6 100644
--- a/doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc
+++ b/doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/zh_CN/getting-started/tutorials.qdoc b/doc/src/zh_CN/getting-started/tutorials.qdoc
index d674175..b9ff7dd 100644
--- a/doc/src/zh_CN/getting-started/tutorials.qdoc
+++ b/doc/src/zh_CN/getting-started/tutorials.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/zh_CN/tutorials/addressbook.qdoc b/doc/src/zh_CN/tutorials/addressbook.qdoc
index c1c9717..cbd02d7 100644
--- a/doc/src/zh_CN/tutorials/addressbook.qdoc
+++ b/doc/src/zh_CN/tutorials/addressbook.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/doc/src/zh_CN/tutorials/widgets-tutorial.qdoc b/doc/src/zh_CN/tutorials/widgets-tutorial.qdoc
index ba4433e..66e6c10 100644
--- a/doc/src/zh_CN/tutorials/widgets-tutorial.qdoc
+++ b/doc/src/zh_CN/tutorials/widgets-tutorial.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/examples/declarative/animation/behaviors/wigglytext.qml b/examples/declarative/animation/behaviors/wigglytext.qml
new file mode 100644
index 0000000..6cd93ab
--- /dev/null
+++ b/examples/declarative/animation/behaviors/wigglytext.qml
@@ -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 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$
+**
+****************************************************************************/
+
+import QtQuick 1.0
+
+Rectangle {
+ id: container
+
+ property string text: "Drag this text..."
+ property bool animated: true
+
+ width: 640; height: 480; color: "#474747"; focus: true
+
+ Keys.onPressed: {
+ if (event.key == Qt.Key_Delete || event.key == Qt.Key_Backspace)
+ container.remove()
+ else if (event.text != "") {
+ container.append(event.text)
+ }
+ }
+
+ function append(text) {
+ container.animated = false
+ var lastLetter = container.children[container.children.length - 1]
+ var newLetter = letterComponent.createObject(container)
+ newLetter.text = text
+ newLetter.follow = lastLetter
+ container.animated = true
+ }
+
+ function remove() {
+ if (container.children.length)
+ container.children[container.children.length - 1].destroy()
+ }
+
+ function doLayout() {
+ var follow = null
+ for (var i = 0; i < container.text.length; ++i) {
+ var newLetter = letterComponent.createObject(container)
+ newLetter.text = container.text[i]
+ newLetter.follow = follow
+ follow = newLetter
+ }
+ }
+
+ Component {
+ id: letterComponent
+ Text {
+ id: letter
+ property variant follow
+
+ x: follow ? follow.x + follow.width : container.width / 3
+ y: follow ? follow.y : container.height / 2
+
+ font.pixelSize: 40; font.bold: true
+ color: "#999999"; styleColor: "#222222"; style: Text.Raised
+
+ MouseArea {
+ anchors.fill: parent
+ drag.target: letter; drag.axis: Drag.XandYAxis
+ onPressed: letter.color = "#dddddd"
+ onReleased: letter.color = "#999999"
+ }
+
+ Behavior on x { enabled: container.animated; SpringAnimation { spring: 3; damping: 0.3; mass: 1.0 } }
+ Behavior on y { enabled: container.animated; SpringAnimation { spring: 3; damping: 0.3; mass: 1.0 } }
+ }
+ }
+
+ Component.onCompleted: doLayout()
+}
diff --git a/examples/declarative/cppextensions/imageprovider/imageprovider.pro b/examples/declarative/cppextensions/imageprovider/imageprovider.pro
index 9797a3f..f700f0b 100644
--- a/examples/declarative/cppextensions/imageprovider/imageprovider.pro
+++ b/examples/declarative/cppextensions/imageprovider/imageprovider.pro
@@ -22,7 +22,7 @@ symbian:{
include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
TARGET.EPOCALLOWDLLDATA = 1
- importFiles.sources = ImageProviderCore/qmlimageproviderplugin.dll ImageProviderCore/qmldir
+ importFiles.files = ImageProviderCore/qmlimageproviderplugin.dll ImageProviderCore/qmldir
importFiles.path = ImageProviderCore
DEPLOYMENT += importFiles
}
diff --git a/examples/declarative/cppextensions/plugins/README b/examples/declarative/cppextensions/plugins/README
index fe519f8..95e0eea 100644
--- a/examples/declarative/cppextensions/plugins/README
+++ b/examples/declarative/cppextensions/plugins/README
@@ -5,5 +5,5 @@ by a C++ plugin (providing the "Time" type), and by QML files (providing the
To run:
make install
- qml -I . plugins.qml
+ qmlviewer -I . plugins.qml
diff --git a/examples/declarative/cppextensions/qwidgets/qwidgets.pro b/examples/declarative/cppextensions/qwidgets/qwidgets.pro
index 3353a8d..d92e072 100644
--- a/examples/declarative/cppextensions/qwidgets/qwidgets.pro
+++ b/examples/declarative/cppextensions/qwidgets/qwidgets.pro
@@ -17,7 +17,7 @@ symbian:{
include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
TARGET.EPOCALLOWDLLDATA = 1
- importFiles.sources = QWidgets/qmlqwidgetsplugin.dll QWidgets/qmldir
+ importFiles.files = QWidgets/qmlqwidgetsplugin.dll QWidgets/qmldir
importFiles.path = QWidgets
DEPLOYMENT += importFiles
diff --git a/examples/declarative/i18n/i18n.qml b/examples/declarative/i18n/i18n.qml
index 8dac88d..219deda 100644
--- a/examples/declarative/i18n/i18n.qml
+++ b/examples/declarative/i18n/i18n.qml
@@ -65,7 +65,8 @@ Rectangle {
anchors.fill: parent; spacing: 20
Text {
- text: "If a translation is available for the system language (eg. French) then the string below will translated (eg. 'Bonjour'). Otherwise it will show 'Hello'."
+ text: "If a translation is available for the system language (eg. French) then the
+ string below will translated (eg. 'Bonjour'). Otherwise it will show 'Hello'."
width: parent.width; wrapMode: Text.WordWrap
}
diff --git a/examples/declarative/modelviews/listview/highlightranges.qml b/examples/declarative/modelviews/listview/highlightranges.qml
index 2716ee5..58d37a3 100644
--- a/examples/declarative/modelviews/listview/highlightranges.qml
+++ b/examples/declarative/modelviews/listview/highlightranges.qml
@@ -42,15 +42,14 @@ import QtQuick 1.0
import "content"
Rectangle {
+ id: root
+ property int current: 0
width: 600; height: 300
// This example shows the same model in three different ListView items,
// with different highlight ranges. The highlight ranges are set by the
// preferredHighlightBegin and preferredHighlightEnd properties in ListView.
//
- // The second and third ListViews set their currentIndex to be the
- // same as the first. The first ListView is given keyboard focus.
- //
// The first ListView does not set a highlight range, so its currentItem
// can move freely within the visible area. If it moves outside the
// visible area, the view is automatically scrolled to keep the current
@@ -66,9 +65,10 @@ Rectangle {
// forces the current item to change when the view is flicked,
// since the highlight is unable to move.
//
- // Note that the first ListView sets its currentIndex to be equal to
- // the third ListView's currentIndex. By flicking the third ListView with
- // the mouse, the current index of the first ListView will be changed.
+ // All ListViews bind their currentIndex to the root.current property.
+ // The first ListView sets root.current whenever its currentIndex changes
+ // due to keyboard interaction.
+ // Flicking the third ListView with the mouse also changes root.current.
ListView {
id: list1
@@ -77,7 +77,8 @@ Rectangle {
delegate: petDelegate
highlight: Rectangle { color: "lightsteelblue" }
- currentIndex: list3.currentIndex
+ currentIndex: root.current
+ onCurrentIndexChanged: root.current = currentIndex
focus: true
}
@@ -89,7 +90,7 @@ Rectangle {
delegate: petDelegate
highlight: Rectangle { color: "yellow" }
- currentIndex: list1.currentIndex
+ currentIndex: root.current
preferredHighlightBegin: 80; preferredHighlightEnd: 220
highlightRangeMode: ListView.ApplyRange
}
@@ -102,7 +103,8 @@ Rectangle {
delegate: petDelegate
highlight: Rectangle { color: "yellow" }
- currentIndex: list1.currentIndex
+ currentIndex: root.current
+ onCurrentIndexChanged: root.current = currentIndex
preferredHighlightBegin: 125; preferredHighlightEnd: 125
highlightRangeMode: ListView.StrictlyEnforceRange
}
diff --git a/examples/declarative/positioners/positioners.qmlproject.user b/examples/declarative/positioners/positioners.qmlproject.user
deleted file mode 100644
index 593479d..0000000
--- a/examples/declarative/positioners/positioners.qmlproject.user
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE QtCreatorProject>
-<qtcreator>
- <data>
- <variable>ProjectExplorer.Project.ActiveTarget</variable>
- <value type="int">0</value>
- </data>
- <data>
- <variable>ProjectExplorer.Project.EditorSettings</variable>
- <valuemap type="QVariantMap">
- <value key="EditorConfiguration.Codec" type="QByteArray">UTF-8</value>
- </valuemap>
- </data>
- <data>
- <variable>ProjectExplorer.Project.Target.0</variable>
- <valuemap type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">QML Runtime</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QmlProjectManager.QmlTarget</value>
- <value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">-1</value>
- <value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
- <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">0</value>
- <valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">QML Runtime</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QmlProjectManager.QmlRunConfiguration</value>
- <value key="QmlProjectManager.QmlRunConfiguration.DebugServerAddress" type="QString">127.0.0.1</value>
- <value key="QmlProjectManager.QmlRunConfiguration.DebugServerPort" type="int">3768</value>
- <value key="QmlProjectManager.QmlRunConfiguration.MainScript" type="QString">positioners.qml</value>
- <value key="QmlProjectManager.QmlRunConfiguration.QDeclarativeViewer" type="QString"></value>
- <value key="QmlProjectManager.QmlRunConfiguration.QDeclarativeViewerArguments" type="QString"></value>
- </valuemap>
- <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
- </valuemap>
- </data>
- <data>
- <variable>ProjectExplorer.Project.TargetCount</variable>
- <value type="int">1</value>
- </data>
- <data>
- <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
- <value type="int">4</value>
- </data>
-</qtcreator>
diff --git a/examples/declarative/toys/tic-tac-toe/tic-tac-toe.qml b/examples/declarative/toys/tic-tac-toe/tic-tac-toe.qml
index 4c1ad51..c60f2df 100644
--- a/examples/declarative/toys/tic-tac-toe/tic-tac-toe.qml
+++ b/examples/declarative/toys/tic-tac-toe/tic-tac-toe.qml
@@ -55,22 +55,6 @@ Rectangle {
source: "content/pics/board.png"
}
- Text {
- id: messageDisplay
- anchors.centerIn: parent
- color: "blue"
- style: Text.Outline; styleColor: "white"
- font.pixelSize: 50; font.bold: true
- visible: false
-
- Timer {
- running: messageDisplay.visible
- onTriggered: {
- messageDisplay.visible = false;
- Logic.restartGame();
- }
- }
- }
Column {
id: display
@@ -118,4 +102,22 @@ Rectangle {
}
}
}
+
+
+ Text {
+ id: messageDisplay
+ anchors.centerIn: parent
+ color: "blue"
+ style: Text.Outline; styleColor: "white"
+ font.pixelSize: 50; font.bold: true
+ visible: false
+
+ Timer {
+ running: messageDisplay.visible
+ onTriggered: {
+ messageDisplay.visible = false;
+ Logic.restartGame();
+ }
+ }
+ }
}
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/samegame.js b/examples/declarative/tutorials/samegame/samegame4/content/samegame.js
index 79ff0c1..ccc3f9d 100755
--- a/examples/declarative/tutorials/samegame/samegame4/content/samegame.js
+++ b/examples/declarative/tutorials/samegame/samegame4/content/samegame.js
@@ -145,7 +145,7 @@ function shuffleDown() {
obj = board[index(column, row)];
if (obj == null)
continue;
- obj.x = (fallDist - column) * gameCanvas.blockSize;
+ obj.x = (column - fallDist) * gameCanvas.blockSize;
board[index(column - fallDist, row)] = obj;
board[index(column, row)] = null;
}
diff --git a/examples/desktop/systray/systray.pro b/examples/desktop/systray/systray.pro
index 9b25916..710452b 100644
--- a/examples/desktop/systray/systray.pro
+++ b/examples/desktop/systray/systray.pro
@@ -14,10 +14,10 @@ symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
wince* {
CONFIG(debug, release|debug) {
- addPlugins.sources = $$QT_BUILD_TREE/plugins/imageformats/qsvgd4.dll
+ addPlugins.files = $$QT_BUILD_TREE/plugins/imageformats/qsvgd4.dll
}
CONFIG(release, release|debug) {
- addPlugins.sources = $$QT_BUILD_TREE/plugins/imageformats/qsvg4.dll
+ addPlugins.files = $$QT_BUILD_TREE/plugins/imageformats/qsvg4.dll
}
addPlugins.path = imageformats
DEPLOYMENT += addPlugins
diff --git a/examples/draganddrop/puzzle/puzzle.pro b/examples/draganddrop/puzzle/puzzle.pro
index ec88f7a..c0400d8 100644
--- a/examples/draganddrop/puzzle/puzzle.pro
+++ b/examples/draganddrop/puzzle/puzzle.pro
@@ -18,12 +18,12 @@ INSTALLS += target sources
symbian:{
TARGET.UID3 = 0xA000CF65
include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
- addFile.sources = example.jpg
+ addFile.files = example.jpg
addFile.path = .
DEPLOYMENT += addFile
}
wince*: {
- addFile.sources = example.jpg
+ addFile.files = example.jpg
addFile.path = .
DEPLOYMENT += addFile
}
diff --git a/examples/multimedia/audiodevices/audiodevices.h b/examples/multimedia/audiodevices/audiodevices.h
index 3b8f074..4a0f74c 100644
--- a/examples/multimedia/audiodevices/audiodevices.h
+++ b/examples/multimedia/audiodevices/audiodevices.h
@@ -38,6 +38,8 @@
**
****************************************************************************/
+#ifndef AUDIODEVICES_H
+#define AUDIODEVICES_H
#include <QObject>
#include <QMainWindow>
@@ -77,3 +79,5 @@ private slots:
};
+#endif
+
diff --git a/examples/multimedia/audioinput/audioinput.h b/examples/multimedia/audioinput/audioinput.h
index 2f4b206..c198304 100644
--- a/examples/multimedia/audioinput/audioinput.h
+++ b/examples/multimedia/audioinput/audioinput.h
@@ -38,6 +38,9 @@
**
****************************************************************************/
+#ifndef AUDIOINPUT_H
+#define AUDIOINPUT_H
+
#include <QPixmap>
#include <QWidget>
#include <QObject>
@@ -132,3 +135,5 @@ private:
static const QString ResumeLabel;
};
+#endif
+
diff --git a/examples/multimedia/audiooutput/audiooutput.h b/examples/multimedia/audiooutput/audiooutput.h
index 004ca49..2f4aa64 100644
--- a/examples/multimedia/audiooutput/audiooutput.h
+++ b/examples/multimedia/audiooutput/audiooutput.h
@@ -38,6 +38,9 @@
**
****************************************************************************/
+#ifndef AUDIOOUTPUT_H
+#define AUDIOOUTPUT_H
+
#include <math.h>
#include <QObject>
@@ -115,3 +118,5 @@ private slots:
void deviceChanged(int index);
};
+#endif
+
diff --git a/examples/network/bearermonitor/bearermonitor.cpp b/examples/network/bearermonitor/bearermonitor.cpp
index 2c976ff..75ffb01 100644
--- a/examples/network/bearermonitor/bearermonitor.cpp
+++ b/examples/network/bearermonitor/bearermonitor.cpp
@@ -41,8 +41,8 @@
#include "bearermonitor.h"
#include "sessionwidget.h"
-#include <QDebug>
-#include <QMessageBox>
+#include <QtCore/QDebug>
+
#ifdef Q_OS_WIN
#include <winsock2.h>
#undef interface
@@ -56,20 +56,18 @@ BearerMonitor::BearerMonitor(QWidget *parent)
: QWidget(parent)
{
setupUi(this);
-#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
+#ifdef MAEMO_UI
newSessionButton->hide();
deleteSessionButton->hide();
#else
delete tabWidget->currentWidget();
sessionGroup->hide();
#endif
-#if defined (Q_OS_SYMBIAN) || defined(Q_OS_WINCE) || defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
+#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE) || defined(MAEMO_UI)
setWindowState(Qt::WindowMaximized);
#endif
updateConfigurations();
-#if !defined(Q_WS_MAEMO_5) && !defined(Q_WS_MAEMO_6)
onlineStateChanged(!manager.allConfigurations(QNetworkConfiguration::Active).isEmpty());
-#endif
QNetworkConfiguration defaultConfiguration = manager.defaultConfiguration();
for (int i = 0; i < treeWidget->topLevelItemCount(); ++i) {
QTreeWidgetItem *item = treeWidget->topLevelItem(i);
@@ -104,7 +102,7 @@ BearerMonitor::BearerMonitor(QWidget *parent)
connect(newSessionButton, SIGNAL(clicked()),
this, SLOT(createNewSession()));
-#if !defined(Q_WS_MAEMO_5) && !defined(Q_WS_MAEMO_6)
+#ifndef MAEMO_UI
connect(deleteSessionButton, SIGNAL(clicked()),
this, SLOT(deleteSession()));
#endif
@@ -257,15 +255,9 @@ void BearerMonitor::updateConfigurations()
void BearerMonitor::onlineStateChanged(bool isOnline)
{
if (isOnline)
-#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
- QMessageBox::information(this, "Connection state changed", "Online", QMessageBox::Close);
- else
- QMessageBox::information(this, "Connection state changed", "Offline", QMessageBox::Close);
-#else
onlineState->setText(tr("Online"));
else
onlineState->setText(tr("Offline"));
-#endif
}
#ifdef Q_OS_WIN
@@ -393,7 +385,7 @@ void BearerMonitor::createSessionFor(QTreeWidgetItem *item)
tabWidget->addTab(session, conf.name());
-#if !defined(Q_WS_MAEMO_5) && !defined(Q_WS_MAEMO_6)
+#ifndef MAEMO_UI
sessionGroup->show();
#endif
@@ -408,7 +400,7 @@ void BearerMonitor::createNewSession()
createSessionFor(item);
}
-#if !defined(Q_WS_MAEMO_5) && !defined(Q_WS_MAEMO_6)
+#ifndef MAEMO_UI
void BearerMonitor::deleteSession()
{
SessionWidget *session = qobject_cast<SessionWidget *>(tabWidget->currentWidget());
diff --git a/examples/network/bearermonitor/bearermonitor.h b/examples/network/bearermonitor/bearermonitor.h
index 45e7275..df1c78b 100644
--- a/examples/network/bearermonitor/bearermonitor.h
+++ b/examples/network/bearermonitor/bearermonitor.h
@@ -45,7 +45,7 @@
#include <qnetworksession.h>
#if defined (Q_OS_SYMBIAN) || defined(Q_OS_WINCE)
#include "ui_bearermonitor_240_320.h"
-#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
+#elif defined(MAEMO_UI)
#include "ui_bearermonitor_maemo.h"
#else
#include "ui_bearermonitor_640_480.h"
@@ -81,7 +81,7 @@ private slots:
void createSessionFor(QTreeWidgetItem *item);
void createNewSession();
-#if !defined(Q_WS_MAEMO_5) && !defined(Q_WS_MAEMO_6)
+#ifndef MAEMO_UI
void deleteSession();
#endif
void performScan();
diff --git a/examples/network/bearermonitor/bearermonitor.pro b/examples/network/bearermonitor/bearermonitor.pro
index 42100bc..bd9bd68 100644
--- a/examples/network/bearermonitor/bearermonitor.pro
+++ b/examples/network/bearermonitor/bearermonitor.pro
@@ -8,7 +8,8 @@ SOURCES = main.cpp \
bearermonitor.cpp \
sessionwidget.cpp
-maemo5|maemo6 {
+maemo5|maemo6|linux-g++-maemo {
+ DEFINES += MAEMO_UI
FORMS = bearermonitor_maemo.ui \
sessionwidget_maemo.ui
} else {
@@ -17,8 +18,8 @@ maemo5|maemo6 {
sessionwidget.ui
}
-win32:!wince*:LIBS += -lWs2_32
-wince*:LIBS += -lWs2
+win32:!wince*:LIBS += -lws2_32
+wince*:LIBS += -lws2
CONFIG += console
diff --git a/examples/network/bearermonitor/bearermonitor_maemo.ui b/examples/network/bearermonitor/bearermonitor_maemo.ui
index a7940c6..9c72bfd 100644
--- a/examples/network/bearermonitor/bearermonitor_maemo.ui
+++ b/examples/network/bearermonitor/bearermonitor_maemo.ui
@@ -7,300 +7,359 @@
<x>0</x>
<y>0</y>
<width>612</width>
- <height>495</height>
+ <height>555</height>
</rect>
</property>
<property name="windowTitle">
<string>BearerMonitor</string>
</property>
- <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <layout class="QVBoxLayout" name="verticalLayout" stretch="0,0">
<item>
- <widget class="QTabWidget" name="tabWidget">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <widget class="QGroupBox" name="systemState">
+ <property name="title">
+ <string>System State</string>
</property>
- <property name="currentIndex">
- <number>0</number>
+ <property name="flat">
+ <bool>true</bool>
</property>
- <property name="usesScrollButtons">
- <bool>false</bool>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <property name="bottomMargin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="onlineStateLabel">
+ <property name="text">
+ <string>Online State:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="onlineState">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="configurations">
+ <property name="title">
+ <string>Configurations &amp;&amp; Sessions</string>
</property>
- <widget class="QWidget" name="tab">
- <attribute name="title">
- <string>Configurations</string>
- </attribute>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QTreeWidget" name="treeWidget">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <attribute name="headerVisible">
- <bool>false</bool>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_5">
+ <property name="leftMargin">
+ <number>0</number>
+ </property>
+ <property name="rightMargin">
+ <number>0</number>
+ </property>
+ <property name="bottomMargin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QTabWidget" name="tabWidget">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="currentIndex">
+ <number>0</number>
+ </property>
+ <property name="usesScrollButtons">
+ <bool>false</bool>
+ </property>
+ <widget class="QWidget" name="tab">
+ <attribute name="title">
+ <string>Configurations</string>
</attribute>
- <column>
- <property name="text">
- <string>1</string>
- </property>
- </column>
- </widget>
- </item>
- <item>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <layout class="QHBoxLayout" name="configurationNameLayout">
- <item>
- <widget class="QLabel" name="configurationNameLabel">
- <property name="text">
- <string>Name:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="configurationName">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" name="configurationStateLayout">
- <item>
- <widget class="QLabel" name="configurationStateLabel">
- <property name="text">
- <string>State:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="configurationState">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" name="configurationTypeLayout">
- <item>
- <widget class="QLabel" name="configurationTypeLabel">
- <property name="text">
- <string>Type:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="configurationType">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Invalid</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" name="configurationPurposeLayout">
- <item>
- <widget class="QLabel" name="configurationPurposeLabel">
- <property name="text">
- <string>Purpose:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="configurationPurpose">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Unknown</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" name="configurationIdentifierLayout">
- <item>
- <widget class="QLabel" name="configurationIdentifierLabel">
- <property name="text">
- <string>Identifier:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="configurationIdentifier">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" name="configurationRoamingLayout">
- <item>
- <widget class="QLabel" name="configurationRoamingLabel">
- <property name="text">
- <string>Roaming:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="configurationRoaming">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" name="configurationChildrenLayout">
- <item>
- <widget class="QLabel" name="configurationChildrenLabel">
- <property name="text">
- <string>Children:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="configurationChildren">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QTreeWidget" name="treeWidget">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="rootIsDecorated">
+ <bool>false</bool>
+ </property>
+ <attribute name="headerVisible">
+ <bool>false</bool>
+ </attribute>
+ <column>
<property name="text">
- <string/>
+ <string>1</string>
</property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QGroupBox" name="nlaGroup">
- <property name="title">
- <string>Network Location Awareness</string>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout">
+ </column>
+ </widget>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <layout class="QHBoxLayout" name="configurationNameLayout">
+ <item>
+ <widget class="QLabel" name="configurationNameLabel">
+ <property name="text">
+ <string>Name:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="configurationName">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="configurationStateLayout">
+ <item>
+ <widget class="QLabel" name="configurationStateLabel">
+ <property name="text">
+ <string>State:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="configurationState">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="configurationTypeLayout">
+ <item>
+ <widget class="QLabel" name="configurationTypeLabel">
+ <property name="text">
+ <string>Type:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="configurationType">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Invalid</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="configurationPurposeLayout">
+ <item>
+ <widget class="QLabel" name="configurationPurposeLabel">
+ <property name="text">
+ <string>Purpose:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="configurationPurpose">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Unknown</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="configurationIdentifierLayout">
+ <item>
+ <widget class="QLabel" name="configurationIdentifierLabel">
+ <property name="text">
+ <string>Identifier:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="configurationIdentifier">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="configurationRoamingLayout">
+ <item>
+ <widget class="QLabel" name="configurationRoamingLabel">
+ <property name="text">
+ <string>Roaming:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="configurationRoaming">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="configurationChildrenLayout">
+ <item>
+ <widget class="QLabel" name="configurationChildrenLabel">
+ <property name="text">
+ <string>Children:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="configurationChildren">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="nlaGroup">
+ <property name="title">
+ <string>Network Location Awareness</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QPushButton" name="registerButton">
+ <property name="text">
+ <string>Register</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="unregisterButton">
+ <property name="text">
+ <string>Unregister</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
<item>
- <widget class="QPushButton" name="registerButton">
+ <widget class="QPushButton" name="newSessionButton">
<property name="text">
- <string>Register</string>
+ <string>New Session</string>
</property>
</widget>
</item>
<item>
- <widget class="QPushButton" name="unregisterButton">
+ <widget class="QPushButton" name="deleteSessionButton">
<property name="text">
- <string>Unregister</string>
+ <string>Delete Session</string>
</property>
</widget>
</item>
+ <item>
+ <widget class="QPushButton" name="scanButton">
+ <property name="text">
+ <string>Scan</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QProgressBar" name="progressBar">
+ <property name="maximum">
+ <number>0</number>
+ </property>
+ <property name="value">
+ <number>23280</number>
+ </property>
+ <property name="textVisible">
+ <bool>false</bool>
+ </property>
+ <property name="invertedAppearance">
+ <bool>false</bool>
+ </property>
+ <property name="format">
+ <string>%p%</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
</layout>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="newSessionButton">
- <property name="text">
- <string>New Session</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="deleteSessionButton">
- <property name="text">
- <string>Delete Session</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="scanButton">
- <property name="text">
- <string>Scan</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QProgressBar" name="progressBar">
- <property name="maximum">
- <number>0</number>
- </property>
- <property name="value">
- <number>23280</number>
- </property>
- <property name="textVisible">
- <bool>false</bool>
- </property>
- <property name="invertedAppearance">
- <bool>false</bool>
- </property>
- <property name="format">
- <string>%p%</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ </layout>
</widget>
</item>
</layout>
diff --git a/examples/network/bearermonitor/main.cpp b/examples/network/bearermonitor/main.cpp
index 1a22c13..11399e4 100644
--- a/examples/network/bearermonitor/main.cpp
+++ b/examples/network/bearermonitor/main.cpp
@@ -38,7 +38,8 @@
**
****************************************************************************/
-#include <QApplication>
+#include <QtGui/QApplication>
+#include <QtGui/QMainWindow>
#include "bearermonitor.h"
@@ -46,8 +47,12 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
+ QMainWindow mainWindow;
+
BearerMonitor monitor;
- monitor.show();
+
+ mainWindow.setCentralWidget(&monitor);
+ mainWindow.show();
return app.exec();
}
diff --git a/examples/network/bearermonitor/sessionwidget.cpp b/examples/network/bearermonitor/sessionwidget.cpp
index 5ec9d53..51de0f2 100644
--- a/examples/network/bearermonitor/sessionwidget.cpp
+++ b/examples/network/bearermonitor/sessionwidget.cpp
@@ -74,7 +74,7 @@ SessionWidget::SessionWidget(const QNetworkConfiguration &config, QWidget *paren
this, SLOT(closeSession()));
connect(stopSessionButton, SIGNAL(clicked()),
this, SLOT(stopSession()));
-#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
+#ifdef MAEMO_UI
connect(deleteSessionButton, SIGNAL(clicked()),
this, SLOT(deleteSession()));
#endif
@@ -94,7 +94,7 @@ void SessionWidget::timerEvent(QTimerEvent *e)
}
}
-#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
+#ifdef MAEMO_UI
void SessionWidget::deleteSession()
{
delete this;
diff --git a/examples/network/bearermonitor/sessionwidget.h b/examples/network/bearermonitor/sessionwidget.h
index c92db44..846a1af 100644
--- a/examples/network/bearermonitor/sessionwidget.h
+++ b/examples/network/bearermonitor/sessionwidget.h
@@ -42,7 +42,8 @@
#define SESSIONWIDGET_H
#include <qnetworksession.h>
-#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
+
+#ifdef MAEMO_UI
#include "ui_sessionwidget_maemo.h"
#else
#include "ui_sessionwidget.h"
@@ -71,7 +72,7 @@ private Q_SLOTS:
void stopSession();
void updateSession();
void updateSessionError(QNetworkSession::SessionError error);
-#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
+#ifdef MAEMO_UI
void deleteSession();
#endif
diff --git a/examples/painting/svgviewer/svgviewer.pro b/examples/painting/svgviewer/svgviewer.pro
index 4809b91..6417849 100644
--- a/examples/painting/svgviewer/svgviewer.pro
+++ b/examples/painting/svgviewer/svgviewer.pro
@@ -17,7 +17,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/painting/svgviewer
INSTALLS += target sources
wince*: {
- addFiles.sources = files\\*.svg
+ addFiles.files = files\\*.svg
addFiles.path = "\\My Documents"
DEPLOYMENT += addFiles
}
@@ -25,7 +25,7 @@ wince*: {
symbian: {
TARGET.UID3 = 0xA000A64E
include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
- addFiles.sources = files\\*.svg
+ addFiles.files = files\\*.svg
addFiles.path = .
DEPLOYMENT += addFiles
}
diff --git a/examples/richtext/syntaxhighlighter/syntaxhighlighter.pro b/examples/richtext/syntaxhighlighter/syntaxhighlighter.pro
index 0574b2d..67aa1ff 100644
--- a/examples/richtext/syntaxhighlighter/syntaxhighlighter.pro
+++ b/examples/richtext/syntaxhighlighter/syntaxhighlighter.pro
@@ -13,7 +13,7 @@ INSTALLS += target sources
symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
wince*: {
- addFiles.sources = main.cpp mainwindow.cpp
+ addFiles.files = main.cpp mainwindow.cpp
addFiles.path = .
DEPLOYMENT += addFiles
}
diff --git a/examples/richtext/textobject/textobject.pro b/examples/richtext/textobject/textobject.pro
index 4fa9cb0..222b0fe 100644
--- a/examples/richtext/textobject/textobject.pro
+++ b/examples/richtext/textobject/textobject.pro
@@ -12,7 +12,7 @@ sources.files = $$SOURCES $$HEADERS *.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/richtext/textobject
INSTALLS += target sources
-filesToDeploy.sources = files/*.svg
+filesToDeploy.files = files/*.svg
filesToDeploy.path = files
DEPLOYMENT += filesToDeploy
diff --git a/examples/script/context2d/context2d.pro b/examples/script/context2d/context2d.pro
index 54f5c31..6a0e397 100644
--- a/examples/script/context2d/context2d.pro
+++ b/examples/script/context2d/context2d.pro
@@ -27,6 +27,6 @@ symbian:{
include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
TARGET.EPOCHEAPSIZE = 0x200000 0xA00000
contextScripts.path = .
- contextScripts.sources = scripts
+ contextScripts.files = scripts
DEPLOYMENT += contextScripts
}
diff --git a/examples/symbianpkgrules.pri b/examples/symbianpkgrules.pri
index a1b6634..0f615c7 100644
--- a/examples/symbianpkgrules.pri
+++ b/examples/symbianpkgrules.pri
@@ -13,4 +13,7 @@ vendorinfo = \
examples_deployment.pkg_prerules += vendorinfo
DEPLOYMENT += examples_deployment
-isEmpty(ICON):ICON = $$QT_SOURCE_TREE/src/s60installs/qt.svg
+isEmpty(ICON):contains(TEMPLATE, ".*app"):contains(QT, gui):contains(CONFIG, qt):!contains(CONFIG, "no_icon") {
+ ICON = $$QT_SOURCE_TREE/src/s60installs/qt.svg
+}
+
diff --git a/examples/tools/undoframework/mainwindow.cpp b/examples/tools/undoframework/mainwindow.cpp
index b4b7ee5..90b4d3f 100644
--- a/examples/tools/undoframework/mainwindow.cpp
+++ b/examples/tools/undoframework/mainwindow.cpp
@@ -48,7 +48,7 @@
//! [0]
MainWindow::MainWindow()
{
- undoStack = new QUndoStack();
+ undoStack = new QUndoStack(this);
createActions();
createMenus();
diff --git a/examples/tutorials/gettingStarted/gsQml/filedialog/cppPlugins.pro b/examples/tutorials/gettingStarted/gsQml/filedialog/filedialog.pro
index d85787d..d85787d 100644
--- a/examples/tutorials/gettingStarted/gsQml/filedialog/cppPlugins.pro
+++ b/examples/tutorials/gettingStarted/gsQml/filedialog/filedialog.pro
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part0/Button.qml b/examples/tutorials/gettingStarted/gsQml/parts/part0/Button.qml
new file mode 100644
index 0000000..ffd4be4
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part0/Button.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: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$
+**
+****************************************************************************/
+
+//! [document]
+import QtQuick 1.0
+
+Rectangle {
+ id: simplebutton
+ color: "grey"
+ width: 150; height: 75
+
+ Text{
+ id: buttonLabel
+ anchors.centerIn: parent
+ text: "button label"
+ }
+}
+//! [document]
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part1/Button.qml b/examples/tutorials/gettingStarted/gsQml/parts/part1/Button.qml
new file mode 100644
index 0000000..bb70cfd
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part1/Button.qml
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE: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 QtQuick 1.0
+
+Rectangle {
+
+ //identifier of the item
+ id: button
+
+ property string label: "button label"
+
+ //these properties act as constants, useable outside this QML file
+ property int buttonHeight: 75
+ property int buttonWidth: 150
+
+ //the color highlight when the mouse hovers on the rectangle
+ property color onHoverColor: "gold"
+ property color borderColor: "white"
+
+ //buttonColor is set to the button's main color
+ property color buttonColor: "lightblue"
+
+ //set appearance properties
+ radius: 10
+ smooth: true
+ border{color: "white"; width: 3}
+ width: buttonWidth; height: buttonHeight
+
+ Text{
+ id: buttonLabel
+ anchors.centerIn: parent
+ text: label
+ }
+
+ //buttonClick() is callable and a signal handler, onButtonClick is automatically created
+ signal buttonClick()
+ onButtonClick: {
+ console.log(buttonLabel.text + " clicked" )
+ }
+
+ //define the clickable area to be the whole rectangle
+ MouseArea{
+ id: buttonMouseArea
+ anchors.fill: parent //stretch the area to the parent's dimension
+ onClicked: buttonClick()
+
+ //if true, then onEntered and onExited called if mouse hovers in the mouse area
+ //if false, a button must be clicked to detect the mouse hover
+ hoverEnabled: true
+
+ //display a border if the mouse hovers on the button mouse area
+ onEntered: parent.border.color = onHoverColor
+ //remove the border if the mouse exits the button mouse area
+ onExited: parent.border.color = borderColor
+ }
+
+ //change the color of the button when pressed
+ color: buttonMouseArea.pressed ? Qt.darker(buttonColor, 1.5) : buttonColor
+}
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part1/EditMenu.qml b/examples/tutorials/gettingStarted/gsQml/parts/part1/EditMenu.qml
new file mode 100644
index 0000000..460f5e9
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part1/EditMenu.qml
@@ -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 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 QtQuick 1.0
+
+Rectangle {
+ id: editMenu
+ height: 480; width:1000
+ color: "powderblue"
+ property string menuName:"Edit"
+
+ Rectangle{
+ id:actionContainer
+ color:"transparent"
+ anchors.centerIn: parent
+
+ width: parent.width; height: parent.height / 5
+ Row{
+ anchors.centerIn: parent
+ spacing: parent.width/6
+ Button{
+ id: loadButton
+ buttonColor: "lightgrey"
+ label: "Cut"
+ }
+
+ Button{
+ buttonColor: "grey"
+ id: saveButton
+ label: "Paste"
+ }
+ Button{
+ id: exitButton
+ label: "Select All"
+ buttonColor: "darkgrey"
+ }
+ }
+ }
+}
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part1/FileMenu.qml b/examples/tutorials/gettingStarted/gsQml/parts/part1/FileMenu.qml
new file mode 100644
index 0000000..65de4f1
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part1/FileMenu.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: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 QtQuick 1.0
+
+Rectangle {
+ id: fileMenu
+
+ //the menuName is accessible from outside this QML file
+ property string menuName: "File"
+
+ //generous amount of screen space that will allow the buttons to fit
+ height: 480; width:1000
+
+ color: "#6C646A"
+
+ //a sub-rectangle allows the flexibility of setting the row area
+ Rectangle{
+ id:actionContainer
+
+ //make this rectangle invisible
+ color:"transparent"
+ anchors.centerIn: parent
+
+ //the height is a good proportion that creates more space at the top of the row of buttons
+ width: parent.width; height: parent.height / 5
+
+ Row{
+ anchors.centerIn: parent
+ spacing: parent.width/6
+ Button{
+ id: loadButton
+ buttonColor: "lightgrey"
+ label: "Load"
+ }
+
+ Button{
+ buttonColor: "grey"
+ id: saveButton
+ label: "Save"
+ }
+ Button{
+ id: exitButton
+ label: "Exit"
+ buttonColor: "darkgrey"
+
+ //exit the application if the exitButton is clicked
+ onButtonClick:{
+ Qt.quit()
+ }
+ }
+ }
+ }
+}
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part1/SimpleButton.qml b/examples/tutorials/gettingStarted/gsQml/parts/part1/SimpleButton.qml
new file mode 100644
index 0000000..5bb50f8
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part1/SimpleButton.qml
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** 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 QtQuick 1.0
+
+Rectangle {
+
+ //identifier of the item
+ id: simplebutton
+
+ //the rectangle's fill color
+ color: "grey"
+
+ //dimensions of the button
+ width: 150; height: 75
+
+ //A text element contains functionalities for creating texts
+ Text {
+ id: buttonLabel
+
+ //center the text inside the parent
+ anchors.centerIn: parent
+
+ //text property binds to the label displayed on the button
+ text: "button label"
+ }
+
+ //define the clickable area to be the whole rectangle
+ MouseArea {
+ id: buttonMouseArea
+ anchors.fill: parent //anchor all sides of the mouse area to the rectangle's anchors
+
+ //onClicked handles valid mouse button clicks
+ onClicked: console.log(buttonLabel.text + " clicked" )
+ }
+}
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_button.png b/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_button.png
new file mode 100644
index 0000000..aab64bc
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_button.png
Binary files differ
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_editmenu.png b/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_editmenu.png
new file mode 100644
index 0000000..d3ff66f
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_editmenu.png
Binary files differ
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_filemenu.png b/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_filemenu.png
new file mode 100644
index 0000000..f2e2b0d
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_filemenu.png
Binary files differ
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_simplebutton.png b/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_simplebutton.png
new file mode 100644
index 0000000..21ce509
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_simplebutton.png
Binary files differ
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part1/qml-texteditor.qmlproject b/examples/tutorials/gettingStarted/gsQml/parts/part1/qml-texteditor.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part1/qml-texteditor.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/tutorials/gettingStarted/gsQml/parts/part2/Button.qml b/examples/tutorials/gettingStarted/gsQml/parts/part2/Button.qml
new file mode 100644
index 0000000..39ac591
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part2/Button.qml
@@ -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 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 QtQuick 1.0
+
+Rectangle {
+
+ //identifier of the item
+ id: button
+
+ property string label: "button label"
+
+ //these properties act as constants, useable outside this QML file
+ property int buttonHeight: 75
+ property int buttonWidth: 150
+
+ //the color highlight when the mouse hovers on the rectangle
+ property color onHoverColor: "gold"
+ property color borderColor: "white"
+
+ //buttonColor is set to the button's main color
+ property color buttonColor: "lightblue"
+
+ //set appearance properties
+ radius:10
+ smooth: true
+ border{color: "white"; width: 3}
+ width: buttonWidth; height: buttonHeight
+
+ Text{
+ id: buttonLabel
+ anchors.centerIn: parent
+ text: label
+ }
+
+ //buttonClick() is callable and a signal handler, onButtonClick is automatically created
+ signal buttonClick()
+ onButtonClick: {
+ console.log(buttonLabel.text + " clicked" )
+ }
+
+ //define the clickable area to be the whole rectangle
+ MouseArea{
+ id: buttonMouseArea
+ anchors.fill: parent //stretch the area to the parent's dimension
+ onClicked: buttonClick()
+
+ //if true, then onEntered and onExited called if mouse hovers in the mouse area
+ //if false, a button must be clicked to detect the mouse hover
+ hoverEnabled: true
+
+ //display a border if the mouse hovers on the button mouse area
+ onEntered: parent.border.color = onHoverColor
+ //remove the border if the mouse exits the button mouse area
+ onExited: parent.border.color = borderColor
+
+ }
+
+ //change the color of the button when pressed
+ color: buttonMouseArea.pressed ? Qt.darker(buttonColor, 1.5) : buttonColor
+
+}
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part2/EditMenu.qml b/examples/tutorials/gettingStarted/gsQml/parts/part2/EditMenu.qml
new file mode 100644
index 0000000..fdd06d5
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part2/EditMenu.qml
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** 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 QtQuick 1.0
+
+Rectangle {
+ id: editMenu
+ height: 480; width:1000
+ color: "powderblue"
+ property string menuName:"Edit"
+
+ Rectangle{
+ id:actionContainer
+ color:"transparent"
+ anchors.centerIn: parent
+
+ width: parent.width; height: parent.height / 5
+ Row{
+ anchors.centerIn: parent
+ spacing: parent.width/6
+ Button{
+ id: loadButton
+ buttonColor: "lightgrey"
+ label: "Cut"
+ }
+
+ Button{
+ buttonColor: "grey"
+ id: saveButton
+ label: "Paste"
+ }
+ Button{
+ id: exitButton
+ label: "Select All"
+ buttonColor: "darkgrey"
+ }
+ }
+ }
+
+}
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part2/FileMenu.qml b/examples/tutorials/gettingStarted/gsQml/parts/part2/FileMenu.qml
new file mode 100644
index 0000000..bd6669b
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part2/FileMenu.qml
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** 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 QtQuick 1.0
+
+Rectangle {
+ id: fileMenu
+
+ //the menuName is accessible from outside this QML file
+ property string menuName: "File"
+
+ //generous amount of screen space that will allow the buttons to fit
+ height: 480; width:1000
+
+ color: "#6C646A"
+
+ //a sub-rectangle allows the flexibility of setting the row area
+ Rectangle{
+ id:actionContainer
+
+ //make this rectangle invisible
+ color:"transparent"
+ anchors.centerIn: parent
+
+ //the height is a good proportion that creates more space at the top of the row of buttons
+ width: parent.width; height: parent.height / 5
+
+ Row{
+ anchors.centerIn: parent
+ spacing: parent.width/6
+ Button{
+ id: loadButton
+ buttonColor: "lightgrey"
+ label: "Load"
+ }
+
+ Button{
+ buttonColor: "grey"
+ id: saveButton
+ label: "Save"
+ }
+ Button{
+ id: exitButton
+ label: "Exit"
+ buttonColor: "darkgrey"
+
+ //exit the application if the exitButton is clicked
+ onButtonClick:{
+ Qt.quit()
+ }
+ }
+ }
+ }
+
+}
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part2/MenuBar.qml b/examples/tutorials/gettingStarted/gsQml/parts/part2/MenuBar.qml
new file mode 100644
index 0000000..8065804
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part2/MenuBar.qml
@@ -0,0 +1,140 @@
+/****************************************************************************
+**
+** 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 QtQuick 1.0
+
+Rectangle {
+ id: menuBar
+ width: 1000
+ height:300
+
+ property color fileColor: "thistle"
+ property color editColor: "powderblue"
+
+ //container for the header and the buttons
+ Rectangle{
+
+ id: labelList
+ height:parent.height/10
+ width: parent.width
+ color: "steelblue"
+
+ //default z is 0, items with higher z values are shown on top of items with lower z values
+ z: 1
+
+ //row displays its children in a vertical row
+ Row{
+ anchors.centerIn: parent
+ spacing:40
+ Button{
+ height: 20
+ width: 50
+ label: "File"
+ id: fileButton
+ buttonColor : menuListView.currentIndex == 0? fileColor : Qt.darker(fileColor, 1.5)
+ scale: menuListView.currentIndex == 0? 1.25: 1
+ radius: 1
+
+ //on a button click, change the list's currently selected item to FileMenu
+ onButtonClick: {
+ menuListView.currentIndex = 0
+ }
+ }
+ Button{
+ height: 20
+ width: 50
+ id: editButton
+ buttonColor : menuListView.currentIndex == 1? editColor : Qt.darker(editColor, 1.5)
+ scale: menuListView.currentIndex == 1? 1.25: 1
+ label: "Edit"
+ radius: 1
+
+ //on a button click, change the list's currently selected item to EditMenu
+ onButtonClick: {
+ menuListView.currentIndex = 1
+ }
+
+
+ }
+
+
+ }
+ }
+
+ //a list of visual items already have delegates handling their display
+ VisualItemModel{
+ id: menuListModel
+
+ FileMenu{
+ width: menuListView.width
+ height: menuBar.height
+ color: fileColor
+ }
+ EditMenu{
+ color: editColor
+ width: menuListView.width
+ height: menuBar.height
+
+ }
+ }
+
+ //list view will display a model according to a delegate
+ ListView{
+ id: menuListView
+ anchors.fill:parent
+ anchors.bottom: parent.bottom
+ width:parent.width
+ height: parent.height
+
+ //the model contains the data
+ model: menuListModel
+
+ //control the movement of the menu switching
+ snapMode: ListView.SnapOneItem
+ orientation: ListView.Horizontal
+ boundsBehavior: Flickable.StopAtBounds
+ flickDeceleration: 5000
+ highlightFollowsCurrentItem: true
+ highlightMoveDuration:240
+ highlightRangeMode: ListView.StrictlyEnforceRange
+ }
+
+
+}
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part2/pics/qml-texteditor2_menubar.png b/examples/tutorials/gettingStarted/gsQml/parts/part2/pics/qml-texteditor2_menubar.png
new file mode 100644
index 0000000..da959a3
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part2/pics/qml-texteditor2_menubar.png
Binary files differ
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part2/qml-texteditor2.qmlproject b/examples/tutorials/gettingStarted/gsQml/parts/part2/qml-texteditor2.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part2/qml-texteditor2.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/tutorials/gettingStarted/gsQml/parts/part3/Button.qml b/examples/tutorials/gettingStarted/gsQml/parts/part3/Button.qml
new file mode 100644
index 0000000..39ac591
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part3/Button.qml
@@ -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 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 QtQuick 1.0
+
+Rectangle {
+
+ //identifier of the item
+ id: button
+
+ property string label: "button label"
+
+ //these properties act as constants, useable outside this QML file
+ property int buttonHeight: 75
+ property int buttonWidth: 150
+
+ //the color highlight when the mouse hovers on the rectangle
+ property color onHoverColor: "gold"
+ property color borderColor: "white"
+
+ //buttonColor is set to the button's main color
+ property color buttonColor: "lightblue"
+
+ //set appearance properties
+ radius:10
+ smooth: true
+ border{color: "white"; width: 3}
+ width: buttonWidth; height: buttonHeight
+
+ Text{
+ id: buttonLabel
+ anchors.centerIn: parent
+ text: label
+ }
+
+ //buttonClick() is callable and a signal handler, onButtonClick is automatically created
+ signal buttonClick()
+ onButtonClick: {
+ console.log(buttonLabel.text + " clicked" )
+ }
+
+ //define the clickable area to be the whole rectangle
+ MouseArea{
+ id: buttonMouseArea
+ anchors.fill: parent //stretch the area to the parent's dimension
+ onClicked: buttonClick()
+
+ //if true, then onEntered and onExited called if mouse hovers in the mouse area
+ //if false, a button must be clicked to detect the mouse hover
+ hoverEnabled: true
+
+ //display a border if the mouse hovers on the button mouse area
+ onEntered: parent.border.color = onHoverColor
+ //remove the border if the mouse exits the button mouse area
+ onExited: parent.border.color = borderColor
+
+ }
+
+ //change the color of the button when pressed
+ color: buttonMouseArea.pressed ? Qt.darker(buttonColor, 1.5) : buttonColor
+
+}
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part3/EditMenu.qml b/examples/tutorials/gettingStarted/gsQml/parts/part3/EditMenu.qml
new file mode 100644
index 0000000..fdd06d5
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part3/EditMenu.qml
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** 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 QtQuick 1.0
+
+Rectangle {
+ id: editMenu
+ height: 480; width:1000
+ color: "powderblue"
+ property string menuName:"Edit"
+
+ Rectangle{
+ id:actionContainer
+ color:"transparent"
+ anchors.centerIn: parent
+
+ width: parent.width; height: parent.height / 5
+ Row{
+ anchors.centerIn: parent
+ spacing: parent.width/6
+ Button{
+ id: loadButton
+ buttonColor: "lightgrey"
+ label: "Cut"
+ }
+
+ Button{
+ buttonColor: "grey"
+ id: saveButton
+ label: "Paste"
+ }
+ Button{
+ id: exitButton
+ label: "Select All"
+ buttonColor: "darkgrey"
+ }
+ }
+ }
+
+}
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part3/FileMenu.qml b/examples/tutorials/gettingStarted/gsQml/parts/part3/FileMenu.qml
new file mode 100644
index 0000000..bd6669b
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part3/FileMenu.qml
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** 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 QtQuick 1.0
+
+Rectangle {
+ id: fileMenu
+
+ //the menuName is accessible from outside this QML file
+ property string menuName: "File"
+
+ //generous amount of screen space that will allow the buttons to fit
+ height: 480; width:1000
+
+ color: "#6C646A"
+
+ //a sub-rectangle allows the flexibility of setting the row area
+ Rectangle{
+ id:actionContainer
+
+ //make this rectangle invisible
+ color:"transparent"
+ anchors.centerIn: parent
+
+ //the height is a good proportion that creates more space at the top of the row of buttons
+ width: parent.width; height: parent.height / 5
+
+ Row{
+ anchors.centerIn: parent
+ spacing: parent.width/6
+ Button{
+ id: loadButton
+ buttonColor: "lightgrey"
+ label: "Load"
+ }
+
+ Button{
+ buttonColor: "grey"
+ id: saveButton
+ label: "Save"
+ }
+ Button{
+ id: exitButton
+ label: "Exit"
+ buttonColor: "darkgrey"
+
+ //exit the application if the exitButton is clicked
+ onButtonClick:{
+ Qt.quit()
+ }
+ }
+ }
+ }
+
+}
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part3/MenuBar.qml b/examples/tutorials/gettingStarted/gsQml/parts/part3/MenuBar.qml
new file mode 100644
index 0000000..8065804
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part3/MenuBar.qml
@@ -0,0 +1,140 @@
+/****************************************************************************
+**
+** 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 QtQuick 1.0
+
+Rectangle {
+ id: menuBar
+ width: 1000
+ height:300
+
+ property color fileColor: "thistle"
+ property color editColor: "powderblue"
+
+ //container for the header and the buttons
+ Rectangle{
+
+ id: labelList
+ height:parent.height/10
+ width: parent.width
+ color: "steelblue"
+
+ //default z is 0, items with higher z values are shown on top of items with lower z values
+ z: 1
+
+ //row displays its children in a vertical row
+ Row{
+ anchors.centerIn: parent
+ spacing:40
+ Button{
+ height: 20
+ width: 50
+ label: "File"
+ id: fileButton
+ buttonColor : menuListView.currentIndex == 0? fileColor : Qt.darker(fileColor, 1.5)
+ scale: menuListView.currentIndex == 0? 1.25: 1
+ radius: 1
+
+ //on a button click, change the list's currently selected item to FileMenu
+ onButtonClick: {
+ menuListView.currentIndex = 0
+ }
+ }
+ Button{
+ height: 20
+ width: 50
+ id: editButton
+ buttonColor : menuListView.currentIndex == 1? editColor : Qt.darker(editColor, 1.5)
+ scale: menuListView.currentIndex == 1? 1.25: 1
+ label: "Edit"
+ radius: 1
+
+ //on a button click, change the list's currently selected item to EditMenu
+ onButtonClick: {
+ menuListView.currentIndex = 1
+ }
+
+
+ }
+
+
+ }
+ }
+
+ //a list of visual items already have delegates handling their display
+ VisualItemModel{
+ id: menuListModel
+
+ FileMenu{
+ width: menuListView.width
+ height: menuBar.height
+ color: fileColor
+ }
+ EditMenu{
+ color: editColor
+ width: menuListView.width
+ height: menuBar.height
+
+ }
+ }
+
+ //list view will display a model according to a delegate
+ ListView{
+ id: menuListView
+ anchors.fill:parent
+ anchors.bottom: parent.bottom
+ width:parent.width
+ height: parent.height
+
+ //the model contains the data
+ model: menuListModel
+
+ //control the movement of the menu switching
+ snapMode: ListView.SnapOneItem
+ orientation: ListView.Horizontal
+ boundsBehavior: Flickable.StopAtBounds
+ flickDeceleration: 5000
+ highlightFollowsCurrentItem: true
+ highlightMoveDuration:240
+ highlightRangeMode: ListView.StrictlyEnforceRange
+ }
+
+
+}
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part3/TextArea.qml b/examples/tutorials/gettingStarted/gsQml/parts/part3/TextArea.qml
new file mode 100644
index 0000000..b0bf664
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part3/TextArea.qml
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE: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 QtQuick 1.0
+
+Rectangle {
+ id:textArea
+
+ width :400
+ height:400
+ color: "white"
+
+ Flickable{
+ id: flickArea
+
+ width: parent.width
+ height: parent.height
+ anchors.fill:parent
+
+ function ensureVisible(r){
+ if (contentX >= r.x)
+ contentX = r.x;
+ else if (contentX+width <= r.x+r.width)
+ contentX = r.x+r.width-width;
+ if (contentY >= r.y)
+ contentY = r.y;
+ else if (contentY+height <= r.y+r.height)
+ contentY = r.y+r.height-height;
+ }
+
+ TextEdit{
+ id: textEditor
+ anchors.fill:parent
+ width:parent.width; height:parent.height
+ color:"midnightblue"
+ focus: true
+
+ wrapMode: TextEdit.Wrap
+
+ onCursorRectangleChanged: flickArea.ensureVisible(cursorRectangle)
+ }
+ }
+}
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part3/TextEditor.qml b/examples/tutorials/gettingStarted/gsQml/parts/part3/TextEditor.qml
new file mode 100644
index 0000000..7f0e650
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part3/TextEditor.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 QtQuick 1.0
+
+Rectangle {
+
+ id: screen
+ width: 1000; height: 1000
+ border.color:"black"
+ //the screen is partitioned into the MenuBar and TextArea. 1/3 of the screen is assigned to the MenuBar
+ property int partition: height/3
+
+ MenuBar{
+ id:menuBar
+ height: partition
+ width:parent.width
+ z: 1
+ }
+
+
+ TextArea{
+ id:textArea
+ anchors.bottom:parent.bottom
+ y: partition
+ color: "azure"
+ height: partition*2
+ width:parent.width
+ }
+
+}
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part3/images/arrow.png b/examples/tutorials/gettingStarted/gsQml/parts/part3/images/arrow.png
new file mode 100644
index 0000000..14978c2
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part3/images/arrow.png
Binary files differ
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part3/pics/qml-texteditor3_texteditor.png b/examples/tutorials/gettingStarted/gsQml/parts/part3/pics/qml-texteditor3_texteditor.png
new file mode 100644
index 0000000..d0623b5
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part3/pics/qml-texteditor3_texteditor.png
Binary files differ
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part3/qml-texteditor3.qmlproject b/examples/tutorials/gettingStarted/gsQml/parts/part3/qml-texteditor3.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part3/qml-texteditor3.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/tutorials/gettingStarted/gsQml/parts/part4/Button.qml b/examples/tutorials/gettingStarted/gsQml/parts/part4/Button.qml
new file mode 100644
index 0000000..36833f5
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part4/Button.qml
@@ -0,0 +1,109 @@
+/****************************************************************************
+**
+** 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 QtQuick 1.0
+
+Rectangle {
+
+ //identifier of the item
+ id: button
+
+ //these properties act as constants, useable outside this QML file
+ property int buttonHeight: 75
+ property int buttonWidth: 150
+
+ //attaches to the Text element's text content
+ property string label
+ property color textColor: buttonLabel.color
+
+ //the color highlight when the mouse hovers on the rectangle
+ property color onHoverColor: "gold"
+ property color borderColor: "white"
+
+ //buttonColor is set to the button's main color
+ property color buttonColor: "lightblue"
+
+ //set appearance properties
+ radius:10
+ smooth: true
+ border.color: "white"
+ border.width: 3
+ width: buttonWidth; height: buttonHeight
+
+ Text{
+ id: buttonLabel
+ anchors.centerIn: parent
+ text: label //"button label" //bind the text to the parent's text
+ }
+
+ //buttonClick() is callable and a signal handler, onButtonClick is automatically created
+ signal buttonClick()
+ onButtonClick: {
+ console.log(buttonLabel.text + " clicked" )
+ }
+
+ //define the clickable area to be the whole rectangle
+ MouseArea{
+ id: buttonMouseArea
+ anchors.fill: parent //stretch the area to the parent's dimension
+ onClicked: buttonClick()
+
+ //if true, then onEntered and onExited called if mouse hovers in the mouse area
+ //if false, a button must be clicked to detect the mouse hover
+ hoverEnabled: true
+
+ //display a border if the mouse hovers on the button mouse area
+ onEntered: parent.border.color = onHoverColor
+ //remove the border if the mouse exits the button mouse area
+ onExited: parent.border.color = borderColor
+
+ }
+
+ //change the color of the button when pressed
+ color: buttonMouseArea.pressed ? Qt.darker(buttonColor, 1.5) : buttonColor
+ //animate the color whenever the color property changes
+ Behavior on color { ColorAnimation{ duration: 55} }
+
+ //scale the button when pressed
+ scale: buttonMouseArea.pressed ? 1.1 : 1.00
+ //Animate the scale property change
+ Behavior on scale { NumberAnimation{ duration: 55} }
+
+}
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part4/EditMenu.qml b/examples/tutorials/gettingStarted/gsQml/parts/part4/EditMenu.qml
new file mode 100644
index 0000000..f0a0e36
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part4/EditMenu.qml
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE: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 QtQuick 1.0
+
+Rectangle {
+ id: editMenu
+ height: 480; width:1000
+ color: "powderblue"
+ property string menuName:"Edit"
+ gradient: Gradient{
+ GradientStop { position: 0.0; color: "#6A6F70" }
+ GradientStop { position: 1.0; color: Qt.darker("#6A6D67") }
+ }
+
+ Rectangle{
+ id:actionContainer
+ color:"transparent"
+ anchors.centerIn: parent
+
+ width: parent.width; height: parent.height / 5
+ Row{
+ anchors.centerIn: parent
+ spacing: parent.width/6
+ Button{
+ id: loadButton
+ buttonColor: "lightgrey"
+ label: "Cut"
+ }
+
+ Button{
+ buttonColor: "grey"
+ id: saveButton
+ label: "Paste"
+ }
+ Button{
+ id: exitButton
+ label: "Select All"
+ buttonColor: "darkgrey"
+ }
+ }
+ }
+
+}
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part4/FileMenu.qml b/examples/tutorials/gettingStarted/gsQml/parts/part4/FileMenu.qml
new file mode 100644
index 0000000..d257d6a
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part4/FileMenu.qml
@@ -0,0 +1,96 @@
+/****************************************************************************
+**
+** 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 QtQuick 1.0
+
+Rectangle {
+ id: fileMenu
+
+ //the menuName is accessible from outside this QML file
+ property string menuName: "File"
+
+ //generous amount of screen space that will allow the buttons to fit
+ height: 480; width:1000
+
+ color: "#6C646A"
+ gradient: Gradient{
+ GradientStop { position: 0.0; color: "#6C646A" }
+ GradientStop { position: 1.0; color: Qt.darker("#6A6D6A") }
+ }
+
+ //a sub-rectangle allows the flexibility of setting the row area
+ Rectangle{
+ id:actionContainer
+
+ //make this rectangle invisible
+ color:"transparent"
+ anchors.centerIn: parent
+
+ //the height is a good proportion that creates more space at the top of the row of buttons
+ width: parent.width; height: parent.height / 5
+
+ Row{
+ anchors.centerIn: parent
+ spacing: parent.width/6
+ Button{
+ id: loadButton
+ buttonColor: "lightgrey"
+ label: "Load"
+ }
+
+ Button{
+ buttonColor: "grey"
+ id: saveButton
+ label: "Save"
+ }
+ Button{
+ id: exitButton
+ label: "Exit"
+ buttonColor: "darkgrey"
+
+ //exit the application if the exitButton is clicked
+ onButtonClick:{
+ Qt.quit()
+ }
+ }
+ }
+ }
+
+}
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part4/MenuBar.qml b/examples/tutorials/gettingStarted/gsQml/parts/part4/MenuBar.qml
new file mode 100644
index 0000000..5b0dbf8
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part4/MenuBar.qml
@@ -0,0 +1,146 @@
+/****************************************************************************
+**
+** 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 QtQuick 1.0
+
+Rectangle {
+ id: menuBar
+ width: 1000
+ height:300
+
+ property color fileColor: "plum"
+ property color editColor: "powderblue"
+
+ //container for the header and the buttons
+ Rectangle{
+
+ id: labelList
+ height:parent.height/10
+ width: parent.width
+ color: "beige"
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "#8C8F8C" }
+ GradientStop { position: 0.17; color: "#6A6D6A" }
+ GradientStop { position: 0.98;color: "#3F3F3F" }
+ GradientStop { position: 1.0; color: "#0e1B20" }
+ }
+
+ //default z is 0, items with higher z values are shown on top of items with lower z values
+ z: 1
+
+ //row displays its children in a vertical row
+ Row{
+ anchors.centerIn: parent
+ spacing:40
+ Button{
+ height: 20
+ width: 50
+ label: "File"
+ id: fileButton
+ buttonColor : menuListView.currentIndex == 0? fileColor : Qt.darker(fileColor, 1.5)
+ scale: menuListView.currentIndex == 0? 1.25: 1
+ radius: 1
+
+ //on a button click, change the list's currently selected item to FileMenu
+ onButtonClick: {
+ menuListView.currentIndex = 0
+ }
+ }
+ Button{
+ height: 20
+ width: 50
+ id: editButton
+ buttonColor : menuListView.currentIndex == 1? editColor : Qt.darker(editColor, 1.5)
+ scale: menuListView.currentIndex == 1? 1.25: 1
+ label: "Edit"
+ radius: 1
+
+ //on a button click, change the list's currently selected item to EditMenu
+ onButtonClick: {
+ menuListView.currentIndex = 1
+ }
+
+
+ }
+
+
+ }
+ }
+
+ //a list of visual items already have delegates handling their display
+ VisualItemModel{
+ id: menuListModel
+
+ FileMenu{
+ width: menuListView.width
+ height: menuBar.height
+ color: fileColor
+ }
+ EditMenu{
+ color: editColor
+ width: menuListView.width
+ height: menuBar.height
+
+ }
+ }
+
+ //list view will display a model according to a delegate
+ ListView{
+ id: menuListView
+ anchors.fill:parent
+ anchors.bottom: parent.bottom
+ width:parent.width
+ height: parent.height
+
+ //the model contains the data
+ model: menuListModel
+
+ //control the movement of the menu switching
+ snapMode: ListView.SnapOneItem
+ orientation: ListView.Horizontal
+ boundsBehavior: Flickable.StopAtBounds
+ flickDeceleration: 5000
+ highlightFollowsCurrentItem: true
+ highlightMoveDuration:240
+ highlightRangeMode: ListView.StrictlyEnforceRange
+ }
+
+
+}
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part4/SimpleButton.qml b/examples/tutorials/gettingStarted/gsQml/parts/part4/SimpleButton.qml
new file mode 100644
index 0000000..d360faa
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part4/SimpleButton.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: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 QtQuick 1.0
+
+Rectangle {
+ id: simplebutton
+ color: "grey"
+ width: 150; height: 75
+
+ Text{
+ id: buttonLabel
+ anchors.centerIn: parent
+ text: "button label"
+ }
+
+ MouseArea{
+ id: buttonMouseArea
+ anchors.fill: parent
+ onClicked: console.log(buttonLabel.text + " clicked" )
+ }
+}
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part4/TextArea.qml b/examples/tutorials/gettingStarted/gsQml/parts/part4/TextArea.qml
new file mode 100644
index 0000000..4eedf34
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part4/TextArea.qml
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE: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 QtQuick 1.0
+
+Rectangle {
+ id:textArea
+
+ width :400
+ height:400
+ property color fontColor: "white"
+
+ Flickable{
+ id: flickArea
+
+ width: parent.width
+ height: parent.height
+ anchors.fill:parent
+
+ function ensureVisible(r){
+ if (contentX >= r.x)
+ contentX = r.x;
+ else if (contentX+width <= r.x+r.width)
+ contentX = r.x+r.width-width;
+ if (contentY >= r.y)
+ contentY = r.y;
+ else if (contentY+height <= r.y+r.height)
+ contentY = r.y+r.height-height;
+ }
+
+ TextEdit{
+ id: textEditor
+ anchors.fill:parent
+ width:parent.width; height:parent.height
+ color:fontColor
+ focus: true
+
+ wrapMode: TextEdit.Wrap
+
+ onCursorRectangleChanged: flickArea.ensureVisible(cursorRectangle)
+ }
+ }
+}
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part4/TextEditor.qml b/examples/tutorials/gettingStarted/gsQml/parts/part4/TextEditor.qml
new file mode 100644
index 0000000..d218bba
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part4/TextEditor.qml
@@ -0,0 +1,146 @@
+/****************************************************************************
+**
+** 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 QtQuick 1.0
+
+Rectangle {
+ id: screen
+ width: 1000; height: 1000
+ property int partition: height/3
+ state: "DRAWER_CLOSED"
+
+
+ //Item 1: MenuBar on the top portion of the screen
+ MenuBar{
+ id:menuBar
+ height: partition
+ //anchors.top:parent.top
+ width:parent.width
+ z:1
+ }
+
+
+ //Item 2: The editable text area
+ TextArea{
+ id:textArea
+ y:drawer.height
+ border.color: Qt.darker(color, 1.4)
+ border.width: 2
+ color: "#3F3F3F"
+ fontColor: "#DCDCCC"
+ height: partition*2
+ width:parent.width
+ }
+
+ //Item 3: The drawer handle
+ Rectangle{
+ id:drawer
+ height:15
+ width: parent.width
+ border.color : "#6A6D6A"
+ border.width: 1
+
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "#8C8F8C" }
+ GradientStop { position: 0.17; color: "#6A6D6A" }
+ GradientStop { position: 0.77; color: "#3F3F3F" }
+ GradientStop { position: 1.0; color: "#6A6D6A" }
+ }
+
+ Image{
+ id: arrowIcon
+ source: "images/arrow.png"
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ Behavior{NumberAnimation{property: "rotation";easing.type: Easing.OutExpo }}
+ }
+
+ MouseArea{
+ id: drawerMouseArea
+ anchors.fill:parent
+ onClicked:{
+ if (screen.state == "DRAWER_CLOSED"){
+ screen.state = "DRAWER_OPEN"
+ console.log("drawer OPEN")
+ }
+ else if (screen.state == "DRAWER_OPEN"){
+ screen.state = "DRAWER_CLOSED"
+ console.log("drawer closed")
+ }
+ }
+
+ //if true, then onEntered and onExited called if mouse hovers in the mouse area
+ //if false, a button must be clicked to detect the mouse hover
+ hoverEnabled: true
+
+ //display a border if the mouse hovers on the button mouse area
+ onEntered: parent.border.color = Qt.lighter("#6A6D6A")
+ //remove the border if the mouse exits the button mouse area
+ onExited: parent.border.color = "#6A6D6A"
+ }
+
+ }
+ states:[
+ State{
+ name: "DRAWER_OPEN"
+ PropertyChanges { target: menuBar; y:0}
+ PropertyChanges { target: textArea; y: partition + drawer.height}
+ PropertyChanges { target: drawer; y: partition}
+ PropertyChanges { target: arrowIcon; rotation: 180}
+ },
+ State{
+ name: "DRAWER_CLOSED"
+ PropertyChanges { target: menuBar; y:-partition}
+ PropertyChanges { target: textArea; y: drawer.height; height: screen.height - drawer.height}
+ PropertyChanges { target: drawer; y: 0}
+ PropertyChanges { target: arrowIcon; rotation: 0}
+ }
+
+ ]
+ transitions: [
+ Transition{
+ to: "*"
+ NumberAnimation { target: textArea; properties: "y, height"; duration: 100; easing.type:Easing.OutExpo }
+ NumberAnimation { target: menuBar; properties: "y"; duration: 100;easing.type: Easing.OutExpo }
+ NumberAnimation { target: drawer; properties: "y"; duration: 100;easing.type: Easing.OutExpo }
+ }
+
+ ]
+}
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part4/images/arrow.png b/examples/tutorials/gettingStarted/gsQml/parts/part4/images/arrow.png
new file mode 100644
index 0000000..14978c2
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part4/images/arrow.png
Binary files differ
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part4/pics/qml-texteditor4_texteditor.png b/examples/tutorials/gettingStarted/gsQml/parts/part4/pics/qml-texteditor4_texteditor.png
new file mode 100644
index 0000000..a195fb8
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part4/pics/qml-texteditor4_texteditor.png
Binary files differ
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part4/qml-texteditor4.qmlproject b/examples/tutorials/gettingStarted/gsQml/parts/part4/qml-texteditor4.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part4/qml-texteditor4.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/tutorials/gettingStarted/gsQml/parts/part5/TextEditor.qml b/examples/tutorials/gettingStarted/gsQml/parts/part5/TextEditor.qml
new file mode 100644
index 0000000..4adcf05
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/TextEditor.qml
@@ -0,0 +1,127 @@
+/****************************************************************************
+**
+** 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 QtQuick 1.0
+import "core"
+
+Rectangle {
+ id: screen
+ width: 1000; height: 1000
+ property int partition: height/3
+ state: "DRAWER_CLOSED"
+
+ //Item 1: MenuBar on the top portion of the screen
+ MenuBar{
+ id:menuBar
+ height: screen.partition; width: screen.width
+ z:1
+ }
+ //Item 2: The editable text area
+ TextArea{
+ id:textArea
+ y:drawer.height
+ color: "#3F3F3F"
+ fontColor: "#DCDCCC"
+ height: partition*2; width:parent.width
+ }
+ //Item 3: The drawer handle
+ Rectangle{
+ id:drawer
+ height:15; width: parent.width
+ border.color : "#6A6D6A"
+ border.width: 1
+ z:1
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "#8C8F8C" }
+ GradientStop { position: 0.17; color: "#6A6D6A" }
+ GradientStop { position: 0.77; color: "#3F3F3F" }
+ GradientStop { position: 1.0; color: "#6A6D6A" }
+ }
+ Image{
+ id: arrowIcon
+ source: "images/arrow.png"
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ Behavior{NumberAnimation{property: "rotation";easing.type: Easing.OutExpo }}
+ }
+
+ MouseArea{
+ id: drawerMouseArea
+ anchors.fill:parent
+ hoverEnabled: true
+ onEntered: parent.border.color = Qt.lighter("#6A6D6A")
+ onExited: parent.border.color = "#6A6D6A"
+ onClicked:{
+ if (screen.state == "DRAWER_CLOSED"){
+ screen.state = "DRAWER_OPEN"
+ }
+ else if (screen.state == "DRAWER_OPEN"){
+ screen.state = "DRAWER_CLOSED"
+ }
+ }
+ }
+ }
+
+ states:[
+ State{
+ name: "DRAWER_OPEN"
+ PropertyChanges { target: menuBar; y: 0}
+ PropertyChanges { target: textArea; y: partition + drawer.height}
+ PropertyChanges { target: drawer; y: partition}
+ PropertyChanges { target: arrowIcon; rotation: 180}
+ },
+ State{
+ name: "DRAWER_CLOSED"
+ PropertyChanges { target: menuBar; y:-height; }
+ PropertyChanges { target: textArea; y: drawer.height; height: screen.height - drawer.height}
+ PropertyChanges { target: drawer; y: 0}
+ PropertyChanges { target: arrowIcon; rotation: 0}
+ }
+ ]
+
+ transitions: [
+ Transition{
+ to: "*"
+ NumberAnimation { target: textArea; properties: "y, height"; duration: 100; easing.type:Easing.OutExpo }
+ NumberAnimation { target: menuBar; properties: "y"; duration: 100;easing.type: Easing.OutExpo }
+ NumberAnimation { target: drawer; properties: "y"; duration: 100;easing.type: Easing.OutExpo }
+ }
+ ]
+}
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/core/Button.qml b/examples/tutorials/gettingStarted/gsQml/parts/part5/core/Button.qml
new file mode 100644
index 0000000..c0c1f77
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/core/Button.qml
@@ -0,0 +1,109 @@
+/****************************************************************************
+**
+** 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 QtQuick 1.0
+
+Rectangle {
+
+ //identifier of the item
+ id: button
+
+ //these properties act as constants, useable outside this QML file
+ property int buttonHeight: 75
+ property int buttonWidth: 150
+
+ //attaches to the Text element's text content
+ property string label
+ property color textColor: buttonLabel.color
+
+ //the color highlight when the mouse hovers on the rectangle
+ property color onHoverColor: "lightsteelblue"
+ property color borderColor: "transparent"
+
+ //buttonColor is set to the button's main color
+ property color buttonColor: "lightblue"
+
+ property real labelSize: 14
+ //set appearance properties
+ radius:6
+ smooth: true
+ border.width: 2
+ border.color: borderColor
+ width: buttonWidth; height: buttonHeight
+
+ Text{
+ id: buttonLabel
+ anchors.centerIn: parent
+ text: label //bind the text to the parent's text
+ color: "#DCDCCC"
+ font.pointSize: labelSize
+ }
+
+ //buttonClick() is callable and a signal handler, onButtonClick is automatically created
+ signal buttonClick()
+
+ //define the clickable area to be the whole rectangle
+ MouseArea{
+ id: buttonMouseArea
+ anchors.fill: parent //stretch the area to the parent's dimension
+ onClicked: buttonClick()
+
+ //if true, then onEntered and onExited called if mouse hovers in the mouse area
+ //if false, a button must be clicked to detect the mouse hover
+ hoverEnabled: true
+
+ //display a border if the mouse hovers on the button mouse area
+ onEntered: parent.border.color = onHoverColor
+ //remove the border if the mouse exits the button mouse area
+ onExited: parent.border.color = borderColor
+
+ }
+
+ //change the color of the button when pressed
+ color: buttonMouseArea.pressed ? Qt.darker(buttonColor, 1.5) : buttonColor
+ //animate the color whenever the color property changes
+ Behavior on color { ColorAnimation{ duration: 55} }
+
+ //scale the button when pressed
+ scale: buttonMouseArea.pressed ? 1.1 : 1.00
+ //Animate the scale property change
+ Behavior on scale { NumberAnimation{ duration: 55} }
+
+}
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/core/EditMenu.qml b/examples/tutorials/gettingStarted/gsQml/parts/part5/core/EditMenu.qml
new file mode 100644
index 0000000..4338d25
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/core/EditMenu.qml
@@ -0,0 +1,110 @@
+/****************************************************************************
+**
+** 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 QtQuick 1.0
+
+Rectangle {
+ id: editMenu
+ height: 480; width:1000
+ color: "powderblue"
+ property color buttonBorderColor: "#7A8182"
+ property color buttonFillColor: "#61BDCACD"
+ property string menuName:"Edit"
+
+ gradient: Gradient{
+ GradientStop { position: 0.0; color: "#6A7570" }
+ GradientStop { position: 1.0; color: Qt.darker("#6A7570") }
+ }
+
+ Rectangle{
+ id:actionContainer
+ color:"transparent"
+ anchors.centerIn: parent
+ width: parent.width; height: parent.height / 5
+ Row{
+ anchors.centerIn: parent
+ spacing: parent.width/9
+ Button{
+ id: loadButton
+ buttonColor: buttonFillColor
+ label: "Copy"
+ labelSize:16
+ borderColor:buttonBorderColor
+ height: actionContainer.height
+ width: actionContainer.width/6
+ onButtonClick:textArea.copy()
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: Qt.lighter(buttonFillColor,1.25) }
+ GradientStop { position: 0.67; color: Qt.darker(buttonFillColor,1.3) }
+ }
+ }
+
+ Button{
+ id: saveButton
+ height: actionContainer.height
+ width: actionContainer.width/6
+ buttonColor: buttonFillColor
+ label: "Paste"
+ borderColor:buttonBorderColor
+ labelSize:16
+ onButtonClick:textArea.paste()
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: Qt.lighter(buttonFillColor,1.25) }
+ GradientStop { position: 0.67; color: Qt.darker(buttonFillColor,1.3) }
+ }
+ }
+ Button{
+ id: exitButton
+ label: "Select All"
+ height: actionContainer.height
+ width: actionContainer.width/6
+ labelSize:16
+ buttonColor: buttonFillColor
+ borderColor:buttonBorderColor
+ onButtonClick:textArea.selectAll()
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: Qt.lighter(buttonFillColor,1.25) }
+ GradientStop { position: 0.67; color: Qt.darker(buttonFillColor,1.3) }
+ }
+ }
+ }
+ }
+
+}
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/core/FileDialog.qml b/examples/tutorials/gettingStarted/gsQml/parts/part5/core/FileDialog.qml
new file mode 100644
index 0000000..af9d82c
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/core/FileDialog.qml
@@ -0,0 +1,170 @@
+/****************************************************************************
+**
+** 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 QtQuick 1.0
+
+Rectangle {
+ id:dialog
+ height: 200 * partition; width: 200
+ color: "transparent"
+
+ signal selectChanged()
+ signal notifyRefresh()
+ onNotifyRefresh:dirView.model = directory.files
+
+ property string selectedFile
+ property int selectedIndex: 0
+
+ Rectangle{
+ id: dirBox
+ radius: 10
+ anchors.centerIn:parent
+ height: parent.height -15; width: parent.width -30
+
+ Rectangle{
+ id:header
+ height:parent.height*0.1
+ width: parent.width
+ radius:3
+ z:1
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "#8C8F8C" }
+ GradientStop { position: 0.17; color: "#6A6D6A" }
+ GradientStop { position: 0.98;color: "#3F3F3F" }
+ GradientStop { position: 1.0; color: "#0e1B20" }
+ }
+ Text{
+ height: header.height
+ anchors.centerIn: header
+ text: "files:"
+ color: "lightblue"
+ font.weight: Font.Light
+ font.italic: true
+ }
+ }
+ GridView{
+ id:dirView
+ width:parent.width
+ height:parent.height*.9
+ anchors.top: header.bottom
+ cellWidth: 100
+ cellHeight: 75
+// highlight: Rectangle { width:cellWidth; height: cellHeight; color: "lightsteelblue" ;radius: 13}
+ model: directory.files
+ delegate: dirDelegate
+ clip: true
+ highlightMoveDuration:40
+ }
+
+ Component{
+ id:dirDelegate
+
+ Rectangle{
+ id:file
+ color: "transparent"
+ width: GridView.view.cellWidth; height: GridView.view.cellHeight
+
+ Text{
+ id:fileName
+ width: parent.width
+ anchors.centerIn:parent
+ text: name
+ color: "#BDCACD"
+ font.weight: GridView.view.currentIndex == index ? Font.DemiBold : Font.Normal
+ font.pointSize: GridView.view.currentIndex == index ? 12 : 10
+ elide: Text.ElideMiddle
+ horizontalAlignment: Text.AlignHCenter
+ }
+ Rectangle{
+ id:selection
+ width:parent.width; height:parent.height
+ anchors.centerIn: parent
+ radius: 10
+ smooth: true
+ scale: GridView.view.currentIndex == index ? 1 : 0.5
+ opacity: GridView.view.currentIndex == index ? 1 : 0
+ Text{
+ id:overlay
+ width: parent.width
+ anchors.centerIn:parent
+ text: name
+ color: "#696167"
+ font.weight: Font.DemiBold
+ font.pointSize: 12
+ smooth:true
+ elide: Text.ElideMiddle
+ horizontalAlignment: Text.AlignHCenter
+ }
+ Behavior on opacity{ NumberAnimation{ duration: 45} }
+ Behavior on scale { NumberAnimation{ duration: 45} }
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: Qt.lighter("lightsteelblue",1.25) }
+ GradientStop { position: 0.67; color: Qt.darker("lightsteelblue",1.3) }
+ }
+ border.color:"lightsteelblue"
+ border.width:1
+ }
+ MouseArea{
+ id:fileMouseArea
+ anchors.fill:parent
+ hoverEnabled: true
+
+ onClicked:{
+ GridView.view.currentIndex = index
+ selectedFile = directory.files[index].name
+ selectChanged()
+ }
+ onEntered:{
+ fileName.color = "lightsteelblue"
+ fileName.font.weight = Font.DemiBold
+ }
+ onExited: {
+ fileName.font.weight = Font.Normal
+ fileName.color = "#BDCACD"
+ }
+ }
+ }
+ }
+ gradient: Gradient{
+ GradientStop { position: 0.0; color: "#A5333333" }
+ GradientStop { position: 1.0; color: "#03333333" }
+ }
+ }
+}
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/core/FileMenu.qml b/examples/tutorials/gettingStarted/gsQml/parts/part5/core/FileMenu.qml
new file mode 100644
index 0000000..1d671e4
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/core/FileMenu.qml
@@ -0,0 +1,232 @@
+/****************************************************************************
+**
+** 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 QtQuick 1.0
+
+Rectangle {
+ id: fileMenu
+ height: 480; width:1000
+ property color buttonBorderColor: "#7F8487"
+ property color buttonFillColor: "#8FBDCACD"
+ property string fileContent:directory.fileContent
+
+ //the menuName is accessible from outside this QML file
+ property string menuName: "File"
+
+ //used to divide the screen into parts.
+ property real partition: 1/3
+
+ color: "#6C646A"
+ gradient: Gradient{
+ GradientStop { position: 0.0; color: "#6C646A" }
+ GradientStop { position: 1.0; color: Qt.darker("#6A6D6A") }
+ }
+
+ Directory{
+ id:directory
+ filename: textInput.text
+ onDirectoryChanged:fileDialog.notifyRefresh()
+ }
+
+ Rectangle{
+ id:actionContainer
+
+ //make this rectangle invisible
+ color:"transparent"
+ anchors.left: parent.left
+
+ //the height is a good proportion that creates more space at the top of the column of buttons
+ width: fileMenu.width * partition; height: fileMenu.height
+
+ Column{
+ anchors.centerIn: parent
+ spacing: parent.height/32
+ Button{
+ id: saveButton
+ label: "Save"
+ borderColor: buttonBorderColor
+ buttonColor: buttonFillColor
+ width: actionContainer.width/ 1.3
+ height:actionContainer.height / 8
+ labelSize:24
+ onButtonClick:{
+ directory.fileContent = textArea.textContent
+ directory.filename = textInput.text
+ directory.saveFile()
+ }
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: Qt.lighter(buttonFillColor,1.25) }
+ GradientStop { position: 0.67; color: Qt.darker(buttonFillColor,1.3) }
+ }
+
+ }
+ Button{
+ id: loadButton
+ width: actionContainer.width/ 1.3
+ height:actionContainer.height/ 8
+ buttonColor: buttonFillColor
+ borderColor: buttonBorderColor
+ label: "Load"
+ labelSize:24
+ onButtonClick:{
+ directory.filename = textInput.text
+ directory.loadFile()
+ textArea.textContent = directory.fileContent
+ }
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: Qt.lighter(buttonFillColor,1.25) }
+ GradientStop { position: 0.67; color: Qt.darker(buttonFillColor,1.3) }
+ }
+ }
+ Button{
+ id: newButton
+ width: actionContainer.width/ 1.3
+ height:actionContainer.height/ 8
+ buttonColor: buttonFillColor
+ borderColor: buttonBorderColor
+ label: "New"
+ labelSize:24
+ onButtonClick:{
+ textArea.textContent = ""
+ textInput.text = ""
+ }
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: Qt.lighter(buttonFillColor,1.25) }
+ GradientStop { position: 0.67; color: Qt.darker(buttonFillColor,1.3) }
+ }
+
+ }
+ Rectangle{
+ id: space
+ width: actionContainer.width/ 1.3
+ height:actionContainer.height / 16
+ color:"transparent"
+ }
+ Button{
+ id: exitButton
+ width: actionContainer.width/ 1.3
+ height:actionContainer.height/ 8
+ label: "Exit"
+ labelSize:24
+ buttonColor: buttonFillColor
+ borderColor: buttonBorderColor
+ onButtonClick:Qt.quit()
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: Qt.lighter(buttonFillColor,1.25) }
+ GradientStop { position: 0.67; color: Qt.darker(buttonFillColor,1.3) }
+ }
+ }
+ }
+ }
+
+ Rectangle{
+ id:dialogContainer
+
+ width: 2*fileMenu.width * partition; height: fileMenu.height
+ anchors.right:parent.right
+ color:"transparent"
+
+ Column {
+ anchors.centerIn: parent
+ spacing: parent.height /640
+ FileDialog{
+ id:fileDialog
+ height: 2*dialogContainer.height * partition; width: dialogContainer.width
+ onSelectChanged: textInput.text = selectedFile
+ }
+
+ Rectangle{
+ id:lowerPartition
+ height: dialogContainer.height * partition; width: dialogContainer.width
+ color: "transparent"
+
+ Rectangle{
+ id: nameField
+ gradient: Gradient{
+ GradientStop { position: 0.0; color: "#806F6F6F" }
+ GradientStop { position: 1.0; color: "#136F6F6F" }
+ }
+
+ radius: 10
+ anchors {centerIn:parent; leftMargin: 15; rightMargin: 15; topMargin: 15}
+ height: parent.height-15; width: parent.width -20
+ border {color:"#4A4A4A"; width:1}
+
+ TextInput{
+ id: textInput
+ z:2
+ anchors {bottom: parent.bottom; topMargin: 10; horizontalCenter:parent.horizontalCenter}
+ width: parent.width - 10
+ height: parent.height -10
+ font.pointSize: 40
+ color:"lightsteelblue"
+ focus:true
+ }
+ Text{
+ id: textInstruction
+ anchors.centerIn:parent
+ text: "Select file name and press save or load"
+ font {pointSize: 11; weight:Font.Light; italic: true}
+ color: "lightblue"
+ z:2
+ opacity: (textInput.text == "") ? 1: 0
+ }
+ Text{
+ id:fieldLabel
+ anchors {top: parent.top; left: parent.left}
+ text: " file name: "
+ font {pointSize: 11; weight: Font.Light; italic: true}
+ color: "lightblue"
+ z:2
+ }
+ MouseArea{
+ anchors.centerIn:parent
+ width: nameField.width; height: nameField.height
+ onClicked:{
+ textInput.text = ""
+ textInput.focus = true
+ textInput.forceFocus()
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/core/MenuBar.qml b/examples/tutorials/gettingStarted/gsQml/parts/part5/core/MenuBar.qml
new file mode 100644
index 0000000..657e5dc
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/core/MenuBar.qml
@@ -0,0 +1,148 @@
+/****************************************************************************
+**
+** 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 QtQuick 1.0
+
+Rectangle {
+ id: menuBar
+ width: 1000; height:300
+ color:"transparent"
+ property color fileColor: "plum"
+ property color editColor: "powderblue"
+
+ property real partition: 1/10
+
+ Column{
+ anchors.fill: parent
+ //container for the header and the buttons
+ z: 1
+ Rectangle{
+ id: labelList
+ height:menuBar.height*partition
+ width: menuBar.width
+ color: "beige"
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "#8C8F8C" }
+ GradientStop { position: 0.17; color: "#6A6D6A" }
+ GradientStop { position: 0.98;color: "#3F3F3F" }
+ GradientStop { position: 1.0; color: "#0e1B20" }
+ }
+ Text{
+ height: parent.height
+ anchors {right: labelRow.left ; verticalCenter: parent.bottom}
+ text: "menu: "
+ color: "lightblue"
+ font {weight: Font.Light; italic: true}
+ smooth: true
+ }
+
+ //row displays its children in a vertical row
+ Row{
+ id: labelRow
+ anchors.centerIn: parent
+ spacing:40
+ Button{
+ id: fileButton
+ height: 20; width: 50
+ label: "File"
+ buttonColor : menuListView.currentIndex == 0? fileColor : Qt.darker(fileColor, 1.5)
+ scale: menuListView.currentIndex == 0? 1.25: 1
+ labelSize: menuListView.currentIndex == 0? 16:12
+ radius: 1
+ smooth:true
+ //on a button click, change the list's currently selected item to FileMenu
+ onButtonClick: menuListView.currentIndex = 0
+ gradient: Gradient{
+ GradientStop { position: 0.0; color: fileColor }
+ GradientStop { position: 1.0; color: "#136F6F6F" }
+ }
+ }
+ Button{
+ id: editButton
+ height: 20; width: 50
+ buttonColor : menuListView.currentIndex == 1? Qt.darker(editColor, 1.5) : Qt.darker(editColor, 1.9)
+ scale: menuListView.currentIndex == 1? 1.25: 1
+ label: "Edit"
+ radius: 1
+ labelSize: menuListView.currentIndex == 1? 16:12
+ smooth:true
+ //on a button click, change the list's currently selected item to EditMenu
+ onButtonClick: menuListView.currentIndex = 1
+ gradient: Gradient{
+ GradientStop { position: 0.0; color: editColor }
+ GradientStop { position: 1.0; color: "#136F6F6F" }
+ }
+ }
+ }
+ }
+
+ //list view will display a model according to a delegate
+ ListView{
+ id: menuListView
+ width:menuBar.width; height: 9*menuBar.height*partition
+
+ //the model contains the data
+ model: menuListModel
+
+ //control the movement of the menu switching
+ snapMode: ListView.SnapOneItem
+ orientation: ListView.Horizontal
+ boundsBehavior: Flickable.StopAtBounds
+ flickDeceleration: 5000
+ highlightFollowsCurrentItem: true
+ highlightMoveDuration:240
+ highlightRangeMode: ListView.StrictlyEnforceRange
+ }
+ }
+ //a list of visual items already have delegates handling their display
+ VisualItemModel{
+ id: menuListModel
+
+ FileMenu{
+ id:fileMenu
+ width: menuListView.width; height: menuListView.height
+ color: fileColor
+ }
+ EditMenu{
+ color: editColor
+ width: menuListView.width; height: menuListView.height
+ }
+ }
+}
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/core/TextArea.qml b/examples/tutorials/gettingStarted/gsQml/parts/part5/core/TextArea.qml
new file mode 100644
index 0000000..d58c159
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/core/TextArea.qml
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** 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 QtQuick 1.0
+
+Rectangle {
+ id:textArea
+
+ function paste(){ textEdit.paste()}
+ function copy() { textEdit.copy() }
+ function selectAll() { textEdit.selectAll() }
+
+ width :400; height:400
+
+ property color fontColor: "white"
+ property alias textContent: textEdit.text
+ Flickable{
+ id: flickArea
+ width: parent.width; height: parent.height
+ anchors.fill:parent
+
+ boundsBehavior: Flickable.StopAtBounds
+ flickableDirection: Flickable.HorizontalFlick
+ interactive: true
+ //Will move the text Edit area to make the area visible when scrolled with keyboard strokes
+ function ensureVisible(r){
+ if (contentX >= r.x)
+ contentX = r.x;
+ else if (contentX+width <= r.x+r.width)
+ contentX = r.x+r.width-width;
+ if (contentY >= r.y)
+ contentY = r.y;
+ else if (contentY+height <= r.y+r.height)
+ contentY = r.y+r.height-height;
+ }
+
+ TextEdit{
+ id: textEdit
+ anchors.fill:parent
+ width:parent.width; height:parent.height
+ color:fontColor
+ focus: true
+ wrapMode: TextEdit.Wrap
+ font.pointSize:10
+ onCursorRectangleChanged: flickArea.ensureVisible(cursorRectangle)
+ selectByMouse: true
+ }
+ }
+}
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/core/qmldir b/examples/tutorials/gettingStarted/gsQml/parts/part5/core/qmldir
new file mode 100644
index 0000000..3f22778
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/core/qmldir
@@ -0,0 +1,13 @@
+
+Button ./Button.qml
+FileDialog ./FileDialog.qml
+TextArea ./TextArea.qml
+TextEditor ./TextEditor.qml
+EditMenu ./EditMenu.qml
+MenuBar ./MenuBar.qml
+
+plugin FileDialog ../plugins
+
+
+
+
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.cpp b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.cpp
new file mode 100644
index 0000000..7ea44ce
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.cpp
@@ -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: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 "dialogPlugin.h"
+#include "directory.h"
+#include "file.h"
+#include <QtDeclarative/qdeclarative.h>
+
+void DialogPlugin::registerTypes(const char *uri){
+
+ //register the class Directory into QML as a "Directory" element version 1.0
+ qmlRegisterType<Directory>(uri, 1, 0, "Directory");
+ qmlRegisterType<File>(uri,1,0,"File");
+
+ //qRegisterMetaType<QDeclarativeListProperty<QString> > ("QDeclarativeListProperty<QString>");
+
+}
+
+//FileDialog is the plugin name (same as the TARGET in the project file) and DialogPlugin is the plugin classs
+Q_EXPORT_PLUGIN2(FileDialog, DialogPlugin); \ No newline at end of file
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.h b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.h
new file mode 100644
index 0000000..188e070
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.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 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$
+**
+****************************************************************************/
+
+#ifndef DIALOGPLUGIN_H
+#define DIALOGPLUGIN_H
+
+#include <QtDeclarative/QDeclarativeExtensionPlugin>
+
+class DialogPlugin : public QDeclarativeExtensionPlugin
+{
+ Q_OBJECT
+
+ public:
+ //registerTypes is inherited from QDeclarativeExtensionPlugin
+ void registerTypes(const char *uri);
+
+};
+
+#endif
+
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/directory.cpp b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/directory.cpp
new file mode 100644
index 0000000..cddfa03
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/directory.cpp
@@ -0,0 +1,219 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#include "directory.h"
+#include <QDebug>
+
+/*
+Directory constructor
+
+Initialize the saves directory and creates the file list
+*/
+Directory::Directory(QObject *parent) : QObject(parent)
+{
+
+
+ m_dir.cd( QDir::currentPath());
+
+ //go to the saved directory. if not found, create save directory
+ m_saveDir = "saves";
+ if (m_dir.cd(m_saveDir) == 0){
+ m_dir.mkdir(m_saveDir);
+ m_dir.cd(m_saveDir);
+ }
+ m_filterList << "*.txt";
+
+ refresh();
+}
+
+/*
+Directory::filesNumber
+Return the number of Files
+*/
+int Directory:: filesCount() const{
+ return m_fileList.size();
+}
+
+/*
+Function called to append data onto list property
+*/
+void appendFiles(QDeclarativeListProperty<File> * property, File * file){
+ //Do nothing. can't add to a directory using this method
+}
+
+/*
+Function called to retrieve file in the list using an index
+*/
+File* fileAt(QDeclarativeListProperty<File> * property, int index){
+ return static_cast< QList<File *> *>(property->data)->at(index);
+}
+
+/*
+Returns the number of files in the list
+*/
+int filesSize(QDeclarativeListProperty<File> * property){
+ return static_cast< QList<File *> *>(property->data)->size();
+}
+
+/*
+Function called to empty the list property contents
+*/
+void clearFilesPtr(QDeclarativeListProperty<File> *property){
+ return static_cast< QList<File *> *>(property->data)->clear();
+}
+
+/*
+Returns the list of files as a QDeclarativeListProperty.
+*/
+QDeclarativeListProperty<File> Directory::files(){
+
+ refresh();
+// return QDeclarativeListProperty<QString>(this,m_filePtrList); //not recommended in the docs
+ return QDeclarativeListProperty<File>( this, &m_fileList, &appendFiles, &filesSize, &fileAt, &clearFilesPtr );
+}
+
+/*
+Return te name of the currently selected file
+*/
+QString Directory::filename() const{
+ return currentFile.name();
+}
+
+/*
+Return the file's content as a string.
+*/
+QString Directory::fileContent() const{
+ return m_fileContent;
+}
+
+/*
+Set the file name of the current file
+*/
+void Directory::setFilename(const QString &str){
+ if(str != currentFile.name()){
+ currentFile.setName(str);
+ emit filenameChanged();
+ }
+}
+
+/*
+Set the content of the file as a string
+*/
+void Directory::setFileContent(const QString &str){
+ if(str != m_fileContent){
+ m_fileContent = str;
+ emit fileContentChanged();
+ }
+}
+
+/*
+Called from QML to save the file using the filename and file content.
+Saving makes sure that the file has a .txt extension.
+*/
+void Directory::saveFile(){
+
+ if(currentFile.name().size() == 0){
+ qWarning()<< "Empty filename. no save";
+ return;
+ }
+
+ QString extendedName = currentFile.name();
+ if(!currentFile.name().endsWith(".txt")){
+ extendedName.append(".txt");
+ }
+
+ QFile file( m_dir.filePath(extendedName) );
+ if (file.open(QFile::WriteOnly | QFile::Truncate)){
+ QTextStream outStream(&file);
+ outStream << m_fileContent;
+ }
+ file.close();
+ refresh();
+ emit directoryChanged();
+}
+
+/*
+Load the contents of a file.
+Only loads files with a .txt extension
+*/
+void Directory::loadFile(){
+
+ m_fileContent.clear();
+ QString extendedName = currentFile.name();
+ if(!currentFile.name().endsWith(".txt")){
+ extendedName.append(".txt");
+ }
+
+ QFile file( m_dir.filePath(extendedName) );
+ if (file.open(QFile::ReadOnly )){
+ QTextStream inStream(&file);
+
+ QString line;
+ do{
+ line = inStream.read(75);
+ m_fileContent.append(line);
+ }while (!line .isNull());
+ }
+ file.close();
+}
+
+/*
+Reloads the content of the files list. This is to ensure that the newly
+created files are added onto the list.
+*/
+void Directory::refresh(){
+ m_dirFiles = m_dir.entryList(m_filterList,QDir::Files,QDir::Name);
+ m_fileList.clear();
+
+ File * file;
+ for(int i = 0; i < m_dirFiles.size() ; i ++){
+
+ file = new File();
+
+ if(m_dirFiles.at(i).endsWith(".txt")){
+ QString name = m_dirFiles.at(i);
+ file->setName( name.remove(".txt",Qt::CaseSensitive));
+ }
+ else{
+ file->setName(m_dirFiles.at(i));
+ }
+ m_fileList.append(file);
+ }
+} \ No newline at end of file
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/directory.h b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/directory.h
new file mode 100644
index 0000000..417df68
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/directory.h
@@ -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 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$
+**
+****************************************************************************/
+
+#ifndef DIRECTORY_H
+#define DIRECTORY_H
+
+#include "file.h"
+
+#include <QDir>
+#include <QStringList>
+#include <QTextStream>
+#include <QDeclarativeListProperty>
+#include <QObject>
+
+class Directory : public QObject{
+
+ Q_OBJECT
+
+ //number of files in the directory
+ Q_PROPERTY(int filesCount READ filesCount)
+
+ //list property containing file names as QString
+ Q_PROPERTY(QDeclarativeListProperty<File> files READ files CONSTANT )
+
+ //file name of the text file to read/write
+ Q_PROPERTY(QString filename READ filename WRITE setFilename NOTIFY filenameChanged)
+
+ //text content of the file
+ Q_PROPERTY(QString fileContent READ fileContent WRITE setFileContent NOTIFY fileContentChanged)
+
+ public:
+ Directory(QObject *parent = 0);
+
+ //properties' read functions
+ int filesCount() const;
+ QString filename() const;
+ QString fileContent() const;
+ QDeclarativeListProperty<File> files();
+
+ //properties' write functions
+ void setFilename(const QString &str);
+ void setFileContent(const QString &str);
+
+ //accessible from QML
+ Q_INVOKABLE void saveFile();
+ Q_INVOKABLE void loadFile();
+
+ signals:
+ void directoryChanged();
+ void filenameChanged();
+ void fileContentChanged();
+
+ private:
+ QDir m_dir;
+ QStringList m_dirFiles;
+ File currentFile;
+ QString m_saveDir;
+ QStringList m_filterList;
+
+ //contains the file data in QString format
+ QString m_fileContent;
+
+ //Registered to QML in a plugin. Accessible from QML as a property of Directory
+ QList<File *> m_fileList;
+
+ //refresh content of the directory
+ void refresh();
+};
+
+
+#endif
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/file.cpp b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/file.cpp
new file mode 100644
index 0000000..f4a360a
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/file.cpp
@@ -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 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$
+**
+****************************************************************************/
+
+#include "file.h"
+
+File::File(QObject *parent) : QObject(parent)
+{
+ m_name = "";
+}
+
+QString File::name() const{
+ return m_name;
+}
+void File::setName(const QString &str){
+ if(str != m_name){
+ m_name = str;
+ emit nameChanged();
+ }
+} \ No newline at end of file
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/file.h b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/file.h
new file mode 100644
index 0000000..b27a143
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/file.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 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$
+**
+****************************************************************************/
+
+#ifndef FILE_H
+#define FILE_H
+
+
+#include <QString>
+#include <QObject>
+
+class File : public QObject{
+
+ Q_OBJECT
+
+ Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
+
+ public:
+ File(QObject *parent = 0);
+
+ QString name() const;
+ void setName(const QString &str);
+
+ signals:
+ void nameChanged();
+
+ private:
+ QString m_name;
+};
+
+#endif \ No newline at end of file
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/filedialog.pro b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/filedialog.pro
new file mode 100644
index 0000000..6247747
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/filedialog.pro
@@ -0,0 +1,17 @@
+TEMPLATE = lib
+CONFIG += qt plugin
+QT += declarative
+
+DESTDIR += ../plugins
+OBJECTS_DIR = tmp
+MOC_DIR = tmp
+
+TARGET = FileDialog
+
+HEADERS += directory.h \
+ file.h \
+ dialogPlugin.h
+
+SOURCES += directory.cpp \
+ file.cpp \
+ dialogPlugin.cpp
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/qmldir b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/qmldir
new file mode 100644
index 0000000..c2b27da
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/qmldir
@@ -0,0 +1 @@
+plugin FileDialog plugins
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/images/arrow.png b/examples/tutorials/gettingStarted/gsQml/parts/part5/images/arrow.png
new file mode 100644
index 0000000..14978c2
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/images/arrow.png
Binary files differ
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_editmenu.png b/examples/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_editmenu.png
new file mode 100644
index 0000000..27feed5
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_editmenu.png
Binary files differ
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_filemenu.png b/examples/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_filemenu.png
new file mode 100644
index 0000000..4d8f9f2
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_filemenu.png
Binary files differ
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_newfile.png b/examples/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_newfile.png
new file mode 100644
index 0000000..680acfe
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_newfile.png
Binary files differ
diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/qml-texteditor5.qmlproject b/examples/tutorials/gettingStarted/gsQml/parts/part5/qml-texteditor5.qmlproject
new file mode 100644
index 0000000..ed034df
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/qml-texteditor5.qmlproject
@@ -0,0 +1,18 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ directory: "core"
+ directory: "filedialog"
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ importPaths: [ " ./plugins " ]
+}
diff --git a/examples/tutorials/gettingStarted/gsQml/texteditor.pro b/examples/tutorials/gettingStarted/gsQml/texteditor.pro
new file mode 100644
index 0000000..aa5306c
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQml/texteditor.pro
@@ -0,0 +1,4 @@
+TEMPLATE = subdirs
+SUBDIRS = \
+ filedialog\
+
diff --git a/examples/webkit/imageanalyzer/README b/examples/webkit/imageanalyzer/README
new file mode 100644
index 0000000..9415b57
--- /dev/null
+++ b/examples/webkit/imageanalyzer/README
@@ -0,0 +1,20 @@
+This example demonstrates the use of Qt WebKit to make a hybrid application.
+
+Build instructions:
+
+ On Mac OS X:
+ In this directory:
+ qmake -spec macx-g++
+ make clean all
+ open imageanalyzer.app
+ On Linux/Unix:
+ In this directory:
+ qmake
+ make clean all
+ ./imageanalyzer
+
+ On Windows:
+ In this directory:
+ qmake
+ nmake clean all
+ debug\imageanalyzer.exe
diff --git a/examples/webkit/imageanalyzer/imageanalyzer.cpp b/examples/webkit/imageanalyzer/imageanalyzer.cpp
new file mode 100644
index 0000000..9f49a00
--- /dev/null
+++ b/examples/webkit/imageanalyzer/imageanalyzer.cpp
@@ -0,0 +1,222 @@
+/****************************************************************************
+**
+** 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 <QNetworkReply>
+#include <QNetworkRequest>
+#include <QNetworkAccessManager>
+#include <QNetworkDiskCache>
+#include "imageanalyzer.h"
+
+/*!
+ * This class operates as follows:
+ * Parent calls the slot startAnalysis which shoves a list of QStrings into URLQueue and then calls fetchURLs.
+ * FetchURLs sends out HTTP GETs for each image it can't get out of the cache.
+ * As the responses come in, handleReply tries to create an image out of each and pushes those images into imageQueue.
+ * On the last (detected by no outstandingFetches and URLQueue.isEmpty()) call to queueImage (from handleReply)
+ * a thread is forked to process all the images. When it finishes, it emits a finished signal that is received
+ * by our JavaScript code.
+ */
+
+//! [ ImageAnalyzer - Constructor ]
+ImageAnalyzer::ImageAnalyzer(QNetworkDiskCache* netcache, QObject* parent)
+ : QObject(parent), m_cache(netcache), m_outstandingFetches(0)
+{
+ /* ImageAnalyzer only wants to receive http responses
+ for requests that it makes, so that's why it has its own
+ QNetworkAccessManager. */
+ m_network = new QNetworkAccessManager(this);
+ m_watcher = new QFutureWatcher<QRgb>(this);
+ /* We want to share a cache with the web browser,
+ in case it has some images we want: */
+ m_network->setCache(m_cache);
+
+ QObject::connect(m_network, SIGNAL(finished(QNetworkReply*)),
+ this, SLOT(handleReply(QNetworkReply*)));
+ QObject::connect(m_watcher, SIGNAL(finished()),
+ this, SLOT(doneProcessing()));
+ QObject::connect(m_watcher, SIGNAL(progressValueChanged(int)),
+ this, SLOT(progressStatus(int)));
+}
+//! [ ImageAnalyzer - Constructor ]
+ImageAnalyzer::~ImageAnalyzer()
+{
+ delete(m_watcher);
+}
+
+
+QRgb ImageAnalyzer::lastResults()
+{
+ int rTot = 0;
+ int bTot = 0;
+ int gTot = 0;
+ int count = m_watcher->future().results().size();
+ foreach(const QRgb & triplet, m_watcher->future().results())
+ {
+ rTot += qRed(triplet);
+ bTot += qBlue(triplet);
+ gTot += qGreen(triplet);
+ }
+ return qRgb(rTot/count, bTot/count, gTot/count);
+}
+
+float ImageAnalyzer::lastRed() { return qRed(lastResults())/2.55; }
+float ImageAnalyzer::lastGreen() { return qGreen(lastResults())/2.55; }
+float ImageAnalyzer::lastBlue() { return qBlue(lastResults())/2.55; }
+
+void ImageAnalyzer::progressStatus(int newstat)
+{
+ emit updateProgress(newstat, m_watcher->progressMaximum());
+}
+
+
+bool ImageAnalyzer::isBusy()
+{
+ return m_watcher->isRunning();
+}
+
+
+//! [ ImageAnalyzer - startAnalysis ]
+void ImageAnalyzer::startAnalysis(const QStringList & urls)
+{
+ m_URLQueue = urls;
+ fetchURLs();
+}
+//! [ ImageAnalyzer - startAnalysis ]
+
+/*!
+ * Analyzes the entire queue - just starts all our http GETs.
+ */
+//! [ ImageAnalyzer - fetchURLs ]
+void ImageAnalyzer::fetchURLs()
+{
+ while (!m_URLQueue.isEmpty())
+ {
+ QString url = m_URLQueue.takeFirst();
+ QUrl URL = QUrl(url);
+ QIODevice * pData = m_cache->data(URL);
+ // Is image already loaded in cache?
+ if (pData == 0) {
+ // HTTP Get image over network.
+ m_outstandingFetches++;
+ QNetworkRequest request = QNetworkRequest(URL);
+ request.setRawHeader("User-Agent", "Nokia - Custom QT app");
+ m_network->get(request);
+ } else {
+ // Get image from cache
+ QImage image;
+ image.load(pData, 0);
+ if (!image.isNull())
+ queueImage(image);
+ delete(pData);
+ }
+ }
+}
+//! [ ImageAnalyzer - fetchURLs ]
+/*
+ * Slot to handle the incoming responses from our http GETs
+ */
+//! [ ImageAnalyzer - handleReply ]
+void ImageAnalyzer::handleReply(QNetworkReply * pReply)
+{
+ m_outstandingFetches--;
+ if (pReply->error()) {
+ qDebug() << "Error code" << pReply->error();
+ qDebug() << "Http code" << pReply->attribute(QNetworkRequest::HttpStatusCodeAttribute);
+ return;
+ }
+ QImage image;
+ image.load(pReply, 0);
+ pReply->deleteLater();
+ if (image.isNull()) {
+ qDebug() << "bad image";
+ qDebug() << pReply->rawHeaderList();
+ foreach(QByteArray element, pReply->rawHeaderList()) {
+ qDebug() << element << " = " << pReply->rawHeader(element);
+ }
+ return;
+ }
+ queueImage(image);
+}
+//! [ ImageAnalyzer - handleReply ]
+
+void ImageAnalyzer::doneProcessing()
+{
+ m_imageQueue = QList<QImage>();
+ emit finishedAnalysis();
+}
+//! [ ImageAnalyzer - queueImage ]
+void ImageAnalyzer::queueImage(QImage img)
+{
+ if (!img.isNull())
+ m_imageQueue << img;
+
+ if (m_outstandingFetches == 0 && m_URLQueue.isEmpty()) {
+ m_watcher->setFuture(QtConcurrent::mapped(m_imageQueue, averageRGB));
+ }
+}
+//! [ ImageAnalyzer - queueImage ]
+
+//! [ ImageAnalyzer - averageRGB ]
+QRgb averageRGB(const QImage &img)
+{
+ int pixelCount = img.width() * img.height();
+ int rAvg, gAvg, bAvg;
+
+ // We waste some time here:
+ for (int timeWaster=0; timeWaster < 100; timeWaster++) {
+ quint64 rTot = 0;
+ quint64 gTot = 0;
+ quint64 bTot = 0;
+ for (int i=0; i < img.width(); i++) {
+ for (int j=0; j < img.height(); j++) {
+ QRgb pixel = img.pixel(i,j);
+ rTot += qRed(pixel);
+ gTot += qGreen(pixel);
+ bTot += qBlue(pixel);
+ }
+ }
+ rAvg = (rTot)/(pixelCount);
+ gAvg = (gTot)/(pixelCount);
+ bAvg = (bTot)/(pixelCount);
+ }
+ return qRgb(rAvg, gAvg, bAvg);
+}
+//! [ ImageAnalyzer - averageRGB ]
diff --git a/examples/webkit/imageanalyzer/imageanalyzer.h b/examples/webkit/imageanalyzer/imageanalyzer.h
new file mode 100644
index 0000000..5a96909
--- /dev/null
+++ b/examples/webkit/imageanalyzer/imageanalyzer.h
@@ -0,0 +1,103 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the 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 IMAGEANALYZER_H
+#define IMAGEANALYZER_H
+
+#include <QFutureWatcher>
+#include <QtGui>
+
+QT_BEGIN_NAMESPACE
+class QNetworkAccessManager;
+class QNetworkReply;
+class QNetworkDiskCache;
+QT_END_NAMESPACE
+
+//! [ ImageAnalyzer - public interface ]
+class ImageAnalyzer : public QObject
+{
+ Q_OBJECT
+public:
+ ImageAnalyzer(QNetworkDiskCache * netcache, QObject * parent=0);
+
+ QRgb lastResults();
+ float lastRed();
+ float lastGreen();
+ float lastBlue();
+ bool isBusy();
+ Q_PROPERTY(bool busy READ isBusy);
+ Q_PROPERTY(float red READ lastRed);
+ Q_PROPERTY(float green READ lastGreen);
+ Q_PROPERTY(float blue READ lastBlue);
+ ~ImageAnalyzer();
+
+public slots:
+ /*! initiates analysis of all the urls in the list */
+ void startAnalysis(const QStringList & urls);
+
+signals:
+ void finishedAnalysis();
+ void updateProgress(int completed, int total);
+ //! [ ImageAnalyzer - public interface ]
+
+private slots:
+ void handleReply(QNetworkReply*);
+ void doneProcessing();
+ void progressStatus(int);
+
+private:
+ QRgb processImages();
+ void fetchURLs();
+ void queueImage(QImage img);
+
+ //! [ ImageAnalyzer - private members ]
+private:
+ QNetworkAccessManager* m_network;
+ QNetworkDiskCache* m_cache;
+ QStringList m_URLQueue;
+ QList<QImage> m_imageQueue;
+ int m_outstandingFetches;
+ QFutureWatcher<QRgb> * m_watcher;
+ //! [ ImageAnalyzer - private members ]
+};
+
+QRgb averageRGB(const QImage &img);
+
+#endif
diff --git a/examples/webkit/imageanalyzer/imageanalyzer.pro b/examples/webkit/imageanalyzer/imageanalyzer.pro
new file mode 100644
index 0000000..c9a0ed1
--- /dev/null
+++ b/examples/webkit/imageanalyzer/imageanalyzer.pro
@@ -0,0 +1,14 @@
+TEMPLATE = app
+HEADERS = imageanalyzer.h \
+ mainwindow.h
+SOURCES = imageanalyzer.cpp \
+ main.cpp \
+ mainwindow.cpp
+
+QT += network webkit
+
+RESOURCES = resources/imageanalyzer.qrc
+
+OTHER_FILES += html/index.html README ../webkit-bridge-tutorial.qdoc outline.txt
+
+
diff --git a/examples/webkit/imageanalyzer/main.cpp b/examples/webkit/imageanalyzer/main.cpp
new file mode 100644
index 0000000..c3f04de
--- /dev/null
+++ b/examples/webkit/imageanalyzer/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$
+**
+****************************************************************************/
+
+
+#include "imageanalyzer.h"
+#include "mainwindow.h"
+
+int main(int argc, char* argv[])
+{
+ QApplication app(argc, argv);
+
+ MainWin win;
+ win.show();
+ return app.exec();
+}
+
diff --git a/examples/webkit/imageanalyzer/mainwindow.cpp b/examples/webkit/imageanalyzer/mainwindow.cpp
new file mode 100644
index 0000000..d89098e
--- /dev/null
+++ b/examples/webkit/imageanalyzer/mainwindow.cpp
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the 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 "mainwindow.h"
+#include "imageanalyzer.h"
+
+#include <QWebFrame>
+#include <QWebElementCollection>
+#include <QNetworkDiskCache>
+
+/*
+ * Default Constructor
+ */
+//! [MainWindow - constructor]
+MainWin::MainWin(QWidget * parent) : QWebView(parent)
+{
+ m_network = new QNetworkAccessManager(this);
+ m_cache = new QNetworkDiskCache(this);
+ m_cache->setCacheDirectory(QDesktopServices::storageLocation(QDesktopServices::CacheLocation) + "/imageanalyzer");
+ m_cache->setMaximumCacheSize(1000000); //set the cache to 10megs
+ m_network->setCache(m_cache);
+ page()->setNetworkAccessManager(m_network);
+
+ //! The object we will expose to JavaScript engine:
+ m_analyzer = new ImageAnalyzer(m_cache, this);
+
+ // Signal is emitted before frame loads any web content:
+ QObject::connect(page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()),
+ this, SLOT(addJSObject()));
+
+ // qrc:// URLs refer to resources. See imagenalayzer.qrc
+ QUrl startURL = QUrl("qrc:/index.html");
+
+ // Load web content now!
+ setUrl(startURL);
+}
+//! [MainWindow - constructor]
+
+//! [MainWindow - addJSObject]
+void MainWin::addJSObject() {
+ // Add pAnalyzer to JavaScript Frame as member "imageAnalyzer".
+ page()->mainFrame()->addToJavaScriptWindowObject(QString("imageAnalyzer"), m_analyzer);
+}
+//! [MainWindow - addJSObject]
diff --git a/examples/webkit/imageanalyzer/mainwindow.h b/examples/webkit/imageanalyzer/mainwindow.h
new file mode 100644
index 0000000..3c943dc
--- /dev/null
+++ b/examples/webkit/imageanalyzer/mainwindow.h
@@ -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 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 MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QWebView>
+
+class ImageAnalyzer;
+QT_BEGIN_NAMESPACE
+class QNetworkDiskCache;
+QT_END_NAMESPACE
+
+class MainWin : public QWebView
+{
+ Q_OBJECT
+
+public:
+ explicit MainWin(QWidget * parent = 0);
+
+private:
+ ImageAnalyzer * m_analyzer;
+ QNetworkAccessManager * m_network;
+ QNetworkDiskCache * m_cache;
+
+private slots:
+ void addJSObject();
+
+};
+#endif
diff --git a/examples/webkit/imageanalyzer/resources/imageanalyzer.qrc b/examples/webkit/imageanalyzer/resources/imageanalyzer.qrc
new file mode 100644
index 0000000..fe9a5df
--- /dev/null
+++ b/examples/webkit/imageanalyzer/resources/imageanalyzer.qrc
@@ -0,0 +1,10 @@
+<!DOCTYPE RCC><RCC version="1.0">
+ <qresource>
+ <file>index.html</file>
+ <file>images/mtRainier.jpg</file>
+ <file>images/bellaCoola.jpg</file>
+ <file>images/trees.jpg</file>
+ <file>images/flower.jpg</file>
+ <file>images/seaShell.jpg</file>
+</qresource>
+</RCC>
diff --git a/examples/webkit/imageanalyzer/resources/images/README b/examples/webkit/imageanalyzer/resources/images/README
new file mode 100644
index 0000000..176a1da
--- /dev/null
+++ b/examples/webkit/imageanalyzer/resources/images/README
@@ -0,0 +1,2 @@
+The images are under public domain and were obtained from
+http://publicdomainpictures.net
diff --git a/examples/webkit/imageanalyzer/resources/images/bellaCoola.jpg b/examples/webkit/imageanalyzer/resources/images/bellaCoola.jpg
new file mode 100644
index 0000000..f90ed54
--- /dev/null
+++ b/examples/webkit/imageanalyzer/resources/images/bellaCoola.jpg
Binary files differ
diff --git a/examples/webkit/imageanalyzer/resources/images/flower.jpg b/examples/webkit/imageanalyzer/resources/images/flower.jpg
new file mode 100644
index 0000000..6b7f6be
--- /dev/null
+++ b/examples/webkit/imageanalyzer/resources/images/flower.jpg
Binary files differ
diff --git a/examples/webkit/imageanalyzer/resources/images/mtRainier.jpg b/examples/webkit/imageanalyzer/resources/images/mtRainier.jpg
new file mode 100644
index 0000000..d09a3f2
--- /dev/null
+++ b/examples/webkit/imageanalyzer/resources/images/mtRainier.jpg
Binary files differ
diff --git a/examples/webkit/imageanalyzer/resources/images/seaShell.jpg b/examples/webkit/imageanalyzer/resources/images/seaShell.jpg
new file mode 100644
index 0000000..c5005a9
--- /dev/null
+++ b/examples/webkit/imageanalyzer/resources/images/seaShell.jpg
Binary files differ
diff --git a/examples/webkit/imageanalyzer/resources/images/trees.jpg b/examples/webkit/imageanalyzer/resources/images/trees.jpg
new file mode 100644
index 0000000..083b26d
--- /dev/null
+++ b/examples/webkit/imageanalyzer/resources/images/trees.jpg
Binary files differ
diff --git a/examples/webkit/imageanalyzer/resources/index.html b/examples/webkit/imageanalyzer/resources/index.html
new file mode 100644
index 0000000..6532951
--- /dev/null
+++ b/examples/webkit/imageanalyzer/resources/index.html
@@ -0,0 +1,133 @@
+
+<html>
+ <body>
+ <!-- [ images list ] -->
+ <div style="float:right; width:50%; border-left: solid 1px black">
+ <div id="listdiv" align="center">
+ <h5>Images to be analyzed:</h5>
+ <select multiple size=10 id=imglist style="width:80%"></select>
+ <br />
+ <input type="button" id="evalbutton" value="Analyze" onclick="analyzeImages()" />
+ </div>
+ </div>
+ <!-- [ images list ] -->
+ <div style="width:50%">
+ <div id="titleblock" align="center">
+ <h2>Image Analyzer</h2>
+ </div>
+ <div id=outputdiv align=center>
+ <h4>Status: <span id=status>Idle</span></h4>
+ <h5>
+ Latest Results:<br />
+ Red: <span id=redval style="color:red">n/a</span><br />
+ Green: <span id=greenval style="color:green">n/a</span><br />
+ Blue: <span id=blueval style="color:blue">n/a</span><br />
+ </h5>
+ <h3>Click on images below to select for analysis</h3>
+ </div>
+ </div>
+ <!-- [ sample images ] -->
+ <div id=imagediv style="clear:both; text-align:center">
+ <hr/>
+ <img src="images/mtRainier.jpg" height=150px onclick='return addImage(this);' />
+ <img src="images/bellaCoola.jpg" height=150px onclick='return addImage(this);'/>
+ <img src="images/seaShell.jpg" height=150px onclick='return addImage(this);'/>
+ <!-- [ sample images ] -->
+ <img src="images/flower.jpg" height=150px onclick='return addImage(this);'/>
+ <img src="images/trees.jpg" height=150px onclick='return addImage(this);'/>
+ </div>
+
+ </body>
+</html>
+
+<script type="text/javascript">
+ var remaining = 0;
+ var connected = false;
+ //We use this function because connect statements resolve their target once, imediately
+ //not at signal emission so they must be connected once the imageAnalyzer object has been added to the frame
+ //! <!-- [ connect slots ] -->
+ function connectSlots()
+ {
+ if ( !connected ) {
+ connected = true;
+ imageAnalyzer.finishedAnalysis.connect(this, finished);
+ imageAnalyzer.updateProgress.connect(this, updateProg);
+ }
+ }
+ //! <!-- [ connect slots ] -->
+
+ function finished() {
+ setStatus('Idle');
+ setResults(imageAnalyzer.red.toFixed(2), imageAnalyzer.green.toFixed(2), imageAnalyzer.blue.toFixed(2));
+ }
+ //This will function as the recieving "slot" for the progress signal
+ function updateProg(complete, max)
+ {
+ var oldRemaining = remaining;
+ remaining = max - complete;
+ pullList(oldRemaining - remaining);
+ //Prevent results getting messed up if we don't get signals in order
+ if( imageAnalyzer.busy ) {
+ setStatus('Processing (' + complete + ' of ' + max + ' completed)');
+ setResults('Calculating','Calculating','Calculating');
+ }
+ }
+
+//! <!-- [ analyzeImages ] -->
+function analyzeImages() {
+ connectSlots();
+ var imglist = document.getElementsByTagName('option');
+ if (imglist.length > 0) {
+ stringlist = [];
+ for(var i=0; i<imglist.length; i++) {
+ stringlist[i]=imglist[i].value;
+ }
+ if (!imageAnalyzer.busy) {
+ remaining = stringlist.length;
+ imageAnalyzer.startAnalysis(stringlist);
+ } else {
+ alert("Processing, please wait until finished.");
+ }
+//! <!-- [ analyzeImages ] -->
+ } else {
+ alert('No images selected. Click on one or more images to select them for analysis.');
+ }
+}
+function clearList() {
+ var imglist = document.getElementById('imglist');
+ while(imglist.length > 0) {
+ imglist.removeChild(imglist.childNodes[0]);
+ }
+}
+function pullList(count) {
+ var imglist = document.getElementById('imglist');
+ while(imglist.length > 0 && count > 0) {
+ imglist.removeChild(imglist.childNodes[0]);
+ count--;
+ }
+}
+function setStatus(statusString) {
+ document.getElementById('status').innerHTML = statusString;
+}
+
+function setResults(red, green, blue) {
+ if (! isNaN(red) ) { red += " %"; }
+ if (! isNaN(green) ) { green += " %"; }
+ if (! isNaN(blue) ) { blue += " %"; }
+ document.getElementById('redval').innerHTML = red;
+ document.getElementById('greenval').innerHTML = green;
+ document.getElementById('blueval').innerHTML = blue;
+}
+//! <!-- [ addImage ] -->
+function addImage(newimg) {
+ var imglist = document.getElementById('imglist');
+ var curChildren = imglist.childNodes;
+ var newline = document.createElement('option');
+ newline.innerHTML = newimg.src.substring(newimg.src.lastIndexOf('/')+1);
+ newline.value = newimg.src;
+ imglist.appendChild(newline);
+}
+//! <!-- [ addImage ] -->
+</script>
+
+
diff --git a/examples/webkit/webkit.pro b/examples/webkit/webkit.pro
index 76c8801..6a1d8f8 100644
--- a/examples/webkit/webkit.pro
+++ b/examples/webkit/webkit.pro
@@ -4,6 +4,7 @@ SUBDIRS += domtraversal \
previewer \
fancybrowser \
simpleselector \
+ imageanalyzer \
framecapture
contains(QT_CONFIG, openssl):SUBDIRS += googlechat
diff --git a/examples/widgets/icons/icons.pro b/examples/widgets/icons/icons.pro
index 39c7ab2..48b2da9 100644
--- a/examples/widgets/icons/icons.pro
+++ b/examples/widgets/icons/icons.pro
@@ -17,7 +17,7 @@ INSTALLS += target sources
symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
wince*: {
- imageFiles.sources = images/*
+ imageFiles.files = images/*
wincewm*: {
imageFiles.path = "/My Documents/My Pictures"
} else {
diff --git a/examples/widgets/movie/movie.pro b/examples/widgets/movie/movie.pro
index 517fec7..d59bf2e 100644
--- a/examples/widgets/movie/movie.pro
+++ b/examples/widgets/movie/movie.pro
@@ -11,7 +11,7 @@ INSTALLS += target sources
symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
wince*: {
- addFiles.sources += *.mng
+ addFiles.files += *.mng
addFiles.path = .
DEPLOYMENT += addFiles
DEPLOYMENT_PLUGIN += qmng
diff --git a/examples/xml/dombookmarks/dombookmarks.pro b/examples/xml/dombookmarks/dombookmarks.pro
index f906d2f..80bbec4 100644
--- a/examples/xml/dombookmarks/dombookmarks.pro
+++ b/examples/xml/dombookmarks/dombookmarks.pro
@@ -14,7 +14,7 @@ INSTALLS += target sources
symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
wince*: {
- addFiles.sources = frank.xbel jennifer.xbel
+ addFiles.files = frank.xbel jennifer.xbel
addFiles.path = "\\My Documents"
DEPLOYMENT += addFiles
}
diff --git a/examples/xml/htmlinfo/htmlinfo.pro b/examples/xml/htmlinfo/htmlinfo.pro
index 5e9c8ca..94b3a07 100644
--- a/examples/xml/htmlinfo/htmlinfo.pro
+++ b/examples/xml/htmlinfo/htmlinfo.pro
@@ -2,7 +2,7 @@ SOURCES += main.cpp
QT -= gui
wince*|symbian:{
- htmlfiles.sources = *.html
+ htmlfiles.files = *.html
htmlfiles.path = .
DEPLOYMENT += htmlfiles
}
diff --git a/examples/xml/saxbookmarks/saxbookmarks.pro b/examples/xml/saxbookmarks/saxbookmarks.pro
index 7293bd1..d4b09b6 100644
--- a/examples/xml/saxbookmarks/saxbookmarks.pro
+++ b/examples/xml/saxbookmarks/saxbookmarks.pro
@@ -14,7 +14,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/xml/saxbookmarks
INSTALLS += target sources
wince*: {
- addFiles.sources = frank.xbel jennifer.xbel
+ addFiles.files = frank.xbel jennifer.xbel
addFiles.path = "\\My Documents"
DEPLOYMENT += addFiles
}
@@ -22,7 +22,7 @@ wince*: {
symbian: {
TARGET.UID3 = 0xA000C60A
include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
- addFiles.sources = frank.xbel jennifer.xbel
+ addFiles.files = frank.xbel jennifer.xbel
addFiles.path = /data/qt/saxbookmarks
DEPLOYMENT += addFiles
}
diff --git a/header.FDL b/header.FDL
index 4f99540..264a1ff 100644
--- a/header.FDL
+++ b/header.FDL
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/lib/fonts/dejavu_sans_11_50.qpf2 b/lib/fonts/dejavu_sans_11_50.qpf2
new file mode 100644
index 0000000..c88d099
--- /dev/null
+++ b/lib/fonts/dejavu_sans_11_50.qpf2
Binary files differ
diff --git a/mkspecs/common/clang.conf b/mkspecs/common/clang.conf
new file mode 100644
index 0000000..069cdfa
--- /dev/null
+++ b/mkspecs/common/clang.conf
@@ -0,0 +1,17 @@
+#
+# Qmake configuration for Clang on Linux and Mac
+#
+
+QMAKE_CC = clang
+QMAKE_CXX = clang++
+
+QMAKE_LINK = $$QMAKE_CXX
+QMAKE_LINK_SHLIB = $$QMAKE_CXX
+
+CONFIG += clang_pch_style
+QMAKE_PCH_OUTPUT_EXT = .pch
+
+QMAKE_CFLAGS_PRECOMPILE = -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_CFLAGS_USE_PRECOMPILE = -Xclang -include-pch -Xclang ${QMAKE_PCH_OUTPUT}
+QMAKE_CXXFLAGS_PRECOMPILE = -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
diff --git a/mkspecs/common/g++-base.conf b/mkspecs/common/g++-base.conf
new file mode 100644
index 0000000..eb5b7d6
--- /dev/null
+++ b/mkspecs/common/g++-base.conf
@@ -0,0 +1,30 @@
+#
+# Qmake configuration for the GNU C++ compiler
+#
+# Before making changes to this file, please read the comment in
+# gcc-base.conf, to make sure the change goes in the right place.
+#
+# To verify that your change has the desired effect on the final configuration
+# you can use the manual test in tests/manual/mkspecs.
+#
+
+QMAKE_CC = gcc
+
+QMAKE_LINK_C = $$QMAKE_CC
+QMAKE_LINK_C_SHLIB = $$QMAKE_CC
+
+QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -g
+
+QMAKE_CXX = g++
+
+QMAKE_LINK = $$QMAKE_CXX
+QMAKE_LINK_SHLIB = $$QMAKE_CXX
+
+QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
+
+QMAKE_PCH_OUTPUT_EXT = .gch
+
+QMAKE_CFLAGS_PRECOMPILE = -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_CFLAGS_USE_PRECOMPILE = -include ${QMAKE_PCH_OUTPUT_BASE}
+QMAKE_CXXFLAGS_PRECOMPILE = -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
diff --git a/mkspecs/common/g++-macx.conf b/mkspecs/common/g++-macx.conf
new file mode 100644
index 0000000..2251157
--- /dev/null
+++ b/mkspecs/common/g++-macx.conf
@@ -0,0 +1,32 @@
+#
+# Qmake configuration for the GNU C++ compiler on Mac OS X
+#
+# Before making changes to this file, please read the comment in
+# gcc-base.conf, to make sure the change goes in the right place.
+#
+# To verify that your change has the desired effect on the final configuration
+# you can use the manual test in tests/manual/mkspecs.
+#
+
+include(g++-base.conf)
+
+QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_DWARF2
+QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_DWARF2
+QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO += -g $$QMAKE_CFLAGS_DWARF2
+
+QMAKE_LFLAGS_STATIC_LIB += -all_load
+
+QMAKE_CFLAGS_X86_64 += -Xarch_x86_64 -mmacosx-version-min=10.5
+QMAKE_CFLAGS_PPC_64 += -Xarch_ppc64 -mmacosx-version-min=10.5
+
+QMAKE_CXXFLAGS_X86_64 = $$QMAKE_CFLAGS_X86_64
+QMAKE_CXXFLAGS_PPC_64 = $$QMAKE_CFLAGS_PPC_64
+QMAKE_OBJECTIVE_CFLAGS_X86_64 = $$QMAKE_CFLAGS_X86_64
+QMAKE_OBJECTIVE_CFLAGS_PPC_64 = $$QMAKE_CFLAGS_PPC_64
+QMAKE_LFLAGS_X86_64 = $$QMAKE_CFLAGS_X86_64
+QMAKE_LFLAGS_PPC_64 = $$QMAKE_CFLAGS_PPC_64
+
+QMAKE_OBJCFLAGS_PRECOMPILE = -x objective-c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
+QMAKE_OBJCXXFLAGS_PRECOMPILE = -x objective-c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
diff --git a/mkspecs/common/g++-unix.conf b/mkspecs/common/g++-unix.conf
new file mode 100644
index 0000000..96e301e
--- /dev/null
+++ b/mkspecs/common/g++-unix.conf
@@ -0,0 +1,14 @@
+#
+# Qmake configuration for the GNU C++ compiler on *nix-systems
+#
+# Before making changes to this file, please read the comment in
+# gcc-base.conf, to make sure the change goes in the right place.
+#
+# To verify that your change has the desired effect on the final configuration
+# you can use the manual test in tests/manual/mkspecs.
+#
+
+include(g++-base.conf)
+
+QMAKE_LFLAGS_RELEASE += -Wl,-O1
+QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined
diff --git a/mkspecs/common/g++.conf b/mkspecs/common/g++.conf
index 0d511fc..c5a34a9 100644
--- a/mkspecs/common/g++.conf
+++ b/mkspecs/common/g++.conf
@@ -1,54 +1,12 @@
#
-# qmake configuration for common gcc
+# Notice: g++.conf has been split into g++-base.conf and g++-unix.conf
+#
+# This file will make sure that anyone who's still including g++.conf
+# directly will get a warning and an explanation of how to fix their mkspec
#
-QMAKE_CC = gcc
-QMAKE_CFLAGS += -pipe
-QMAKE_CFLAGS_DEPS += -M
-QMAKE_CFLAGS_WARN_ON += -Wall -W
-QMAKE_CFLAGS_WARN_OFF += -w
-QMAKE_CFLAGS_RELEASE += -O2
-QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -g
-QMAKE_CFLAGS_DEBUG += -g
-QMAKE_CFLAGS_SHLIB += -fPIC
-QMAKE_CFLAGS_STATIC_LIB += -fPIC
-QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses
-QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
-QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
-QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE}
-
-QMAKE_CXX = g++
-QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
-QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS
-QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON
-QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF
-QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE
-QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
-QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG
-QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB
-QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB
-QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC
-QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
-QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
-QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
-
-QMAKE_LINK = g++
-QMAKE_LINK_SHLIB = g++
-QMAKE_LINK_C = gcc
-QMAKE_LINK_C_SHLIB = gcc
-QMAKE_LFLAGS +=
-QMAKE_LFLAGS_RELEASE += -Wl,-O1
-QMAKE_LFLAGS_DEBUG +=
-QMAKE_LFLAGS_APP +=
-QMAKE_LFLAGS_SHLIB += -shared
-QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB
-QMAKE_LFLAGS_SONAME += -Wl,-soname,
-QMAKE_LFLAGS_THREAD +=
-QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined
-QMAKE_LFLAGS_RPATH = -Wl,-rpath,
-
-QMAKE_PCH_OUTPUT_EXT = .gch
+warning($$escape_expand("Your mkspec is including 'common/g++.conf', but the mkspecs have been refactored\\n\\tTo fix this include 'common/gcc-base-$${TARGET_PLATFORM}.conf and 'common/g++-$${TARGET_PLATFORM}.conf' instead"))
-# -Bsymbolic-functions (ld) support
-QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions
-QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list,
+# We include gcc-base-unix.conf and g++-unix.conf to keep the behavior of the old g++.conf
+include(gcc-base-unix.conf)
+include(g++-unix.conf)
diff --git a/mkspecs/common/gcc-base-macx.conf b/mkspecs/common/gcc-base-macx.conf
new file mode 100644
index 0000000..5c9a8a1
--- /dev/null
+++ b/mkspecs/common/gcc-base-macx.conf
@@ -0,0 +1,43 @@
+#
+# Base qmake configuration for GCC on Mac OS X
+#
+# Before making changes to this file, please read the comment in
+# gcc-base.conf, to make sure the change goes in the right place.
+#
+# To verify that your change has the desired effect on the final configuration
+# you can use the manual test in tests/manual/mkspecs.
+#
+
+include(gcc-base.conf)
+
+QMAKE_COMPILER_DEFINES += __APPLE__ __GNUC__
+
+QMAKE_CFLAGS_X86 += -arch i386
+QMAKE_CFLAGS_X86_64 += -arch x86_64
+QMAKE_CFLAGS_PPC += -arch ppc
+QMAKE_CFLAGS_PPC_64 += -arch ppc64
+QMAKE_CFLAGS_DWARF2 += -gdwarf-2
+
+QMAKE_CXXFLAGS_X86 += $$QMAKE_CFLAGS_X86
+QMAKE_CXXFLAGS_X86_64 += $$QMAKE_CFLAGS_X86_64
+QMAKE_CXXFLAGS_PPC += $$QMAKE_CFLAGS_PPC
+QMAKE_CXXFLAGS_PPC_64 += $$QMAKE_CFLAGS_PPC_64
+QMAKE_CXXFLAGS_DWARF2 += $$QMAKE_CFLAGS_DWARF2
+
+QMAKE_OBJECTIVE_CFLAGS_X86 += $$QMAKE_CFLAGS_X86
+QMAKE_OBJECTIVE_CFLAGS_X86_64 += $$QMAKE_CFLAGS_X86_64
+QMAKE_OBJECTIVE_CFLAGS_PPC += $$QMAKE_CFLAGS_PPC
+QMAKE_OBJECTIVE_CFLAGS_PPC_64 += $$QMAKE_CFLAGS_PPC_64
+
+QMAKE_LFLAGS_X86 += $$QMAKE_CFLAGS_X86
+QMAKE_LFLAGS_X86_64 += $$QMAKE_CFLAGS_X86_64
+QMAKE_LFLAGS_PPC += $$QMAKE_CFLAGS_PPC
+QMAKE_LFLAGS_PPC_64 += $$QMAKE_CFLAGS_PPC_64
+
+QMAKE_LFLAGS += -headerpad_max_install_names
+QMAKE_LFLAGS_SHLIB += -single_module -dynamiclib
+QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_INCREMENTAL += -undefined suppress -flat_namespace
+QMAKE_LFLAGS_SONAME += -install_name$${LITERAL_WHITESPACE}
+QMAKE_LFLAGS_VERSION += -current_version$${LITERAL_WHITESPACE}
+QMAKE_LFLAGS_COMPAT_VERSION += -compatibility_version$${LITERAL_WHITESPACE}
diff --git a/mkspecs/common/gcc-base-unix.conf b/mkspecs/common/gcc-base-unix.conf
new file mode 100644
index 0000000..dc8d7e4
--- /dev/null
+++ b/mkspecs/common/gcc-base-unix.conf
@@ -0,0 +1,21 @@
+#
+# Base qmake configuration for GCC on *nix-systems
+#
+# Before making changes to this file, please read the comment in
+# gcc-base.conf, to make sure the change goes in the right place.
+#
+# To verify that your change has the desired effect on the final configuration
+# you can use the manual test in tests/manual/mkspecs.
+#
+
+include(gcc-base.conf)
+
+QMAKE_LFLAGS_SHLIB += -shared
+QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME += -Wl,-soname,
+QMAKE_LFLAGS_THREAD +=
+QMAKE_LFLAGS_RPATH = -Wl,-rpath,
+
+# -Bsymbolic-functions (ld) support
+QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions
+QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list,
diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf
new file mode 100644
index 0000000..0e90666
--- /dev/null
+++ b/mkspecs/common/gcc-base.conf
@@ -0,0 +1,60 @@
+#
+# This file is used as a basis for the following compilers:
+#
+# - The GNU C++ compiler (g++)
+# - LLVM
+# - Clang
+#
+# Platform-specific options shared by these compilers are put into:
+#
+# - gcc-base-macx.conf
+# - gcc-base-unix.conf
+#
+# These base files are then combined with configurations for each compiler:
+#
+# - g++-base.conf
+# - g++-macx.conf
+# - g++-unix.conf
+# - llvm.conf
+# - clang.conf
+#
+# The combination happens in the top level mkspec, by including a platform-
+# specific version of the base-file, for example gcc-base-macx.conf, and then
+# a (possibly platform-specific) version of the actual compiler configuration,
+# for example g++-macx.conf.
+#
+# If you are making changes to any of these files, please consider the
+# possible effect it may have due to these include-rules, and whether it
+# might make more sense to share the rule or make it more specific.
+#
+# To verify that your change has the desired effect on the final configuration
+# you can use the manual test in tests/manual/mkspecs.
+#
+
+QMAKE_CFLAGS += -pipe
+QMAKE_CFLAGS_DEPS += -M
+QMAKE_CFLAGS_WARN_ON += -Wall -W
+QMAKE_CFLAGS_WARN_OFF += -w
+QMAKE_CFLAGS_RELEASE += -O2
+QMAKE_CFLAGS_DEBUG += -g
+QMAKE_CFLAGS_SHLIB += -fPIC
+QMAKE_CFLAGS_STATIC_LIB += -fPIC
+QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
+
+QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
+
+QMAKE_LFLAGS +=
+QMAKE_LFLAGS_DEBUG +=
+QMAKE_LFLAGS_APP +=
+QMAKE_LFLAGS_RELEASE +=
+
diff --git a/mkspecs/common/llvm.conf b/mkspecs/common/llvm.conf
index 70f52aa..86e0ab4 100644
--- a/mkspecs/common/llvm.conf
+++ b/mkspecs/common/llvm.conf
@@ -1,49 +1,16 @@
#
-# qmake configuration for common gcc
+# Qmake configuration for LLVM on Linux and Mac
#
-QMAKE_CC = llvm-gcc
-QMAKE_CFLAGS += -pipe
-QMAKE_CFLAGS_DEPS += -M
-QMAKE_CFLAGS_WARN_ON += -Wall -W
-QMAKE_CFLAGS_WARN_OFF += -w
-QMAKE_CFLAGS_RELEASE += -O2
-QMAKE_CFLAGS_DEBUG += -g
-QMAKE_CFLAGS_SHLIB += -fPIC
-QMAKE_CFLAGS_STATIC_LIB += -fPIC
-QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses
-QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
-QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
-QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE}
+QMAKE_CC = llvm-gcc
+QMAKE_CXX = llvm-g++
-QMAKE_CXX = llvm-g++
-QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
-QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS
-QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON
-QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF
-QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE
-QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG
-QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB
-QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB
-QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC
-QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
-QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
-QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
+QMAKE_LINK = $$QMAKE_CXX
+QMAKE_LINK_SHLIB = $$QMAKE_CXX
-QMAKE_LINK = llvm-g++
-QMAKE_LINK_SHLIB = llvm-g++
-QMAKE_LFLAGS +=
-QMAKE_LFLAGS_RELEASE +=
-QMAKE_LFLAGS_DEBUG +=
-QMAKE_LFLAGS_APP +=
-QMAKE_LFLAGS_SHLIB += -shared
-QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB
-QMAKE_LFLAGS_SONAME += -Wl,-soname,
-QMAKE_LFLAGS_THREAD +=
-QMAKE_LFLAGS_RPATH = -Wl,-rpath,
+QMAKE_PCH_OUTPUT_EXT = .gch
-QMAKE_PCH_OUTPUT_EXT = .gch
-
-# -Bsymbolic-functions (ld) support
-QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions
-QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list,
+QMAKE_CFLAGS_PRECOMPILE = -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_CFLAGS_USE_PRECOMPILE = -include ${QMAKE_PCH_OUTPUT_BASE}
+QMAKE_CXXFLAGS_PRECOMPILE = -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE \ No newline at end of file
diff --git a/mkspecs/common/mac-g++.conf b/mkspecs/common/mac-g++.conf
deleted file mode 100644
index 29b7408..0000000
--- a/mkspecs/common/mac-g++.conf
+++ /dev/null
@@ -1,81 +0,0 @@
-#
-# qmake configuration for common gcc on Mac OS X
-#
-
-include(mac.conf)
-
-QMAKE_COMPILER_DEFINES += __APPLE__ __GNUC__
-QMAKE_CFLAGS += -pipe
-QMAKE_CFLAGS_DEPS += -M
-QMAKE_CFLAGS_WARN_ON += -Wall -W
-QMAKE_CFLAGS_WARN_OFF += -w
-QMAKE_CFLAGS_RELEASE += -O2
-QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -g -gdwarf-2
-QMAKE_CFLAGS_DEBUG += -g
-QMAKE_CFLAGS_SHLIB += -fPIC
-QMAKE_CFLAGS_STATIC_LIB += -fPIC
-QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses
-QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
-QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
-QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE}
-
-QMAKE_CFLAGS_PPC_64 += -arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5
-QMAKE_OBJECTIVE_CFLAGS_PPC_64 += -arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5
-QMAKE_CFLAGS_X86_64 += -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5
-QMAKE_OBJECTIVE_CFLAGS_X86_64 += -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5
-QMAKE_CFLAGS_PPC += -arch ppc
-QMAKE_OBJECTIVE_CFLAGS_PPC += -arch ppc
-QMAKE_CFLAGS_X86 += -arch i386
-QMAKE_OBJECTIVE_CFLAGS_X86 += -arch i386
-QMAKE_CFLAGS_DWARF2 += -gdwarf-2
-
-QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
-QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS
-QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON
-QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF
-QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE
-QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
-QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG
-QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB
-QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB
-QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC
-QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
-QMAKE_CXXFLAGS_PPC_64 += -arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5
-QMAKE_CXXFLAGS_X86_64 += -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5
-QMAKE_CXXFLAGS_PPC += -arch ppc
-QMAKE_CXXFLAGS_X86 += -arch i386
-QMAKE_CXXFLAGS_DWARF2 += $$QMAKE_CFLAGS_DWARF2
-QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
-QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
-
-QMAKE_LINK = $$QMAKE_CXX
-QMAKE_LINK_SHLIB = $$QMAKE_CXX
-QMAKE_LINK_C = $$QMAKE_CC
-QMAKE_LINK_C_SHLIB = $$QMAKE_CC
-QMAKE_LFLAGS += -headerpad_max_install_names
-QMAKE_LFLAGS_RELEASE +=
-QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO += -g -gdwarf-2
-QMAKE_LFLAGS_DEBUG +=
-QMAKE_LFLAGS_APP +=
-QMAKE_LFLAGS_SHLIB += -single_module -dynamiclib
-QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB
-QMAKE_LFLAGS_THREAD +=
-QMAKE_LFLAGS_INCREMENTAL+= -undefined suppress -flat_namespace
-QMAKE_LFLAGS_SONAME += -install_name$${LITERAL_WHITESPACE}
-QMAKE_LFLAGS_PPC_64 += -arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5
-QMAKE_LFLAGS_X86_64 += -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5
-QMAKE_LFLAGS_PPC += -arch ppc
-QMAKE_LFLAGS_X86 += -arch i386
-QMAKE_LFLAGS_VERSION += -current_version$${LITERAL_WHITESPACE}
-QMAKE_LFLAGS_COMPAT_VERSION += -compatibility_version$${LITERAL_WHITESPACE}
-# -all_load requred to make Objective-C categories work in static builds.
-QMAKE_LFLAGS_STATIC_LIB += -all_load
-QMAKE_LFLAGS_RPATH +=
-
-QMAKE_PCH_OUTPUT_EXT = .gch
-
-QMAKE_OBJCFLAGS_PRECOMPILE += -x objective-c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
-QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
-
-QMAKE_OBJCXXFLAGS_PRECOMPILE += -x objective-c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
-QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
diff --git a/mkspecs/common/mac-llvm.conf b/mkspecs/common/mac-llvm.conf
deleted file mode 100644
index 4ff088c..0000000
--- a/mkspecs/common/mac-llvm.conf
+++ /dev/null
@@ -1,76 +0,0 @@
-#
-# qmake configuration for common gcc on Mac OS X
-#
-
-include(mac.conf)
-
-QMAKE_COMPILER_DEFINES += __APPLE__ __GNUC__
-QMAKE_CC = llvm-gcc
-QMAKE_CFLAGS += -pipe
-QMAKE_CFLAGS_DEPS += -M
-QMAKE_CFLAGS_WARN_ON += -Wall -W
-QMAKE_CFLAGS_WARN_OFF += -w
-QMAKE_CFLAGS_RELEASE += -O2
-QMAKE_CFLAGS_DEBUG += -g
-QMAKE_CFLAGS_SHLIB += -fPIC
-QMAKE_CFLAGS_STATIC_LIB += -fPIC
-QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses
-QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
-QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
-QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE}
-
-QMAKE_CFLAGS_PPC_64 += -arch ppc64
-QMAKE_OBJECTIVE_CFLAGS_PPC_64 += -arch ppc64
-QMAKE_CFLAGS_X86_64 += -arch x86_64
-QMAKE_OBJECTIVE_CFLAGS_X86_64 += -arch x86_64
-QMAKE_CFLAGS_PPC += -arch ppc
-QMAKE_OBJECTIVE_CFLAGS_PPC += -arch ppc
-QMAKE_CFLAGS_X86 += -arch i386
-QMAKE_OBJECTIVE_CFLAGS_X86 += -arch i386
-QMAKE_CFLAGS_DWARF2 += -gdwarf-2
-
-QMAKE_CXX = llvm-g++
-QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
-QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS
-QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON
-QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF
-QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE
-QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG
-QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB
-QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB
-QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC
-QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
-QMAKE_CXXFLAGS_PPC_64 += -arch ppc64
-QMAKE_CXXFLAGS_X86_64 += -arch x86_64
-QMAKE_CXXFLAGS_PPC += -arch ppc
-QMAKE_CXXFLAGS_X86 += -arch i386
-QMAKE_CXXFLAGS_DWARF2 += $$QMAKE_CFLAGS_DWARF2
-QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
-QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
-
-QMAKE_LINK = $$QMAKE_CXX
-QMAKE_LINK_SHLIB = $$QMAKE_CXX
-QMAKE_LFLAGS += -headerpad_max_install_names
-QMAKE_LFLAGS_RELEASE +=
-QMAKE_LFLAGS_DEBUG +=
-QMAKE_LFLAGS_APP +=
-QMAKE_LFLAGS_SHLIB += -single_module -dynamiclib
-QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB
-QMAKE_LFLAGS_THREAD +=
-QMAKE_LFLAGS_INCREMENTAL+= -undefined suppress -flat_namespace
-QMAKE_LFLAGS_SONAME += -install_name$${LITERAL_WHITESPACE}
-QMAKE_LFLAGS_PPC_64 += -arch ppc64
-QMAKE_LFLAGS_X86_64 += -arch x86_64
-QMAKE_LFLAGS_PPC += -arch ppc
-QMAKE_LFLAGS_X86 += -arch i386
-QMAKE_LFLAGS_VERSION += -current_version$${LITERAL_WHITESPACE}
-QMAKE_LFLAGS_COMPAT_VERSION += -compatibility_version$${LITERAL_WHITESPACE}
-QMAKE_LFLAGS_RPATH +=
-
-QMAKE_PCH_OUTPUT_EXT = .gch
-
-QMAKE_OBJCFLAGS_PRECOMPILE += -x objective-c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
-QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
-
-QMAKE_OBJCXXFLAGS_PRECOMPILE += -x objective-c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
-QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
diff --git a/mkspecs/common/mac/qplatformdefs.h b/mkspecs/common/mac/qplatformdefs.h
new file mode 100644
index 0000000..99d64ef
--- /dev/null
+++ b/mkspecs/common/mac/qplatformdefs.h
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#define QT_NO_LIBRARY_UNLOAD
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#include "../common/posix/qplatformdefs.h"
+
+#undef QT_OPEN_LARGEFILE
+#undef QT_SOCKLEN_T
+#undef QT_SIGNAL_IGNORE
+
+#define QT_OPEN_LARGEFILE 0
+
+#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
+#define QT_SOCKLEN_T socklen_t
+#else
+#define QT_SOCKLEN_T int
+#endif
+
+#define QT_SIGNAL_IGNORE (void (*)(int))1
+
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/common/qws.conf b/mkspecs/common/qws.conf
index 225f0ff..59820b8 100644
--- a/mkspecs/common/qws.conf
+++ b/mkspecs/common/qws.conf
@@ -20,5 +20,3 @@ QMAKE_INCDIR_OPENGL_ES2 =
QMAKE_LIBDIR_OPENGL_ES2 =
QMAKE_LIBS_X11 =
QMAKE_LIBS_X11SM =
-QMAKE_LIBS_OPENGL =
-QMAKE_LIBS_OPENGL_QT =
diff --git a/mkspecs/common/symbian/symbian-makefile.conf b/mkspecs/common/symbian/symbian-makefile.conf
index 364e91b..9dc3674 100644
--- a/mkspecs/common/symbian/symbian-makefile.conf
+++ b/mkspecs/common/symbian/symbian-makefile.conf
@@ -30,9 +30,9 @@ QMAKE_EXTENSION_STATICLIB = lib
QMAKE_SYMBIAN_SHLIB = 1
is_using_gnupoc {
- DEFINES *= __PRODUCT_INCLUDE__=\\<$${EPOCROOT}epoc32/include/variant/symbian_os.hrh\\>
+ DEFINES *= __PRODUCT_INCLUDE__=\"<$${EPOCROOT}epoc32/include/variant/symbian_os.hrh>\"
} else {
- DEFINES *= __PRODUCT_INCLUDE__=\\<$${EPOCROOT}epoc32/include/variant/Symbian_OS.hrh\\>
+ DEFINES *= __PRODUCT_INCLUDE__=\"<$${EPOCROOT}epoc32/include/variant/Symbian_OS.hrh>\"
}
DEFINES *= \
__SYMBIAN32__ \
diff --git a/mkspecs/common/symbian/symbian-mmp.conf b/mkspecs/common/symbian/symbian-mmp.conf
index 5292781..1fbd302 100644
--- a/mkspecs/common/symbian/symbian-mmp.conf
+++ b/mkspecs/common/symbian/symbian-mmp.conf
@@ -4,16 +4,6 @@
include(symbian.conf)
-contains(QMAKE_HOST.os, "Windows") {
- QMAKE_MOC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc.exe
- QMAKE_UIC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic.exe
- QMAKE_IDC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc.exe
-} else {
- QMAKE_MOC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc
- QMAKE_UIC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic
- QMAKE_IDC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc
-}
-
load(symbian/add_mmp_rules)
symbian-abld {
diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf
index 0bdc8e5..4d0320d 100644
--- a/mkspecs/common/symbian/symbian.conf
+++ b/mkspecs/common/symbian/symbian.conf
@@ -27,7 +27,7 @@ QMAKE_CFLAGS_DEBUG =
QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
MMP_OPTION_KEYWORDS = CW ARMCC GCCE
-VERSION_FLAGS.ARMCC = ARMCC_4_0
+VERSION_FLAGS.ARMCC = ARMCC_4
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
# Symbian build system applies -cwd source on the MWCC command line.
# this causes problems with include paths, -cwd include uses the same
@@ -36,7 +36,7 @@ QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
# both on the command line and rely on the compiler using the last specified
QMAKE_CXXFLAGS.CW = -cwd include
QMAKE_CXXFLAGS.ARMCC = --visibility_inlines_hidden
-QMAKE_CXXFLAGS.ARMCC_4_0 = --import_all_vtbl
+QMAKE_CXXFLAGS.ARMCC_4 = --import_all_vtbl
QMAKE_CXXFLAGS.GCCE = -fvisibility-inlines-hidden
QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
@@ -79,7 +79,6 @@ QMAKE_LIBS_OPENGL_ES2_QT = -llibglesv2 -lcone -lws32
QMAKE_LIBS_OPENVG = -llibOpenVG -lfbscli -lbitgdi -lgdi
QMAKE_LIBS_THREAD = -llibpthread
QMAKE_LIBS_COMPAT =
-QMAKE_LIBS_QT_ENTRY = -llibcrt0.lib
QMAKE_LIBS_S60 = -lavkon -leikcoctl
exists($${EPOCROOT}epoc32/include/platform/sgresource/sgimage.h) {
@@ -95,15 +94,23 @@ contains(QMAKE_HOST.os,Windows) {
QMAKE_DEL_DIR = rmdir
QMAKE_DEL_TREE = rmdir /s /q
QMAKE_CHK_DIR_EXISTS = if not exist
+
+ QMAKE_MOC = $$[QT_INSTALL_BINS]\\moc.exe
+ QMAKE_UIC = $$[QT_INSTALL_BINS]\\uic.exe
+ QMAKE_IDC = $$[QT_INSTALL_BINS]\\idc.exe
} else {
QMAKE_COPY = cp
QMAKE_COPY_DIR = cp -r
QMAKE_MOVE = mv
QMAKE_DEL_FILE = rm -f
- QMAKE_MKDIR = mkdir
+ QMAKE_MKDIR = mkdir -p
QMAKE_DEL_DIR = rmdir
QMAKE_DEL_TREE = rm -rf
QMAKE_CHK_DIR_EXISTS = test -d
+
+ QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+ QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+ QMAKE_IDC = $$[QT_INSTALL_BINS]/idc
}
QMAKE_IDL = midl
@@ -119,6 +126,10 @@ QT_ARCH = symbian
load(qt_config)
+QMAKE_LIBS_QT_ENTRY = -lqtmain$${QT_LIBINFIX}.lib
+QMAKE_LIBS_NO_QT_ENTRY = -llibcrt0.lib
+QMAKE_LIBS_NO_QT_ENTRY_GCCE = -llibcrt0_gcce.lib
+
# These directories must match what configure uses for QT_INSTALL_PLUGINS and QT_INSTALL_IMPORTS
QT_PLUGINS_BASE_DIR = /resource/qt$${QT_LIBINFIX}/plugins
QT_IMPORTS_BASE_DIR = /resource/qt/imports
diff --git a/mkspecs/features/link_pkgconfig.prf b/mkspecs/features/link_pkgconfig.prf
index 4c528aa..d70e5de 100644
--- a/mkspecs/features/link_pkgconfig.prf
+++ b/mkspecs/features/link_pkgconfig.prf
@@ -1,6 +1,7 @@
# handle pkg-config files
+isEmpty(PKG_CONFIG):PKG_CONFIG = pkg-config
for(PKGCONFIG_LIB, $$list($$unique(PKGCONFIG))) {
- QMAKE_CXXFLAGS += $$system(pkg-config --cflags $$PKGCONFIG_LIB)
- QMAKE_CFLAGS += $$system(pkg-config --cflags $$PKGCONFIG_LIB)
- LIBS += $$system(pkg-config --libs $$PKGCONFIG_LIB)
+ QMAKE_CXXFLAGS += $$system($$PKG_CONFIG --cflags $$PKGCONFIG_LIB)
+ QMAKE_CFLAGS += $$system($$PKG_CONFIG --cflags $$PKGCONFIG_LIB)
+ LIBS += $$system($$PKG_CONFIG --libs $$PKGCONFIG_LIB)
}
diff --git a/mkspecs/features/mac/objective_c.prf b/mkspecs/features/mac/objective_c.prf
index 0df7013..ca693ba 100644
--- a/mkspecs/features/mac/objective_c.prf
+++ b/mkspecs/features/mac/objective_c.prf
@@ -1,13 +1,22 @@
+for(source, SOURCES) {
+ contains(source,.*\\.mm?$) {
+ warning(Objective-C source \'$$source\' found in SOURCES but should be in OBJECTIVE_SOURCES)
+ SOURCES -= $$source
+ OBJECTIVE_SOURCES += $$source
+ }
+}
+
isEmpty(QMAKE_OBJECTIVE_CC):QMAKE_OBJECTIVE_CC = $$QMAKE_CC
- QMAKE_OBJECTIVE_CFLAGS = $$QMAKE_CFLAGS
- QMAKE_OBJECTIVE_CFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
- QMAKE_OBJECTIVE_CFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
- QMAKE_OBJECTIVE_CFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
- QMAKE_OBJECTIVE_CFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
- QMAKE_OBJECTIVE_CFLAGS_X86 = $$QMAKE_CFLAGS_X86
- QMAKE_OBJECTIVE_CFLAGS_PPC = $$QMAKE_CFLAGS_PPC
- QMAKE_OBJECTIVE_CFLAGS_HIDESYMS = $$QMAKE_CXXFLAGS_HIDESYMS
+
+QMAKE_OBJECTIVE_CFLAGS = $$QMAKE_CFLAGS
+QMAKE_OBJECTIVE_CFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_OBJECTIVE_CFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_OBJECTIVE_CFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_OBJECTIVE_CFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_OBJECTIVE_CFLAGS_X86 = $$QMAKE_CFLAGS_X86
+QMAKE_OBJECTIVE_CFLAGS_PPC = $$QMAKE_CFLAGS_PPC
+QMAKE_OBJECTIVE_CFLAGS_HIDESYMS = $$QMAKE_CXXFLAGS_HIDESYMS
OBJECTIVE_C_OBJECTS_DIR = $$OBJECTS_DIR
isEmpty(OBJECTIVE_C_OBJECTS_DIR):OBJECTIVE_C_OBJECTS_DIR = .
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
index e59319f..191a449 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -113,7 +113,7 @@ for(QT_CURRENT_VERIFY, $$list($$QT_PLUGIN_VERIFY)) {
CONFIG(debug, debug|release): QT_ITEM = $${QTPLUG}d4.dll
else: QT_ITEM = $${QTPLUG}4.dll
- eval(qt_additional_plugin_$${QTPLUG}.sources = $$[QT_INSTALL_PLUGINS]/$${QT_PLUGINPATH}/$${QT_ITEM})
+ eval(qt_additional_plugin_$${QTPLUG}.files = $$[QT_INSTALL_PLUGINS]/$${QT_PLUGINPATH}/$${QT_ITEM})
eval(qt_additional_plugin_$${QTPLUG}.path = $${QT_PLUGINPATH})
DEPLOYMENT *= qt_additional_plugin_$${QTPLUG}
@@ -121,7 +121,7 @@ for(QT_CURRENT_VERIFY, $$list($$QT_PLUGIN_VERIFY)) {
isEqual(QT_CURRENT_VERIFY, DEPLOYMENT_PLUGIN):shared:symbian: {
QT_ITEM = $${QTPLUG}.dll
- eval(qt_additional_plugin_$${QTPLUG}.sources = $${QT_ITEM})
+ eval(qt_additional_plugin_$${QTPLUG}.files = $${QT_ITEM})
eval(qt_additional_plugin_$${QTPLUG}.path = $${QT_PLUGINPATH})
DEPLOYMENT *= qt_additional_plugin_$${QTPLUG}
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index afc708a..e5ef5a1 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
@@ -87,6 +87,12 @@ defineTest(qtPrepareTool) {
else:$$1 = $$[QT_INSTALL_BINS]/$$2
}
$$1 ~= s,[/\\\\],$$QMAKE_DIR_SEP,
- contains(QMAKE_HOST.os, Windows):!contains($$1, .*\\.exe$):$$1 = $$eval($$1).exe
+ contains(QMAKE_HOST.os, Windows):!contains($$1, .*\\.(exe|bat)$) {
+ exists($$eval($$1).bat) {
+ $$1 = $$eval($$1).bat
+ } else {
+ $$1 = $$eval($$1).exe
+ }
+ }
export($$1)
}
diff --git a/mkspecs/features/qttest_p4.prf b/mkspecs/features/qttest_p4.prf
index d1c7c2b..2ee148b 100644
--- a/mkspecs/features/qttest_p4.prf
+++ b/mkspecs/features/qttest_p4.prf
@@ -1,6 +1,9 @@
isEmpty(TEMPLATE):TEMPLATE=app
CONFIG += qt warn_on console depend_includepath testcase
+# x11 is not defined by configure (the following line is copied from gui.pro)
+!win32:!embedded:!mac:!symbian:CONFIG += x11
+
qtAddLibrary(QtTest)
symbian:{
diff --git a/mkspecs/features/symbian/application_icon.prf b/mkspecs/features/symbian/application_icon.prf
index 2948811..f50e944 100644
--- a/mkspecs/features/symbian/application_icon.prf
+++ b/mkspecs/features/symbian/application_icon.prf
@@ -7,7 +7,8 @@ contains(CONFIG, no_icon) {
symbian:RSS_RULES += "hidden = KAppIsHidden;"
CONFIG -= no_icon
}
-}
+}
+
!contains(CONFIG, no_icon) {
baseTarget = $$symbianRemoveSpecialCharacters($$basename(TARGET))
@@ -15,17 +16,19 @@ contains(CONFIG, no_icon) {
resourceZDir = $$EPOCROOT$$HW_ZDIR$$APP_RESOURCE_DIR
regZDir = $$EPOCROOT$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR
} else {
- isEmpty(DESTDIR) {
- resourceZDir = .
- } else {
+ contains(DESTDIR, "/.*") {
resourceZDir = $$DESTDIR
+ } else:isEmpty(DESTDIR) {
+ resourceZDir = $$OUT_PWD
+ } else {
+ resourceZDir = $$OUT_PWD/$$DESTDIR
}
regZDir = $$resourceZDir
}
- default_resource_deployment.sources += $$resourceZDir/$${baseTarget}.rsc
+ default_resource_deployment.files += $$resourceZDir/$${baseTarget}.rsc
default_resource_deployment.path = $$APP_RESOURCE_DIR
- default_reg_deployment.sources += $$regZDir/$${baseTarget}_reg.rsc
+ default_reg_deployment.files += $$regZDir/$${baseTarget}_reg.rsc
default_reg_deployment.path = $$REG_RESOURCE_IMPORT_DIR
!isEmpty(ICON) {
@@ -68,9 +71,10 @@ contains(CONFIG, no_icon) {
}
# Rules to use generated MIF file from symbian resources
RSS_RULES.number_of_icons = $$size(ICON_backslashed)
+
RSS_RULES.icon_file = $$APP_RESOURCE_DIR/$${baseTarget}.mif
- default_resource_deployment.sources += $$resourceZDir/$${baseTarget}.mif
+ default_resource_deployment.files += $$resourceZDir/$${baseTarget}.mif
}
}
diff --git a/mkspecs/features/symbian/data_caging_paths.prf b/mkspecs/features/symbian/data_caging_paths.prf
index 2f03128..7f5420c 100644
--- a/mkspecs/features/symbian/data_caging_paths.prf
+++ b/mkspecs/features/symbian/data_caging_paths.prf
@@ -13,7 +13,7 @@
#
# # These variables are mostly useful when specifying deployment
#
-# myLib.sources = myLib.dll
+# myLib.files = myLib.dll
# myLib.path = $$SHARED_LIB_DIR
# DEPLOYMENT += myLib
#
@@ -21,7 +21,7 @@
# # $$QT_PUBLIC_PLUGINS_BASE specifies the public base directory for Qt
# # plugin stubs:
#
-# myPublicImageFormatPlugin.sources = myImageFormat.dll
+# myPublicImageFormatPlugin.files = myImageFormat.dll
# myPublicImageFormatPlugin.path = $$QT_PLUGINS_BASE_DIR/imageformats
# DEPLOYMENT += myPublicImageFormatPlugin
#
diff --git a/mkspecs/features/symbian/def_files.prf b/mkspecs/features/symbian/def_files.prf
index f243878..1c11925 100644
--- a/mkspecs/features/symbian/def_files.prf
+++ b/mkspecs/features/symbian/def_files.prf
@@ -7,6 +7,18 @@ CONFIG -= def_files_disabled
equals(QMAKE_TARGET_PRODUCT, Qt4):clean_TARGET = $$replace(TARGET, "$${QT_LIBINFIX}$", "")
else:clean_TARGET = $$TARGET
+defineTest(qtTestIfDirExists) {
+ contains(QMAKE_HOST.os,Windows) {
+ dirToTest = $$1
+ $$dirToTest ~= s,/,\\,
+ # Windows trick. Test for existence of nul, which every directory has.
+ retValue = $$system("if exist $$dirToTest\\nul echo true")
+ contains(retValue, true):return(true)|return(false)
+ } else {
+ system("test -d $$1"):return(true)|return(false)
+ }
+}
+
symbian-abld|symbian-sbsv2 {
# Firstly, if the MMP_RULES already contain a defBlock variable, don't generate another one
# (this bit is slightly magic, because it depends upon everyone creating their DEFFILE statements
@@ -52,9 +64,11 @@ symbian-abld|symbian-sbsv2 {
} else {
defFile = .
}
- system("$$QMAKE_CHK_DIR_EXISTS $$_PRO_FILE_PWD_/$$defFile") {
+ qtTestIfDirExists($$_PRO_FILE_PWD_/$$defFile) {
!exists("$$_PRO_FILE_PWD_/$$defFile/eabi") {
- system("$$QMAKE_MKDIR $$_PRO_FILE_PWD_/$$defFile/eabi")
+ dirToCreate = $$_PRO_FILE_PWD_/$$defFile/eabi
+ contains(QMAKE_HOST.os,Windows):dirToCreate ~= s,/,\\,
+ system("$$QMAKE_MKDIR $$dirToCreate")
}
elf2e32FileToAdd = $$_PRO_FILE_PWD_/$$defFile/eabi/$$basename(clean_TARGET)u.def
} else {
diff --git a/mkspecs/features/symbian/default_post.prf b/mkspecs/features/symbian/default_post.prf
index a9b6d0e..d9ff03d 100644
--- a/mkspecs/features/symbian/default_post.prf
+++ b/mkspecs/features/symbian/default_post.prf
@@ -3,16 +3,21 @@ load(default_post)
contains(TEMPLATE, ".*app") {
contains(CONFIG, stdbinary) {
QMAKE_LIBS +=
- } else:contains(QT, gui):contains(CONFIG,qt) {
- S60MAIN_LIBS = -leuser
- QMAKE_LIBS += -lqtmain$${QT_LIBINFIX}.lib $$S60MAIN_LIBS
- } else {
+ } else:contains(CONFIG,qt) {
QMAKE_LIBS += $$QMAKE_LIBS_QT_ENTRY
+ } else {
+ QMAKE_LIBS += $$QMAKE_LIBS_NO_QT_ENTRY
+ }
+
+ contains(DESTDIR, "/.*") {
+ default_bin_deployment.sources += $$DESTDIR/$$symbianRemoveSpecialCharacters($$basename(TARGET)).exe
+ } else:isEmpty(DESTDIR) {
+ default_bin_deployment.sources += $$OUT_PWD/$$symbianRemoveSpecialCharacters($$basename(TARGET)).exe
+ } else {
+ default_bin_deployment.sources += $$OUT_PWD/$$DESTDIR/$$symbianRemoveSpecialCharacters($$basename(TARGET)).exe
}
-
- default_bin_deployment.sources += $$symbianRemoveSpecialCharacters($$basename(TARGET)).exe
default_bin_deployment.path += /sys/bin
-
+
load(application_icon.prf)
}
contains(TEMPLATE, lib): {
diff --git a/mkspecs/features/symbian/do_not_build_as_thumb.prf b/mkspecs/features/symbian/do_not_build_as_thumb.prf
index 60d9382..0f1fd9f 100644
--- a/mkspecs/features/symbian/do_not_build_as_thumb.prf
+++ b/mkspecs/features/symbian/do_not_build_as_thumb.prf
@@ -1,6 +1,6 @@
symbian-abld|symbian-sbsv2 {
MMP_RULES += ALWAYS_BUILD_AS_ARM
-} else:linux-armcc {
+} else:symbian-armcc {
QMAKE_CFLAGS -= --thumb
QMAKE_CFLAGS += --arm
QMAKE_CXXFLAGS -= --thumb
diff --git a/mkspecs/features/symbian/qt_config.prf b/mkspecs/features/symbian/qt_config.prf
index 2f446dc..82c1862 100644
--- a/mkspecs/features/symbian/qt_config.prf
+++ b/mkspecs/features/symbian/qt_config.prf
@@ -3,7 +3,7 @@ load(qt_config)
!contains(QMAKE_HOST.os, "Windows") {
# Test for the existence of lower cased headers, a sign of using Gnupoc.
# Note that the qmake "exists" test won't do because it is case insensitive.
- system("test -f $${EPOCROOT}/epoc32/include/akndoc.h") {
+ system("test -f $${EPOCROOT}epoc32/include/akndoc.h") {
CONFIG += is_using_gnupoc
}
}
diff --git a/mkspecs/features/symbian/run_on_phone.prf b/mkspecs/features/symbian/run_on_phone.prf
index d845277..ba88a66 100644
--- a/mkspecs/features/symbian/run_on_phone.prf
+++ b/mkspecs/features/symbian/run_on_phone.prf
@@ -5,7 +5,8 @@ GENERATE_RUN_TARGETS = false
contains(TEMPLATE, app): GENERATE_RUN_TARGETS = true
else:!equals(DEPLOYMENT, default_deployment) {
for(dep_item, $$list($$DEPLOYMENT)) {
- dep_item_sources = $$eval($${dep_item}.sources)
+ ### Qt 5: remove .sources, inconsistent with INSTALLS
+ dep_item_sources = $$eval($${dep_item}.files) $$eval($${dep_item}.sources)
!isEmpty(dep_item_sources): GENERATE_RUN_TARGETS = true
}
}
diff --git a/mkspecs/features/symbian/sis_targets.prf b/mkspecs/features/symbian/sis_targets.prf
index e838e10..e5a33cb 100644
--- a/mkspecs/features/symbian/sis_targets.prf
+++ b/mkspecs/features/symbian/sis_targets.prf
@@ -4,7 +4,8 @@ GENERATE_SIS_TARGETS = false
contains(TEMPLATE, app): GENERATE_SIS_TARGETS = true
else:!equals(DEPLOYMENT, default_deployment) {
for(dep_item, $$list($$DEPLOYMENT)) {
- dep_item_sources = $$eval($${dep_item}.sources)
+ ### Qt 5: remove .sources, inconsistent with INSTALLS
+ dep_item_sources = $$eval($${dep_item}.files) $$eval($${dep_item}.sources)
!isEmpty(dep_item_sources): GENERATE_SIS_TARGETS = true
}
}
diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf
index 614fb65..9288583 100644
--- a/mkspecs/features/symbian/symbian_building.prf
+++ b/mkspecs/features/symbian/symbian_building.prf
@@ -1,7 +1,7 @@
-linux-armcc {
+symbian-armcc {
QMAKE_CFLAGS += $$QMAKE_CFLAGS.ARMCC
QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS.ARMCC
-} else:linux-gcce {
+} else:symbian-gcce {
QMAKE_CFLAGS += $$QMAKE_CFLAGS.GCCE
QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS.GCCE
}
@@ -16,7 +16,7 @@ else:clean_TARGET = $$TARGET
!contains(clean_TARGET, ".*[ -/].*"):eval(TMPVAR = \$\$QMAKE_$${clean_TARGET}_LFLAGS)
!isEmpty(TMPVAR) {
QMAKE_LFLAGS += $$TMPVAR
-} else :linux-gcce { # lets provide a simple default. Without elf2e32 complains
+} else :symbian-gcce { # lets provide a simple default. Without elf2e32 complains
QMAKE_LFLAGS += -Ttext 0x80000 -Tdata 0x400000
}
@@ -62,8 +62,8 @@ for(libToProcess, libsToProcess) {
} else {
qt_newLib = $$processSymbianLibrary($$qt_library)
contains(qt_newLib, ".*\\.dso$")|contains(qt_newLib, ".*\\.lib$"):PRE_TARGETDEPS += $$qt_newLib
- linux-gcce:qt_newLib = "-l:$$qt_newLib"
- eval($$libToProcess += \$\$qt_newLib)
+ symbian-gcce:qt_newLib = "-l:$$qt_newLib"
+ eval($$libToProcess *= \$\$qt_newLib)
}
}
}
@@ -89,12 +89,13 @@ count(splitVersion, 0) {
decVersion = "10.0"
} else {
count(splitVersion, 3) {
- hexVersion = $$system("sh -c 'printf %02x $$member(splitVersion, 0)'")
- hexPart2 = $$system("sh -c 'printf %02x $$member(splitVersion, 1)'")"
- hexPart2 = $$hexPart2$$system("sh -c 'printf %02x $$member(splitVersion, 2)'")"
- decVersion = $$system("sh -c 'printf %1d 0x$$hexVersion'").
+ hexVersion = $$system("perl -e \"printf (\\\"%02x\\\", $$member(splitVersion, 0))\"")
+ hexPart2 = $$system("perl -e \"printf (\\\"%02x\\\", $$member(splitVersion, 1))\"")"
+ hexPart2 = $$hexPart2$$system("perl -e \"printf (\\\"%02x\\\", $$member(splitVersion, 2))\"")"
+ decVersion = $$system("perl -e \"printf (\\\"%1d\\\", 0x$$hexVersion)\"").
hexVersion = $$hexVersion$$hexPart2
- decVersion = $$decVersion$$system("sh -c 'printf %d 0x$$hexPart2'")
+ decVersion = $$decVersion$$system("perl -e \"printf (\\\"%d\\\", 0x$$hexPart2)\"")
+
!contains(hexVersion, "[0-9a-f]{8}"):hexVersion = "00$${hexVersion}"
} else { # app code may have different numbering...
hexVersion = $$VERSION
@@ -117,7 +118,9 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) {
contains(CONFIG, plugin):QMAKE_ELF2E32_FLAGS += --definput=plugin_commonu.def
!isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$escape_expand(\\n\\t)$$QMAKE_POST_LINK
- QMAKE_POST_LINK = $$QMAKE_MOVE $$symbianDestdir/$${baseTarget}.dll $$symbianDestdir/$${baseTarget}.sym \
+ moveCmd = $$QMAKE_MOVE $$symbianDestdir/$${baseTarget}.dll $$symbianDestdir/$${baseTarget}.sym
+ contains(QMAKE_HOST.os,Windows):moveCmd = $$replace(moveCmd, /, \\)
+ QMAKE_POST_LINK = $$moveCmd \
&& $$QMAKE_ELF2E32_WRAPPER --version=$$decVersion \
--sid=$$TARGET.SID \
--uid1=0x10000079 \
@@ -129,7 +132,7 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) {
--tmpdso=$${symbianObjdir}/$${baseTarget}.dso \
--dso=$${symbianDestdir}/$${baseTarget}.dso \
--defoutput=$$symbianObjdir/$${baseTarget}.def \
- --linkas=$${baseTarget}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll \
+ --linkas=\"$${baseTarget}{$${hexVersion}}[$${intUid3}].dll\" \
--heap=$$epoc_heap_size \
--stack=$$TARGET.EPOCSTACKSIZE \
$$elf2e32_LIBPATH \
@@ -142,11 +145,17 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) {
QMAKE_CLEAN += $${symbianObjdir}/$${baseTarget}.dso
QMAKE_CLEAN += $${symbianObjdir}/$${baseTarget}.def
- linux-armcc: {
- LIBS += usrt2_2.lib dfpaeabi.dso dfprvct2_2.dso drtaeabi.dso scppnwdl.dso drtrvct2_2.dso h_t__uf.l\\(switch8.o\\)
- LIBS += -ledllstub.lib -ledll.lib\\(uc_dll_.o\\)
- } else :linux-gcce {
+ symbian-armcc: {
+ LIBS += usrt2_2.lib dfpaeabi.dso dfprvct2_2.dso drtaeabi.dso scppnwdl.dso drtrvct2_2.dso
+ # Quotation unfortunately is different on Windows and unix.
+ contains(QMAKE_HOST.os, Windows) {
+ LIBS += \"h_t__uf.l(switch8.o)\" edllstub.lib \"edll.lib(uc_dll_.o)\"
+ } else {
+ LIBS += h_t__uf.l\\(switch8.o\\) edllstub.lib edll.lib\\(uc_dll_.o\\)
+ }
+ } else :symbian-gcce {
LIBS += \
+ -l:edllstub.lib \
-l:edll.lib \
-l:usrt2_2.lib \
-l:dfpaeabi.dso \
@@ -156,13 +165,15 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) {
-lgcc
}
- QMAKE_LFLAGS += --soname $${baseTarget}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll
+ QMAKE_LFLAGS += --soname \"$${baseTarget}{$${hexVersion}}[$${intUid3}].dll\"
DEFINES += __DLL__
}
contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@:.*") {
!isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$escape_expand(\\n\\t)$$QMAKE_POST_LINK
- QMAKE_POST_LINK = $$QMAKE_MOVE $$symbianDestdir/$${baseTarget} $$symbianDestdir/$${baseTarget}.sym \
+ moveCmd = $$QMAKE_MOVE $$symbianDestdir/$${baseTarget} $$symbianDestdir/$${baseTarget}.sym
+ contains(QMAKE_HOST.os,Windows):moveCmd = $$replace(moveCmd, /, \\)
+ QMAKE_POST_LINK = $$moveCmd \
&& $$QMAKE_ELF2E32_WRAPPER --version $$decVersion \
--sid=$$TARGET.SID \
--uid1=0x1000007a \
@@ -171,7 +182,7 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@:.*") {
--targettype=EXE \
--elfinput=$${symbianDestdir}/$${baseTarget}.sym \
--output=$${symbianDestdir}/$${baseTarget}.exe \
- --linkas=$${baseTarget}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe \
+ --linkas=\"$${baseTarget}{$${hexVersion}}[$${intUid3}].exe\" \
--heap=$$epoc_heap_size \
--stack=$$TARGET.EPOCSTACKSIZE \
$$elf2e32_LIBPATH \
@@ -184,28 +195,31 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@:.*") {
QMAKE_DISTCLEAN += $${symbianDestdir}/$${baseTarget}.exe
QMAKE_CLEAN += $${symbianDestdir}/$${baseTarget}
- linux-armcc: {
+ symbian-armcc: {
QMAKE_LIBS += usrt2_2.lib dfpaeabi.dso dfprvct2_2.dso drtaeabi.dso scppnwdl.dso drtrvct2_2.dso h_t__uf.l\\(switch8.o\\)
QMAKE_LIBS += -leexe.lib\\(uc_exe_.o\\)
- contains(CONFIG, "qt"):contains(QT, "gui") { #if linking with QtCore
- QMAKE_LIBS -= -lqtmain$${QT_LIBINFIX}.lib
- QMAKE_LIBS += -lqtmain$${QT_LIBINFIX}.lib
+ contains(CONFIG, "qt") {
+ QMAKE_LIBS -= $$QMAKE_LIBS_QT_ENTRY
+ QMAKE_LIBS += $$QMAKE_LIBS_QT_ENTRY
} else {
- QMAKE_LIBS -= -llibcrt0.lib
- QMAKE_LIBS += -llibcrt0.lib
+ QMAKE_LIBS -= $$QMAKE_LIBS_NO_QT_ENTRY
+ QMAKE_LIBS += $$QMAKE_LIBS_NO_QT_ENTRY
}
- } else :linux-gcce {
+ } else :symbian-gcce {
# notice that we can't merge these as ordering of arguments is important.
QMAKE_LIBS += \
-l:eexe.lib \
-l:usrt2_2.lib
- contains(CONFIG, "qt"):contains(QT, "gui") { #if linking with QtCore
- QMAKE_LIBS -= -l:qtmain$${QT_LIBINFIX}.lib
- QMAKE_LIBS += -l:qtmain$${QT_LIBINFIX}.lib
+ contains(CONFIG, "qt") {
+ modified_entry = $$replace(QMAKE_LIBS_QT_ENTRY, "^-l", "-l:")
+ QMAKE_LIBS -= $$modified_entry
+ QMAKE_LIBS += $$modified_entry
} else {
- QMAKE_LIBS -= -l:libcrt0.lib
- QMAKE_LIBS -= -l:libcrt0_gcce.lib
- QMAKE_LIBS += -l:libcrt0_gcce.lib
+ modified_entry = $$replace(QMAKE_LIBS_NO_QT_ENTRY, "^-l", "-l:")
+ QMAKE_LIBS -= $$modified_entry
+ modified_entry = $$replace(QMAKE_LIBS_NO_QT_ENTRY_GCCE, "^-l", "-l:")
+ QMAKE_LIBS -= $$modified_entry
+ QMAKE_LIBS += $$modified_entry
}
QMAKE_LIBS += \
-l:dfpaeabi.dso \
@@ -216,12 +230,12 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@:.*") {
QMAKE_LFLAGS += --shared
}
- QMAKE_LFLAGS += --soname $${baseTarget}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe
+ QMAKE_LFLAGS += --soname \"$${baseTarget}{$${hexVersion}}[$${intUid3}].exe\"
DEFINES += __EXE__
}
# Symbian resource files
-linux-armcc: {
+symbian-armcc: {
SYMBIAN_RVCT22INC=$$(RVCT22INC)
!isEmpty(SYMBIAN_RVCT22INC):symbian_resources_INCLUDES = -I$${SYMBIAN_RVCT22INC}
}
@@ -229,7 +243,7 @@ symbian_resources_INCLUDES = $$replace(symbian_resources_INCLUDES, ",", " -I")
symbian_resources_INCLUDES += $$join(INCLUDEPATH, " -I", "-I")
symbian_resources_DEFINES = $$join(DEFINES, " -D", "-D")
symbian_resources_RCC_DIR = $$replace(RCC_DIR, "/$", "")
-symbian_resources_INCLUDES += "-I $$symbian_resources_RCC_DIR"
+symbian_resources_INCLUDES += "-I$$symbian_resources_RCC_DIR"
for(symbian_resource, SYMBIAN_RESOURCES) {
symbian_resource = $$basename(symbian_resource)
@@ -245,7 +259,7 @@ symbianresources.commands = cpp -nostdinc -undef \
$$symbian_resources_INCLUDES \
$$symbian_resources_DEFINES \
${QMAKE_FILE_NAME} \
- -o $${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rpp \
+ > $${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rpp \
&& rcomp -u -m045,046,047 \
-s$${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rpp \
-o$${symbianDestdir}/${QMAKE_FILE_BASE}$${QT_LIBINFIX}.rsc \
@@ -265,7 +279,7 @@ contains(TEMPLATE, "app"):!contains(CONFIG, "no_icon") {
$$symbian_resources_INCLUDES \
$$symbian_resources_DEFINES \
$${baseTarget}.rss \
- -o $${symbian_resources_RCC_DIR}/$${baseTarget}.rpp \
+ > $${symbian_resources_RCC_DIR}/$${baseTarget}.rpp \
&& rcomp -u -m045,046,047 \
-s$${symbian_resources_RCC_DIR}/$${baseTarget}.rpp \
-o$${symbianDestdir}/$${baseTarget}.rsc \
@@ -284,7 +298,7 @@ contains(TEMPLATE, "app"):!contains(CONFIG, "no_icon") {
$$symbian_resources_INCLUDES \
$$symbian_resources_DEFINES \
$${baseTarget}_reg.rss \
- -o $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rpp \
+ > $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rpp \
&& rcomp -u -m045,046,047 \
-s$${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rpp \
-o$${symbianDestdir}/$${baseTarget}_reg.rsc \
diff --git a/mkspecs/freebsd-g++/qmake.conf b/mkspecs/freebsd-g++/qmake.conf
index 9de93d4..9d7c443 100644
--- a/mkspecs/freebsd-g++/qmake.conf
+++ b/mkspecs/freebsd-g++/qmake.conf
@@ -48,6 +48,7 @@ QMAKE_DEL_FILE = rm -f
QMAKE_DEL_DIR = rmdir
QMAKE_CHK_DIR_EXISTS = test -d
QMAKE_MKDIR = mkdir -p
-include(../common/g++.conf)
include(../common/unix.conf)
+include(../common/gcc-base-unix.conf)
+include(../common/g++-unix.conf)
load(qt_config)
diff --git a/mkspecs/linux-g++-32/qmake.conf b/mkspecs/linux-g++-32/qmake.conf
index f425c0d..cdf8914 100644
--- a/mkspecs/linux-g++-32/qmake.conf
+++ b/mkspecs/linux-g++-32/qmake.conf
@@ -12,6 +12,7 @@ QMAKE_INCREMENTAL_STYLE = sublib
QMAKE_CFLAGS = -m32
QMAKE_LFLAGS = -m32
-include(../common/g++.conf)
include(../common/linux.conf)
+include(../common/gcc-base-unix.conf)
+include(../common/g++-unix.conf)
load(qt_config)
diff --git a/mkspecs/linux-g++-64/qmake.conf b/mkspecs/linux-g++-64/qmake.conf
index b8877a9..222f6b7 100644
--- a/mkspecs/linux-g++-64/qmake.conf
+++ b/mkspecs/linux-g++-64/qmake.conf
@@ -15,8 +15,10 @@ QMAKE_INCREMENTAL_STYLE = sublib
QMAKE_CFLAGS = -m64
QMAKE_LFLAGS = -m64
-include(../common/g++.conf)
include(../common/linux.conf)
+include(../common/gcc-base-unix.conf)
+include(../common/g++-unix.conf)
+
QMAKE_LIBDIR_X11 = /usr/X11R6/lib64
QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib64
diff --git a/mkspecs/linux-g++-maemo/qmake.conf b/mkspecs/linux-g++-maemo/qmake.conf
index 8f85c54..23f1f71 100644
--- a/mkspecs/linux-g++-maemo/qmake.conf
+++ b/mkspecs/linux-g++-maemo/qmake.conf
@@ -10,8 +10,9 @@ CONFIG += nostrip
QT += core gui
QMAKE_INCREMENTAL_STYLE = sublib
-include(../common/g++.conf)
include(../common/linux.conf)
+include(../common/gcc-base-unix.conf)
+include(../common/g++-unix.conf)
# Override the default lib/include directories for scratchbox:
@@ -21,10 +22,7 @@ QMAKE_LIBDIR_X11 = /usr/lib
QMAKE_LIBDIR_OPENGL = /usr/lib
# We still need to generate debug symbols in release mode to put into the *-dbg packages:
-QMAKE_CFLAGS_RELEASE += -g -fno-omit-frame-pointer -fno-optimize-sibling-calls
-QMAKE_CXXFLAGS_RELEASE += -g -fno-omit-frame-pointer -fno-optimize-sibling-calls
-
-# Work round PowerVR SGX 1.3 driver bug with glScissor & FBOs:
-DEFINES += QT_GL_NO_SCISSOR_TEST
+QMAKE_CFLAGS_RELEASE += -g -Wno-psabi
+QMAKE_CXXFLAGS_RELEASE += -g -Wno-psabi
load(qt_config)
diff --git a/mkspecs/linux-g++/qmake.conf b/mkspecs/linux-g++/qmake.conf
index d772b5e..00df894 100644
--- a/mkspecs/linux-g++/qmake.conf
+++ b/mkspecs/linux-g++/qmake.conf
@@ -9,6 +9,7 @@ CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index
QT += core gui
QMAKE_INCREMENTAL_STYLE = sublib
-include(../common/g++.conf)
include(../common/linux.conf)
+include(../common/gcc-base-unix.conf)
+include(../common/g++-unix.conf)
load(qt_config)
diff --git a/mkspecs/linux-llvm/qmake.conf b/mkspecs/linux-llvm/qmake.conf
index 77f8d81..46ea2aa 100644
--- a/mkspecs/linux-llvm/qmake.conf
+++ b/mkspecs/linux-llvm/qmake.conf
@@ -9,6 +9,7 @@ CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index
QT += core gui
QMAKE_INCREMENTAL_STYLE = sublib
-include(../common/llvm.conf)
include(../common/linux.conf)
+include(../common/gcc-base-unix.conf)
+include(../common/llvm.conf)
load(qt_config)
diff --git a/mkspecs/macx-g++/qmake.conf b/mkspecs/macx-g++/qmake.conf
index 4464686..e402e54 100644
--- a/mkspecs/macx-g++/qmake.conf
+++ b/mkspecs/macx-g++/qmake.conf
@@ -13,9 +13,7 @@ CONFIG += qt warn_on release app_bundle incremental global_init_link_order lib
QT += core gui
QMAKE_INCREMENTAL_STYLE = sublib
-QMAKE_CC = gcc
-QMAKE_CXX = g++
-
-include(../common/mac-g++.conf)
-
+include(../common/mac.conf)
+include(../common/gcc-base-macx.conf)
+include(../common/g++-macx.conf)
load(qt_config)
diff --git a/mkspecs/macx-g++/qplatformdefs.h b/mkspecs/macx-g++/qplatformdefs.h
index 99d64ef..5bdef57 100644
--- a/mkspecs/macx-g++/qplatformdefs.h
+++ b/mkspecs/macx-g++/qplatformdefs.h
@@ -39,59 +39,5 @@
**
****************************************************************************/
-#ifndef QPLATFORMDEFS_H
-#define QPLATFORMDEFS_H
+#include "../common/mac/qplatformdefs.h"
-// Get Qt defines/settings
-
-#include "qglobal.h"
-
-// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
-
-#include <unistd.h>
-
-
-// We are hot - unistd.h should have turned on the specific APIs we requested
-
-
-#include <pthread.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <grp.h>
-#include <pwd.h>
-#include <signal.h>
-#define QT_NO_LIBRARY_UNLOAD
-
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/ipc.h>
-#include <sys/time.h>
-#include <sys/shm.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <netinet/in.h>
-#ifndef QT_NO_IPV6IFNAME
-#include <net/if.h>
-#endif
-
-#include "../common/posix/qplatformdefs.h"
-
-#undef QT_OPEN_LARGEFILE
-#undef QT_SOCKLEN_T
-#undef QT_SIGNAL_IGNORE
-
-#define QT_OPEN_LARGEFILE 0
-
-#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
-#define QT_SOCKLEN_T socklen_t
-#else
-#define QT_SOCKLEN_T int
-#endif
-
-#define QT_SIGNAL_IGNORE (void (*)(int))1
-
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
-
-#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/macx-g++40/qmake.conf b/mkspecs/macx-g++40/qmake.conf
index 784f5fc..07663c6 100644
--- a/mkspecs/macx-g++40/qmake.conf
+++ b/mkspecs/macx-g++40/qmake.conf
@@ -13,9 +13,16 @@ CONFIG += qt warn_on release app_bundle incremental global_init_link_order lib
QT += core gui
QMAKE_INCREMENTAL_STYLE = sublib
+include(../common/mac.conf)
+include(../common/gcc-base-macx.conf)
+include(../common/g++-macx.conf)
+
QMAKE_CC = gcc-4.0
QMAKE_CXX = g++-4.0
-include(../common/mac-g++.conf)
+QMAKE_LINK = $$QMAKE_CXX
+QMAKE_LINK_SHLIB = $$QMAKE_CXX
+QMAKE_LINK_C = $$QMAKE_CC
+QMAKE_LINK_C_SHLIB = $$QMAKE_CC
load(qt_config)
diff --git a/mkspecs/macx-g++40/qplatformdefs.h b/mkspecs/macx-g++40/qplatformdefs.h
index 99d64ef..5bdef57 100644
--- a/mkspecs/macx-g++40/qplatformdefs.h
+++ b/mkspecs/macx-g++40/qplatformdefs.h
@@ -39,59 +39,5 @@
**
****************************************************************************/
-#ifndef QPLATFORMDEFS_H
-#define QPLATFORMDEFS_H
+#include "../common/mac/qplatformdefs.h"
-// Get Qt defines/settings
-
-#include "qglobal.h"
-
-// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
-
-#include <unistd.h>
-
-
-// We are hot - unistd.h should have turned on the specific APIs we requested
-
-
-#include <pthread.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <grp.h>
-#include <pwd.h>
-#include <signal.h>
-#define QT_NO_LIBRARY_UNLOAD
-
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/ipc.h>
-#include <sys/time.h>
-#include <sys/shm.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <netinet/in.h>
-#ifndef QT_NO_IPV6IFNAME
-#include <net/if.h>
-#endif
-
-#include "../common/posix/qplatformdefs.h"
-
-#undef QT_OPEN_LARGEFILE
-#undef QT_SOCKLEN_T
-#undef QT_SIGNAL_IGNORE
-
-#define QT_OPEN_LARGEFILE 0
-
-#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
-#define QT_SOCKLEN_T socklen_t
-#else
-#define QT_SOCKLEN_T int
-#endif
-
-#define QT_SIGNAL_IGNORE (void (*)(int))1
-
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
-
-#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/macx-g++42/qmake.conf b/mkspecs/macx-g++42/qmake.conf
index fb93697..3d31305 100644
--- a/mkspecs/macx-g++42/qmake.conf
+++ b/mkspecs/macx-g++42/qmake.conf
@@ -13,9 +13,16 @@ CONFIG += qt warn_on release app_bundle incremental global_init_link_order lib
QT += core gui
QMAKE_INCREMENTAL_STYLE = sublib
+include(../common/mac.conf)
+include(../common/gcc-base-macx.conf)
+include(../common/g++-macx.conf)
+
QMAKE_CC = gcc-4.2
QMAKE_CXX = g++-4.2
-include(../common/mac-g++.conf)
+QMAKE_LINK = $$QMAKE_CXX
+QMAKE_LINK_SHLIB = $$QMAKE_CXX
+QMAKE_LINK_C = $$QMAKE_CC
+QMAKE_LINK_C_SHLIB = $$QMAKE_CC
load(qt_config)
diff --git a/mkspecs/macx-g++42/qplatformdefs.h b/mkspecs/macx-g++42/qplatformdefs.h
index 99d64ef..5bdef57 100644
--- a/mkspecs/macx-g++42/qplatformdefs.h
+++ b/mkspecs/macx-g++42/qplatformdefs.h
@@ -39,59 +39,5 @@
**
****************************************************************************/
-#ifndef QPLATFORMDEFS_H
-#define QPLATFORMDEFS_H
+#include "../common/mac/qplatformdefs.h"
-// Get Qt defines/settings
-
-#include "qglobal.h"
-
-// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
-
-#include <unistd.h>
-
-
-// We are hot - unistd.h should have turned on the specific APIs we requested
-
-
-#include <pthread.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <grp.h>
-#include <pwd.h>
-#include <signal.h>
-#define QT_NO_LIBRARY_UNLOAD
-
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/ipc.h>
-#include <sys/time.h>
-#include <sys/shm.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <netinet/in.h>
-#ifndef QT_NO_IPV6IFNAME
-#include <net/if.h>
-#endif
-
-#include "../common/posix/qplatformdefs.h"
-
-#undef QT_OPEN_LARGEFILE
-#undef QT_SOCKLEN_T
-#undef QT_SIGNAL_IGNORE
-
-#define QT_OPEN_LARGEFILE 0
-
-#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
-#define QT_SOCKLEN_T socklen_t
-#else
-#define QT_SOCKLEN_T int
-#endif
-
-#define QT_SIGNAL_IGNORE (void (*)(int))1
-
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
-
-#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/macx-icc/qplatformdefs.h b/mkspecs/macx-icc/qplatformdefs.h
index d46381c..5bdef57 100644
--- a/mkspecs/macx-icc/qplatformdefs.h
+++ b/mkspecs/macx-icc/qplatformdefs.h
@@ -39,5 +39,5 @@
**
****************************************************************************/
-#include "../macx-g++/qplatformdefs.h"
+#include "../common/mac/qplatformdefs.h"
diff --git a/mkspecs/macx-llvm/qmake.conf b/mkspecs/macx-llvm/qmake.conf
index d46baea..d794701 100644
--- a/mkspecs/macx-llvm/qmake.conf
+++ b/mkspecs/macx-llvm/qmake.conf
@@ -13,6 +13,13 @@ CONFIG += qt warn_on release app_bundle incremental global_init_link_order lib
QT += core gui
QMAKE_INCREMENTAL_STYLE = sublib
-include(../common/mac-llvm.conf)
+include(../common/mac.conf)
+include(../common/gcc-base-macx.conf)
+include(../common/llvm.conf)
+
+QMAKE_OBJCFLAGS_PRECOMPILE = -x objective-c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
+QMAKE_OBJCXXFLAGS_PRECOMPILE = -x objective-c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
load(qt_config)
diff --git a/mkspecs/macx-llvm/qplatformdefs.h b/mkspecs/macx-llvm/qplatformdefs.h
index 99d64ef..5bdef57 100644
--- a/mkspecs/macx-llvm/qplatformdefs.h
+++ b/mkspecs/macx-llvm/qplatformdefs.h
@@ -39,59 +39,5 @@
**
****************************************************************************/
-#ifndef QPLATFORMDEFS_H
-#define QPLATFORMDEFS_H
+#include "../common/mac/qplatformdefs.h"
-// Get Qt defines/settings
-
-#include "qglobal.h"
-
-// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
-
-#include <unistd.h>
-
-
-// We are hot - unistd.h should have turned on the specific APIs we requested
-
-
-#include <pthread.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <grp.h>
-#include <pwd.h>
-#include <signal.h>
-#define QT_NO_LIBRARY_UNLOAD
-
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/ipc.h>
-#include <sys/time.h>
-#include <sys/shm.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <netinet/in.h>
-#ifndef QT_NO_IPV6IFNAME
-#include <net/if.h>
-#endif
-
-#include "../common/posix/qplatformdefs.h"
-
-#undef QT_OPEN_LARGEFILE
-#undef QT_SOCKLEN_T
-#undef QT_SIGNAL_IGNORE
-
-#define QT_OPEN_LARGEFILE 0
-
-#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
-#define QT_SOCKLEN_T socklen_t
-#else
-#define QT_SOCKLEN_T int
-#endif
-
-#define QT_SIGNAL_IGNORE (void (*)(int))1
-
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
-
-#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/macx-xcode/qmake.conf b/mkspecs/macx-xcode/qmake.conf
index 3a4a500..4cb4626 100755
--- a/mkspecs/macx-xcode/qmake.conf
+++ b/mkspecs/macx-xcode/qmake.conf
@@ -9,10 +9,16 @@ TEMPLATE = app
CONFIG += qt warn_on release lib_version_first incremental plugin_no_soname link_prl app_bundle
QT += core gui
-include(../common/mac-g++.conf)
+include(../common/mac.conf)
+include(../common/gcc-base-macx.conf)
+include(../common/g++-macx.conf)
-QMAKE_CC =
-QMAKE_CXX =
+QMAKE_CC =
+QMAKE_CXX =
+QMAKE_LINK =
+QMAKE_LINK_C =
+QMAKE_LINK_C_SHLIB =
+QMAKE_LINK_SHLIB =
QMAKE_CFLAGS_HIDESYMS =
QMAKE_CFLAGS_PPC_64 =
QMAKE_CFLAGS_X86_64 =
diff --git a/mkspecs/macx-xcode/qplatformdefs.h b/mkspecs/macx-xcode/qplatformdefs.h
index 99d64ef..5bdef57 100644
--- a/mkspecs/macx-xcode/qplatformdefs.h
+++ b/mkspecs/macx-xcode/qplatformdefs.h
@@ -39,59 +39,5 @@
**
****************************************************************************/
-#ifndef QPLATFORMDEFS_H
-#define QPLATFORMDEFS_H
+#include "../common/mac/qplatformdefs.h"
-// Get Qt defines/settings
-
-#include "qglobal.h"
-
-// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
-
-#include <unistd.h>
-
-
-// We are hot - unistd.h should have turned on the specific APIs we requested
-
-
-#include <pthread.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <grp.h>
-#include <pwd.h>
-#include <signal.h>
-#define QT_NO_LIBRARY_UNLOAD
-
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/ipc.h>
-#include <sys/time.h>
-#include <sys/shm.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <netinet/in.h>
-#ifndef QT_NO_IPV6IFNAME
-#include <net/if.h>
-#endif
-
-#include "../common/posix/qplatformdefs.h"
-
-#undef QT_OPEN_LARGEFILE
-#undef QT_SOCKLEN_T
-#undef QT_SIGNAL_IGNORE
-
-#define QT_OPEN_LARGEFILE 0
-
-#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
-#define QT_SOCKLEN_T socklen_t
-#else
-#define QT_SOCKLEN_T int
-#endif
-
-#define QT_SIGNAL_IGNORE (void (*)(int))1
-
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
-
-#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/qws/linux-arm-g++/qmake.conf b/mkspecs/qws/linux-arm-g++/qmake.conf
index 7e0a3b4..7b37813 100644
--- a/mkspecs/qws/linux-arm-g++/qmake.conf
+++ b/mkspecs/qws/linux-arm-g++/qmake.conf
@@ -2,8 +2,9 @@
# qmake configuration for building with arm-linux-g++
#
-include(../../common/g++.conf)
include(../../common/linux.conf)
+include(../../common/gcc-base-unix.conf)
+include(../../common/g++-unix.conf)
include(../../common/qws.conf)
# modifications to g++.conf
diff --git a/mkspecs/qws/linux-arm-gnueabi-g++/qmake.conf b/mkspecs/qws/linux-arm-gnueabi-g++/qmake.conf
index 3611421..e1ad837 100644
--- a/mkspecs/qws/linux-arm-gnueabi-g++/qmake.conf
+++ b/mkspecs/qws/linux-arm-gnueabi-g++/qmake.conf
@@ -2,8 +2,9 @@
# qmake configuration for building with arm-none-linux-gnueabi-g++
#
-include(../../common/g++.conf)
include(../../common/linux.conf)
+include(../../common/gcc-base-unix.conf)
+include(../../common/g++-unix.conf)
include(../../common/qws.conf)
# modifications to g++.conf
diff --git a/mkspecs/qws/linux-armv6-g++/qmake.conf b/mkspecs/qws/linux-armv6-g++/qmake.conf
index cd7ecca..0e2473c 100644
--- a/mkspecs/qws/linux-armv6-g++/qmake.conf
+++ b/mkspecs/qws/linux-armv6-g++/qmake.conf
@@ -2,8 +2,9 @@
# qmake configuration for building for ARMv6 devices with arm-linux-g++
#
-include(../../common/g++.conf)
include(../../common/linux.conf)
+include(../../common/gcc-base-unix.conf)
+include(../../common/g++-unix.conf)
include(../../common/qws.conf)
# modifications to g++.conf
diff --git a/mkspecs/qws/linux-avr32-g++/qmake.conf b/mkspecs/qws/linux-avr32-g++/qmake.conf
index 057c938..32c0444 100644
--- a/mkspecs/qws/linux-avr32-g++/qmake.conf
+++ b/mkspecs/qws/linux-avr32-g++/qmake.conf
@@ -2,8 +2,9 @@
# qmake configuration for building with avr32-linux-g++
#
-include(../../common/g++.conf)
include(../../common/linux.conf)
+include(../../common/gcc-base-unix.conf)
+include(../../common/g++-unix.conf)
include(../../common/qws.conf)
# modifications to g++.conf
diff --git a/mkspecs/qws/linux-cellon-g++/qmake.conf b/mkspecs/qws/linux-cellon-g++/qmake.conf
index 363a3ce..ad66c3c 100644
--- a/mkspecs/qws/linux-cellon-g++/qmake.conf
+++ b/mkspecs/qws/linux-cellon-g++/qmake.conf
@@ -6,8 +6,9 @@
# qmake configuration for building with arm-linux-g++
#
-include(../../common/g++.conf)
include(../../common/linux.conf)
+include(../../common/gcc-base-unix.conf)
+include(../../common/g++-unix.conf)
include(../../common/qws.conf)
# modifications to g++.conf
diff --git a/mkspecs/qws/linux-dm7000-g++/qmake.conf b/mkspecs/qws/linux-dm7000-g++/qmake.conf
index aea2647..c897091 100644
--- a/mkspecs/qws/linux-dm7000-g++/qmake.conf
+++ b/mkspecs/qws/linux-dm7000-g++/qmake.conf
@@ -2,8 +2,9 @@
# qmake configuration for linux-dm7000-g++, for Dream Multimedia's DM7000S
#
-include(../../common/g++.conf)
include(../../common/linux.conf)
+include(../../common/gcc-base-unix.conf)
+include(../../common/g++-unix.conf)
include(../../common/qws.conf)
# modifications to g++.conf
diff --git a/mkspecs/qws/linux-dm800-g++/qmake.conf b/mkspecs/qws/linux-dm800-g++/qmake.conf
index fca93b4..002e4c7 100644
--- a/mkspecs/qws/linux-dm800-g++/qmake.conf
+++ b/mkspecs/qws/linux-dm800-g++/qmake.conf
@@ -2,8 +2,9 @@
# qmake configuration for linux-dm800-g++, for Dream Multimedia's DM800
#
-include(../../common/g++.conf)
include(../../common/linux.conf)
+include(../../common/gcc-base-unix.conf)
+include(../../common/g++-unix.conf)
include(../../common/qws.conf)
# modifications to g++.conf
diff --git a/mkspecs/qws/linux-generic-g++-32/qmake.conf b/mkspecs/qws/linux-generic-g++-32/qmake.conf
index 81af4ab..249c10aa 100644
--- a/mkspecs/qws/linux-generic-g++-32/qmake.conf
+++ b/mkspecs/qws/linux-generic-g++-32/qmake.conf
@@ -2,8 +2,9 @@
# qmake configuration for building with arm-linux-g++
#
-include(../../common/g++.conf)
include(../../common/linux.conf)
+include(../../common/gcc-base-unix.conf)
+include(../../common/g++-unix.conf)
include(../../common/qws.conf)
# modifications to g++.conf
diff --git a/mkspecs/qws/linux-generic-g++/qmake.conf b/mkspecs/qws/linux-generic-g++/qmake.conf
index a026e88..e803d0d 100644
--- a/mkspecs/qws/linux-generic-g++/qmake.conf
+++ b/mkspecs/qws/linux-generic-g++/qmake.conf
@@ -2,8 +2,9 @@
# qmake configuration for building with g++
#
-include(../../common/g++.conf)
include(../../common/linux.conf)
+include(../../common/gcc-base-unix.conf)
+include(../../common/g++-unix.conf)
include(../../common/qws.conf)
load(qt_config)
diff --git a/mkspecs/qws/linux-ipaq-g++/qmake.conf b/mkspecs/qws/linux-ipaq-g++/qmake.conf
index 59f4e6e..f9d33b3 100644
--- a/mkspecs/qws/linux-ipaq-g++/qmake.conf
+++ b/mkspecs/qws/linux-ipaq-g++/qmake.conf
@@ -2,8 +2,9 @@
# qmake configuration for building with arm-linux-g++
#
-include(../../common/g++.conf)
include(../../common/linux.conf)
+include(../../common/gcc-base-unix.conf)
+include(../../common/g++-unix.conf)
include(../../common/qws.conf)
# modifications to g++.conf
diff --git a/mkspecs/qws/linux-lsb-g++/qmake.conf b/mkspecs/qws/linux-lsb-g++/qmake.conf
index 8b66228..4b35925 100644
--- a/mkspecs/qws/linux-lsb-g++/qmake.conf
+++ b/mkspecs/qws/linux-lsb-g++/qmake.conf
@@ -3,10 +3,12 @@
#
-include(../../common/g++.conf)
include(../../common/linux.conf)
+include(../../common/gcc-base-unix.conf)
+include(../../common/g++-unix.conf)
include(../../common/qws.conf)
+
QMAKE_LSB = 1
# modifications to g++.conf
diff --git a/mkspecs/qws/linux-mips-g++/qmake.conf b/mkspecs/qws/linux-mips-g++/qmake.conf
index 3c55342..1a86078 100644
--- a/mkspecs/qws/linux-mips-g++/qmake.conf
+++ b/mkspecs/qws/linux-mips-g++/qmake.conf
@@ -2,8 +2,9 @@
# qmake configuration for building with mipsel-linux-g++
#
-include(../../common/g++.conf)
include(../../common/linux.conf)
+include(../../common/gcc-base-unix.conf)
+include(../../common/g++-unix.conf)
include(../../common/qws.conf)
# modifications to g++.conf
diff --git a/mkspecs/qws/linux-nacl-g++/qmake.conf b/mkspecs/qws/linux-nacl-g++/qmake.conf
new file mode 100644
index 0000000..83ce65b
--- /dev/null
+++ b/mkspecs/qws/linux-nacl-g++/qmake.conf
@@ -0,0 +1,74 @@
+#
+# qmake configuration for building with nacl-g++
+#
+
+include(../../common/unix.conf)
+include(../../common/qws.conf)
+
+QT = core gui
+
+# copy of ../../common/g++.conf, with modifications:
+
+QMAKE_CC = nacl-gcc
+QMAKE_CXX = nacl-g++
+QMAKE_LINK = nacl-g++
+QMAKE_LINK_SHLIB = nacl-g++
+
+#QMAKE_CC = gcc
+QMAKE_CFLAGS += -pipe -DXP_UNIX -DNACL_STANDALONE=1
+QMAKE_CFLAGS_DEPS += -M
+QMAKE_CFLAGS_WARN_ON += -Wall -W
+QMAKE_CFLAGS_WARN_OFF += -w
+QMAKE_CFLAGS_RELEASE += -O2
+QMAKE_CFLAGS_DEBUG += -g
+QMAKE_CFLAGS_SHLIB += -fPIC
+#QMAKE_CFLAGS_STATIC_LIB += -fPIC
+QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
+QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE}
+
+#QMAKE_CXX = g++
+QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
+QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
+
+#QMAKE_LINK = g++
+#QMAKE_LINK_SHLIB = g++
+QMAKE_LINK_C = gcc
+QMAKE_LINK_C_SHLIB = gcc
+QMAKE_LFLAGS +=
+QMAKE_LFLAGS_RELEASE += -Wl,-O1
+QMAKE_LFLAGS_DEBUG +=
+QMAKE_LFLAGS_APP +=
+QMAKE_LFLAGS_SHLIB += -shared
+QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME += -Wl,-soname,
+QMAKE_LFLAGS_THREAD +=
+QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined
+QMAKE_LFLAGS_RPATH = -Wl,-rpath,
+
+QMAKE_LIBS = -lgoogle_nacl_imc -lgoogle_nacl_npruntime -lgoogle_nacl_pgl -lgoogle_nacl_gpu -lpthread -lsrpc
+
+QMAKE_PCH_OUTPUT_EXT = .gch
+
+# -Bsymbolic-functions (ld) support
+QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions
+QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list,
+
+# modifications to linux.conf
+QMAKE_AR = nacl-ar q
+QMAKE_OBJCOPY = nacl-objcopy
+QMAKE_STRIP = nacl-strip
+QMAKE_LIBS_DYNLOAD =
+
+load(qt_config)
diff --git a/mkspecs/qws/linux-nacl-g++/qplatformdefs.h b/mkspecs/qws/linux-nacl-g++/qplatformdefs.h
new file mode 100644
index 0000000..01b26d9
--- /dev/null
+++ b/mkspecs/qws/linux-nacl-g++/qplatformdefs.h
@@ -0,0 +1,175 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#define _POSIX_TIMERS
+
+#include "qglobal.h"
+
+
+#define _POSIX_TIMERS
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+// 1) need to reset default environment if _BSD_SOURCE is defined
+// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
+// 3) it seems older glibc need this to include the X/Open stuff
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+#include <sys/features.h>
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+//#include <dlfcn.h>
+
+#include <sys/types.h>
+//#include <sys/ioctl.h>
+//#include <sys/ipc.h>
+
+#include <sys/time.h>
+//#include <sys/shm.h>
+//#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+//#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+// extra disabling.
+#ifdef __native_client__
+#define QT_NO_FSFILEENGINE
+#define QT_NO_TRANSLATION
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct stat64
+#define QT_STATBUF4TSTAT struct stat64
+#define QT_STAT ::stat64
+#define QT_FSTAT ::fstat64
+#define QT_LSTAT ::lstat64
+#define QT_OPEN ::open64
+#define QT_TRUNCATE ::truncate64
+#define QT_FTRUNCATE ::ftruncate64
+#define QT_LSEEK ::lseek64
+#else
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_OPEN ::open
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_FOPEN ::fopen64
+#define QT_FSEEK ::fseeko64
+#define QT_FTELL ::ftello64
+#define QT_FGETPOS ::fgetpos64
+#define QT_FSETPOS ::fsetpos64
+#define QT_FPOS_T fpos64_t
+#define QT_OFF_T off64_t
+#else
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+#endif
+
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_CLOSE ::close
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#if defined(__GLIBC__) && (__GLIBC__ >= 2)
+#define QT_SOCKLEN_T socklen_t
+#else
+#define QT_SOCKLEN_T int
+#endif
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+#endif
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/qws/linux-powerpc-g++/qmake.conf b/mkspecs/qws/linux-powerpc-g++/qmake.conf
index e1926b4..6a6310a 100644
--- a/mkspecs/qws/linux-powerpc-g++/qmake.conf
+++ b/mkspecs/qws/linux-powerpc-g++/qmake.conf
@@ -2,8 +2,9 @@
# qmake configuration for building with g++
#
-include(../../common/g++.conf)
include(../../common/linux.conf)
+include(../../common/gcc-base-unix.conf)
+include(../../common/g++-unix.conf)
include(../../common/qws.conf)
# modifications to g++.conf
diff --git a/mkspecs/qws/linux-sh-g++/qmake.conf b/mkspecs/qws/linux-sh-g++/qmake.conf
index 61b57a3..004780a 100644
--- a/mkspecs/qws/linux-sh-g++/qmake.conf
+++ b/mkspecs/qws/linux-sh-g++/qmake.conf
@@ -2,8 +2,9 @@
# qmake configuration for building for SH devices with sh3-linux-g++
#
-include(../../common/g++.conf)
include(../../common/linux.conf)
+include(../../common/gcc-base-unix.conf)
+include(../../common/g++-unix.conf)
include(../../common/qws.conf)
# modifications to g++.conf
diff --git a/mkspecs/qws/linux-sh4al-g++/qmake.conf b/mkspecs/qws/linux-sh4al-g++/qmake.conf
index 9caebdf..71f6b3d 100644
--- a/mkspecs/qws/linux-sh4al-g++/qmake.conf
+++ b/mkspecs/qws/linux-sh4al-g++/qmake.conf
@@ -2,8 +2,9 @@
# qmake configuration for building for SH4AL-DSP devices with sh3-linux-g++
#
-include(../../common/g++.conf)
include(../../common/linux.conf)
+include(../../common/gcc-base-unix.conf)
+include(../../common/g++-unix.conf)
include(../../common/qws.conf)
# modifications to g++.conf
diff --git a/mkspecs/qws/linux-sharp-g++/qmake.conf b/mkspecs/qws/linux-sharp-g++/qmake.conf
index 083e4e8..6a000b9 100644
--- a/mkspecs/qws/linux-sharp-g++/qmake.conf
+++ b/mkspecs/qws/linux-sharp-g++/qmake.conf
@@ -2,8 +2,9 @@
# qmake configuration for building with arm-linux-g++
#
-include(../../common/g++.conf)
include(../../common/linux.conf)
+include(../../common/gcc-base-unix.conf)
+include(../../common/g++-unix.conf)
include(../../common/qws.conf)
# modifications to g++.conf
diff --git a/mkspecs/qws/linux-x86-g++/qmake.conf b/mkspecs/qws/linux-x86-g++/qmake.conf
index 7e28d4e..55011ec 100644
--- a/mkspecs/qws/linux-x86-g++/qmake.conf
+++ b/mkspecs/qws/linux-x86-g++/qmake.conf
@@ -2,8 +2,9 @@
# qmake configuration for building with linux-g++
#
-include(../../common/g++.conf)
include(../../common/linux.conf)
+include(../../common/gcc-base-unix.conf)
+include(../../common/g++-unix.conf)
include(../../common/qws.conf)
load(qt_config)
diff --git a/mkspecs/qws/linux-x86_64-g++/qmake.conf b/mkspecs/qws/linux-x86_64-g++/qmake.conf
index d4e6189..e18d055 100644
--- a/mkspecs/qws/linux-x86_64-g++/qmake.conf
+++ b/mkspecs/qws/linux-x86_64-g++/qmake.conf
@@ -2,8 +2,9 @@
# qmake configuration for building with linux-g++
#
-include(../../common/g++.conf)
include(../../common/linux.conf)
+include(../../common/gcc-base-unix.conf)
+include(../../common/g++-unix.conf)
include(../../common/qws.conf)
# modifications to g++.conf
diff --git a/mkspecs/qws/linux-zylonite-g++/qmake.conf b/mkspecs/qws/linux-zylonite-g++/qmake.conf
index 97ae600..f50b70f 100644
--- a/mkspecs/qws/linux-zylonite-g++/qmake.conf
+++ b/mkspecs/qws/linux-zylonite-g++/qmake.conf
@@ -2,8 +2,9 @@
# qmake configuration for building with arm-linux-g++
#
-include(../../common/g++.conf)
include(../../common/linux.conf)
+include(../../common/gcc-base-unix.conf)
+include(../../common/g++-unix.conf)
include(../../common/qws.conf)
# modifications to g++.conf
diff --git a/mkspecs/qws/macx-generic-g++/qmake.conf b/mkspecs/qws/macx-generic-g++/qmake.conf
index 9096712..8dcbb39 100644
--- a/mkspecs/qws/macx-generic-g++/qmake.conf
+++ b/mkspecs/qws/macx-generic-g++/qmake.conf
@@ -2,6 +2,8 @@
# qmake configuration for macx-g++ with Qtopia Core
#
+include(../../common/unix.conf)
+
MAKEFILE_GENERATOR = UNIX
TARGET_PLATFORM = macx
TEMPLATE = app
@@ -18,18 +20,18 @@ QMAKE_YACCFLAGS = -d
QMAKE_CFLAGS = -pipe
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF =
-QMAKE_CFLAGS_RELEASE = -O2 -fno-default-inline
+QMAKE_CFLAGS_RELEASE = -O2
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC
QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
QMAKE_CFLAGS_THREAD = -D_REENTRANT
QMAKE_CFLAGS_HIDESYMS = -fvisibility=hidden
-QMAKE_CXX = $(TB)c++
+QMAKE_CXX = c++
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -DQT_NO_QWS_TRANSFORMED
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
-QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -fno-default-inline
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
diff --git a/mkspecs/qws/macx-nacl-g++/qmake.conf b/mkspecs/qws/macx-nacl-g++/qmake.conf
new file mode 100644
index 0000000..0a54b4b
--- /dev/null
+++ b/mkspecs/qws/macx-nacl-g++/qmake.conf
@@ -0,0 +1,95 @@
+#
+# qmake configuration for macx-nacl-g++ with embedded-lite
+#
+
+include(../../common/unix.conf)
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+QMAKE_INCREMENTAL_STYLE = sublib
+QMAKE_EXTENSION_SHLIB = dylib
+
+
+QMAKE_CC = nacl-gcc
+QMAKE_CXX = nacl-g++
+QMAKE_LINK = nacl-g++
+QMAKE_LINK_SHLIB = nacl-g++
+
+#QMAKE_CC = $(TB)cc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -pipe -DXP_UNIX -DNACL_STANDALONE=1
+QMAKE_CFLAGS_WARN_ON = -Wall -W
+QMAKE_CFLAGS_WARN_OFF =
+QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -fPIC
+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_THREAD = -D_REENTRANT
+QMAKE_CFLAGS_HIDESYMS = -fvisibility=hidden
+
+#QMAKE_CXX = $(TB)c++
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -DQT_NO_QWS_TRANSFORMED
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -fno-default-inline
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+QMAKE_CXXFLAGS_HIDESYMS = $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 =
+QMAKE_LIBDIR_X11 =
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL =
+QMAKE_LIBDIR_OPENGL =
+QMAKE_INCDIR_QTOPIA = $(QPEDIR)/include
+QMAKE_LIBDIR_QTOPIA = $(QPEDIR)/lib
+
+#QMAKE_LINK = $$QMAKE_CXX
+#QMAKE_LINK_SHLIB = $$QMAKE_CXX
+QMAKE_LFLAGS =
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -dynamiclib
+QMAKE_LFLAGS_INCREMENTAL = -undefined suppress -flat_namespace
+QMAKE_LFLAGS_PLUGIN = -bundle
+QMAKE_LFLAGS_SONAME =
+QMAKE_LFLAGS_THREAD =
+
+QMAKE_LIBS = -lgoogle_nacl_imc -lgoogle_nacl_npruntime -lgoogle_nacl_pgl -lgoogle_nacl_gpu -lpthread -lsrpc
+QMAKE_LIBS_X11 =
+QMAKE_LIBS_X11SM =
+QMAKE_LIBS_QT = -lqte
+QMAKE_LIBS_QT_THREAD = -lqte-mt
+QMAKE_LIBS_QT_OPENGL = -lqgl
+QMAKE_LIBS_QTOPIA = -lqpe -lqtopia
+QMAKE_LIBS_THREAD =
+QMAKE_LIBS_OPENGL =
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = nacl-ar q
+QMAKE_OBJCOPY = nacl-objcopy
+QMAKE_STRIP = nacl-strip
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+load(qt_config)
diff --git a/mkspecs/qws/macx-nacl-g++/qplatformdefs.h b/mkspecs/qws/macx-nacl-g++/qplatformdefs.h
new file mode 100644
index 0000000..01b26d9
--- /dev/null
+++ b/mkspecs/qws/macx-nacl-g++/qplatformdefs.h
@@ -0,0 +1,175 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#define _POSIX_TIMERS
+
+#include "qglobal.h"
+
+
+#define _POSIX_TIMERS
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+// 1) need to reset default environment if _BSD_SOURCE is defined
+// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
+// 3) it seems older glibc need this to include the X/Open stuff
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+#include <sys/features.h>
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+//#include <dlfcn.h>
+
+#include <sys/types.h>
+//#include <sys/ioctl.h>
+//#include <sys/ipc.h>
+
+#include <sys/time.h>
+//#include <sys/shm.h>
+//#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+//#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+// extra disabling.
+#ifdef __native_client__
+#define QT_NO_FSFILEENGINE
+#define QT_NO_TRANSLATION
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct stat64
+#define QT_STATBUF4TSTAT struct stat64
+#define QT_STAT ::stat64
+#define QT_FSTAT ::fstat64
+#define QT_LSTAT ::lstat64
+#define QT_OPEN ::open64
+#define QT_TRUNCATE ::truncate64
+#define QT_FTRUNCATE ::ftruncate64
+#define QT_LSEEK ::lseek64
+#else
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_OPEN ::open
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_FOPEN ::fopen64
+#define QT_FSEEK ::fseeko64
+#define QT_FTELL ::ftello64
+#define QT_FGETPOS ::fgetpos64
+#define QT_FSETPOS ::fsetpos64
+#define QT_FPOS_T fpos64_t
+#define QT_OFF_T off64_t
+#else
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+#endif
+
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_CLOSE ::close
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#if defined(__GLIBC__) && (__GLIBC__ >= 2)
+#define QT_SOCKLEN_T socklen_t
+#else
+#define QT_SOCKLEN_T int
+#endif
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+#endif
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/symbian/linux-gcce/features/default_post.prf b/mkspecs/symbian-armcc/features/default_post.prf
index 7aa1f4d..7aa1f4d 100644
--- a/mkspecs/symbian/linux-gcce/features/default_post.prf
+++ b/mkspecs/symbian-armcc/features/default_post.prf
diff --git a/mkspecs/symbian-armcc/qmake.conf b/mkspecs/symbian-armcc/qmake.conf
new file mode 100644
index 0000000..be6af39
--- /dev/null
+++ b/mkspecs/symbian-armcc/qmake.conf
@@ -0,0 +1,62 @@
+#
+# qmake configuration for symbian-armcc
+#
+
+include(../common/symbian/symbian-makefile.conf)
+
+include(../common/armcc.conf)
+
+QMAKE_RVCT_LINKSTYLE = 1
+
+# notice that the middle part of the following set of vars matches the TARGET content of the libs
+
+#QMAKE_qtmain_CXXFLAGS = --arm
+#QMAKE_QtCore_CXXFLAGS =
+QMAKE_QtGui_LFLAGS = "--rw-base 0x800000"
+#QMAKE_QtDBus_CXXFLAGS =
+#QMAKE_QtDeclarative_CXXFLAGS =
+#QMAKE_QtMultimedia_CXXFLAGS =
+#QMAKE_QtNetwork_CXXFLAGS =
+#QMAKE_QtOpenGL_CXXFLAGS =
+#QMAKE_QtOpenVG_CXXFLAGS =
+#QMAKE_phonon_CXXFLAGS =
+#QMAKE_QtScript_CXXFLAGS =
+#QMAKE_QtScriptTools_CXXFLAGS =
+#QMAKE_QtSql_CXXFLAGS =
+#QMAKE_QtSvg_CXXFLAGS =
+#QMAKE_QtTest_CXXFLAGS =
+#QMAKE_QtXmlPatterns_CXXFLAGS =
+#QMAKE_QtXml_CXXFLAGS =
+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 --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
+QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB
+
+DEFINES += EKA2 \
+ __ARMCC__ \
+ __ARMcc_2__ \
+ __ARMCC_2_2__
+
+QMAKE_LIBDIR += $${EPOCROOT}epoc32/release/armv5/lib
+QMAKE_LIBDIR *= $$(RVCT22LIB)
+
+INCLUDEPATH = $${EPOCROOT}epoc32/include \
+ $${EPOCROOT}epoc32/include/variant \
+ $${EPOCROOT}epoc32/include/stdapis \
+ $$INCLUDEPATH
+
+exists($${EPOCROOT}epoc32/include/rvct2_2) {
+ INCLUDEPATH += $${EPOCROOT}epoc32/include/rvct2_2
+ QMAKE_CFLAGS += --preinclude rvct2_2.h
+ QMAKE_CXXFLAGS += --preinclude rvct2_2.h
+} else {
+ INCLUDEPATH += $${EPOCROOT}epoc32/include/rvct
+ QMAKE_CFLAGS += --preinclude rvct.h
+ QMAKE_CXXFLAGS += --preinclude rvct.h
+}
diff --git a/mkspecs/symbian-armcc/qplatformdefs.h b/mkspecs/symbian-armcc/qplatformdefs.h
new file mode 100644
index 0000000..6f084d3
--- /dev/null
+++ b/mkspecs/symbian-armcc/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the mkspecs 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 "../common/symbian/qplatformdefs.h"
diff --git a/mkspecs/symbian/linux-armcc/features/default_post.prf b/mkspecs/symbian-gcce/features/default_post.prf
index 7aa1f4d..7aa1f4d 100644
--- a/mkspecs/symbian/linux-armcc/features/default_post.prf
+++ b/mkspecs/symbian-gcce/features/default_post.prf
diff --git a/mkspecs/symbian-gcce/qmake.conf b/mkspecs/symbian-gcce/qmake.conf
new file mode 100644
index 0000000..a31e6e4
--- /dev/null
+++ b/mkspecs/symbian-gcce/qmake.conf
@@ -0,0 +1,93 @@
+#
+# qmake configuration for symbian-gcce
+#
+
+include(../common/symbian/symbian-makefile.conf)
+
+include(../common/g++-unix.conf)
+include(../common/gcc-base-unix.conf)
+
+QMAKE_CC = arm-none-symbianelf-gcc
+QMAKE_CXX = arm-none-symbianelf-g++
+QMAKE_LINK = arm-none-symbianelf-ld
+QMAKE_LINK_SHLIB = arm-none-symbianelf-ld
+QMAKE_LINK_C = arm-none-symbianelf-ld
+QMAKE_LINK_C_SHLIB = arm-none-symbianelf-ld
+QMAKE_AR = arm-none-symbianelf-ar cqs
+
+# gcce defaults to 'arm' instruction set. Lets use the better 'thumb' if possible
+# notice that the middle part of the following set of vars matches the TARGET content of the libs
+
+QMAKE_qtmain_CXXFLAGS = -mthumb
+QMAKE_QtCore_CXXFLAGS = -mthumb
+QMAKE_QtGui_LFLAGS = -Ttext 0x8000 -Tdata 0xE00000
+QMAKE_QtDBus_CXXFLAGS = -mthumb
+QMAKE_QtDeclarative_CXXFLAGS = -mthumb
+QMAKE_QtMultimedia_CXXFLAGS = -mthumb
+QMAKE_QtNetwork_CXXFLAGS = -mthumb
+QMAKE_QtOpenGL_CXXFLAGS = -mthumb
+QMAKE_QtOpenVG_CXXFLAGS = -mthumb
+QMAKE_phonon_CXXFLAGS = -mthumb
+QMAKE_QtScript_CXXFLAGS = -mthumb
+QMAKE_QtScriptTools_CXXFLAGS = -mthumb
+QMAKE_QtSql_CXXFLAGS = -mthumb
+QMAKE_QtSvg_CXXFLAGS = -mthumb
+QMAKE_QtTest_CXXFLAGS = -mthumb
+QMAKE_QtXmlPatterns_CXXFLAGS = -mthumb
+QMAKE_QtXml_CXXFLAGS = -mthumb
+#TODO fails with; arm-none-symbianelf-ld: section .data loaded at [00e00000,00e05973] overlaps section .text loaded at [00008000,00fe748b]
+QMAKE_QtWebKit_LFLAGS = -Ttext 0x8000 -Tdata 0xE00000
+
+# never use -fPIC, gcce-linker doesn't like it.
+# g++ conf above adds it if the host platform is 64 bit, so we remove it again
+QMAKE_CFLAGS_SHLIB -= -fPIC
+QMAKE_CFLAGS_STATIC_LIB -= -fPIC
+QMAKE_CXXFLAGS_SHLIB -= -fPIC
+QMAKE_CXXFLAGS_STATIC_LIB -= -fPIC
+
+QMAKE_LFLAGS_SONAME =
+#QMAKE_LFLAGS_THREAD +=
+#QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined
+QMAKE_LFLAGS_RPATH = --rpath=
+
+DEFINES += __GCCE__ \
+ UNICODE
+
+QMAKE_LFLAGS_APP += --entry=_E32Startup -u _E32Startup
+QMAKE_LFLAGS_SHLIB += -shared --default-symver --entry _E32Dll
+QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB
+
+gcceExtraFlags = --include=$${EPOCROOT}epoc32/include/gcce/gcce.h -march=armv5t -mapcs -mthumb-interwork -nostdinc -c -msoft-float -T script
+QMAKE_CFLAGS += $${gcceExtraFlags}
+QMAKE_CXXFLAGS += $${gcceExtraFlags} -x c++ -fexceptions -fno-unit-at-a-time -fvisibility-inlines-hidden
+#If we are not going to link to Qt or qtmain.lib, we need to include this at least once.
+isEmpty(QT):contains(TEMPLATE, app) {
+ QMAKE_CXXFLAGS += --include=$${EPOCROOT}epoc32/include/stdapis/staticlibinit_gcce.h
+}
+
+QMAKE_LFLAGS += --target1-abs \
+ --no-undefined \
+ --nostdlib
+
+QMAKE_LIBDIR += $${EPOCROOT}epoc32/release/armv5/udeb/
+
+# g++ knows the path to the gcc-shipped-libs, ld doesn't. So cache the full path in the generate Makefile
+QMAKE_GCC_SEARCH_DIRS =$$system($$QMAKE_CXX -print-search-dirs)
+for(line, QMAKE_GCC_SEARCH_DIRS) {
+ contains(line, "libraries:") {
+ foundIt="1"
+ } else {
+ contains(foundIt, "1") {
+ QMAKE_LFLAGS += $$replace(line, "[=:]", " -L")
+ }
+ }
+}
+
+QMAKE_LIBDIR += $${EPOCROOT}epoc32/release/armv5/lib
+
+INCLUDEPATH = $${EPOCROOT}epoc32/include/ \
+ $${EPOCROOT}epoc32/include/variant \
+ $${EPOCROOT}epoc32/include/stdapis \
+ $${EPOCROOT}epoc32/include/gcce \
+ $$INCLUDEPATH
+
diff --git a/mkspecs/symbian-gcce/qplatformdefs.h b/mkspecs/symbian-gcce/qplatformdefs.h
new file mode 100644
index 0000000..8549347
--- /dev/null
+++ b/mkspecs/symbian-gcce/qplatformdefs.h
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** 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 mkspecs 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 "../common/symbian/qplatformdefs.h"
+
diff --git a/mkspecs/symbian-sbsv2/flm/qt/qmake_emulator_deployment.flm b/mkspecs/symbian-sbsv2/flm/qt/qmake_emulator_deployment.flm
index 3877edb..a557cbb 100644
--- a/mkspecs/symbian-sbsv2/flm/qt/qmake_emulator_deployment.flm
+++ b/mkspecs/symbian-sbsv2/flm/qt/qmake_emulator_deployment.flm
@@ -21,7 +21,7 @@ CLEAN_TARGET:=$(1)
$(1): $(2)
$(call startrule,qmake_emulator_deployment) \
- $(GNUCP) --no-preserve=mode $(2) "$$@" && \
+ $(GNUCP) --remove-destination --no-preserve=mode $(2) "$$@" && \
$(GNUCHMOD) a+rw "$$@" \
$(call endrule,qmake_emulator_deployment)
endef
diff --git a/mkspecs/symbian-sbsv2/flm/qt/qmake_extra_pre_targetdep.flm b/mkspecs/symbian-sbsv2/flm/qt/qmake_extra_pre_targetdep.flm
index 1338515..2dc4028 100644
--- a/mkspecs/symbian-sbsv2/flm/qt/qmake_extra_pre_targetdep.flm
+++ b/mkspecs/symbian-sbsv2/flm/qt/qmake_extra_pre_targetdep.flm
@@ -12,6 +12,10 @@ SINGLETON:=$(call sanitise,TARGET_$(PREDEP_TARGET))
$(call makepathfor,$(PREDEP_TARGET))
+ifeq ($(patsubst /epoc32/%,MATCH,$(firstword $(COMMAND))),MATCH)
+COMMAND:=$(EPOCROOT)$(COMMAND)
+endif
+
define qmake_extra_pre_targetdep
EXPORT:: $(PREDEP_TARGET)
diff --git a/mkspecs/symbian/linux-armcc/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf
deleted file mode 100644
index f058421..0000000
--- a/mkspecs/symbian/linux-armcc/qmake.conf
+++ /dev/null
@@ -1,62 +0,0 @@
-#
-# qmake configuration for symbian/linux-armcc
-#
-
-include(../../common/symbian/symbian-makefile.conf)
-
-include(../../common/armcc.conf)
-
-QMAKE_RVCT_LINKSTYLE = 1
-
-# notice that the middle part of the following set of vars matches the TARGET content of the libs
-
-#QMAKE_qtmain_CXXFLAGS = --arm
-#QMAKE_QtCore_CXXFLAGS =
-QMAKE_QtGui_LFLAGS = "--rw-base 0x800000"
-#QMAKE_QtDBus_CXXFLAGS =
-#QMAKE_QtDeclarative_CXXFLAGS =
-#QMAKE_QtMultimedia_CXXFLAGS =
-#QMAKE_QtNetwork_CXXFLAGS =
-#QMAKE_QtOpenGL_CXXFLAGS =
-#QMAKE_QtOpenVG_CXXFLAGS =
-#QMAKE_phonon_CXXFLAGS =
-#QMAKE_QtScript_CXXFLAGS =
-#QMAKE_QtScriptTools_CXXFLAGS =
-#QMAKE_QtSql_CXXFLAGS =
-#QMAKE_QtSvg_CXXFLAGS =
-#QMAKE_QtTest_CXXFLAGS =
-#QMAKE_QtXmlPatterns_CXXFLAGS =
-#QMAKE_QtXml_CXXFLAGS =
-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 --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
-QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB
-
-DEFINES += EKA2 \
- __ARMCC__ \
- __ARMcc_2__ \
- __ARMCC_2_2__
-
-QMAKE_LIBDIR += $${EPOCROOT}epoc32/release/armv5/lib
-QMAKE_LIBDIR *= $$(RVCT22LIB)
-
-INCLUDEPATH = $${EPOCROOT}epoc32/include \
- $${EPOCROOT}epoc32/include/variant \
- $${EPOCROOT}epoc32/include/stdapis \
- $$INCLUDEPATH
-
-exists($${EPOCROOT}epoc32/include/rvct2_2) {
- INCLUDEPATH += $${EPOCROOT}epoc32/include/rvct2_2
- QMAKE_CFLAGS += --preinclude rvct2_2.h
- QMAKE_CXXFLAGS += --preinclude rvct2_2.h
-} else {
- INCLUDEPATH += $${EPOCROOT}epoc32/include/rvct
- QMAKE_CFLAGS += --preinclude rvct.h
- QMAKE_CXXFLAGS += --preinclude rvct.h
-}
diff --git a/mkspecs/symbian/linux-armcc/qplatformdefs.h b/mkspecs/symbian/linux-armcc/qplatformdefs.h
deleted file mode 100644
index 3b7d023..0000000
--- a/mkspecs/symbian/linux-armcc/qplatformdefs.h
+++ /dev/null
@@ -1,42 +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 mkspecs 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 "../../common/symbian/qplatformdefs.h"
diff --git a/mkspecs/symbian/linux-gcce/qmake.conf b/mkspecs/symbian/linux-gcce/qmake.conf
deleted file mode 100644
index faac2f1..0000000
--- a/mkspecs/symbian/linux-gcce/qmake.conf
+++ /dev/null
@@ -1,95 +0,0 @@
-#
-# qmake configuration for symbian/linux-gcce
-#
-
-include(../../common/symbian/symbian-makefile.conf)
-
-include(../../common/g++.conf)
-
-QMAKE_CC = arm-none-symbianelf-gcc
-QMAKE_CXX = arm-none-symbianelf-g++
-QMAKE_LINK = arm-none-symbianelf-ld
-QMAKE_LINK_SHLIB = arm-none-symbianelf-ld
-QMAKE_LINK_C = arm-none-symbianelf-ld
-QMAKE_LINK_C_SHLIB = arm-none-symbianelf-ld
-QMAKE_AR = arm-none-symbianelf-ar cqs
-
-# gcce defaults to 'arm' instruction set. Lets use the better 'thumb' if possible
-# notice that the middle part of the following set of vars matches the TARGET content of the libs
-
-QMAKE_qtmain_CXXFLAGS = -mthumb
-QMAKE_QtCore_CXXFLAGS = -mthumb
-QMAKE_QtGui_LFLAGS = -Ttext 0x8000 -Tdata 0xE00000
-QMAKE_QtDBus_CXXFLAGS = -mthumb
-QMAKE_QtDeclarative_CXXFLAGS = -mthumb
-QMAKE_QtMultimedia_CXXFLAGS = -mthumb
-QMAKE_QtNetwork_CXXFLAGS = -mthumb
-QMAKE_QtOpenGL_CXXFLAGS = -mthumb
-QMAKE_QtOpenVG_CXXFLAGS = -mthumb
-QMAKE_phonon_CXXFLAGS = -mthumb
-QMAKE_QtScript_CXXFLAGS = -mthumb
-QMAKE_QtScriptTools_CXXFLAGS = -mthumb
-QMAKE_QtSql_CXXFLAGS = -mthumb
-QMAKE_QtSvg_CXXFLAGS = -mthumb
-QMAKE_QtTest_CXXFLAGS = -mthumb
-QMAKE_QtXmlPatterns_CXXFLAGS = -mthumb
-QMAKE_QtXml_CXXFLAGS = -mthumb
-#TODO fails with; arm-none-symbianelf-ld: section .data loaded at [00e00000,00e05973] overlaps section .text loaded at [00008000,00fe748b]
-QMAKE_QtWebKit_LFLAGS = -Ttext 0x8000 -Tdata 0xE00000
-
-# never use -fPIC, gcce-linker doesn't like it.
-# g++ conf above adds it if the host platform is 64 bit, so we remove it again
-QMAKE_CFLAGS_SHLIB -= -fPIC
-QMAKE_CFLAGS_STATIC_LIB -= -fPIC
-QMAKE_CXXFLAGS_SHLIB -= -fPIC
-QMAKE_CXXFLAGS_STATIC_LIB -= -fPIC
-
-QMAKE_LFLAGS_SONAME =
-#QMAKE_LFLAGS_THREAD +=
-#QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined
-QMAKE_LFLAGS_RPATH = --rpath=
-
-DEFINES += __GCCE__ \
- UNICODE \
- _STLP_NO_EXCEPTION_HEADER
-
-QMAKE_LFLAGS_APP += --entry=_E32Startup -u _E32Startup
-QMAKE_LFLAGS_SHLIB += --default-symver --entry _E32Dll
-QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB
-
-gcceExtraFlags = --include=${EPOCROOT}/epoc32/include/gcce/gcce.h -march=armv5t -mapcs -mthumb-interwork -nostdinc -c -msoft-float -T script
-QMAKE_CFLAGS += $${gcceExtraFlags}
-QMAKE_CXXFLAGS += $${gcceExtraFlags} -x c++ -fexceptions -fno-unit-at-a-time -fvisibility-inlines-hidden
-#If we are not going to link to Qt or qtmain.lib, we need to include this at least once.
-isEmpty(QT):contains(TEMPLATE, app) {
- QMAKE_CXXFLAGS += --include=${EPOCROOT}/epoc32/include/stdapis/staticlibinit_gcce.h
-}
-
-QMAKE_LFLAGS += --target1-abs \
- --no-undefined \
- --nostdlib
-
-QMAKE_LIBDIR += ${EPOCROOT}/epoc32/release/armv5/udeb/
-
-# g++ knows the path to the gcc-shipped-libs, ld doesn't. So cache the full path in the generate Makefile
-QMAKE_GCC_SEARCH_DIRS =$$system($$QMAKE_CXX -print-search-dirs)
-for(line, QMAKE_GCC_SEARCH_DIRS) {
- contains(line, "libraries:") {
- foundIt="1"
- } else {
- contains(foundIt, "1") {
- QMAKE_LFLAGS += $$replace(line, "[=:]", " -L")
- }
- }
-}
-
-QMAKE_LIBDIR += $${EPOCROOT}/epoc32/release/armv5/lib
-
-INCLUDEPATH = ${EPOCROOT}/epoc32/include/ \
- $${EPOCROOT}/epoc32/include/variant \
- $${EPOCROOT}/epoc32/include/stdapis \
- $${EPOCROOT}/epoc32/include/gcce \
- ${EPOCROOT}/epoc32/include/stdapis/sys \
- ${EPOCROOT}/epoc32/include/stdapis/stlport \
- $$INCLUDEPATH
-
diff --git a/mkspecs/symbian/linux-gcce/qplatformdefs.h b/mkspecs/symbian/linux-gcce/qplatformdefs.h
deleted file mode 100644
index fcbd9ea..0000000
--- a/mkspecs/symbian/linux-gcce/qplatformdefs.h
+++ /dev/null
@@ -1,43 +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 mkspecs 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 "../../common/symbian/qplatformdefs.h"
-
diff --git a/mkspecs/unsupported/linux-clang/qmake.conf b/mkspecs/unsupported/linux-clang/qmake.conf
new file mode 100644
index 0000000..6b63b7a
--- /dev/null
+++ b/mkspecs/unsupported/linux-clang/qmake.conf
@@ -0,0 +1,19 @@
+#
+# qmake configuration for linux-clang
+#
+
+MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
+TEMPLATE = app
+CONFIG += qt warn_on release incremental link_prl
+QT += core gui
+
+QMAKE_INCREMENTAL_STYLE = sublib
+
+include(../../common/linux.conf)
+include(../../common/gcc-base-unix.conf)
+include(../../common/clang.conf)
+
+QMAKE_LFLAGS += -ccc-gcc-name g++
+
+load(qt_config)
diff --git a/mkspecs/unsupported/linux-clang/qplatformdefs.h b/mkspecs/unsupported/linux-clang/qplatformdefs.h
new file mode 100644
index 0000000..2dd7b80
--- /dev/null
+++ b/mkspecs/unsupported/linux-clang/qplatformdefs.h
@@ -0,0 +1,102 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+// 1) need to reset default environment if _BSD_SOURCE is defined
+// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
+// 3) it seems older glibc need this to include the X/Open stuff
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+#include <features.h>
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#include "../../common/posix/qplatformdefs.h"
+
+#undef QT_SOCKLEN_T
+
+#if defined(__GLIBC__) && (__GLIBC__ >= 2)
+#define QT_SOCKLEN_T socklen_t
+#else
+#define QT_SOCKLEN_T int
+#endif
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+#endif
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/unsupported/linux-scratchbox2-g++/qmake.conf b/mkspecs/unsupported/linux-scratchbox2-g++/qmake.conf
index 28e7754..c362634 100644
--- a/mkspecs/unsupported/linux-scratchbox2-g++/qmake.conf
+++ b/mkspecs/unsupported/linux-scratchbox2-g++/qmake.conf
@@ -18,8 +18,9 @@ CONFIG += qt warn_on release incremental link_prl
QT += core gui
QMAKE_INCREMENTAL_STYLE = sublib
-include(../../common/g++.conf)
include(../../common/linux.conf)
+include(../../common/gcc-base-unix.conf)
+include(../../common/g++-unix.conf)
# modifications to g++.conf
QMAKE_CC = sb2 gcc
diff --git a/mkspecs/unsupported/macx-clang/Info.plist.app b/mkspecs/unsupported/macx-clang/Info.plist.app
new file mode 100644
index 0000000..393b615
--- /dev/null
+++ b/mkspecs/unsupported/macx-clang/Info.plist.app
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+<plist version="0.9">
+<dict>
+ <key>CFBundleIconFile</key>
+ <string>@ICON@</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleGetInfoString</key>
+ <string>Created by Qt/QMake</string>
+ <key>CFBundleSignature</key>
+ <string>@TYPEINFO@</string>
+ <key>CFBundleExecutable</key>
+ <string>@EXECUTABLE@</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.yourcompany.@EXECUTABLE@</string>
+ <key>NOTE</key>
+ <string>This file was generated by Qt/QMake.</string>
+</dict>
+</plist>
diff --git a/mkspecs/unsupported/macx-clang/Info.plist.lib b/mkspecs/unsupported/macx-clang/Info.plist.lib
new file mode 100644
index 0000000..97609ed
--- /dev/null
+++ b/mkspecs/unsupported/macx-clang/Info.plist.lib
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+<plist version="0.9">
+<dict>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleShortVersionString</key>
+ <string>@SHORT_VERSION@</string>
+ <key>CFBundleGetInfoString</key>
+ <string>Created by Qt/QMake</string>
+ <key>CFBundleSignature</key>
+ <string>@TYPEINFO@</string>
+ <key>CFBundleExecutable</key>
+ <string>@LIBRARY@</string>
+ <key>NOTE</key>
+ <string>Please, do NOT change this file -- It was generated by Qt/QMake.</string>
+</dict>
+</plist>
diff --git a/mkspecs/unsupported/macx-clang/qmake.conf b/mkspecs/unsupported/macx-clang/qmake.conf
new file mode 100644
index 0000000..3191344
--- /dev/null
+++ b/mkspecs/unsupported/macx-clang/qmake.conf
@@ -0,0 +1,21 @@
+#
+# qmake configuration for Clang on OS X
+#
+
+MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = macx
+TEMPLATE = app
+CONFIG += qt warn_on release app_bundle incremental global_init_link_order lib_version_first plugin_no_soname link_prl
+QT += core gui
+QMAKE_INCREMENTAL_STYLE = sublib
+
+include(../../common/mac.conf)
+include(../../common/gcc-base-macx.conf)
+include(../../common/clang.conf)
+
+QMAKE_OBJCFLAGS_PRECOMPILE = -x objective-c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
+QMAKE_OBJCXXFLAGS_PRECOMPILE = -x objective-c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
+
+load(qt_config)
diff --git a/mkspecs/unsupported/macx-clang/qplatformdefs.h b/mkspecs/unsupported/macx-clang/qplatformdefs.h
new file mode 100644
index 0000000..72f3ac7
--- /dev/null
+++ b/mkspecs/unsupported/macx-clang/qplatformdefs.h
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#define QT_NO_LIBRARY_UNLOAD
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#include "../../common/posix/qplatformdefs.h"
+
+#undef QT_OPEN_LARGEFILE
+#undef QT_SOCKLEN_T
+#undef QT_SIGNAL_IGNORE
+
+#define QT_OPEN_LARGEFILE 0
+
+#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
+#define QT_SOCKLEN_T socklen_t
+#else
+#define QT_SOCKLEN_T int
+#endif
+
+#define QT_SIGNAL_IGNORE (void (*)(int))1
+
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/unsupported/qnx-g++/qmake.conf b/mkspecs/unsupported/qnx-g++/qmake.conf
index dfe9bed..83c4a26 100644
--- a/mkspecs/unsupported/qnx-g++/qmake.conf
+++ b/mkspecs/unsupported/qnx-g++/qmake.conf
@@ -10,7 +10,8 @@ TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
-include(../common/g++.conf)
+include(../common/gcc-base-unix.conf)
+include(../common/g++-unix.conf)
include(../common/unix.conf)
QMAKE_CFLAGS_THREAD = -D_REENTRANT
diff --git a/mkspecs/unsupported/qws/linux-x86-openkode-g++/qmake.conf b/mkspecs/unsupported/qws/linux-x86-openkode-g++/qmake.conf
new file mode 100644
index 0000000..b891c5e
--- /dev/null
+++ b/mkspecs/unsupported/qws/linux-x86-openkode-g++/qmake.conf
@@ -0,0 +1,23 @@
+#
+# qmake configuration for building with linux-g++
+#
+
+include(../../../common/gcc-base-unix.conf)
+include(../../../common/g++-unix.conf)
+include(../../../common/linux.conf)
+include(../../../common/qws.conf)
+
+load(qt_config)
+
+# ### HACK - This should be a configure check
+OPENKODE_DIR = $(OPENKODE_DIR)
+
+QMAKE_INCDIR_OPENGL_ES2 = $${OPENKODE_DIR}/include
+QMAKE_LIBDIR_OPENGL_ES2 = $${OPENKODE_DIR}/lib-target
+QMAKE_LIBS_OPENGL_ES2 = $${QMAKE_RPATH}/$${OPENKODE_DIR}/lib-target -lGLESv2_CM
+
+QMAKE_INCDIR_EGL = $$QMAKE_INCDIR_OPENGL_ES2
+QMAKE_LIBDIR_EGL = $$QMAKE_LIBDIR_OPENGL_ES2
+QMAKE_LIBS_EGL = $${QMAKE_RPATH}/$${OPENKODE_DIR}/lib-target -lEGL
+
+QMAKE_LIBS += $${QMAKE_RPATH}/$${OPENKODE_DIR}/lib-target
diff --git a/mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h b/mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h
new file mode 100644
index 0000000..86d84e8
--- /dev/null
+++ b/mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $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 "../../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/unsupported/qws/qnx-generic-g++/qmake.conf b/mkspecs/unsupported/qws/qnx-generic-g++/qmake.conf
index 26de9b7..bb760b2 100644
--- a/mkspecs/unsupported/qws/qnx-generic-g++/qmake.conf
+++ b/mkspecs/unsupported/qws/qnx-generic-g++/qmake.conf
@@ -61,7 +61,6 @@ QMAKE_PCH_OUTPUT_EXT = .gch
QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions
QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list,
-#include(../../common/g++.conf)
include(../../common/unix.conf)
QMAKE_CFLAGS_THREAD = -D_REENTRANT
diff --git a/mkspecs/unsupported/vxworks-ppc-g++/qmake.conf b/mkspecs/unsupported/vxworks-ppc-g++/qmake.conf
index 80b5f3e..7a77c81 100644
--- a/mkspecs/unsupported/vxworks-ppc-g++/qmake.conf
+++ b/mkspecs/unsupported/vxworks-ppc-g++/qmake.conf
@@ -14,7 +14,8 @@ VXWORKS_ARCH = ppc
VXWORKS_CPU = PPC32
VXWORKS_ARCH_MUNCH = ppc
-include(../../common/g++.conf)
+include(../../common/gcc-base-unix.conf)
+include(../../common/g++-unix.conf)
include(../../common/linux.conf)
QMAKE_CC = cc$$VXWORKS_ARCH_MUNCH
diff --git a/mkspecs/unsupported/vxworks-simpentium-g++/qmake.conf b/mkspecs/unsupported/vxworks-simpentium-g++/qmake.conf
index 83f46c0..2a96a1a 100644
--- a/mkspecs/unsupported/vxworks-simpentium-g++/qmake.conf
+++ b/mkspecs/unsupported/vxworks-simpentium-g++/qmake.conf
@@ -14,7 +14,8 @@ VXWORKS_ARCH = simlinux
VXWORKS_CPU = SIMLINUX
VXWORKS_ARCH_MUNCH = pentium
-include(../../common/g++.conf)
+include(../../common/gcc-base-unix.conf)
+include(../../common/g++-unix.conf)
include(../../common/linux.conf)
QMAKE_CC = cc$$VXWORKS_ARCH_MUNCH
diff --git a/mkspecs/win32-msvc2003/qmake.conf b/mkspecs/win32-msvc2003/qmake.conf
index 63d1ffd..a573a4d 100644
--- a/mkspecs/win32-msvc2003/qmake.conf
+++ b/mkspecs/win32-msvc2003/qmake.conf
@@ -53,7 +53,7 @@ QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<<
QMAKE_LINK = link
QMAKE_LFLAGS = /NOLOGO
QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO
-QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /INCREMENTAL:NO /DEBUG
+QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /DEBUG /OPT:REF
QMAKE_LFLAGS_DEBUG = /DEBUG
QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE
QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS
diff --git a/mkspecs/win32-msvc2005/qmake.conf b/mkspecs/win32-msvc2005/qmake.conf
index 265d028..aa58e30 100644
--- a/mkspecs/win32-msvc2005/qmake.conf
+++ b/mkspecs/win32-msvc2005/qmake.conf
@@ -55,7 +55,7 @@ QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<<
QMAKE_LINK = link
QMAKE_LFLAGS = /NOLOGO
QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO
-QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /INCREMENTAL:NO /DEBUG
+QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /DEBUG /OPT:REF
QMAKE_LFLAGS_DEBUG = /DEBUG
QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE
QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS \"/MANIFESTDEPENDENCY:type=\'win32\' name=\'Microsoft.Windows.Common-Controls\' version=\'6.0.0.0\' publicKeyToken=\'6595b64144ccf1df\' language=\'*\' processorArchitecture=\'*\'\"
diff --git a/mkspecs/win32-msvc2008/qmake.conf b/mkspecs/win32-msvc2008/qmake.conf
index 1432645..ee7b99a 100644
--- a/mkspecs/win32-msvc2008/qmake.conf
+++ b/mkspecs/win32-msvc2008/qmake.conf
@@ -57,7 +57,7 @@ QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<<
QMAKE_LINK = link
QMAKE_LFLAGS = /NOLOGO
QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO
-QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /INCREMENTAL:NO /DEBUG
+QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /DEBUG /OPT:REF
QMAKE_LFLAGS_DEBUG = /DEBUG
QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE
QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS \"/MANIFESTDEPENDENCY:type=\'win32\' name=\'Microsoft.Windows.Common-Controls\' version=\'6.0.0.0\' publicKeyToken=\'6595b64144ccf1df\' language=\'*\' processorArchitecture=\'*\'\"
diff --git a/mkspecs/win32-msvc2010/qmake.conf b/mkspecs/win32-msvc2010/qmake.conf
index 84086e2..44e460e 100644
--- a/mkspecs/win32-msvc2010/qmake.conf
+++ b/mkspecs/win32-msvc2010/qmake.conf
@@ -57,7 +57,7 @@ QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<<
QMAKE_LINK = link
QMAKE_LFLAGS = /NOLOGO
QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO
-QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /INCREMENTAL:NO /DEBUG
+QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /DEBUG /OPT:REF
QMAKE_LFLAGS_DEBUG = /DEBUG
QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE
QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS \"/MANIFESTDEPENDENCY:type=\'win32\' name=\'Microsoft.Windows.Common-Controls\' version=\'6.0.0.0\' publicKeyToken=\'6595b64144ccf1df\' language=\'*\' processorArchitecture=\'*\'\"
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp
index aa55f51..c659adb 100644
--- a/qmake/generators/mac/pbuilder_pbx.cpp
+++ b/qmake/generators/mac/pbuilder_pbx.cpp
@@ -167,6 +167,7 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t)
}
if(tmp_proj.read(fn)) {
if(Option::debug_level) {
+ debug_msg(1, "Dumping all variables:");
QMap<QString, QStringList> &vars = tmp_proj.variables();
for(QMap<QString, QStringList>::Iterator it = vars.begin();
it != vars.end(); ++it) {
diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp
index e98831d..df05550 100644
--- a/qmake/generators/metamakefile.cpp
+++ b/qmake/generators/metamakefile.cpp
@@ -217,6 +217,7 @@ BuildsMetaMakefileGenerator::write(const QString &oldpwd)
// debugging
if(Option::debug_level) {
+ debug_msg(1, "Dumping all variables:");
QMap<QString, QStringList> &vars = project->variables();
for(QMap<QString, QStringList>::Iterator it = vars.begin(); it != vars.end(); ++it) {
if(!it.key().startsWith(".") && !it.value().isEmpty())
diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.cpp b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
index 5a6f66f..eb45b10 100644
--- a/qmake/generators/symbian/initprojectdeploy_symbian.cpp
+++ b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
@@ -59,7 +59,12 @@
static QString fixPathToEpocOS(const QString &src)
{
QString ret = Option::fixPathToTargetOS(src);
- return ret.replace('/', '\\');
+
+ bool pathHasDriveLetter = false;
+ if (ret.size() > 1)
+ pathHasDriveLetter = (ret.at(1) == QLatin1Char(':'));
+
+ return pathHasDriveLetter ? ret.replace('/', '\\') : QDir::toNativeSeparators(ret);
}
static bool isPlugin(const QFileInfo& info, const QString& devicePath)
@@ -250,7 +255,8 @@ void initProjectDeploySymbian(QMakeProject* project,
QStringList flags = project->values(item + ".flags");
- foreach(QString source, project->values(item + ".sources")) {
+ // ### Qt 5: remove .sources, inconsistent with INSTALLS
+ foreach(QString source, project->values(item + ".sources") + project->values(item + ".files")) {
source = Option::fixPathToLocalOS(source);
QString nameFilter;
QFileInfo info(source);
diff --git a/qmake/generators/symbian/symbian_makefile.h b/qmake/generators/symbian/symbian_makefile.h
index 94f0145..63cede2 100644
--- a/qmake/generators/symbian/symbian_makefile.h
+++ b/qmake/generators/symbian/symbian_makefile.h
@@ -72,7 +72,9 @@ public:
} else {
const QStringList deployments = this->project->values("DEPLOYMENT");
for (int i = 0; i < deployments.count(); ++i) {
- if (!this->project->values(deployments.at(i) + ".sources").isEmpty()) {
+ // ### Qt 5: remove .sources, inconsistent with INSTALLS
+ if (!this->project->values(deployments.at(i) + ".sources").isEmpty() ||
+ !this->project->values(deployments.at(i) + ".files").isEmpty()) {
generatePkg = true;
break;
}
diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp
index 0938b58..9d4f27e 100644
--- a/qmake/generators/symbian/symbiancommon.cpp
+++ b/qmake/generators/symbian/symbiancommon.cpp
@@ -699,7 +699,7 @@ void SymbianCommonGenerator::readRssRules(QString &numberOfIcons,
newValues << itemList.join("\n");
}
}
- // Verify thet there is exactly one value in RSS_TAG_NBROFICONS
+ // Verify that there is exactly one value in RSS_TAG_NBROFICONS
if (newKey == RSS_TAG_NBROFICONS) {
if (newValues.count() == 1) {
numberOfIcons = newValues[0];
@@ -708,7 +708,7 @@ void SymbianCommonGenerator::readRssRules(QString &numberOfIcons,
RSS_RULES_BASE, RSS_TAG_NBROFICONS);
continue;
}
- // Verify thet there is exactly one value in RSS_TAG_ICONFILE
+ // Verify that there is exactly one value in RSS_TAG_ICONFILE
} else if (newKey == RSS_TAG_ICONFILE) {
if (newValues.count() == 1) {
iconFile = newValues[0];
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index 09a3fc8..0d63cdf 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -197,7 +197,9 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
generatePkg = true;
} else {
foreach(QString item, project->values("DEPLOYMENT")) {
- if (!project->values(item + ".sources").isEmpty()) {
+ // ### Qt 5: remove .sources, inconsistent with INSTALLS
+ if (!project->values(item + ".sources").isEmpty() ||
+ !project->values(item + ".files").isEmpty()) {
generatePkg = true;
break;
}
diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp
index 7416cbe..f895109 100644
--- a/qmake/generators/symbian/symmake_abld.cpp
+++ b/qmake/generators/symbian/symmake_abld.cpp
@@ -205,8 +205,11 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
#ifdef Q_OS_WIN32
t << "XCOPY = xcopy /d /f /h /r /y /i" << endl;
t << "ABLD = ABLD.BAT" << endl;
+#elif defined(Q_OS_MAC)
+ t << "XCOPY = cp -R -v" << endl;
+ t << "ABLD = abld" << endl;
#else
- t << "XCOPY = cp -u -v" << endl;
+ t << "XCOPY = cp -R -u -v" << endl;
t << "ABLD = abld" << endl;
#endif
t << "DEBUG_PLATFORMS = " << debugPlatforms.join(" ") << endl;
@@ -427,7 +430,8 @@ bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t, bool i
t << WINSCW_DEPLOYMENT_TARGET ":" << endl;
QString remoteTestPath = epocRoot()
- + QLatin1String(isRom ? "epoc32\\data\\z\\private\\" : "epoc32\\winscw\\c\\private\\")
+ + QDir::toNativeSeparators(QLatin1String(isRom ? "epoc32/data/z/private/"
+ : "epoc32/winscw/c/private/"))
+ privateDirUid;
DeploymentList depList;
@@ -439,11 +443,21 @@ bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t, bool i
t << "\t-echo Deploying changed files..." << endl;
for (int i = 0; i < depList.size(); ++i) {
+#ifdef Q_OS_WIN32
// Xcopy prompts for selecting file or directory if target doesn't exist,
// and doesn't provide switch to force file selection. It does provide dir forcing, though,
// so strip the last part of the destination.
t << "\t-$(XCOPY) \"" << depList.at(i).from << "\" \""
<< depList.at(i).to.left(depList.at(i).to.lastIndexOf("\\") + 1) << "\"" << endl;
+#else
+ QString dirExists = var("QMAKE_CHK_DIR_EXISTS");
+ QString mkdir = var("QMAKE_MKDIR");
+ QString dir = QFileInfo(depList.at(i).to).dir().path();
+ t << "\t-@ " << dirExists << " \"" << dir << "\" || "
+ << mkdir << " \"" << dir << "\"" << endl;
+ t << "\t-$(XCOPY) \"" << QDir::toNativeSeparators(depList.at(i).from) << "\" \""
+ << QDir::toNativeSeparators(depList.at(i).to) << "\"" << endl;
+#endif
}
t << endl;
@@ -455,7 +469,7 @@ bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t, bool i
QStringList cleanList;
for (int i = 0; i < depList.size(); ++i) {
- cleanList.append(depList.at(i).to);
+ cleanList.append(QDir::toNativeSeparators(depList.at(i).to));
}
generateCleanCommands(t, cleanList, "$(DEL_FILE)", "", "", "");
diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp
index 32c31ee..d650e08 100644
--- a/qmake/generators/symbian/symmake_sbsv2.cpp
+++ b/qmake/generators/symbian/symmake_sbsv2.cpp
@@ -120,7 +120,7 @@ void SymbianSbsv2MakefileGenerator::findInstalledCompilerVersions(const QString
&& fileInfo(matcher.cap(matcher.captureCount())).exists()) {
// First capture (index 0) is the whole match, which is skipped.
// Next n captures are version numbers, which are interesting.
- // Final capture is the env var value, which we alrady used, so that is skipped, too.
+ // Final capture is the env var value, which we already used, so that is skipped, too.
int capture = 1;
int finalCapture = matcher.captureCount() - 1;
QString version = versionPrefix;
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index 71a6061..43543a1 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -206,6 +206,33 @@ UnixMakefileGenerator::init()
// icc style
pchFlags = pchFlags.replace("${QMAKE_PCH_OUTPUT}",
pchBaseName + project->first("QMAKE_PCH_OUTPUT_EXT"));
+ } else {
+ // gcc style (including clang_pch_style)
+ QString headerPrefix = project->first("QMAKE_PRECOMP_PREFIX");
+ QString headerSuffix;
+ if (project->isActiveConfig("clang_pch_style"))
+ headerSuffix = project->first("QMAKE_PCH_OUTPUT_EXT");
+ else
+ pchBaseName += project->first("QMAKE_PCH_OUTPUT_EXT");
+
+ pchBaseName += Option::dir_sep;
+ QString pchOutputFile;
+
+ if(comps[i] == "C") {
+ pchOutputFile = "c";
+ } else if(comps[i] == "CXX") {
+ pchOutputFile = "c++";
+ } else if(project->isActiveConfig("objective_c")) {
+ if(comps[i] == "OBJC")
+ pchOutputFile = "objective-c";
+ else if(comps[i] == "OBJCXX")
+ pchOutputFile = "objective-c++";
+ }
+
+ if(!pchOutputFile.isEmpty()) {
+ pchFlags = pchFlags.replace("${QMAKE_PCH_OUTPUT}",
+ pchBaseName + pchOutputFile + headerSuffix);
+ }
}
if (!pchFlags.isEmpty())
@@ -379,7 +406,9 @@ QStringList
QString header_prefix;
if(!project->isEmpty("PRECOMPILED_DIR"))
header_prefix = project->first("PRECOMPILED_DIR");
- header_prefix += project->first("QMAKE_ORIG_TARGET") + project->first("QMAKE_PCH_OUTPUT_EXT");
+ header_prefix += project->first("QMAKE_ORIG_TARGET");
+ if (!project->isActiveConfig("clang_pch_style"))
+ header_prefix += project->first("QMAKE_PCH_OUTPUT_EXT");
if (project->isActiveConfig("icc_pch_style")) {
// icc style
for(QStringList::Iterator it = Option::cpp_ext.begin(); it != Option::cpp_ext.end(); ++it) {
@@ -389,23 +418,25 @@ QStringList
}
}
} else {
- // gcc style
+ // gcc style (including clang_pch_style)
+ QString header_suffix = project->isActiveConfig("clang_pch_style")
+ ? project->first("QMAKE_PCH_OUTPUT_EXT") : "";
header_prefix += Option::dir_sep + project->first("QMAKE_PRECOMP_PREFIX");
for(QStringList::Iterator it = Option::c_ext.begin(); it != Option::c_ext.end(); ++it) {
if(file.endsWith(*it)) {
if(!project->isEmpty("QMAKE_CFLAGS_PRECOMPILE")) {
- QString precomp_c_h = header_prefix + "c";
+ QString precomp_c_h = header_prefix + "c" + header_suffix;
if(!ret.contains(precomp_c_h))
ret += precomp_c_h;
}
if(project->isActiveConfig("objective_c")) {
if(!project->isEmpty("QMAKE_OBJCFLAGS_PRECOMPILE")) {
- QString precomp_objc_h = header_prefix + "objective-c";
+ QString precomp_objc_h = header_prefix + "objective-c" + header_suffix;
if(!ret.contains(precomp_objc_h))
ret += precomp_objc_h;
}
if(!project->isEmpty("QMAKE_OBJCXXFLAGS_PRECOMPILE")) {
- QString precomp_objcpp_h = header_prefix + "objective-c++";
+ QString precomp_objcpp_h = header_prefix + "objective-c++" + header_suffix;
if(!ret.contains(precomp_objcpp_h))
ret += precomp_objcpp_h;
}
@@ -416,13 +447,13 @@ QStringList
for(QStringList::Iterator it = Option::cpp_ext.begin(); it != Option::cpp_ext.end(); ++it) {
if(file.endsWith(*it)) {
if(!project->isEmpty("QMAKE_CXXFLAGS_PRECOMPILE")) {
- QString precomp_cpp_h = header_prefix + "c++";
+ QString precomp_cpp_h = header_prefix + "c++" + header_suffix;
if(!ret.contains(precomp_cpp_h))
ret += precomp_cpp_h;
}
if(project->isActiveConfig("objective_c")) {
if(!project->isEmpty("QMAKE_OBJCXXFLAGS_PRECOMPILE")) {
- QString precomp_objcpp_h = header_prefix + "objective-c++";
+ QString precomp_objcpp_h = header_prefix + "objective-c++" + header_suffix;
if(!ret.contains(precomp_objcpp_h))
ret += precomp_objcpp_h;
}
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index d16cd6b..7c68316 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -835,7 +835,9 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
if(!project->isEmpty("PRECOMPILED_DIR"))
precomph_out_dir = project->first("PRECOMPILED_DIR");
- precomph_out_dir += project->first("QMAKE_ORIG_TARGET") + project->first("QMAKE_PCH_OUTPUT_EXT");
+ precomph_out_dir += project->first("QMAKE_ORIG_TARGET");
+ if (!project->isActiveConfig("clang_pch_style"))
+ precomph_out_dir += project->first("QMAKE_PCH_OUTPUT_EXT");
if (project->isActiveConfig("icc_pch_style")) {
// icc style
@@ -849,19 +851,22 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
precomp_files << precomph_out_dir << sourceFile << objectFile;
} else {
- // gcc style
+ // gcc style (including clang_pch_style)
precomph_out_dir += Option::dir_sep;
QString header_prefix = project->first("QMAKE_PRECOMP_PREFIX");
+ QString header_suffix = project->isActiveConfig("clang_pch_style")
+ ? project->first("QMAKE_PCH_OUTPUT_EXT") : "";
+
if(!project->isEmpty("QMAKE_CFLAGS_PRECOMPILE"))
- precomp_files += precomph_out_dir + header_prefix + "c";
+ precomp_files += precomph_out_dir + header_prefix + "c" + header_suffix;
if(!project->isEmpty("QMAKE_CXXFLAGS_PRECOMPILE"))
- precomp_files += precomph_out_dir + header_prefix + "c++";
+ precomp_files += precomph_out_dir + header_prefix + "c++" + header_suffix;
if(project->isActiveConfig("objective_c")) {
if(!project->isEmpty("QMAKE_OBJCFLAGS_PRECOMPILE"))
- precomp_files += precomph_out_dir + header_prefix + "objective-c";
+ precomp_files += precomph_out_dir + header_prefix + "objective-c" + header_suffix;
if(!project->isEmpty("QMAKE_OBJCXXFLAGS_PRECOMPILE"))
- precomp_files += precomph_out_dir + header_prefix + "objective-c++";
+ precomp_files += precomph_out_dir + header_prefix + "objective-c++" + header_suffix;
}
}
t << "-$(DEL_FILE) " << precomp_files.join(" ") << "\n\t";
@@ -930,7 +935,9 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
QString pchOutput;
if(!project->isEmpty("PRECOMPILED_DIR"))
pchOutput = project->first("PRECOMPILED_DIR");
- pchOutput += pchBaseName + project->first("QMAKE_PCH_OUTPUT_EXT");
+ pchOutput += pchBaseName;
+ if (!project->isActiveConfig("clang_pch_style"))
+ pchOutput += project->first("QMAKE_PCH_OUTPUT_EXT");
if (project->isActiveConfig("icc_pch_style")) {
// icc style
@@ -943,9 +950,10 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
pchFlags = pchFlags.replace("${QMAKE_PCH_TEMP_SOURCE}", sourceFile)
.replace("${QMAKE_PCH_TEMP_OBJECT}", objectFile);
} else {
- // gcc style
+ // gcc style (including clang_pch_style)
QString header_prefix = project->first("QMAKE_PRECOMP_PREFIX");
-
+ QString header_suffix = project->isActiveConfig("clang_pch_style")
+ ? project->first("QMAKE_PCH_OUTPUT_EXT") : "";
pchOutput += Option::dir_sep;
QString pchOutputDir = pchOutput, pchOutputFile;
@@ -961,7 +969,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
}
if(pchOutputFile.isEmpty())
continue;
- pchOutput += header_prefix + pchOutputFile;
+ pchOutput += header_prefix + pchOutputFile + header_suffix;
t << pchOutput << ": " << pchInput << " " << findDependencies(pchInput).join(" \\\n\t\t")
<< "\n\t" << mkdir_p_asstring(pchOutputDir);
diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp
index d32b888..0678d86 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -215,7 +215,7 @@ void NmakeMakefileGenerator::init()
project->values("QMAKE_CLEAN").append(project->first("DESTDIR") + project->first("TARGET") + version + ".exp");
}
if(project->isActiveConfig("debug")) {
- project->values("QMAKE_CLEAN").append(project->first("DESTDIR") + project->first("TARGET") + version + ".pdb");
+ project->values("QMAKE_DISTCLEAN").append(project->first("DESTDIR") + project->first("TARGET") + version + ".pdb");
project->values("QMAKE_CLEAN").append(project->first("DESTDIR") + project->first("TARGET") + version + ".ilk");
project->values("QMAKE_CLEAN").append("vc*.pdb");
project->values("QMAKE_CLEAN").append("vc*.idb");
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp
index b20d2b7..834e5fd 100644
--- a/qmake/generators/win32/msvc_objectmodel.cpp
+++ b/qmake/generators/win32/msvc_objectmodel.cpp
@@ -2288,7 +2288,7 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info)
// Output in info.additionalFile -----------
if (!CustomBuildTool.Description.isEmpty())
- CustomBuildTool.Description += " & ";
+ CustomBuildTool.Description += ", ";
CustomBuildTool.Description += cmd_name;
CustomBuildTool.CommandLine += VCToolBase::fixCommandLine(cmd.trimmed());
int space = cmd.indexOf(' ');
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index 06b726f..fbaa6c2 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -459,6 +459,7 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
tmp_vcproj.setProjectFile(&tmp_proj);
Option::qmake_mode = old_mode;
if(Option::debug_level) {
+ debug_msg(1, "Dumping all variables:");
QMap<QString, QStringList> &vars = tmp_proj.variables();
for(QMap<QString, QStringList>::Iterator it = vars.begin();
it != vars.end(); ++it) {
@@ -1174,7 +1175,8 @@ void VcprojGenerator::initDeploymentTool()
devicePath = Option::fixPathToLocalOS(QDir::cleanPath(targetPath + QLatin1Char('\\') + devicePath));
}
// foreach d in item.sources
- foreach(QString source, project->values(item + ".sources")) {
+ // ### Qt 5: remove .sources, inconsistent with INSTALLS
+ foreach(QString source, project->values(item + ".sources") + project->values(item + ".files")) {
QString itemDevicePath = devicePath;
source = Option::fixPathToLocalOS(source);
QString nameFilter;
@@ -1551,10 +1553,10 @@ QString VcprojGenerator::fixFilename(QString ofile) const
if(slashfind == -1) {
ofile = ofile.replace('-', '_');
} else {
- int hypenfind = ofile.indexOf('-', slashfind);
- while (hypenfind != -1 && slashfind < hypenfind) {
- ofile = ofile.replace(hypenfind, 1, '_');
- hypenfind = ofile.indexOf('-', hypenfind + 1);
+ int hyphenfind = ofile.indexOf('-', slashfind);
+ while (hyphenfind != -1 && slashfind < hyphenfind) {
+ ofile = ofile.replace(hyphenfind, 1, '_');
+ hyphenfind = ofile.indexOf('-', hyphenfind + 1);
}
}
return ofile;
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index 58f21cb..ddfe399 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -651,7 +651,7 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t)
t << "DIST = " << varList("DISTFILES") << endl;
t << "QMAKE_TARGET = " << var("QMAKE_ORIG_TARGET") << endl;
- // The comment is important to maintain variable compatability with Unix
+ // The comment is important to maintain variable compatibility with Unix
// Makefiles, while not interpreting a trailing-slash as a linebreak
t << "DESTDIR = " << escapeFilePath(destDir) << " #avoid trailing-slash linebreak" << endl;
t << "TARGET = " << escapeFilePath(target) << endl;
diff --git a/qmake/project.cpp b/qmake/project.cpp
index 29d4242..5f5745a 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -76,7 +76,7 @@
QT_BEGIN_NAMESPACE
-//expand fucntions
+//expand functions
enum ExpandFunc { E_MEMBER=1, E_FIRST, E_LAST, E_CAT, E_FROMFILE, E_EVAL, E_LIST,
E_SPRINTF, E_JOIN, E_SPLIT, E_BASENAME, E_DIRNAME, E_SECTION,
E_FIND, E_SYSTEM, E_UNIQUE, E_QUOTE, E_ESCAPE_EXPAND,
@@ -677,7 +677,23 @@ QMakeProject::reset()
bool
QMakeProject::parse(const QString &t, QMap<QString, QStringList> &place, int numLines)
{
- QString s = t.simplified();
+ // To preserve the integrity of any UTF-8 characters in .pro file, temporarily replace the
+ // non-breaking space (0xA0) characters with another non-space character, so that
+ // QString::simplified() call will not replace it with space.
+ // Note: There won't be any two byte characters in .pro files, so 0x10A0 should be a safe
+ // replacement character.
+ static QChar nbsp(0xA0);
+ static QChar nbspFix(0x01A0);
+ QString s;
+ if (t.indexOf(nbsp) != -1) {
+ s = t;
+ s.replace(nbsp, nbspFix);
+ s = s.simplified();
+ s.replace(nbspFix, nbsp);
+ } else {
+ s = t.simplified();
+ }
+
int hash_mark = s.indexOf("#");
if(hash_mark != -1) //good bye comments
s = s.left(hash_mark);
@@ -1063,7 +1079,7 @@ QMakeProject::parse(const QString &t, QMap<QString, QStringList> &place, int num
#undef SKIP_WS
doVariableReplace(var, place);
- var = varMap(var); //backwards compatability
+ var = varMap(var); //backwards compatibility
if(!var.isEmpty() && Option::mkfile::do_preprocess) {
static QString last_file("*none*");
if(parser.file != last_file) {
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-buffer.h b/src/3rdparty/harfbuzz/src/harfbuzz-buffer.h
index 0d7c2c2..0d631b2 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-buffer.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-buffer.h
@@ -32,10 +32,6 @@
HB_BEGIN_HEADER
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(push, 1)
-#endif
-
typedef struct HB_GlyphItemRec_ {
HB_UInt gindex;
HB_UInt properties;
@@ -93,10 +89,6 @@ hb_buffer_add_glyph( HB_Buffer buffer,
HB_UInt properties,
HB_UInt cluster );
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(pop)
-#endif
-
HB_END_HEADER
#endif /* HARFBUZZ_BUFFER_H */
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gdef-private.h b/src/3rdparty/harfbuzz/src/harfbuzz-gdef-private.h
index 2a6d958..94e9b43 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-gdef-private.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-gdef-private.h
@@ -33,11 +33,6 @@
HB_BEGIN_HEADER
-
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(push, 1)
-#endif
-
/* Attachment related structures */
struct HB_AttachPoint_
@@ -126,10 +121,6 @@ _HB_GDEF_LoadMarkAttachClassDef_From_LookupFlags( HB_GDEFHeader* gdef,
HB_Lookup* lo,
HB_UShort num_lookups );
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(pop)
-#endif
-
HB_END_HEADER
#endif /* HARFBUZZ_GDEF_PRIVATE_H */
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gdef.h b/src/3rdparty/harfbuzz/src/harfbuzz-gdef.h
index f9a03dd..ccb6bf9 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-gdef.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-gdef.h
@@ -31,10 +31,6 @@
HB_BEGIN_HEADER
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(push, 1)
-#endif
-
/* GDEF glyph properties. Note that HB_GDEF_COMPONENT has no corresponding
* flag in the LookupFlag field. */
#define HB_GDEF_BASE_GLYPH 0x0002
@@ -131,10 +127,6 @@ HB_Error HB_GDEF_Build_ClassDefinition( HB_GDEFHeader* gdef,
HB_UShort* glyph_array,
HB_UShort* class_array );
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(pop)
-#endif
-
HB_END_HEADER
#endif /* HARFBUZZ_GDEF_H */
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-global.h b/src/3rdparty/harfbuzz/src/harfbuzz-global.h
index bccd6a2..d4e6b46 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-global.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-global.h
@@ -39,10 +39,6 @@
#define HB_END_HEADER /* nothing */
#endif
-#if defined(__GNUC__) || defined(_MSC_VER)
-#define HB_USE_PACKED_STRUCTS
-#endif
-
HB_BEGIN_HEADER
#ifndef FALSE
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h b/src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h
index 39f3159..63ba907 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h
@@ -32,10 +32,6 @@
HB_BEGIN_HEADER
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(push, 1)
-#endif
-
/* shared tables */
#define VR_X_PLACEMENT_DEVICE 0
@@ -720,10 +716,6 @@ HB_INTERNAL void
_HB_GPOS_Free_SubTable( HB_GPOS_SubTable* st,
HB_UShort lookup_type );
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(pop)
-#endif
-
HB_END_HEADER
#endif /* HARFBUZZ_GPOS_PRIVATE_H */
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gsub-private.h b/src/3rdparty/harfbuzz/src/harfbuzz-gsub-private.h
index 7eb329e..df0c3f6 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-gsub-private.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-gsub-private.h
@@ -32,10 +32,6 @@
HB_BEGIN_HEADER
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(push, 1)
-#endif
-
typedef union HB_GSUB_SubTable_ HB_GSUB_SubTable;
/* LookupType 1 */
@@ -474,10 +470,6 @@ HB_INTERNAL void
_HB_GSUB_Free_SubTable( HB_GSUB_SubTable* st,
HB_UShort lookup_type );
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(pop)
-#endif
-
HB_END_HEADER
#endif /* HARFBUZZ_GSUB_PRIVATE_H */
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gsub.h b/src/3rdparty/harfbuzz/src/harfbuzz-gsub.h
index b00df44..6e452bd 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-gsub.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-gsub.h
@@ -31,11 +31,6 @@
HB_BEGIN_HEADER
-
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(push, 1)
-#endif
-
/* Lookup types for glyph substitution */
#define HB_GSUB_LOOKUP_SINGLE 1
@@ -139,10 +134,6 @@ HB_Error HB_GSUB_Register_Alternate_Function( HB_GSUBHeader* gsub,
HB_Error HB_GSUB_Apply_String( HB_GSUBHeader* gsub,
HB_Buffer buffer );
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(pop)
-#endif
-
HB_END_HEADER
#endif /* HARFBUZZ_GSUB_H */
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp b/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp
index 4d8418b..4a618da 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp
@@ -37,7 +37,7 @@ static HB_Bool isLetter(HB_UChar16 ucs)
FLAG(HB_Letter_Titlecase) |
FLAG(HB_Letter_Modifier) |
FLAG(HB_Letter_Other);
- return FLAG(HB_GetUnicodeCharCategory(ucs)) & test;
+ return (FLAG(HB_GetUnicodeCharCategory(ucs)) & test) != 0;
}
static HB_Bool isMark(HB_UChar16 ucs)
@@ -660,18 +660,18 @@ static const unsigned char indicPosition[0xe00-0x900] = {
None, None, None, None,
None, None, None, None,
- None, None, None, None,
- None, None, None, None,
- None, None, None, None,
+ None, Below, Below, Below,
+ Below, Below, Below, Below,
+ Below, Below, None, Below,
- None, None, None, None,
- Below, None, None, None,
- Below, None, None, None,
+ Below, Below, Below, Below,
+ Below, Below, Below, Below,
+ Below, None, Below, Below,
Below, Below, Below, Post,
Below, None, Below, Below,
- None, None, None, None,
- None, None, None, None,
+ None, Below, Below, Below,
+ Below, Below, None, None,
None, None, Post, Above,
Post, Below, Below, Below,
@@ -833,7 +833,7 @@ static const unsigned char indicPosition[0xe00-0x900] = {
None, None, None, None,
None, None, None, Post,
- Post, None, Below, None,
+ Pre, None, Below, None,
None, Post, None, None,
None, None, None, None,
None, None, Post, Post,
@@ -1741,6 +1741,11 @@ static int indic_nextSyllableBoundary(HB_Script script, const HB_UChar16 *s, int
if (state == Halant && uc[pos] == 0x200d /* ZWJ */)
break;
// the control character should be the last char in the item
+ if (state == Consonant && script == HB_Script_Bengali && uc[pos-1] == 0x09B0 && uc[pos] == 0x200d /* ZWJ */)
+ break;
+ if (state == Consonant && script == HB_Script_Kannada && uc[pos-1] == 0x0CB0 && uc[pos] == 0x200d /* ZWJ */)
+ break;
+ // Bengali and Kannada has a special exception for rendering yaphala with ra (to avoid reph) see http://www.unicode.org/faq/indic.html#15
++pos;
goto finish;
case Consonant:
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-open.h b/src/3rdparty/harfbuzz/src/harfbuzz-open.h
index 4ba6cf5..9ad7c98 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-open.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-open.h
@@ -30,10 +30,6 @@
HB_BEGIN_HEADER
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(push, 1)
-#endif
-
/* Use this if a feature applies to all glyphs */
#define HB_ALL_GLYPHS 0xFFFF
@@ -279,10 +275,6 @@ enum HB_Type_
typedef enum HB_Type_ HB_Type;
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(pop)
-#endif
-
HB_END_HEADER
#endif /* HARFBUZZ_OPEN_H */
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h
index ab5c07a..470e27b 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h
@@ -34,10 +34,6 @@
HB_BEGIN_HEADER
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(push, 1)
-#endif
-
/*
using anything else than signed or unsigned for bitfields in C is non standard,
but accepted by almost all compilers. And it gives a significant reduction in
@@ -258,10 +254,6 @@ typedef struct HB_Font_ {
void *userData;
} HB_FontRec;
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(pop)
-#endif
-
typedef struct HB_ShaperItem_ HB_ShaperItem;
struct HB_ShaperItem_ {
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-stream.h b/src/3rdparty/harfbuzz/src/harfbuzz-stream.h
index a155cc2..cfbfb1c 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-stream.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-stream.h
@@ -30,10 +30,6 @@
HB_BEGIN_HEADER
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(push, 1)
-#endif
-
typedef struct HB_StreamRec_
{
HB_Byte* base;
@@ -42,10 +38,6 @@ typedef struct HB_StreamRec_
HB_UInt pos;
} HB_StreamRec;
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(pop)
-#endif
-
HB_END_HEADER
#endif
diff --git a/src/3rdparty/harfbuzz/tests/shaping/main.cpp b/src/3rdparty/harfbuzz/tests/shaping/main.cpp
index 28f8e07..73760a8 100644
--- a/src/3rdparty/harfbuzz/tests/shaping/main.cpp
+++ b/src/3rdparty/harfbuzz/tests/shaping/main.cpp
@@ -642,6 +642,10 @@ void tst_QScriptEngine::bengali()
{ { 0x9f1, 0x9cd, 0x9ad, 0x0 },
{ 0x191, 0x17d, 0x168, 0x0 } },
+ // Ra ZWJ Halant Ya
+ { { 0x09b0, 0x200d, 0x09cd, 0x09af, 0x0 },
+ { 0x016b, 0x01cf, 0x0 } },
+
{ {0}, {0} }
};
@@ -749,6 +753,13 @@ void tst_QScriptEngine::bengali()
{ { 0x09b0, 0x09cd, 0x09ac, 0x09cd, 0x09ac, 0x0 },
{ 0x013b, 0x00e1, 0x0 } },
+ // Init feature for vowel sign E should only be
+ // applied when it's initial character (QTBUG-13620)
+ { { 0x09a8, 0x09c7, 0x0 },
+ { 0x0232, 0x0086, 0x0 } },
+ { { 0x09a8, 0x09a8, 0x09c7, 0x0 },
+ { 0x0086, 0x009b, 0x0086, 0x0 } },
+
{ {0}, {0} }
};
@@ -847,6 +858,19 @@ void tst_QScriptEngine::oriya()
{ 0x177, 0x0 } },
{ { 0xb28, 0xb4d, 0xb24, 0xb4d, 0xb30, 0xb4d, 0xb2f, 0x0 },
{ 0x176, 0x124, 0x0 } },
+
+ // QTBUG-13542
+ { { 0x0b2c, 0x0b4d, 0x0b21, 0x0 },
+ { 0x0089, 0x00fc, 0x0 } },
+ { { 0x0b36, 0x0b4d, 0x0b2b, 0x0 },
+ { 0x0092, 0x0105, 0x0 } },
+ { { 0x0b36, 0x0b4d, 0x0b1f, 0x0 },
+ { 0x0092, 0x00fa, 0x0 } },
+ { { 0x0b39, 0x0b4d, 0x0b1f, 0x0 },
+ { 0x0095, 0x00fa, 0x0 } },
+ { { 0x0b15, 0x0b4d, 0x0b16, 0x0 },
+ { 0x0073, 0x00f1, 0x0 } },
+
{ {0}, {0} }
};
@@ -1005,6 +1029,11 @@ void tst_QScriptEngine::kannada()
{ 0x0036, 0x00c1, 0x0 } },
{ { 0x0cb0, 0x0ccd, 0x200d, 0x0c95, 0x0 },
{ 0x0050, 0x00a7, 0x0 } },
+
+ // Kaphala
+ { { 0x0cb0, 0x200d, 0x0ccd, 0x0c95, 0x0 },
+ { 0x0050, 0x00a7, 0x0 } },
+
{ {0}, {0} }
};
diff --git a/src/3rdparty/md5/md5.cpp b/src/3rdparty/md5/md5.cpp
index f32903c..ac296b5 100644
--- a/src/3rdparty/md5/md5.cpp
+++ b/src/3rdparty/md5/md5.cpp
@@ -24,6 +24,7 @@
#ifndef _WIN32_WCE
#include <sys/types.h> /* for stupid systems */
#else
+#include <windef.h>
#include <types.h>
#endif
diff --git a/src/3rdparty/phonon/gstreamer/devicemanager.cpp b/src/3rdparty/phonon/gstreamer/devicemanager.cpp
index c3826eb..518aa85 100644
--- a/src/3rdparty/phonon/gstreamer/devicemanager.cpp
+++ b/src/3rdparty/phonon/gstreamer/devicemanager.cpp
@@ -22,7 +22,9 @@
#include "videowidget.h"
#include "glrenderer.h"
#include "widgetrenderer.h"
+#ifdef Q_WS_X11
#include "x11renderer.h"
+#endif
#include "artssink.h"
#include "pulsesupport.h"
@@ -264,7 +266,7 @@ AbstractRenderer *DeviceManager::createVideoRenderer(VideoWidget *parent)
if (m_videoSinkWidget == "software") {
return new WidgetRenderer(parent);
}
-#ifndef Q_WS_QWS
+#ifdef Q_WS_X11
else if (m_videoSinkWidget == "xwindow") {
return new X11Renderer(parent);
} else {
diff --git a/src/3rdparty/phonon/gstreamer/videowidget.cpp b/src/3rdparty/phonon/gstreamer/videowidget.cpp
index e1f0ec9..a4c6f79 100644
--- a/src/3rdparty/phonon/gstreamer/videowidget.cpp
+++ b/src/3rdparty/phonon/gstreamer/videowidget.cpp
@@ -31,7 +31,9 @@
#include "glrenderer.h"
#include "widgetrenderer.h"
+#ifdef Q_WS_X11
#include "x11renderer.h"
+#endif
#ifndef QT_NO_PHONON_VIDEO
QT_BEGIN_NAMESPACE
@@ -116,10 +118,12 @@ void VideoWidget::setupVideoBin()
GstPad *videopad = gst_element_get_pad (queue, "sink");
gst_element_add_pad (m_videoBin, gst_ghost_pad_new ("sink", videopad));
gst_object_unref (videopad);
+#ifndef Q_WS_QPA
QWidget *parentWidget = qobject_cast<QWidget*>(parent());
if (parentWidget)
parentWidget->winId(); // Due to some existing issues with alien in 4.4,
// we must currently force the creation of a parent widget.
+#endif
m_isValid = true; //initialization ok, accept input
}
}
diff --git a/src/3rdparty/phonon/gstreamer/x11renderer.h b/src/3rdparty/phonon/gstreamer/x11renderer.h
index f7140da..8e2ea19 100644
--- a/src/3rdparty/phonon/gstreamer/x11renderer.h
+++ b/src/3rdparty/phonon/gstreamer/x11renderer.h
@@ -27,8 +27,6 @@
QT_BEGIN_NAMESPACE
-#ifndef Q_WS_QWS
-
class QString;
namespace Phonon
@@ -61,8 +59,6 @@ private:
}
} //namespace Phonon::Gstreamer
-#endif // Q_WS_QWS
-
QT_END_NAMESPACE
#endif // Phonon_GSTREAMER_X11RENDERER_H
diff --git a/src/3rdparty/phonon/mmf/abstractvideooutput.cpp b/src/3rdparty/phonon/mmf/abstractvideooutput.cpp
index 2d221ed..068118b 100644
--- a/src/3rdparty/phonon/mmf/abstractvideooutput.cpp
+++ b/src/3rdparty/phonon/mmf/abstractvideooutput.cpp
@@ -161,24 +161,10 @@ void MMF::AbstractVideoOutput::dump() const
{
#ifndef QT_NO_DEBUG
TRACE_CONTEXT(AbstractVideoOutput::dump, EVideoInternal);
-
QScopedPointer<ObjectDump::QVisitor> visitor(new ObjectDump::QVisitor);
visitor->setPrefix("Phonon::MMF"); // to aid searchability of logs
ObjectDump::addDefaultAnnotators(*visitor);
-
- if (QWidget *window = QApplication::activeWindow()) {
- TRACE("Dumping from root window 0x%08x:", window);
- ObjectDump::dumpTreeFromLeaf(*window, *visitor);
- }
-
- TRACE("Dumping tree from leaf 0x%08x:", this);
ObjectDump::dumpTreeFromLeaf(*this, *visitor);
-
- QScopedPointer<ObjectDump::QDumper> dumper(new ObjectDump::QDumper);
- dumper->setPrefix("Phonon::MMF"); // to aid searchability of logs
- ObjectDump::addDefaultAnnotators(*dumper);
- TRACE_0("Dumping AbstractVideoOutput:");
- dumper->dumpObject(*this);
#endif
}
diff --git a/src/3rdparty/phonon/mmf/videowidget.cpp b/src/3rdparty/phonon/mmf/videowidget.cpp
index 122094e..d59e82a 100644
--- a/src/3rdparty/phonon/mmf/videowidget.cpp
+++ b/src/3rdparty/phonon/mmf/videowidget.cpp
@@ -65,6 +65,8 @@ MMF::VideoWidget::VideoWidget(QWidget *parent)
TRACE_CONTEXT(VideoWidget::VideoWidget, EVideoApi);
TRACE_ENTRY_0();
+ parent->setProperty("_q_DummyWindowSurface", true);
+
TRACE_EXIT_0();
}
diff --git a/src/3rdparty/phonon/phonon/objectdescriptionmodel.h b/src/3rdparty/phonon/phonon/objectdescriptionmodel.h
index 8fd622f..d994600 100644
--- a/src/3rdparty/phonon/phonon/objectdescriptionmodel.h
+++ b/src/3rdparty/phonon/phonon/objectdescriptionmodel.h
@@ -141,10 +141,11 @@ namespace Phonon
/* Required to ensure template class vtables are exported on both symbian
and existing builds. */
-#if defined(Q_OS_SYMBIAN) && defined(Q_CC_RVCT)
+#if (defined(Q_OS_SYMBIAN) && defined(Q_CC_RVCT)) || defined(Q_CC_CLANG)
// RVCT compiler (2.2.686) requires the export declaration to be on the class to export vtables
// MWC compiler works both ways
// GCCE compiler is unknown (it can't compile QtCore yet)
+// Clang also requires the export declaration to be on the class to export vtables
#define PHONON_TEMPLATE_CLASS_EXPORT PHONON_EXPORT
#define PHONON_TEMPLATE_CLASS_MEMBER_EXPORT
#else
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro
index 981dba2..3ccc57f 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pro
+++ b/src/3rdparty/webkit/WebCore/WebCore.pro
@@ -56,6 +56,7 @@ TEMPLATE = lib
TARGET = QtWebKit
contains(QT_CONFIG, embedded):CONFIG += embedded
+contains(QT_CONFIG, qpa):CONFIG += embedded
CONFIG(standalone_package) {
isEmpty(WC_GENERATED_SOURCES_DIR):WC_GENERATED_SOURCES_DIR = $$PWD/generated
@@ -2180,11 +2181,11 @@ contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=1) {
mac {
SOURCES += \
- plugins/mac/PluginPackageMac.cpp \
- plugins/mac/PluginViewMac.mm
+ plugins/mac/PluginPackageMac.cpp
OBJECTIVE_SOURCES += \
platform/text/mac/StringImplMac.mm \
- platform/mac/WebCoreNSStringExtras.mm
+ platform/mac/WebCoreNSStringExtras.mm \
+ plugins/mac/PluginViewMac.mm
INCLUDEPATH += platform/mac
# Note: XP_MACOSX is defined in npapi.h
} else {
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSDOMBinding.h b/src/3rdparty/webkit/WebCore/bindings/js/JSDOMBinding.h
index 40f7e40..0df23a2 100644
--- a/src/3rdparty/webkit/WebCore/bindings/js/JSDOMBinding.h
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSDOMBinding.h
@@ -225,7 +225,7 @@ namespace WebCore {
{
if (!node)
return JSC::jsNull();
- if (JSNode* wrapper = getCachedDOMNodeWrapper(exec, node->document(), node))
+ if (JSC::JSCell* wrapper = getCachedDOMNodeWrapper(exec, node->document(), node))
return wrapper;
return createDOMNodeWrapper<WrapperClass>(exec, globalObject, node);
}
diff --git a/src/activeqt/container/qaxwidget.cpp b/src/activeqt/container/qaxwidget.cpp
index d3f736b..15d586b 100644
--- a/src/activeqt/container/qaxwidget.cpp
+++ b/src/activeqt/container/qaxwidget.cpp
@@ -1008,7 +1008,7 @@ HRESULT WINAPI QAxClientSite::TranslateAccelerator(LPMSG lpMsg, DWORD /*grfModif
}
}
// ActiveQt based in-processes-servers will handle the event properly, so
- // we dont need to send this key event to the host.
+ // we don't need to send this key event to the host.
return S_OK;
}
diff --git a/src/activeqt/shared/qaxtypes.cpp b/src/activeqt/shared/qaxtypes.cpp
index dfec8178..4a38544 100644
--- a/src/activeqt/shared/qaxtypes.cpp
+++ b/src/activeqt/shared/qaxtypes.cpp
@@ -547,7 +547,7 @@ bool QVariantToVARIANT(const QVariant &var, VARIANT &arg, const QByteArray &type
SAFEARRAY *array = 0;
bool is2D = false;
// If the first element in the array is a list the whole list is
- // treated as a 2D array. The colum count is taken from the 1st element.
+ // treated as a 2D array. The column count is taken from the 1st element.
if (count) {
QVariantList col = list.at(0).toList();
int maxColumns = col.count();
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp
index 641b42b..9add36e 100644
--- a/src/corelib/animation/qabstractanimation.cpp
+++ b/src/corelib/animation/qabstractanimation.cpp
@@ -166,11 +166,12 @@ Q_GLOBAL_STATIC(QThreadStorage<QUnifiedTimer *>, unifiedTimer)
#endif
QUnifiedTimer::QUnifiedTimer() :
- QObject(), lastTick(0), timingInterval(DEFAULT_TIMER_INTERVAL),
+ QObject(), defaultDriver(this), lastTick(0), timingInterval(DEFAULT_TIMER_INTERVAL),
currentAnimationIdx(0), consistentTiming(false), slowMode(false),
slowdownFactor(5.0f), isPauseTimerActive(false), runningLeafAnimations(0)
{
time.invalidate();
+ driver = &defaultDriver;
}
@@ -247,14 +248,27 @@ void QUnifiedTimer::restartAnimationTimer()
qDebug() << runningPauseAnimations;
qDebug() << closestPauseAnimationTimeToFinish();
}
+ driver->stop();
animationTimer.start(closestTimeToFinish, this);
isPauseTimerActive = true;
- } else if (!animationTimer.isActive() || isPauseTimerActive) {
- animationTimer.start(timingInterval, this);
+ } else if (!driver->isRunning() || isPauseTimerActive) {
+ driver->start();
isPauseTimerActive = false;
}
}
+void QUnifiedTimer::setTimingInterval(int interval)
+{
+ timingInterval = interval;
+
+ if (driver->isRunning() && !isPauseTimerActive) {
+ //we changed the timing interval
+ driver->stop();
+ driver->start();
+ }
+}
+
+
void QUnifiedTimer::timerEvent(QTimerEvent *event)
{
//in the case of consistent timing we make sure the orders in which events come is always the same
@@ -369,6 +383,129 @@ int QUnifiedTimer::closestPauseAnimationTimeToFinish()
return closestTimeToFinish;
}
+void QUnifiedTimer::installAnimationDriver(QAnimationDriver *d)
+{
+ if (driver->isRunning()) {
+ qWarning("QUnifiedTimer: Cannot change animation driver while animations are running");
+ return;
+ }
+
+ if (driver && driver != &defaultDriver)
+ delete driver;
+
+ driver = d;
+}
+
+/*!
+ \class QAnimationDriver
+
+ \brief The QAnimationDriver class is used to exchange the mechanism that drives animations.
+
+ The default animation system is driven by a timer that fires at regular intervals.
+ In some scenarios, it is better to drive the animation based on other synchronization
+ mechanisms, such as the vertical refresh rate of the screen.
+ */
+
+QAnimationDriver::QAnimationDriver(QObject *parent)
+ : QObject(*(new QAnimationDriverPrivate), parent)
+{
+}
+
+QAnimationDriver::QAnimationDriver(QAnimationDriverPrivate &dd, QObject *parent)
+ : QObject(dd, parent)
+{
+}
+
+
+/*!
+ Advances the animation based on the current time. This function should
+ be continuously called by the driver while the animation is running.
+ */
+void QAnimationDriver::advance()
+{
+ QUnifiedTimer *instance = QUnifiedTimer::instance();
+
+ // update current time on all top level animations
+ instance->updateAnimationsTime();
+ instance->restartAnimationTimer();
+}
+
+
+/*!
+ Installs this animation driver. The animation driver is thread local and
+ will only apply for the thread its installed in.
+ */
+void QAnimationDriver::install()
+{
+ QUnifiedTimer *timer = QUnifiedTimer::instance(true);
+ timer->installAnimationDriver(this);
+}
+
+bool QAnimationDriver::isRunning() const
+{
+ return d_func()->running;
+}
+
+
+void QAnimationDriver::start()
+{
+ Q_D(QAnimationDriver);
+ if (!d->running) {
+ started();
+ d->running = true;
+ }
+}
+
+
+void QAnimationDriver::stop()
+{
+ Q_D(QAnimationDriver);
+ if (d->running) {
+ stopped();
+ d->running = false;
+ }
+}
+
+/*!
+ \fn QAnimationDriver::started()
+
+ This function is called by the animation framework to notify the driver
+ that it should start running.
+ */
+
+/*!
+ \fn QAnimationDriver::stopped()
+
+ This function is called by the animation framework to notify the driver
+ that it should stop running.
+ */
+
+/*!
+ The default animation driver just spins the timer...
+ */
+QDefaultAnimationDriver::QDefaultAnimationDriver(QUnifiedTimer *timer)
+ : QAnimationDriver(0), m_unified_timer(timer)
+{
+}
+
+void QDefaultAnimationDriver::timerEvent(QTimerEvent *e)
+{
+ Q_ASSERT(e->timerId() == m_timer.timerId());
+ advance();
+}
+
+void QDefaultAnimationDriver::started()
+{
+ m_timer.start(m_unified_timer->timingInterval, this);
+}
+
+void QDefaultAnimationDriver::stopped()
+{
+ m_timer.stop();
+}
+
+
+
void QAbstractAnimationPrivate::setState(QAbstractAnimation::State newState)
{
Q_Q(QAbstractAnimation);
@@ -794,6 +931,9 @@ void QAbstractAnimation::stop()
{
Q_D(QAbstractAnimation);
+ if (d->state == Stopped)
+ return;
+
d->setState(Stopped);
}
diff --git a/src/corelib/animation/qabstractanimation.h b/src/corelib/animation/qabstractanimation.h
index d3c0d0d..6abe8c1 100644
--- a/src/corelib/animation/qabstractanimation.h
+++ b/src/corelib/animation/qabstractanimation.h
@@ -54,6 +54,7 @@ QT_MODULE(Core)
class QAnimationGroup;
class QSequentialAnimationGroup;
+class QAnimationDriver;
class QAbstractAnimationPrivate;
class Q_CORE_EXPORT QAbstractAnimation : public QObject
@@ -132,6 +133,36 @@ private:
Q_DECLARE_PRIVATE(QAbstractAnimation)
};
+class QAnimationDriverPrivate;
+class Q_CORE_EXPORT QAnimationDriver : public QObject
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QAnimationDriver)
+
+public:
+ QAnimationDriver(QObject *parent);
+
+ void advance();
+ void install();
+
+ bool isRunning() const;
+
+protected:
+ virtual void started() = 0;
+ virtual void stopped() = 0;
+
+ QAnimationDriver(QAnimationDriverPrivate &dd, QObject *parent = 0);
+
+private:
+ friend class QUnifiedTimer;
+
+ void start();
+ void stop();
+};
+
+
+
+
#endif //QT_NO_ANIMATION
QT_END_NAMESPACE
diff --git a/src/corelib/animation/qabstractanimation_p.h b/src/corelib/animation/qabstractanimation_p.h
index d3d4098..d56c130 100644
--- a/src/corelib/animation/qabstractanimation_p.h
+++ b/src/corelib/animation/qabstractanimation_p.h
@@ -58,6 +58,7 @@
#include <QtCore/qtimer.h>
#include <QtCore/qelapsedtimer.h>
#include <private/qobject_p.h>
+#include <qabstractanimation.h>
#ifdef Q_OS_WIN
#include <qt_windows.h>
@@ -114,30 +115,47 @@ private:
Q_DECLARE_PUBLIC(QAbstractAnimation)
};
+
+class QUnifiedTimer;
+class QDefaultAnimationDriver : public QAnimationDriver
+{
+ Q_OBJECT
+public:
+ QDefaultAnimationDriver(QUnifiedTimer *timer);
+ void timerEvent(QTimerEvent *e);
+
+ void started();
+ void stopped();
+
+private:
+ QBasicTimer m_timer;
+ QUnifiedTimer *m_unified_timer;
+};
+
+class Q_CORE_EXPORT QAnimationDriverPrivate : public QObjectPrivate
+{
+public:
+ QAnimationDriverPrivate() : running(false) {}
+ bool running;
+};
+
typedef QElapsedTimer ElapsedTimer;
-class QUnifiedTimer : public QObject
+class Q_CORE_EXPORT QUnifiedTimer : public QObject
{
private:
QUnifiedTimer();
public:
//XXX this is needed by dui
- static Q_CORE_EXPORT QUnifiedTimer *instance();
+ static QUnifiedTimer *instance();
static QUnifiedTimer *instance(bool create);
static void registerAnimation(QAbstractAnimation *animation, bool isTopLevel);
static void unregisterAnimation(QAbstractAnimation *animation);
//defines the timing interval. Default is DEFAULT_TIMER_INTERVAL
- void setTimingInterval(int interval)
- {
- timingInterval = interval;
- if (animationTimer.isActive() && !isPauseTimerActive) {
- //we changed the timing interval
- animationTimer.start(timingInterval, this);
- }
- }
+ void setTimingInterval(int interval);
/*
this allows to have a consistent timer interval at each tick from the timer
@@ -161,11 +179,20 @@ public:
*/
static void updateAnimationTimer();
+ void installAnimationDriver(QAnimationDriver *driver);
+
+ void restartAnimationTimer();
+ void updateAnimationsTime();
+
protected:
void timerEvent(QTimerEvent *);
private:
- // timer used for all active (running) animations
+ friend class QDefaultAnimationDriver;
+
+ QAnimationDriver *driver;
+ QDefaultAnimationDriver defaultDriver;
+
QBasicTimer animationTimer;
// timer used to delay the check if we should start/stop the animation timer
QBasicTimer startStopAnimationTimer;
@@ -195,9 +222,6 @@ private:
void registerRunningAnimation(QAbstractAnimation *animation);
void unregisterRunningAnimation(QAbstractAnimation *animation);
- void restartAnimationTimer();
-
- void updateAnimationsTime();
int closestPauseAnimationTimeToFinish();
};
diff --git a/src/corelib/arch/qatomic_arch.h b/src/corelib/arch/qatomic_arch.h
index 00b288b..5106d29 100644
--- a/src/corelib/arch/qatomic_arch.h
+++ b/src/corelib/arch/qatomic_arch.h
@@ -88,6 +88,8 @@ QT_BEGIN_HEADER
# include "QtCore/qatomic_sh.h"
#elif defined(QT_ARCH_SH4A)
# include "QtCore/qatomic_sh4a.h"
+#elif defined(QT_ARCH_NACL)
+# include "QtCore/qatomic_generic.h"
#else
# error "Qt has not been ported to this architecture"
#endif
diff --git a/src/corelib/arch/qatomic_arm.h b/src/corelib/arch/qatomic_arm.h
index 1c1c8a5..0513af2 100644
--- a/src/corelib/arch/qatomic_arm.h
+++ b/src/corelib/arch/qatomic_arm.h
@@ -59,7 +59,7 @@ QT_END_INCLUDE_HEADER
|| defined(__ARM_ARCH_6K__) \
|| defined(__ARM_ARCH_6ZK__) \
|| defined(__ARM_ARCH_6M__) \
- || (__TARGET_ARCH_ARM-0 >= 6)
+ || (defined(__TARGET_ARCH_ARM) && (__TARGET_ARCH_ARM-0 >= 6))
# define QT_ARCH_ARMV6
QT_BEGIN_INCLUDE_HEADER
# include "QtCore/qatomic_armv6.h"
diff --git a/src/corelib/arch/symbian/heap_hybrid.cpp b/src/corelib/arch/symbian/heap_hybrid.cpp
index 91faaed..5d2b2b6 100644
--- a/src/corelib/arch/symbian/heap_hybrid.cpp
+++ b/src/corelib/arch/symbian/heap_hybrid.cpp
@@ -134,7 +134,7 @@ The constant can be changed at ROM build time using patchdata OBY keyword.
@deprecated Patching this constant no longer has any effect.
*/
-#ifdef __X86GCC__ // For X86GCC we dont use the proper data import attribute
+#ifdef __X86GCC__ // For X86GCC we don't use the proper data import attribute
#undef IMPORT_D // since the constants are not really imported. GCC doesn't
#define IMPORT_D // allow imports from self.
#endif
@@ -451,7 +451,7 @@ TInt RHybridHeap::ConstructLock(TUint32 aMode)
void RHybridHeap::Init(TInt aBitmapSlab, TInt aPagePower)
{
- /*Moved code which does initilization */
+ /*Moved code which does initialization */
iTop = (TUint8*)this + iMinLength;
iBase = Ceiling(iBase, ECellAlignment); // Align iBase address
@@ -874,7 +874,7 @@ available in the largest free block.
Note that this function exists mainly for compatibility reasons. In a modern
heap implementation such as that present in Symbian it is not appropriate to
concern oneself with details such as the amount of free memory available on a
-heap and its largeset free block, because the way that a modern heap implmentation
+heap and its largeset free block, because the way that a modern heap implementation
works is not simple. The amount of available virtual memory != physical memory
and there are multiple allocation strategies used internally, which makes all
memory usage figures "fuzzy" at best.
@@ -1616,7 +1616,7 @@ void* RHybridHeap::DlMalloc(size_t bytes)
void RHybridHeap::DlFree(void* mem)
{
/*
- Consolidate freed chunks with preceeding or succeeding bordering
+ Consolidate freed chunks with preceding or succeeding bordering
free chunks, if they exist, and then place in a bin. Intermixed
with special cases for iTop, iDv, mmapped chunks, and usage errors.
*/
diff --git a/src/corelib/arch/symbian/qatomic_generic_armv6.cpp b/src/corelib/arch/symbian/qatomic_generic_armv6.cpp
index 39d966a..444d3d3 100644
--- a/src/corelib/arch/symbian/qatomic_generic_armv6.cpp
+++ b/src/corelib/arch/symbian/qatomic_generic_armv6.cpp
@@ -38,7 +38,7 @@
** $QT_END_LICENSE$
**
** This file implements the generic atomics interface using ARMv6 assembly
-** instructions. It is more efficent than the inline versions when Qt is
+** instructions. It is more efficient than the inline versions when Qt is
** built for the THUMB instruction set, as the required instructions are
** only available in ARM state.
****************************************************************************/
diff --git a/src/corelib/codecs/codecs.qdoc b/src/corelib/codecs/codecs.qdoc
index b88f016..3171f58 100644
--- a/src/corelib/codecs/codecs.qdoc
+++ b/src/corelib/codecs/codecs.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/src/corelib/codecs/qutfcodec.cpp b/src/corelib/codecs/qutfcodec.cpp
index f747bf7..031baa3 100644
--- a/src/corelib/codecs/qutfcodec.cpp
+++ b/src/corelib/codecs/qutfcodec.cpp
@@ -195,7 +195,7 @@ QString QUtf8::convertToUnicode(const char *chars, int len, QTextCodec::Converte
// utf-8 bom composes into 0xfeff code point
bool nonCharacter;
if (!headerdone && uc == 0xfeff) {
- // dont do anything, just skip the BOM
+ // don't do anything, just skip the BOM
} else if (!(nonCharacter = isUnicodeNonCharacter(uc)) && uc > 0xffff && uc < 0x110000) {
// surrogate pair
Q_ASSERT((qch - (ushort*)result.unicode()) + 2 < result.length());
diff --git a/src/corelib/concurrent/qtconcurrentrunbase.h b/src/corelib/concurrent/qtconcurrentrunbase.h
index a6bbe3e..888d395 100644
--- a/src/corelib/concurrent/qtconcurrentrunbase.h
+++ b/src/corelib/concurrent/qtconcurrentrunbase.h
@@ -100,7 +100,18 @@ public:
this->reportFinished();
return;
}
- this->runFunctor();
+#ifndef QT_NO_EXCEPTIONS
+ try {
+#endif
+ this->runFunctor();
+#ifndef QT_NO_EXCEPTIONS
+ } catch (QtConcurrent::Exception &e) {
+ QFutureInterface<T>::reportException(e);
+ } catch (...) {
+ QFutureInterface<T>::reportException(QtConcurrent::UnhandledException());
+ }
+#endif
+
this->reportResult(result);
this->reportFinished();
}
@@ -117,7 +128,17 @@ public:
this->reportFinished();
return;
}
- this->runFunctor();
+#ifndef QT_NO_EXCEPTIONS
+ try {
+#endif
+ this->runFunctor();
+#ifndef QT_NO_EXCEPTIONS
+ } catch (QtConcurrent::Exception &e) {
+ QFutureInterface<void>::reportException(e);
+ } catch (...) {
+ QFutureInterface<void>::reportException(QtConcurrent::UnhandledException());
+ }
+#endif
this->reportFinished();
}
};
diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro
index b7d6034..e946d5d 100644
--- a/src/corelib/corelib.pro
+++ b/src/corelib/corelib.pro
@@ -19,7 +19,14 @@ include(codecs/codecs.pri)
include(statemachine/statemachine.pri)
include(xml/xml.pri)
-mac|darwin:LIBS_PRIVATE += -framework ApplicationServices
+!qpa:mac|darwin:LIBS_PRIVATE += -framework ApplicationServices
+qpa:mac|darwin {
+ contains(QT_CONFIG, coreservices) {
+ LIBS_PRIVATE += -framework CoreServices
+ } else {
+ LIBS_PRIVATE += -framework CoreFoundation
+ }
+}
mac:lib_bundle:DEFINES += QT_NO_DEBUG_PLUGIN_CHECK
win32:DEFINES-=QT_NO_CAST_TO_ASCII
@@ -37,10 +44,3 @@ symbian: {
MMP_RULES -= PAGED
MMP_RULES *= UNPAGED
}
-
-neon {
- DEFINES += QT_HAVE_NEON
- QMAKE_CXXFLAGS *= -mfpu=neon
-}
-
-
diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri
index 4800716..47b82ef 100644
--- a/src/corelib/global/global.pri
+++ b/src/corelib/global/global.pri
@@ -13,13 +13,17 @@ SOURCES += \
global/qmalloc.cpp \
global/qnumeric.cpp
+nacl {
+ SOURCES += global/qnaclunimplemented.cpp
+}
+
# qlibraryinfo.cpp includes qconfig.cpp
INCLUDEPATH += $$QT_BUILD_TREE/src/corelib/global
# Only used on platforms with CONFIG += precompile_header
PRECOMPILED_HEADER = global/qt_pch.h
-linux*:!static:!linux-armcc:!linux-gcce {
+linux*:!static:!symbian-armcc:!symbian-gcce {
QMAKE_LFLAGS += -Wl,-e,qt_core_boilerplate
prog=$$quote(if (/program interpreter: (.*)]/) { print $1; })
DEFINES += ELF_INTERPRETER=\\\"$$system(readelf -l /bin/ls | perl -n -e \'$$prog\')\\\"
diff --git a/src/corelib/global/qconfig-minimal-system-dependencies.h b/src/corelib/global/qconfig-minimal-system-dependencies.h
new file mode 100644
index 0000000..63319b9
--- /dev/null
+++ b/src/corelib/global/qconfig-minimal-system-dependencies.h
@@ -0,0 +1,371 @@
+/****************************************************************************
+**
+** 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 QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#define QT_FONTS_ARE_RESOURCES
+
+/* Data structures */
+#ifndef QT_NO_QUUID_STRING
+# define QT_NO_QUUID_STRING
+#endif
+#ifndef QT_NO_STL
+# define QT_NO_STL
+#endif
+#ifndef QT_NO_TEXTDATE
+# define QT_NO_TEXTDATE
+#endif
+#ifndef QT_NO_DATESTRING
+# define QT_NO_DATESTRING
+#endif
+
+/* Dialogs */
+#ifndef QT_NO_FILEDIALOG
+# define QT_NO_FILEDIALOG
+#endif
+#ifndef QT_NO_PRINTDIALOG
+# define QT_NO_PRINTDIALOG
+#endif
+#ifndef QT_NO_PRINTPREVIEWDIALOG
+# define QT_NO_PRINTPREVIEWDIALOG
+#endif
+
+
+/* File I/O */
+#ifndef QT_NO_DOM
+# define QT_NO_DOM
+#endif
+#ifndef QT_NO_FILESYSTEMWATCHER
+# define QT_NO_FILESYSTEMWATCHER
+#endif
+#ifndef QT_NO_FSFILEENGINE
+# define QT_NO_FSFILEENGINE
+#endif
+#ifndef QT_NO_FILESYSTEMMODEL
+# define QT_NO_FILESYSTEMMODEL
+#endif
+#ifndef QT_NO_FILESYSTEMMODEL
+# define QT_NO_FILESYSTEMMODEL
+#endif
+#ifndef QT_NO_PROCESS
+# define QT_NO_PROCESS
+#endif
+#ifndef QT_NO_TEMPORARYFILE
+# define QT_NO_TEMPORARYFILE
+#endif
+#ifndef QT_NO_SETTINGS
+# define QT_NO_SETTINGS
+#endif
+#ifndef QT_NO_LIBRARY
+# define QT_NO_LIBRARY
+#endif
+
+/* Fonts */
+#ifndef QT_NO_QWS_QPF2
+# define QT_NO_QWS_QPF2
+#endif
+
+/* Images */
+#ifndef QT_NO_IMAGEFORMATPLUGIN
+# define QT_NO_IMAGEFORMATPLUGIN
+#endif
+#ifndef QT_NO_IMAGE_HEURISTIC_MASK
+# define QT_NO_IMAGE_HEURISTIC_MASK
+#endif
+#ifndef QT_NO_IMAGE_TEXT
+# define QT_NO_IMAGE_TEXT
+#endif
+#ifndef QT_NO_MOVIE
+# define QT_NO_MOVIE
+#endif
+
+/* Internationalization */
+#ifndef QT_NO_BIG_CODECS
+# define QT_NO_BIG_CODECS
+#endif
+#ifndef QT_NO_QWS_INPUTMETHODS
+# define QT_NO_QWS_INPUTMETHODS
+#endif
+#ifndef QT_NO_TEXTCODEC
+# define QT_NO_TEXTCODEC
+#endif
+#ifndef QT_NO_CODECS
+# define QT_NO_CODECS
+#endif
+#ifndef QT_NO_TEXTCODECPLUGIN
+# define QT_NO_TEXTCODECPLUGIN
+#endif
+#ifndef QT_NO_TRANSLATION
+# define QT_NO_TRANSLATION
+#endif
+#ifndef QT_NO_TRANSLATION_UTF8
+# define QT_NO_TRANSLATION_UTF8
+#endif
+
+/* ItemViews */
+
+#ifndef QT_NO_DIRMODEL
+# define QT_NO_DIRMODEL
+#endif
+
+/* Kernel */
+#ifndef QT_NO_CLIPBOARD
+# define QT_NO_CLIPBOARD
+#endif
+#ifndef QT_NO_CSSPARSER
+# define QT_NO_CSSPARSER
+#endif
+#ifndef QT_NO_CURSOR
+# define QT_NO_CURSOR
+#endif
+#ifndef QT_NO_DRAGANDDROP
+# define QT_NO_DRAGANDDROP
+#endif
+#ifndef QT_NO_EFFECTS
+# define QT_NO_EFFECTS
+#endif
+#ifndef QT_NO_SESSIONMANAGER
+# define QT_NO_SESSIONMANAGER
+#endif
+#ifndef QT_NO_SHAREDMEMORY
+# define QT_NO_SHAREDMEMORY
+#endif
+#ifndef QT_NO_SOUND
+# define QT_NO_SOUND
+#endif
+#ifndef QT_NO_SYSTEMLOCALE
+# define QT_NO_SYSTEMSEMAPHORE
+#endif
+#ifndef QT_NO_SYSTEMSEMAPHORE
+# define QT_NO_SYSTEMSEMAPHORE
+#endif
+#ifndef QT_NO_TABLETEVENT
+# define QT_NO_TABLETEVENT
+#endif
+#ifndef QT_NO_CRASHHANDLER
+# define QT_NO_CRASHHANDLER
+#endif
+#ifndef QT_NO_CONCURRENT
+# define QT_NO_CONCURRENT
+#endif
+#ifndef QT_NO_XMLSTREAM
+# define QT_NO_XMLSTREAM
+#endif
+#ifndef QT_NO_XMLSTREAMREADER
+# define QT_NO_XMLSTREAMREADER
+#endif
+#ifndef QT_NO_XMLSTREAMWRITER
+# define QT_NO_XMLSTREAMWRITER
+#endif
+
+/* Networking */
+#ifndef QT_NO_COP
+# define QT_NO_COP
+#endif
+#ifndef QT_NO_HOSTINFO
+# define QT_NO_HOSTINFO
+#endif
+#ifndef QT_NO_HTTP
+# define QT_NO_HTTP
+#endif
+#ifndef QT_NO_NETWORKPROXY
+# define QT_NO_NETWORKPROXY
+#endif
+#ifndef QT_NO_SOCKS5
+# define QT_NO_SOCKS5
+#endif
+#ifndef QT_NO_UDPSOCKET
+# define QT_NO_UDPSOCKET
+#endif
+#ifndef QT_NO_URLINFO
+# define QT_NO_URLINFO
+#endif
+#ifndef QT_NO_FTP
+# define QT_NO_FTP
+#endif
+
+/* Painting */
+#ifndef QT_NO_COLORNAMES
+# define QT_NO_COLORNAMES
+#endif
+#ifndef QT_NO_DIRECTPAINTER
+# define QT_NO_DIRECTPAINTER
+#endif
+#ifndef QT_NO_PAINTONSCREEN
+# define QT_NO_PAINTONSCREEN
+#endif
+#ifndef QT_NO_PAINT_DEBUG
+# define QT_NO_PAINT_DEBUG
+#endif
+#ifndef QT_NO_PICTURE
+# define QT_NO_PICTURE
+#endif
+#ifndef QT_NO_PRINTER
+# define QT_NO_PRINTER
+#endif
+#ifndef QT_NO_CUPS
+# define QT_NO_CUPS
+#endif
+
+/* Qt for Embedded Linux */
+#ifndef QT_NO_QWSEMBEDWIDGET
+# define QT_NO_QWSEMBEDWIDGET
+#endif
+#ifndef QT_NO_QWS_ALPHA_CURSOR
+# define QT_NO_QWS_ALPHA_CURSOR
+#endif
+#ifndef QT_NO_QWS_CURSOR
+# define QT_NO_QWS_CURSOR
+#endif
+#ifndef QT_NO_QWS_DECORATION_DEFAULT
+# define QT_NO_QWS_DECORATION_DEFAULT
+#endif
+#ifndef QT_NO_QWS_DECORATION_STYLED
+# define QT_NO_QWS_DECORATION_STYLED
+#endif
+#ifndef QT_NO_QWS_DECORATION_WINDOWS
+# define QT_NO_QWS_DECORATION_WINDOWS
+#endif
+#ifndef QT_NO_QWS_MANAGER
+# define QT_NO_QWS_MANAGER
+#endif
+#ifndef QT_NO_QWS_KEYBOARD
+# define QT_NO_QWS_KEYBOARD
+#endif
+#ifndef QT_NO_QWS_MOUSE
+# define QT_NO_QWS_MOUSE
+#endif
+#ifndef QT_NO_QWS_MOUSE_AUTO
+# define QT_NO_QWS_MOUSE_AUTO
+#endif
+#ifndef QT_NO_QWS_MOUSE_MANUAL
+# define QT_NO_QWS_MOUSE_MANUAL
+#endif
+#ifndef QT_NO_QWS_MULTIPROCESS
+# define QT_NO_QWS_MULTIPROCESS
+#endif
+#ifndef QT_NO_QWS_SOUNDSERVER
+# define QT_NO_QWS_SOUNDSERVER
+#endif
+#ifndef QT_NO_SXE
+# define QT_NO_SXE
+#endif
+#ifndef QT_NO_QWS_PROPERTIES
+# define QT_NO_QWS_PROPERTIES
+#endif
+#ifndef QT_NO_QWS_PROXYSCREEN
+# define QT_NO_QWS_PROXYSCREEN
+#endif
+#ifndef QT_NO_QWS_DYNAMICSCREENTRANSFORMATION
+# define QT_NO_QWS_DYNAMICSCREENTRANSFORMATION
+#endif
+#ifndef QT_NO_QWS_LINUXFB
+# define QT_NO_QWS_LINUXFB
+#endif
+#ifndef QT_NO_QWS_MOUSE_PC
+# define QT_NO_QWS_MOUSE_PC
+#endif
+#ifndef QT_NO_QWS_MOUSE_LINUXTP
+# define QT_NO_QWS_MOUSE_LINUXTP
+#endif
+#ifndef QT_NO_QWS_QPF
+# define QT_NO_QWS_QPF
+#endif
+
+/* SVG */
+#ifndef QT_NO_SVG
+# define QT_NO_SVG
+#endif
+#ifndef QT_NO_GRAPHICSSVGITEM
+# define QT_NO_GRAPHICSSVGITEM
+#endif
+#ifndef QT_NO_SVGGENERATOR
+# define QT_NO_SVGGENERATOR
+#endif
+#ifndef QT_NO_SVGRENDERER
+# define QT_NO_SVGRENDERER
+#endif
+#ifndef QT_NO_SVGWIDGET
+# define QT_NO_SVGWIDGET
+#endif
+
+/* Styles */
+#ifndef QT_NO_STYLE_MOTIF
+# define QT_NO_STYLE_MOTIF
+#endif
+#ifndef QT_NO_STYLE_CDE
+# define QT_NO_STYLE_CDE
+#endif
+#ifndef QT_NO_STYLE_STYLESHEET
+# define QT_NO_STYLE_STYLESHEET
+#endif
+#ifndef QT_NO_STYLE_WINDOWSCE
+# define QT_NO_STYLE_WINDOWSCE
+#endif
+#ifndef QT_NO_STYLE_WINDOWSMOBILE
+# define QT_NO_STYLE_WINDOWSMOBILE
+#endif
+#ifndef QT_NO_STYLE_WINDOWSVISTA
+# define QT_NO_STYLE_WINDOWSVISTA
+#endif
+#ifndef QT_NO_STYLE_WINDOWSXP
+# define QT_NO_STYLE_WINDOWSXP
+#endif
+
+/* Utilities */
+#ifndef QT_NO_ACCESSIBILITY
+# define QT_NO_ACCESSIBILITY
+#endif
+#ifndef QT_NO_COMPLETER
+# define QT_NO_COMPLETER
+#endif
+#ifndef QT_NO_DESKTOPSERVICES
+# define QT_NO_DESKTOPSERVICES
+#endif
+#ifndef QT_NO_SCRIPT
+# define QT_NO_SCRIPT
+#endif
+#ifndef QT_NO_SYSTEMTRAYICON
+# define QT_NO_SYSTEMTRAYICON
+#endif
+
+/* Windows */
+#ifndef QT_NO_WIN_ACTIVEQT
+# define QT_NO_WIN_ACTIVEQT
+#endif
diff --git a/src/corelib/global/qendian.qdoc b/src/corelib/global/qendian.qdoc
index 795ff81..ecdaf9f 100644
--- a/src/corelib/global/qendian.qdoc
+++ b/src/corelib/global/qendian.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/src/corelib/global/qfeatures.h b/src/corelib/global/qfeatures.h
index b606843..9710079 100644
--- a/src/corelib/global/qfeatures.h
+++ b/src/corelib/global/qfeatures.h
@@ -523,11 +523,6 @@
#define QT_NO_FTP
#endif
-// Hyper Text Transfer Protocol
-#if !defined(QT_NO_HTTP) && (defined(QT_NO_HOSTINFO))
-#define QT_NO_HTTP
-#endif
-
// QInputContext
#if !defined(QT_NO_IM) && (defined(QT_NO_LIBRARY))
#define QT_NO_IM
@@ -583,6 +578,11 @@
#define QT_NO_GRAPHICSVIEW
#endif
+// Hyper Text Transfer Protocol
+#if !defined(QT_NO_HTTP) && (defined(QT_NO_HOSTINFO) || defined(QT_NO_NETWORKPROXY))
+#define QT_NO_HTTP
+#endif
+
// QMdiArea
#if !defined(QT_NO_MDIAREA) && (defined(QT_NO_SCROLLAREA))
#define QT_NO_MDIAREA
diff --git a/src/corelib/global/qfeatures.txt b/src/corelib/global/qfeatures.txt
index 4d938a9..f07fbd5 100644
--- a/src/corelib/global/qfeatures.txt
+++ b/src/corelib/global/qfeatures.txt
@@ -1050,7 +1050,7 @@ SeeAlso: ???
Feature: HTTP
Description: Supports HTTP file access.
Section: Networking
-Requires: HOSTINFO
+Requires: HOSTINFO NETWORKPROXY
Name: Hyper Text Transfer Protocol
SeeAlso: ???
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index e973688..9b597f6 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -74,7 +74,7 @@
# include <envLib.h>
#endif
-#if defined(Q_CC_MWERKS) && defined(Q_OS_MACX)
+#if defined(Q_OS_MACX) && !defined(QT_NO_CORESERVICES)
#include <CoreServices/CoreServices.h>
#endif
@@ -1232,7 +1232,7 @@ bool qSharedBuild()
Defined on Mac OS X.
- \sa Q_WS_WIN, Q_WS_X11, Q_WS_QWS, Q_WS_S60
+ \sa Q_WS_WIN, Q_WS_X11, Q_WS_QWS, Q_WS_QPA, Q_WS_S60
*/
/*!
@@ -1241,7 +1241,7 @@ bool qSharedBuild()
Defined on Windows.
- \sa Q_WS_MAC, Q_WS_X11, Q_WS_QWS, Q_WS_S60
+ \sa Q_WS_MAC, Q_WS_X11, Q_WS_QWS, Q_WS_QPA, Q_WS_S60
*/
/*!
@@ -1250,7 +1250,7 @@ bool qSharedBuild()
Defined on X11.
- \sa Q_WS_MAC, Q_WS_WIN, Q_WS_QWS, Q_WS_S60
+ \sa Q_WS_MAC, Q_WS_WIN, Q_WS_QWS, Q_WS_QPA, Q_WS_S60
*/
/*!
@@ -1259,7 +1259,16 @@ bool qSharedBuild()
Defined on Qt for Embedded Linux.
- \sa Q_WS_MAC, Q_WS_WIN, Q_WS_X11, Q_WS_S60
+ \sa Q_WS_MAC, Q_WS_WIN, Q_WS_X11, Q_WS_QPA, Q_WS_S60
+*/
+
+/*!
+ \macro Q_WS_QPA
+ \relates <QtGlobal>
+
+ Defined on Qt for Embedded Linux, Lite version.
+
+ \sa Q_WS_MAC, Q_WS_WIN, Q_WS_X11, Q_WS_QWS, Q_WS_S60
*/
/*!
@@ -1634,7 +1643,7 @@ static const unsigned int qt_one = 1;
const int QSysInfo::ByteOrder = ((*((unsigned char *) &qt_one) == 0) ? BigEndian : LittleEndian);
#endif
-#if !defined(QWS) && defined(Q_OS_MAC)
+#if !defined(QWS) && !defined(Q_WS_QPA) && defined(Q_OS_MAC)
QT_BEGIN_INCLUDE_NAMESPACE
#include "private/qcore_mac_p.h"
@@ -1688,15 +1697,18 @@ Q_CORE_EXPORT void qt_mac_to_pascal_string(QString s, Str255 str, TextEncoding e
Q_CORE_EXPORT QString qt_mac_from_pascal_string(const Str255 pstr) {
return QCFString(CFStringCreateWithPascalString(0, pstr, CFStringGetSystemEncoding()));
}
+#endif //!defined(QWS) && !defined(Q_WS_QPA) && defined(Q_OS_MAC)
-
+#if !defined(QWS) && defined(Q_OS_MAC)
static QSysInfo::MacVersion macVersion()
{
+#ifndef QT_NO_CORESERVICES
SInt32 gestalt_version;
if (Gestalt(gestaltSystemVersion, &gestalt_version) == noErr) {
return QSysInfo::MacVersion(((gestalt_version & 0x00F0) >> 4) + 2);
}
+#endif
return QSysInfo::MV_Unknown;
}
const QSysInfo::MacVersion QSysInfo::MacintoshVersion = macVersion();
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 1b2a6a8..b75a3d8 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -64,6 +64,10 @@
#ifdef __cplusplus
+#ifndef QT_NO_STL
+#include <algorithm>
+#endif
+
#ifndef QT_NAMESPACE /* user namespace */
# define QT_PREPEND_NAMESPACE(name) ::name
@@ -216,6 +220,8 @@ namespace QT_NAMESPACE {}
# define Q_OS_ULTRIX
#elif defined(sinix)
# define Q_OS_RELIANT
+#elif defined(__native_client__)
+# define Q_OS_NACL
#elif defined(__linux__) || defined(__linux)
# define Q_OS_LINUX
#elif defined(__FreeBSD__) || defined(__DragonFly__)
@@ -284,7 +290,7 @@ namespace QT_NAMESPACE {}
# endif
#endif
-#if defined(Q_OS_MAC64) && !defined(QT_MAC_USE_COCOA) && !defined(QT_BUILD_QMAKE)
+#if defined(Q_WS_MAC64) && !defined(QT_MAC_USE_COCOA) && !defined(QT_BUILD_QMAKE) && !defined(QT_BOOTSTRAPPED)
#error "You are building a 64-bit application, but using a 32-bit version of Qt. Check your build configuration."
#endif
@@ -356,6 +362,7 @@ namespace QT_NAMESPACE {}
GCCE - GCCE (Symbian GCCE builds)
RVCT - ARM Realview Compiler Suite
NOKIAX86 - Nokia x86 (Symbian WINSCW builds)
+ CLANG - C++ front-end for the LLVM compiler
Should be sorted most to least authoritative.
@@ -452,6 +459,10 @@ namespace QT_NAMESPACE {}
# define Q_CC_INTEL
# define Q_NO_TEMPLATE_FRIENDS
# endif
+# if defined(__clang__)
+/* Clang also masquerades as GCC 4.2.1 */
+# define Q_CC_CLANG
+# endif
# ifdef __APPLE__
# define Q_NO_DEPRECATED_CONSTRUCTORS
# endif
@@ -817,7 +828,7 @@ namespace QT_NAMESPACE {}
# define Q_WS_PM
# error "Qt does not work with OS/2 Presentation Manager or Workplace Shell"
#elif defined(Q_OS_UNIX)
-# if defined(Q_OS_MAC) && !defined(__USE_WS_X11__) && !defined(Q_WS_QWS)
+# if defined(Q_OS_MAC) && !defined(__USE_WS_X11__) && !defined(Q_WS_QWS) && !defined(Q_WS_QPA)
# define Q_WS_MAC
# define Q_WS_MACX
# if defined(Q_OS_MAC64)
@@ -829,7 +840,7 @@ namespace QT_NAMESPACE {}
# if !defined(QT_NO_S60)
# define Q_WS_S60
# endif
-# elif !defined(Q_WS_QWS)
+# elif !defined(Q_WS_QWS) && !defined(Q_WS_QPA)
# define Q_WS_X11
# endif
#endif
@@ -1091,7 +1102,7 @@ redefine to built-in booleans to make autotests work properly */
typedef int QNoImplicitBoolCast;
-#if defined(QT_ARCH_ARM) || defined(QT_ARCH_AVR32) || (defined(QT_ARCH_MIPS) && (defined(Q_WS_QWS) || defined(Q_OS_WINCE))) || defined(QT_ARCH_SH) || defined(QT_ARCH_SH4A)
+#if defined(QT_ARCH_ARM) || defined(QT_ARCH_ARMV6) || defined(QT_ARCH_AVR32) || (defined(QT_ARCH_MIPS) && (defined(Q_WS_QWS) || defined(Q_WS_QPA) || defined(Q_OS_WINCE))) || defined(QT_ARCH_SH) || defined(QT_ARCH_SH4A)
#define QT_NO_FPU
#endif
@@ -2057,9 +2068,14 @@ Q_DECLARE_TYPEINFO_BODY(TYPE, FLAGS)
template <typename T>
inline void qSwap(T &value1, T &value2)
{
+#ifdef QT_NO_STL
const T t = value1;
value1 = value2;
value2 = t;
+#else
+ using std::swap;
+ swap(value1, value2);
+#endif
}
/*
@@ -2071,12 +2087,23 @@ inline void qSwap(T &value1, T &value2)
types must declare a 'bool isDetached(void) const;' member for this
to work.
*/
+#ifdef QT_NO_STL
+#define Q_DECLARE_SHARED_STL(TYPE)
+#else
+#define Q_DECLARE_SHARED_STL(TYPE) \
+QT_END_NAMESPACE \
+namespace std { \
+ template<> inline void swap<QT_PREPEND_NAMESPACE(TYPE)>(QT_PREPEND_NAMESPACE(TYPE) &value1, QT_PREPEND_NAMESPACE(TYPE) &value2) \
+ { swap(value1.data_ptr(), value2.data_ptr()); } \
+} \
+QT_BEGIN_NAMESPACE
+#endif
+
#define Q_DECLARE_SHARED(TYPE) \
template <> inline bool qIsDetached<TYPE>(TYPE &t) { return t.isDetached(); } \
template <> inline void qSwap<TYPE>(TYPE &value1, TYPE &value2) \
-{ \
- qSwap(value1.data_ptr(), value2.data_ptr()); \
-}
+{ qSwap(value1.data_ptr(), value2.data_ptr()); } \
+Q_DECLARE_SHARED_STL(TYPE)
/*
QTypeInfo primitive specializations
@@ -2644,6 +2671,10 @@ QT_LICENSED_MODULE(DBus)
# define QT_NO_PROCESS
#endif
+#ifdef Q_OS_NACL
+#include <QtCore/qnaclunimplemented.h>
+#endif
+
#if defined (__ELF__)
# if defined (Q_OS_LINUX) || defined (Q_OS_SOLARIS) || defined (Q_OS_FREEBSD) || defined (Q_OS_OPENBSD) || defined (Q_OS_IRIX)
# define Q_OF_ELF
diff --git a/src/corelib/global/qmalloc.cpp b/src/corelib/global/qmalloc.cpp
index 090998c..028a0a5 100644
--- a/src/corelib/global/qmalloc.cpp
+++ b/src/corelib/global/qmalloc.cpp
@@ -90,8 +90,6 @@ void *qReallocAligned(void *oldptr, size_t newsize, size_t oldsize, size_t align
return newptr + 1;
}
- union { void *ptr; void **pptr; quintptr n; } real, faked;
-
// qMalloc returns pointers aligned at least at sizeof(size_t) boundaries
// but usually more (8- or 16-byte boundaries).
// So we overallocate by alignment-sizeof(size_t) bytes, so we're guaranteed to find a
@@ -100,19 +98,21 @@ void *qReallocAligned(void *oldptr, size_t newsize, size_t oldsize, size_t align
// However, we need to store the actual pointer, so we need to allocate actually size +
// alignment anyway.
- real.ptr = qRealloc(actualptr, newsize + alignment);
- if (!real.ptr)
+ void *real = qRealloc(actualptr, newsize + alignment);
+ if (!real)
return 0;
- faked.n = real.n + alignment;
- faked.n &= ~(alignment - 1);
+ quintptr faked = reinterpret_cast<quintptr>(real) + alignment;
+ faked &= ~(alignment - 1);
+
+ void **faked_ptr = reinterpret_cast<void **>(faked);
// now save the value of the real pointer at faked-sizeof(void*)
// by construction, alignment > sizeof(void*) and is a power of 2, so
// faked-sizeof(void*) is properly aligned for a pointer
- faked.pptr[-1] = real.ptr;
+ faked_ptr[-1] = real;
- return faked.ptr;
+ return faked_ptr;
}
void qFreeAligned(void *ptr)
diff --git a/src/corelib/global/qnaclunimplemented.cpp b/src/corelib/global/qnaclunimplemented.cpp
new file mode 100644
index 0000000..1a89b8df
--- /dev/null
+++ b/src/corelib/global/qnaclunimplemented.cpp
@@ -0,0 +1,156 @@
+/****************************************************************************
+**
+** 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 QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qnaclunimplemented.h"
+#include <pthread.h>
+#include <qglobal.h>
+
+/*
+ The purpose of this file is to stub out certain functions
+ that are not provided by the Native Client SDK. This is
+ done as an alterative to sprinkling the Qt sources with
+ NACL ifdefs.
+
+ There are two main classes of functions:
+
+ - Functions that are called but can have no effect:
+ For these we simply give an empty implementation
+
+ - Functions that are referenced in the source code, but
+ is not/must not be called at run-time:
+ These we either leave undefined or implement with a
+ qFatal.
+
+ This is a work in progress.
+*/
+
+extern "C" {
+
+void pthread_cleanup_push(void (*)(void *), void *)
+{
+
+}
+
+void pthread_cleanup_pop(int)
+{
+
+}
+
+int pthread_setcancelstate(int, int *)
+{
+ return 0;
+}
+
+int pthread_setcanceltype(int, int *)
+{
+ return 0;
+}
+
+void pthread_testcancel(void)
+{
+
+}
+
+
+int pthread_cancel(pthread_t)
+{
+ return 0;
+}
+
+int pthread_attr_setinheritsched(pthread_attr_t *,int)
+{
+ return 0;
+}
+
+
+int pthread_attr_getinheritsched(const pthread_attr_t *, int *)
+{
+ return 0;
+}
+
+// event dispatcher, select
+//struct fd_set;
+//struct timeval;
+
+int fcntl(int, int, ...)
+{
+ return 0;
+}
+
+int sigaction(int, const struct sigaction *, struct sigaction *)
+{
+ return 0;
+}
+
+int open(const char *, int, ...)
+{
+ return 0;
+}
+
+int open64(const char *, int, ...)
+{
+ return 0;
+}
+
+int access(const char *, int)
+{
+ return 0;
+}
+
+typedef long off64_t;
+off64_t ftello64(void *)
+{
+ qFatal("ftello64 called");
+ return 0;
+}
+
+off64_t lseek64(int, off_t, int)
+{
+ qFatal("lseek64 called");
+ return 0;
+}
+
+} // Extern C
+
+int select(int, fd_set *, fd_set *, fd_set *, struct timeval *)
+{
+ return 0;
+}
diff --git a/src/corelib/global/qnaclunimplemented.h b/src/corelib/global/qnaclunimplemented.h
new file mode 100644
index 0000000..2d3d426
--- /dev/null
+++ b/src/corelib/global/qnaclunimplemented.h
@@ -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 QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QNACLUNIMPLEMENTED_H
+#define QNACLUNIMPLEMENTED_H
+
+#ifdef Q_OS_NACL
+
+// pthread
+#include <pthread.h>
+#define PTHREAD_CANCEL_DISABLE 1
+#define PTHREAD_CANCEL_ENABLE 2
+#define PTHREAD_INHERIT_SCHED 3
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Core)
+
+extern "C" {
+
+void pthread_cleanup_push(void (*handler)(void *), void *arg);
+void pthread_cleanup_pop(int execute);
+
+int pthread_setcancelstate(int state, int *oldstate);
+int pthread_setcanceltype(int type, int *oldtype);
+void pthread_testcancel(void);
+int pthread_cancel(pthread_t thread);
+
+int pthread_attr_setinheritsched(pthread_attr_t *attr,
+ int inheritsched);
+int pthread_attr_getinheritsched(const pthread_attr_t *attr,
+ int *inheritsched);
+
+// event dispatcher, select
+//struct fd_set;
+//struct timeval;
+int fcntl(int fildes, int cmd, ...);
+int sigaction(int sig, const struct sigaction * act, struct sigaction * oact);
+
+typedef long off64_t;
+off64_t ftello64(void *stream);
+off64_t lseek64(int fildes, off_t offset, int whence);
+int open64(const char *path, int oflag, ...);
+
+}
+
+int select(int nfds, fd_set * readfds, fd_set * writefds, fd_set * errorfds, struct timeval * timeout);
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif //Q_OS_NACL
+
+#endif //QNACLUNIMPLEMENTED_H
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index a531009..3ed6291 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -1659,7 +1659,7 @@ public:
typedef void *HANDLE;
#elif defined(Q_WS_X11)
typedef unsigned long HANDLE;
-#elif defined(Q_WS_QWS)
+#elif defined(Q_WS_QWS) || defined(Q_WS_QPA)
typedef void * HANDLE;
#elif defined(Q_OS_SYMBIAN)
typedef unsigned long int HANDLE; // equivalent to TUint32
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 2bc33d3..f097f2a 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -466,15 +466,18 @@
\value TextWordWrap Breaks lines at appropriate points, e.g. at word
boundaries.
\value TextWrapAnywhere Breaks lines anywhere, even within words.
- \value TextHideMnemonic Same as Qt::TextShowMnemonic but doesn't draw the underlines.
- \value TextDontPrint Treat this text as "hidden" and don't print
- it.
- \value IncludeTrailingSpaces When this option is set, QTextLine::naturalTextWidth() and naturalTextRect() will
- return a value that includes the width of trailing spaces in the text; otherwise
- this width is excluded.
+ \value TextHideMnemonic Same as Qt::TextShowMnemonic but doesn't draw
+ the underlines.
+ \value TextDontPrint Treat this text as "hidden" and don't print it.
+ \value IncludeTrailingSpaces When this option is set,
+ QTextLine::naturalTextWidth() and naturalTextRect() will
+ return a value that includes the width of trailing spaces in the
+ text; otherwise this width is excluded.
\value TextIncludeTrailingSpaces Same as IncludeTrailingSpaces
\value TextJustificationForced Ensures that text lines are justified.
+ \omitvalue TextLongestVariant Ensures that the longest variant is always used
+ when computing the size of a multi-variant string. (Internal)
\omitvalue TextBypassShaping
\omitvalue BreakAnywhere
\omitvalue DontClip
@@ -487,7 +490,6 @@
\omitvalue WordBreak
\omitvalue TextForceLeftToRight
\omitvalue TextForceRightToLeft
- \omitvalue TextLongestVariant Always use the longest variant when computing the size of a multi-variant string.
You can use as many modifier flags as you want, except that
Qt::TextSingleLine and Qt::TextWordWrap cannot be combined.
@@ -514,9 +516,11 @@
delivery at a later time.
\value AutoConnection
- (default) Same as DirectConnection, if the emitter and
- receiver are in the same thread. Same as QueuedConnection,
- if the emitter and receiver are in different threads.
+ (default) If the signal is emitted from a different thread than the
+ receiving object, the signal is queued, behaving as
+ Qt::QueuedConnection. Otherwise, the slot is invoked directly,
+ behaving as Qt::DirectConnection. The type of connection is
+ determined when the signal is emitted.
\value DirectConnection
The slot is invoked immediately, when the signal is
diff --git a/src/corelib/io/io.pri b/src/corelib/io/io.pri
index f81ffaf..4d4ae21 100644
--- a/src/corelib/io/io.pri
+++ b/src/corelib/io/io.pri
@@ -83,7 +83,7 @@ win32 {
SOURCES += io/qprocess_unix.cpp
SOURCES += io/qfilesystemiterator_unix.cpp
}
- macx-*: {
+ !nacl:macx-*: {
HEADERS += io/qfilesystemwatcher_fsevents_p.h
SOURCES += io/qfilesystemengine_mac.cpp
SOURCES += io/qsettings_mac.cpp io/qfilesystemwatcher_fsevents.cpp
@@ -99,9 +99,11 @@ win32 {
io/qfilesystemwatcher_dnotify_p.h
}
- freebsd-*|macx-*|darwin-*|openbsd-*:{
- SOURCES += io/qfilesystemwatcher_kqueue.cpp
- HEADERS += io/qfilesystemwatcher_kqueue_p.h
+ !nacl {
+ freebsd-*|macx-*|darwin-*|openbsd-*:{
+ SOURCES += io/qfilesystemwatcher_kqueue.cpp
+ HEADERS += io/qfilesystemwatcher_kqueue_p.h
+ }
}
symbian {
diff --git a/src/corelib/io/qfilesystemwatcher_fsevents.cpp b/src/corelib/io/qfilesystemwatcher_fsevents.cpp
index d3276bd..0f96792 100644
--- a/src/corelib/io/qfilesystemwatcher_fsevents.cpp
+++ b/src/corelib/io/qfilesystemwatcher_fsevents.cpp
@@ -45,6 +45,8 @@
#include "qfilesystemwatcher.h"
#include "qfilesystemwatcher_fsevents_p.h"
+#ifndef QT_NO_FILESYSTEMWATCHER
+
#include <qdebug.h>
#include <qfile.h>
#include <qdatetime.h>
@@ -487,3 +489,4 @@ void QFSEventsFileSystemWatcherEngine::run()
}
QT_END_NAMESPACE
+#endif //QT_NO_FILESYSTEMWATCHER
diff --git a/src/corelib/io/qfilesystemwatcher_fsevents_p.h b/src/corelib/io/qfilesystemwatcher_fsevents_p.h
index b0462b6..c888c61 100644
--- a/src/corelib/io/qfilesystemwatcher_fsevents_p.h
+++ b/src/corelib/io/qfilesystemwatcher_fsevents_p.h
@@ -56,6 +56,8 @@
#include "qfilesystemwatcher_p.h"
+#ifndef QT_NO_FILESYSTEMWATCHER
+
#include <QtCore/qmutex.h>
#include <QtCore/qwaitcondition.h>
#include <QtCore/qthread.h>
@@ -123,6 +125,8 @@ private:
#endif
};
+#endif //QT_NO_FILESYSTEMWATCHER
+
#endif
QT_END_NAMESPACE
diff --git a/src/corelib/io/qfilesystemwatcher_inotify.cpp b/src/corelib/io/qfilesystemwatcher_inotify.cpp
index 4740a89..dc18ae7 100644
--- a/src/corelib/io/qfilesystemwatcher_inotify.cpp
+++ b/src/corelib/io/qfilesystemwatcher_inotify.cpp
@@ -353,24 +353,24 @@ void QInotifyFileSystemWatcherEngine::readFromInotify()
ioctl(inotifyFd, FIONREAD, (char *) &buffSize);
QVarLengthArray<char, 4096> buffer(buffSize);
buffSize = read(inotifyFd, buffer.data(), buffSize);
- const char *at = buffer.data();
- const char * const end = at + buffSize;
+ char *at = buffer.data();
+ char * const end = at + buffSize;
- QMap<int, inotify_event> eventForId;
+ QMap<int, inotify_event *> eventForId;
while (at < end) {
- const inotify_event *event = reinterpret_cast<const inotify_event *>(at);
+ inotify_event *event = reinterpret_cast<inotify_event *>(at);
if (eventForId.contains(event->wd))
- eventForId[event->wd].mask |= event->mask;
+ eventForId[event->wd]->mask |= event->mask;
else
- eventForId.insert(event->wd, *event);
+ eventForId.insert(event->wd, event);
at += sizeof(inotify_event) + event->len;
}
- QMap<int, inotify_event>::const_iterator it = eventForId.constBegin();
+ QMap<int, inotify_event *>::const_iterator it = eventForId.constBegin();
while (it != eventForId.constEnd()) {
- inotify_event event = *it;
+ const inotify_event &event = **it;
++it;
// qDebug() << "inotify event, wd" << event.wd << "mask" << hex << event.mask;
diff --git a/src/corelib/io/qfilesystemwatcher_kqueue.cpp b/src/corelib/io/qfilesystemwatcher_kqueue.cpp
index 378ad20..7960792 100644
--- a/src/corelib/io/qfilesystemwatcher_kqueue.cpp
+++ b/src/corelib/io/qfilesystemwatcher_kqueue.cpp
@@ -45,6 +45,8 @@
#include "qfilesystemwatcher_kqueue_p.h"
#include "private/qcore_unix_p.h"
+#ifndef QT_NO_FILESYSTEMWATCHER
+
#include <qdebug.h>
#include <qfile.h>
#include <qsocketnotifier.h>
@@ -343,4 +345,6 @@ process_next_event:
}
}
+#endif //QT_NO_FILESYSTEMWATCHER
+
QT_END_NAMESPACE
diff --git a/src/corelib/io/qfilesystemwatcher_kqueue_p.h b/src/corelib/io/qfilesystemwatcher_kqueue_p.h
index eda646b..edc20ae 100644
--- a/src/corelib/io/qfilesystemwatcher_kqueue_p.h
+++ b/src/corelib/io/qfilesystemwatcher_kqueue_p.h
@@ -60,6 +60,7 @@
#include <QtCore/qthread.h>
#include <QtCore/qvector.h>
+#ifndef QT_NO_FILESYSTEMWATCHER
struct kevent;
QT_BEGIN_NAMESPACE
@@ -92,4 +93,5 @@ private:
QT_END_NAMESPACE
+#endif //QT_NO_FILESYSTEMWATCHER
#endif // FILEWATCHER_KQUEUE_P_H
diff --git a/src/corelib/io/qiodevice_p.h b/src/corelib/io/qiodevice_p.h
index 1dd51ea..8b77da5 100644
--- a/src/corelib/io/qiodevice_p.h
+++ b/src/corelib/io/qiodevice_p.h
@@ -68,7 +68,7 @@ QT_BEGIN_NAMESPACE
#define QIODEVICE_BUFFERSIZE Q_INT64_C(16384)
#endif
-// This is QIODevice's read buffer, optimised for read(), isEmpty() and getChar()
+// This is QIODevice's read buffer, optimized for read(), isEmpty() and getChar()
class QIODevicePrivateLinearBuffer
{
public:
diff --git a/src/corelib/io/qresource.cpp b/src/corelib/io/qresource.cpp
index 929885c..98b1dcc 100644
--- a/src/corelib/io/qresource.cpp
+++ b/src/corelib/io/qresource.cpp
@@ -580,7 +580,7 @@ QResource::addSearchPath(const QString &path)
\obsolete
Use QDir::searchPaths() instead.
-
+
Returns the current search path list. This list is consulted when
creating a relative resource.
@@ -928,7 +928,7 @@ public:
}
};
-#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN) && ! defined (Q_OS_NACL)
#define QT_USE_MMAP
#endif
diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp
index f25c272..7235459 100644
--- a/src/corelib/io/qsettings.cpp
+++ b/src/corelib/io/qsettings.cpp
@@ -88,6 +88,12 @@
#define CSIDL_APPDATA 0x001a // <username>\Application Data
#endif
+#ifdef Q_AUTOTEST_EXPORT
+# define Q_AUTOTEST_EXPORT_HELPER Q_AUTOTEST_EXPORT
+#else
+# define Q_AUTOTEST_EXPORT_HELPER static
+#endif
+
// ************************************************************************
// QConfFile
@@ -134,7 +140,7 @@ QT_BEGIN_INCLUDE_NAMESPACE
# include <sys/mount.h>
QT_END_INCLUDE_NAMESPACE
-static bool isLikelyToBeNfs(int handle)
+Q_AUTOTEST_EXPORT_HELPER bool qIsLikelyToBeNfs(int handle)
{
struct statfs buf;
if (fstatfs(handle, &buf) != 0)
@@ -160,7 +166,7 @@ QT_END_INCLUDE_NAMESPACE
# define AUTOFSNG_SUPER_MAGIC 0x7d92b1a0
# endif
-static bool isLikelyToBeNfs(int handle)
+Q_AUTOTEST_EXPORT_HELPER bool qIsLikelyToBeNfs(int handle)
{
struct statfs buf;
if (fstatfs(handle, &buf) != 0)
@@ -177,7 +183,7 @@ QT_BEGIN_INCLUDE_NAMESPACE
# include <sys/statvfs.h>
QT_END_INCLUDE_NAMESPACE
-static bool isLikelyToBeNfs(int handle)
+Q_AUTOTEST_EXPORT_HELPER bool qIsLikelyToBeNfs(int handle)
{
struct statvfs buf;
if (fstatvfs(handle, &buf) != 0)
@@ -189,7 +195,7 @@ static bool isLikelyToBeNfs(int handle)
#endif
}
#else
-static inline bool isLikelyToBeNfs(int /* handle */)
+Q_AUTOTEST_EXPORT_HELPER inline bool qIsLikelyToBeNfs(int /* handle */)
{
return true;
}
@@ -203,7 +209,7 @@ static bool unixLock(int handle, int lockType)
now is to disable locking when we detect NFS (or AutoFS or
CacheFS, which are probably wrapping NFS).
*/
- if (isLikelyToBeNfs(handle))
+ if (qIsLikelyToBeNfs(handle))
return false;
struct flock fl;
@@ -1124,7 +1130,7 @@ static void initDefaultPaths(QMutexLocker *locker)
if (env == 0) {
userPath = homePath;
userPath += QLatin1Char('/');
-#ifdef Q_WS_QWS
+#if defined(Q_WS_QWS) || defined(Q_WS_QPA)
userPath += QLatin1String("Settings");
#else
userPath += QLatin1String(".config");
@@ -1229,16 +1235,21 @@ QConfFileSettingsPrivate::~QConfFileSettingsPrivate()
if (confFiles[i] && !confFiles[i]->ref.deref()) {
if (confFiles[i]->size == 0) {
delete confFiles[i].take();
- } else if (unusedCache) {
+ } else {
if (usedHash)
usedHash->remove(confFiles[i]->name);
- QT_TRY {
- // compute a better size?
- unusedCache->insert(confFiles[i]->name, confFiles[i].data(),
- 10 + (confFiles[i]->originalKeys.size() / 4));
- confFiles[i].take();
- } QT_CATCH(...) {
- // out of memory. Do not cache the file.
+ if (unusedCache) {
+ QT_TRY {
+ // compute a better size?
+ unusedCache->insert(confFiles[i]->name, confFiles[i].data(),
+ 10 + (confFiles[i]->originalKeys.size() / 4));
+ confFiles[i].take();
+ } QT_CATCH(...) {
+ // out of memory. Do not cache the file.
+ delete confFiles[i].take();
+ }
+ } else {
+ // unusedCache is gone - delete the entry to prevent a memory leak
delete confFiles[i].take();
}
}
@@ -3504,7 +3515,7 @@ void QSettings::setPath(Format format, Scope scope, const QString &path)
\threadsafe
Registers a custom storage format. On success, returns a special
- Format value that can then be passed to the QSettings constuctor.
+ Format value that can then be passed to the QSettings constructor.
On failure, returns InvalidFormat.
The \a extension is the file
diff --git a/src/corelib/io/qsettings_p.h b/src/corelib/io/qsettings_p.h
index ec345be..5ff4d96 100644
--- a/src/corelib/io/qsettings_p.h
+++ b/src/corelib/io/qsettings_p.h
@@ -70,7 +70,7 @@
QT_BEGIN_NAMESPACE
-#if defined(Q_WS_QWS)
+#if defined(Q_WS_QWS) || defined(Q_WS_QPA)
#define QT_QSETTINGS_ALWAYS_CASE_SENSITIVE_AND_FORGET_ORIGINAL_KEY_ORDER
#endif
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index 6452c0f..6ec5562 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -6048,6 +6048,14 @@ QUrl &QUrl::operator =(const QString &url)
return *this;
}
+/*!
+ \fn void QUrl::swap(QUrl &other)
+ \since 4.8
+
+ Swaps URL \a other with this URL. This operation is very
+ fast and never fails.
+*/
+
/*! \internal
Forces a detach.
diff --git a/src/corelib/io/qurl.h b/src/corelib/io/qurl.h
index 563be5f..63fe98d 100644
--- a/src/corelib/io/qurl.h
+++ b/src/corelib/io/qurl.h
@@ -100,6 +100,8 @@ public:
#endif
~QUrl();
+ inline void swap(QUrl &other) { qSwap(d, other.d); }
+
void setUrl(const QString &url);
void setUrl(const QString &url, ParsingMode mode);
// ### Qt 5: merge the two setUrl() functions, with mode = TolerantMode
diff --git a/src/corelib/kernel/kernel.pri b/src/corelib/kernel/kernel.pri
index bd674a5..93818d1 100644
--- a/src/corelib/kernel/kernel.pri
+++ b/src/corelib/kernel/kernel.pri
@@ -80,12 +80,12 @@ wince*: {
kernel/qfunctions_wince.h
}
-mac:!embedded {
+mac:!embedded:!qpa{
SOURCES += \
kernel/qcoreapplication_mac.cpp
}
-mac {
+mac:!nacl {
SOURCES += \
kernel/qcore_mac.cpp
}
diff --git a/src/corelib/kernel/qabstractitemmodel.cpp b/src/corelib/kernel/qabstractitemmodel.cpp
index 4fc9792..7e1ed9d 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 & drop with item views},
+ QAbstractItemView, {Using drag and drop with item views},
{Simple DOM Model Example}, {Simple Tree Model Example},
{Editable Tree Model Example}, {Fetch More Example}
*/
@@ -1336,14 +1336,13 @@ void QAbstractItemModelPrivate::columnsRemoved(const QModelIndex &parent,
layoutChanged(). In other words, when the structure changes:
\list
- \o Call beginLayoutChanged()
+ \o emit layoutAboutToBeChanged
\o Remember the QModelIndex that will change
\o Update your internal data
\o Call changePersistentIndex()
- \o Call endLayoutChanged()
+ \o emit layoutChanged
\endlist
-
\sa layoutAboutToBeChanged(), dataChanged(), headerDataChanged(), modelReset(),
changePersistentIndex()
*/
@@ -1761,7 +1760,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 & drop with item views}
+ \sa supportedDropActions(), {Using drag and drop with item views}
*/
bool QAbstractItemModel::dropMimeData(const QMimeData *data, Qt::DropAction action,
int row, int column, const QModelIndex &parent)
@@ -1798,7 +1797,7 @@ bool QAbstractItemModel::dropMimeData(const QMimeData *data, Qt::DropAction acti
reimplement the dropMimeData() function to handle the additional
operations.
- \sa dropMimeData(), Qt::DropActions, {Using drag & drop with item
+ \sa dropMimeData(), Qt::DropActions, {Using drag and drop with item
views}
*/
Qt::DropActions QAbstractItemModel::supportedDropActions() const
@@ -1815,7 +1814,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 & drop with item views}
+ \sa Qt::DropActions, {Using drag and drop with item views}
*/
Qt::DropActions QAbstractItemModel::supportedDragActions() const
{
@@ -1831,7 +1830,7 @@ Qt::DropActions QAbstractItemModel::supportedDragActions() const
Sets the supported drag \a actions for the items in the model.
- \sa supportedDragActions(), {Using drag & drop with item views}
+ \sa supportedDragActions(), {Using drag and drop with item views}
*/
void QAbstractItemModel::setSupportedDragActions(Qt::DropActions actions)
{
@@ -2637,8 +2636,6 @@ void QAbstractItemModel::endMoveRows()
QAbstractItemModelPrivate::Change insertChange = d->changes.pop();
QAbstractItemModelPrivate::Change removeChange = d->changes.pop();
- d->itemsMoved(removeChange.parent, removeChange.first, removeChange.last, insertChange.parent, insertChange.first, Qt::Vertical);
-
QModelIndex adjustedSource = removeChange.parent;
QModelIndex adjustedDestination = insertChange.parent;
@@ -2649,6 +2646,8 @@ void QAbstractItemModel::endMoveRows()
if (removeChange.needsAdjust)
adjustedSource = createIndex(adjustedSource.row() + numMoved, adjustedSource.column(), adjustedSource.internalPointer());
+ d->itemsMoved(adjustedSource, removeChange.first, removeChange.last, adjustedDestination, insertChange.first, Qt::Vertical);
+
emit rowsMoved(adjustedSource, removeChange.first, removeChange.last, adjustedDestination, insertChange.first);
emit layoutChanged();
}
@@ -2861,8 +2860,6 @@ void QAbstractItemModel::endMoveColumns()
QAbstractItemModelPrivate::Change insertChange = d->changes.pop();
QAbstractItemModelPrivate::Change removeChange = d->changes.pop();
- d->itemsMoved(removeChange.parent, removeChange.first, removeChange.last, insertChange.parent, insertChange.first, Qt::Horizontal);
-
QModelIndex adjustedSource = removeChange.parent;
QModelIndex adjustedDestination = insertChange.parent;
@@ -2873,6 +2870,8 @@ void QAbstractItemModel::endMoveColumns()
if (removeChange.needsAdjust)
adjustedSource = createIndex(adjustedSource.row(), adjustedSource.column() + numMoved, adjustedSource.internalPointer());
+ d->itemsMoved(adjustedSource, removeChange.first, removeChange.last, adjustedDestination, insertChange.first, Qt::Horizontal);
+
emit columnsMoved(adjustedSource, removeChange.first, removeChange.last, adjustedDestination, insertChange.first);
emit layoutChanged();
}
diff --git a/src/corelib/kernel/qcore_mac_p.h b/src/corelib/kernel/qcore_mac_p.h
index 9591f08..22b6a36 100644
--- a/src/corelib/kernel/qcore_mac_p.h
+++ b/src/corelib/kernel/qcore_mac_p.h
@@ -68,7 +68,15 @@
# undef qDebug
#endif
+#if defined(QT_BUILD_QMAKE) || defined(QT_BOOTSTRAPPED)
#include <ApplicationServices/ApplicationServices.h>
+#else
+#include <CoreFoundation/CoreFoundation.h>
+#endif
+
+#ifndef QT_NO_CORESERVICES
+#include <CoreServices/CoreServices.h>
+#endif
#undef DEBUG
#ifdef OLD_DEBUG
diff --git a/src/corelib/kernel/qcore_unix.cpp b/src/corelib/kernel/qcore_unix.cpp
index e0d92c0..685576b 100644
--- a/src/corelib/kernel/qcore_unix.cpp
+++ b/src/corelib/kernel/qcore_unix.cpp
@@ -42,7 +42,8 @@
#include "qcore_unix_p.h"
#include "qelapsedtimer.h"
-#ifndef Q_OS_VXWORKS
+#ifdef Q_OS_NACL
+#elif !defined (Q_OS_VXWORKS)
# if !defined(Q_OS_HPUX) || defined(__ia64)
# include <sys/select.h>
# endif
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index 4abe0ae..0f95ee0 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -416,11 +416,10 @@ QString qAppName()
operations can call processEvents() to keep the application
responsive.
- Some Qt classes, such as QString, can be used without a
- QCoreApplication object. However, in general, we recommend that
- you create a QCoreApplication or a QApplication object in your \c
- main() function as early as possible. exit() will not return
- until the event loop exits; e.g., when quit() is called.
+ In general, we recommend that you create a QCoreApplication or
+ a QApplication object in your \c main() function as early as
+ possible. exit() will not return until the event loop exits;
+ e.g., when quit() is called.
Several static convenience functions are also provided. The
QCoreApplication object is available from instance(). Events can
diff --git a/src/corelib/kernel/qcoreevent.h b/src/corelib/kernel/qcoreevent.h
index 9d3513a..4c91aaf 100644
--- a/src/corelib/kernel/qcoreevent.h
+++ b/src/corelib/kernel/qcoreevent.h
@@ -328,6 +328,7 @@ private:
friend class QETWidget;
friend class QGraphicsView;
friend class QGraphicsViewPrivate;
+ friend class QGraphicsScene;
friend class QGraphicsScenePrivate;
#ifndef QT_NO_GESTURES
friend class QGestureManager;
diff --git a/src/corelib/kernel/qeventdispatcher_glib.cpp b/src/corelib/kernel/qeventdispatcher_glib.cpp
index 8390275..8d25780 100644
--- a/src/corelib/kernel/qeventdispatcher_glib.cpp
+++ b/src/corelib/kernel/qeventdispatcher_glib.cpp
@@ -180,6 +180,8 @@ static gboolean timerSourceCheck(GSource *source)
static gboolean timerSourceDispatch(GSource *source, GSourceFunc, gpointer)
{
GTimerSource *timerSource = reinterpret_cast<GTimerSource *>(source);
+ if (timerSource->processEventsFlags & QEventLoop::X11ExcludeTimers)
+ return true;
timerSource->runWithIdlePriority = true;
(void) timerSource->timerList.activateTimers();
return true; // ??? don't remove, right again?
@@ -311,6 +313,10 @@ QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(GMainContext *context)
}
}
+#if GLIB_CHECK_VERSION (2, 22, 0)
+ g_main_context_push_thread_default (mainContext);
+#endif
+
// setup post event source
postEventSource = reinterpret_cast<GPostEventSource *>(g_source_new(&postEventSourceFuncs,
sizeof(GPostEventSource)));
@@ -389,6 +395,9 @@ QEventDispatcherGlib::~QEventDispatcherGlib()
d->postEventSource = 0;
Q_ASSERT(d->mainContext != 0);
+#if GLIB_CHECK_VERSION (2, 22, 0)
+ g_main_context_pop_thread_default (d->mainContext);
+#endif
g_main_context_unref(d->mainContext);
d->mainContext = 0;
}
diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp
index 87d6a49..6154119 100644
--- a/src/corelib/kernel/qeventdispatcher_symbian.cpp
+++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp
@@ -975,9 +975,7 @@ bool QEventDispatcherSymbian::sendPostedEvents()
inline void QEventDispatcherSymbian::addDeferredActiveObject(QActiveObject *object)
{
- if (m_deferredActiveObjects.isEmpty()) {
- m_completeDeferredAOs->complete();
- }
+ queueDeferredActiveObjectsCompletion();
m_deferredActiveObjects.append(object);
}
@@ -986,6 +984,11 @@ inline void QEventDispatcherSymbian::removeDeferredActiveObject(QActiveObject *o
m_deferredActiveObjects.removeAll(object);
}
+void QEventDispatcherSymbian::queueDeferredActiveObjectsCompletion()
+{
+ m_completeDeferredAOs->complete();
+}
+
void QEventDispatcherSymbian::reactivateDeferredActiveObjects()
{
while (!m_deferredActiveObjects.isEmpty()) {
diff --git a/src/corelib/kernel/qeventdispatcher_symbian_p.h b/src/corelib/kernel/qeventdispatcher_symbian_p.h
index 1486db5..3615996 100644
--- a/src/corelib/kernel/qeventdispatcher_symbian_p.h
+++ b/src/corelib/kernel/qeventdispatcher_symbian_p.h
@@ -247,7 +247,9 @@ public:
void addDeferredActiveObject(QActiveObject *object);
void removeDeferredActiveObject(QActiveObject *object);
- void reactivateDeferredActiveObjects();
+ void queueDeferredActiveObjectsCompletion();
+ // Can be overridden to activate local active objects too, but do call baseclass!
+ virtual void reactivateDeferredActiveObjects();
inline int iterationCount() const { return m_iterationCount; }
diff --git a/src/corelib/kernel/qeventdispatcher_unix.cpp b/src/corelib/kernel/qeventdispatcher_unix.cpp
index f50994c..b2b9806 100644
--- a/src/corelib/kernel/qeventdispatcher_unix.cpp
+++ b/src/corelib/kernel/qeventdispatcher_unix.cpp
@@ -112,7 +112,9 @@ QEventDispatcherUNIXPrivate::QEventDispatcherUNIXPrivate()
bool pipefail = false;
// initialize the common parts of the event loop
-#if defined(Q_OS_INTEGRITY)
+#if defined(Q_OS_NACL)
+ // do nothing.
+#elif defined(Q_OS_INTEGRITY)
// INTEGRITY doesn't like a "select" on pipes, so use socketpair instead
if (socketpair(AF_INET, SOCK_STREAM, PF_INET, thread_pipe) == -1) {
perror("QEventDispatcherUNIXPrivate(): Unable to create socket pair");
@@ -157,7 +159,9 @@ QEventDispatcherUNIXPrivate::QEventDispatcherUNIXPrivate()
QEventDispatcherUNIXPrivate::~QEventDispatcherUNIXPrivate()
{
-#if defined(Q_OS_VXWORKS)
+#if defined(Q_OS_NACL)
+ // do nothing.
+#elif defined(Q_OS_VXWORKS)
close(thread_pipe[0]);
char name[20];
@@ -312,7 +316,7 @@ int QEventDispatcherUNIXPrivate::doSelect(QEventLoop::ProcessEventsFlags flags,
QTimerInfoList::QTimerInfoList()
{
-#if (_POSIX_MONOTONIC_CLOCK-0 <= 0) && !defined(Q_OS_MAC)
+#if (_POSIX_MONOTONIC_CLOCK-0 <= 0) && !defined(Q_OS_MAC) && !defined(Q_OS_NACL)
if (!QElapsedTimer::isMonotonic()) {
// not using monotonic timers, initialize the timeChanged() machinery
previousTime = qt_gettime();
@@ -364,6 +368,10 @@ timeval qAbs(const timeval &t)
*/
bool QTimerInfoList::timeChanged(timeval *delta)
{
+#ifdef Q_OS_NACL
+ Q_UNUSED(delta)
+ return false; // Calling "times" crashes.
+#endif
struct tms unused;
clock_t currentTicks = times(&unused);
diff --git a/src/corelib/kernel/qeventdispatcher_unix_p.h b/src/corelib/kernel/qeventdispatcher_unix_p.h
index 060a163..e1b6b1d 100644
--- a/src/corelib/kernel/qeventdispatcher_unix_p.h
+++ b/src/corelib/kernel/qeventdispatcher_unix_p.h
@@ -64,7 +64,7 @@
# include <sys/times.h>
#else
# include <sys/time.h>
-# if !defined(Q_OS_HPUX) || defined(__ia64)
+# if (!defined(Q_OS_HPUX) || defined(__ia64)) && !defined(Q_OS_NACL)
# include <sys/select.h>
# endif
#endif
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp
index 153ccdf..aa7e32f 100644
--- a/src/corelib/kernel/qeventdispatcher_win.cpp
+++ b/src/corelib/kernel/qeventdispatcher_win.cpp
@@ -78,6 +78,8 @@ extern uint qGlobalPostedEventsCount();
#ifndef QT_NO_GESTURES
#ifndef WM_GESTURE
# define WM_GESTURE 0x0119
+#endif
+#ifndef WM_GESTURENOTIFY
# define WM_GESTURENOTIFY 0x011A
#endif
#endif // QT_NO_GESTURES
@@ -354,9 +356,6 @@ public:
// for controlling when to send posted events
QAtomicInt serialNumber;
int lastSerialNumber;
-#ifndef Q_OS_WINCE
- int lastMessageTime;
-#endif
QAtomicInt wakeUps;
// timers
@@ -381,11 +380,7 @@ public:
QEventDispatcherWin32Private::QEventDispatcherWin32Private()
: threadId(GetCurrentThreadId()), interrupt(false), internalHwnd(0), getMessageHook(0),
- serialNumber(0), lastSerialNumber(0),
-#ifndef Q_OS_WINCE
- lastMessageTime(0),
-#endif
- wakeUps(0)
+ serialNumber(0), lastSerialNumber(0), wakeUps(0)
{
resolveTimerAPI();
}
@@ -500,9 +495,6 @@ LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPA
int localSerialNumber = d->serialNumber;
if (localSerialNumber != d->lastSerialNumber) {
d->lastSerialNumber = localSerialNumber;
-#ifndef Q_OS_WINCE
- d->lastMessageTime = GetMessageTime();
-#endif
QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData);
}
return 0;
@@ -521,11 +513,7 @@ LRESULT QT_WIN_CALLBACK qt_GetMessageHook(int code, WPARAM wp, LPARAM lp)
int localSerialNumber = d->serialNumber;
MSG unused;
if ((HIWORD(GetQueueStatus(QS_INPUT | QS_RAWINPUT)) == 0
- && PeekMessage(&unused, 0, WM_TIMER, WM_TIMER, PM_NOREMOVE) == 0)
-#ifndef Q_OS_WINCE
- || GetMessageTime() - d->lastMessageTime >= 10
-#endif
- ) {
+ && PeekMessage(&unused, 0, WM_TIMER, WM_TIMER, PM_NOREMOVE) == 0)) {
// no more input or timer events in the message queue or more than 10ms has elapsed since
// we send posted events, we can allow posted events to be sent now
(void) d->wakeUps.fetchAndStoreRelease(0);
diff --git a/src/corelib/kernel/qmath.qdoc b/src/corelib/kernel/qmath.qdoc
index 48f74b6..2c03b9a 100644
--- a/src/corelib/kernel/qmath.qdoc
+++ b/src/corelib/kernel/qmath.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/src/corelib/kernel/qmimedata.cpp b/src/corelib/kernel/qmimedata.cpp
index bf4001a..899ca7b 100644
--- a/src/corelib/kernel/qmimedata.cpp
+++ b/src/corelib/kernel/qmimedata.cpp
@@ -249,7 +249,7 @@ QVariant QMimeDataPrivate::retrieveTypedData(const QString &format, QVariant::Ty
\o We can subclass QMimeData and reimplement hasFormat(),
formats(), and retrieveData().
- \o If the drag and drop operation occurs withing a single
+ \o If the drag and drop operation occurs within a single
application, we can subclass QMimeData and add extra data in
it, and use a qobject_cast() in the receiver's drop event
handler. For example:
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index ceffa66..7fe9c52 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -127,6 +127,7 @@ extern "C" Q_CORE_EXPORT void qt_removeObject(QObject *)
void (*QAbstractDeclarativeData::destroyed)(QAbstractDeclarativeData *, QObject *) = 0;
void (*QAbstractDeclarativeData::parentChanged)(QAbstractDeclarativeData *, QObject *, QObject *) = 0;
+void (*QAbstractDeclarativeData::objectNameChanged)(QAbstractDeclarativeData *, QObject *) = 0;
QObjectData::~QObjectData() {}
@@ -1067,7 +1068,12 @@ QString QObject::objectName() const
void QObject::setObjectName(const QString &name)
{
Q_D(QObject);
+ bool objectNameChanged = d->declarativeData && d->objectName != name;
+
d->objectName = name;
+
+ if (objectNameChanged)
+ d->declarativeData->objectNameChanged(d->declarativeData, this);
}
@@ -3502,9 +3508,7 @@ void QMetaObject::activate(QObject *sender, const QMetaObject *m, int local_sign
// determine if this connection should be sent immediately or
// put into the event queue
- if ((c->connectionType == Qt::AutoConnection
- && (!receiverInSameThread
- || receiver->d_func()->threadData != sender->d_func()->threadData))
+ if ((c->connectionType == Qt::AutoConnection && !receiverInSameThread)
|| (c->connectionType == Qt::QueuedConnection)) {
queued_activate(sender, signal_absolute_index, c, argv ? argv : empty_argv);
continue;
diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h
index 82023d4..effd3e6 100644
--- a/src/corelib/kernel/qobject_p.h
+++ b/src/corelib/kernel/qobject_p.h
@@ -90,6 +90,7 @@ class Q_CORE_EXPORT QAbstractDeclarativeData
public:
static void (*destroyed)(QAbstractDeclarativeData *, QObject *);
static void (*parentChanged)(QAbstractDeclarativeData *, QObject *, QObject *);
+ static void (*objectNameChanged)(QAbstractDeclarativeData *, QObject *);
};
class Q_CORE_EXPORT QObjectPrivate : public QObjectData
diff --git a/src/corelib/kernel/qsharedmemory.cpp b/src/corelib/kernel/qsharedmemory.cpp
index 0782ffe..6d7c7a4 100644
--- a/src/corelib/kernel/qsharedmemory.cpp
+++ b/src/corelib/kernel/qsharedmemory.cpp
@@ -73,14 +73,13 @@ QSharedMemoryPrivate::makePlatformSafeKey(const QString &key,
QString part1 = key;
part1.replace(QRegExp(QLatin1String("[^A-Za-z]")), QString());
result.append(part1);
-#ifdef Q_OS_SYMBIAN
- return result.left(KMaxKernelName);
-#endif
QByteArray hex = QCryptographicHash::hash(key.toUtf8(), QCryptographicHash::Sha1).toHex();
result.append(QLatin1String(hex));
#ifdef Q_OS_WIN
return result;
+#elif defined(Q_OS_SYMBIAN)
+ return result.left(KMaxKernelName);
#else
return QDir::tempPath() + QLatin1Char('/') + result;
#endif
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp
index feb85ce..aa070f1 100644
--- a/src/corelib/kernel/qvariant.cpp
+++ b/src/corelib/kernel/qvariant.cpp
@@ -1808,6 +1808,14 @@ QVariant& QVariant::operator=(const QVariant &variant)
}
/*!
+ \fn void QVariant::swap(QVariant &other)
+ \since 4.8
+
+ Swaps variant \a other with this variant. This operation is very
+ fast and never fails.
+*/
+
+/*!
\fn void QVariant::detach()
\internal
diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h
index b267954..611db8b 100644
--- a/src/corelib/kernel/qvariant.h
+++ b/src/corelib/kernel/qvariant.h
@@ -224,6 +224,8 @@ class Q_CORE_EXPORT QVariant
{ qSwap(d, other.d); return *this; }
#endif
+ inline void swap(QVariant &other) { qSwap(d, other.d); }
+
Type type() const;
int userType() const;
const char *typeName() const;
diff --git a/src/corelib/plugin/qelfparser_p.cpp b/src/corelib/plugin/qelfparser_p.cpp
index 2e77ae7..c60b3d5 100644
--- a/src/corelib/plugin/qelfparser_p.cpp
+++ b/src/corelib/plugin/qelfparser_p.cpp
@@ -39,8 +39,11 @@
**
****************************************************************************/
-#include "qlibrary_p.h"
#include "qelfparser_p.h"
+
+#if defined (Q_OF_ELF) && defined(Q_CC_GNU)
+
+#include "qlibrary_p.h"
#include <qdebug.h>
QT_BEGIN_NAMESPACE
@@ -139,7 +142,7 @@ int QElfParser::parse(const char *dataStart, ulong fdlen, const QString &library
qelfhalf_t e_shtrndx = read<qelfhalf_t> (data);
data += sizeof(qelfhalf_t); // e_shtrndx
- if ((e_shnum * e_shentsize) > fdlen) {
+ if ((quint32)(e_shnum * e_shentsize) > fdlen) {
if (lib)
lib->errorString = QLibrary::tr("'%1' is an invalid ELF object (%2)").arg(library)
.arg(QLatin1String("announced %2 sections, each %3 bytes, exceed file size"))
@@ -165,7 +168,7 @@ int QElfParser::parse(const char *dataStart, ulong fdlen, const QString &library
parseSectionHeader(dataStart + soff, &strtab);
m_stringTableFileOffset = strtab.offset;
- if ((m_stringTableFileOffset + e_shentsize) >= fdlen || m_stringTableFileOffset == 0) {
+ if ((quint32)(m_stringTableFileOffset + e_shentsize) >= fdlen || m_stringTableFileOffset == 0) {
if (lib)
lib->errorString = QLibrary::tr("'%1' is an invalid ELF object (%2)").arg(library)
.arg(QLatin1String("string table seems to be at %1"))
@@ -232,3 +235,4 @@ int QElfParser::parse(const char *dataStart, ulong fdlen, const QString &library
QT_END_NAMESPACE
+#endif // defined(Q_OF_ELF) && defined(Q_CC_GNU)
diff --git a/src/corelib/plugin/qelfparser_p.h b/src/corelib/plugin/qelfparser_p.h
index 380d5a1..8087da5 100644
--- a/src/corelib/plugin/qelfparser_p.h
+++ b/src/corelib/plugin/qelfparser_p.h
@@ -56,6 +56,8 @@
#include <qendian.h>
#include <qglobal.h>
+#if defined (Q_OF_ELF) && defined(Q_CC_GNU)
+
QT_BEGIN_NAMESPACE
class QString;
@@ -99,5 +101,6 @@ public:
QT_END_NAMESPACE
-#endif // QELFPARSER_P_H
+#endif // defined(Q_OF_ELF) && defined(Q_CC_GNU)
+#endif // QELFPARSER_P_H
diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp
index 5683c66..fc8721c 100644
--- a/src/corelib/plugin/qlibrary.cpp
+++ b/src/corelib/plugin/qlibrary.cpp
@@ -1,3 +1,4 @@
+
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
@@ -385,7 +386,7 @@ static bool qt_unix_query(const QString &library, uint *version, bool *debug, QB
}
} else if (r != QElfParser::Ok) {
if (lib && qt_debug_component()) {
- qWarning(qPrintable(lib->errorString));
+ qWarning("QElfParser: %s",qPrintable(lib->errorString));
}
return false;
}
diff --git a/src/corelib/plugin/qplugin.qdoc b/src/corelib/plugin/qplugin.qdoc
index b02cfbf..9183350 100644
--- a/src/corelib/plugin/qplugin.qdoc
+++ b/src/corelib/plugin/qplugin.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/src/corelib/plugin/qsystemlibrary.cpp b/src/corelib/plugin/qsystemlibrary.cpp
index 1b8d8fe..2386cd6 100644
--- a/src/corelib/plugin/qsystemlibrary.cpp
+++ b/src/corelib/plugin/qsystemlibrary.cpp
@@ -57,8 +57,8 @@
The search order is the same as the order in DLL Safe search mode Windows,
except that we don't search:
* The current directory
- * The 16-bit system directory. (normally c:\windows\system)
- * The Windows directory. (normally c:\windows)
+ * The 16-bit system directory. (normally \c{c:\windows\system})
+ * The Windows directory. (normally \c{c:\windows})
This means that the effective search order is:
1. Application path.
diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp
index 09558a9..98f7931 100644
--- a/src/corelib/statemachine/qstatemachine.cpp
+++ b/src/corelib/statemachine/qstatemachine.cpp
@@ -178,7 +178,7 @@ QT_BEGIN_NAMESPACE
QStateMachinePrivate::QStateMachinePrivate()
{
- QAbstractStatePrivate::isMachine = true;
+ isMachine = true;
state = NotRunning;
_startState = 0;
diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp
index 2c63dfc..69b70cb 100644
--- a/src/corelib/thread/qthread.cpp
+++ b/src/corelib/thread/qthread.cpp
@@ -667,9 +667,9 @@ QThread::Priority QThread::priority() const
to finish will be woken up.
\warning This function is dangerous and its use is discouraged.
- The thread can be terminate at any point in its code path.
+ The thread can be terminated at any point in its code path.
Threads can be terminated while modifying data. There is no
- chance for the thread to cleanup after itself, unlock any held
+ chance for the thread to clean up after itself, unlock any held
mutexes, etc. In short, use this function only if absolutely
necessary.
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp
index a7601b6..f508c0a 100644
--- a/src/corelib/thread/qthread_unix.cpp
+++ b/src/corelib/thread/qthread_unix.cpp
@@ -83,7 +83,9 @@
# define old_qDebug qDebug
# undef qDebug
# endif
+#ifndef QT_NO_CORESERVICES
# include <CoreServices/CoreServices.h>
+#endif //QT_NO_CORESERVICES
# ifdef old_qDebug
# undef qDebug
@@ -142,6 +144,39 @@ static void destroy_current_thread_data_key()
}
Q_DESTRUCTOR_FUNCTION(destroy_current_thread_data_key)
+
+// Utility functions for getting, setting and clearing thread specific data.
+// In Symbian, TLS access is significantly faster than pthread_getspecific.
+// However Symbian does not have the thread destruction cleanup functionality
+// that pthread has, so pthread_setspecific is also used.
+static QThreadData *get_thread_data()
+{
+#ifdef Q_OS_SYMBIAN
+ return reinterpret_cast<QThreadData *>(Dll::Tls());
+#else
+ pthread_once(&current_thread_data_once, create_current_thread_data_key);
+ return reinterpret_cast<QThreadData *>(pthread_getspecific(current_thread_data_key));
+#endif
+}
+
+static void set_thread_data(QThreadData *data)
+{
+#ifdef Q_OS_SYMBIAN
+ qt_symbian_throwIfError(Dll::SetTls(data));
+#endif
+ pthread_once(&current_thread_data_once, create_current_thread_data_key);
+ pthread_setspecific(current_thread_data_key, data);
+}
+
+static void clear_thread_data()
+{
+#ifdef Q_OS_SYMBIAN
+ Dll::FreeTls();
+#endif
+ pthread_setspecific(current_thread_data_key, 0);
+}
+
+
#ifdef Q_OS_SYMBIAN
static void init_symbian_thread_handle(RThread &thread)
{
@@ -158,26 +193,24 @@ static void init_symbian_thread_handle(RThread &thread)
QThreadData *QThreadData::current()
{
- pthread_once(&current_thread_data_once, create_current_thread_data_key);
-
- QThreadData *data = reinterpret_cast<QThreadData *>(pthread_getspecific(current_thread_data_key));
+ QThreadData *data = get_thread_data();
if (!data) {
void *a;
if (QInternal::activateCallbacks(QInternal::AdoptCurrentThread, &a)) {
QThread *adopted = static_cast<QThread*>(a);
Q_ASSERT(adopted);
data = QThreadData::get2(adopted);
- pthread_setspecific(current_thread_data_key, data);
+ set_thread_data(data);
adopted->d_func()->running = true;
adopted->d_func()->finished = false;
static_cast<QAdoptedThread *>(adopted)->init();
} else {
data = new QThreadData;
- pthread_setspecific(current_thread_data_key, data);
QT_TRY {
+ set_thread_data(data);
data->thread = new QAdoptedThread(data);
} QT_CATCH(...) {
- pthread_setspecific(current_thread_data_key, 0);
+ clear_thread_data();
data->deref();
data = 0;
QT_RETHROW;
@@ -268,8 +301,7 @@ void *QThreadPrivate::start(void *arg)
User::SetCritical(User::EProcessCritical);
#endif
- pthread_once(&current_thread_data_once, create_current_thread_data_key);
- pthread_setspecific(current_thread_data_key, data);
+ set_thread_data(data);
data->ref();
data->quitNow = false;
@@ -313,6 +345,7 @@ void QThreadPrivate::finish(void *arg)
emit thr->terminated();
d->terminated = false;
emit thr->finished();
+ QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete);
if (d->data->eventDispatcher) {
d->data->eventDispatcher->closingDown();
@@ -358,7 +391,7 @@ int QThread::idealThreadCount()
{
int cores = -1;
-#if defined(Q_OS_MAC)
+#if defined(Q_OS_MAC) && !defined(Q_WS_QPA)
// Mac OS X
cores = MPProcessorsScheduled();
#elif defined(Q_OS_HPUX)
@@ -476,6 +509,7 @@ void QThread::usleep(unsigned long usecs)
// Does some magic and calculate the Unix scheduler priorities
// sched_policy is IN/OUT: it must be set to a valid policy before calling this function
// sched_priority is OUT only
+#if defined(Q_OS_DARWIN) || !defined(Q_OS_OPENBSD) && defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING-0 >= 0)
static bool calculateUnixPriority(int priority, int *sched_policy, int *sched_priority)
{
#ifdef SCHED_IDLE
@@ -503,6 +537,7 @@ static bool calculateUnixPriority(int priority, int *sched_policy, int *sched_pr
*sched_priority = prio;
return true;
}
+#endif
void QThread::start(Priority priority)
{
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp
index f0cbe8d..4a967ed 100644
--- a/src/corelib/thread/qthread_win.cpp
+++ b/src/corelib/thread/qthread_win.cpp
@@ -332,6 +332,7 @@ void QThreadPrivate::finish(void *arg, bool lockAnyway)
emit thr->terminated();
d->terminated = false;
emit thr->finished();
+ QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete);
if (d->data->eventDispatcher) {
d->data->eventDispatcher->closingDown();
diff --git a/src/corelib/thread/qwaitcondition.qdoc b/src/corelib/thread/qwaitcondition.qdoc
index b21285e..aaed420 100644
--- a/src/corelib/thread/qwaitcondition.qdoc
+++ b/src/corelib/thread/qwaitcondition.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/src/corelib/tools/qalgorithms.qdoc b/src/corelib/tools/qalgorithms.qdoc
index 4a4f592..898f940 100644
--- a/src/corelib/tools/qalgorithms.qdoc
+++ b/src/corelib/tools/qalgorithms.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/src/corelib/tools/qbitarray.cpp b/src/corelib/tools/qbitarray.cpp
index 04018ba..a1ad787 100644
--- a/src/corelib/tools/qbitarray.cpp
+++ b/src/corelib/tools/qbitarray.cpp
@@ -418,6 +418,13 @@ void QBitArray::fill(bool value, int begin, int end)
this bit array.
*/
+/*! \fn void QBitArray::swap(QBitArray &other)
+ \since 4.8
+
+ Swaps bit array \a other with this bit array. This operation is very
+ fast and never fails.
+*/
+
/*! \fn bool QBitArray::operator==(const QBitArray &other) const
Returns true if \a other is equal to this bit array; otherwise
diff --git a/src/corelib/tools/qbitarray.h b/src/corelib/tools/qbitarray.h
index bd79904..ddda5e7 100644
--- a/src/corelib/tools/qbitarray.h
+++ b/src/corelib/tools/qbitarray.h
@@ -68,6 +68,8 @@ public:
{ qSwap(d, other.d); return *this; }
#endif
+ inline void swap(QBitArray &other) { qSwap(d, other.d); }
+
inline int size() const { return (d.size() << 3) - *d.constData(); }
inline int count() const { return (d.size() << 3) - *d.constData(); }
int count(bool on) const;
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index 6be3416..f26d878 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -541,6 +541,11 @@ QByteArray qUncompress(const uchar* data, int nbytes)
forever {
ulong alloc = len;
+ if (len >= (1 << 31) - sizeof(QByteArray::Data)) {
+ //QByteArray does not support that huge size anyway.
+ qWarning("qUncompress: Input data is corrupted");
+ return QByteArray();
+ }
QByteArray::Data *p = static_cast<QByteArray::Data *>(qRealloc(d.data(), sizeof(QByteArray::Data) + alloc));
if (!p) {
// we are not allowed to crash here when compiling with QT_NO_EXCEPTIONS
@@ -556,6 +561,11 @@ QByteArray qUncompress(const uchar* data, int nbytes)
switch (res) {
case Z_OK:
if (len != alloc) {
+ if (len >= (1 << 31) - sizeof(QByteArray::Data)) {
+ //QByteArray does not support that huge size anyway.
+ qWarning("qUncompress: Input data is corrupted");
+ return QByteArray();
+ }
QByteArray::Data *p = static_cast<QByteArray::Data *>(qRealloc(d.data(), sizeof(QByteArray::Data) + len));
if (!p) {
// we are not allowed to crash here when compiling with QT_NO_EXCEPTIONS
@@ -904,6 +914,13 @@ QByteArray &QByteArray::operator=(const char *str)
return *this;
}
+/*! \fn void QByteArray::swap(QByteArray &other)
+ \since 4.8
+
+ Swaps byte array \a other with this byte array. This operation is very
+ fast and never fails.
+*/
+
/*! \fn int QByteArray::size() const
Returns the number of bytes in this byte array.
@@ -1816,7 +1833,7 @@ QByteArray &QByteArray::replace(int pos, int len, const QByteArray &after)
return *this;
} else {
QByteArray copy(after);
- // ### optimise me
+ // ### optimize me
remove(pos, len);
return insert(pos, copy);
}
@@ -1857,7 +1874,7 @@ QByteArray &QByteArray::replace(int pos, int len, const char *after, int alen)
}
}
-// ### optimise all other replace method, by offering
+// ### optimize all other replace method, by offering
// QByteArray::replace(const char *before, int blen, const char *after, int alen)
/*!
diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h
index 3cdcaab..b625f4c 100644
--- a/src/corelib/tools/qbytearray.h
+++ b/src/corelib/tools/qbytearray.h
@@ -149,6 +149,8 @@ public:
{ qSwap(d, other.d); return *this; }
#endif
+ inline void swap(QByteArray &other) { qSwap(d, other.d); }
+
inline int size() const;
bool isEmpty() const;
void resize(int size);
diff --git a/src/corelib/tools/qcache.qdoc b/src/corelib/tools/qcache.qdoc
index 71e0483..0a3c971 100644
--- a/src/corelib/tools/qcache.qdoc
+++ b/src/corelib/tools/qcache.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/src/corelib/tools/qcontiguouscache.cpp b/src/corelib/tools/qcontiguouscache.cpp
index 3ba5186..7880bd3 100644
--- a/src/corelib/tools/qcontiguouscache.cpp
+++ b/src/corelib/tools/qcontiguouscache.cpp
@@ -194,6 +194,13 @@ MyRecord record(int row) const
Assigns \a other to this cache and returns a reference to this cache.
*/
+/*! \fn void QContiguousCache::swap(QContiguousCache<T> &other)
+ \since 4.8
+
+ Swaps cache \a other with this cache. This operation is very
+ fast and never fails.
+*/
+
/*! \fn bool QContiguousCache::operator==(const QContiguousCache<T> &other) const
Returns true if \a other is equal to this cache; otherwise returns false.
diff --git a/src/corelib/tools/qcontiguouscache.h b/src/corelib/tools/qcontiguouscache.h
index 4c1a846..3d0a159 100644
--- a/src/corelib/tools/qcontiguouscache.h
+++ b/src/corelib/tools/qcontiguouscache.h
@@ -114,6 +114,7 @@ public:
inline QContiguousCache<T> &operator=(QContiguousCache<T> &&other)
{ qSwap(d, other.d); return *this; }
#endif
+ inline void swap(QContiguousCache<T> &other) { qSwap(d, other.d); }
bool operator==(const QContiguousCache<T> &other) const;
inline bool operator!=(const QContiguousCache<T> &other) const { return !(*this == other); }
diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp
index f21aa2e..6a20c7a 100644
--- a/src/corelib/tools/qdatetime.cpp
+++ b/src/corelib/tools/qdatetime.cpp
@@ -1630,6 +1630,7 @@ QString QTime::toString(Qt::DateFormat format) const
\endtable
If the datetime is invalid, an empty string will be returned.
+ If \a format is empty, the default format "hh:mm:ss" is used.
\sa QDate::toString() QDateTime::toString()
*/
diff --git a/src/corelib/tools/qelapsedtimer.cpp b/src/corelib/tools/qelapsedtimer.cpp
index 4adddf9..28d3450 100644
--- a/src/corelib/tools/qelapsedtimer.cpp
+++ b/src/corelib/tools/qelapsedtimer.cpp
@@ -83,7 +83,7 @@ QT_BEGIN_NAMESPACE
function, which can be used to determine if a certain number of
milliseconds has already elapsed:
- \snippet doc/src/snippets/qelapsedtimer/main.cpp 1
+ \snippet doc/src/snippets/qelapsedtimer/main.cpp 2
\section1 Reference clocks
diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp
index 2971c06..3dc9c92 100644
--- a/src/corelib/tools/qhash.cpp
+++ b/src/corelib/tools/qhash.cpp
@@ -730,6 +730,20 @@ void QHashData::checkSanity()
Assigns \a other to this hash and returns a reference to this hash.
*/
+/*! \fn void QHash::swap(QHash<Key, T> &other)
+ \since 4.8
+
+ Swaps hash \a other with this hash. This operation is very
+ fast and never fails.
+*/
+
+/*! \fn void QMultiHash::swap(QMultiHash<Key, T> &other)
+ \since 4.8
+
+ Swaps hash \a other with this hash. This operation is very
+ fast and never fails.
+*/
+
/*! \fn bool QHash::operator==(const QHash<Key, T> &other) const
Returns true if \a other is equal to this hash; otherwise returns
diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h
index 992ff33..21fca2d 100644
--- a/src/corelib/tools/qhash.h
+++ b/src/corelib/tools/qhash.h
@@ -287,6 +287,7 @@ public:
inline QHash<Key, T> &operator=(QHash<Key, T> &&other)
{ qSwap(d, other.d); return *this; }
#endif
+ inline void swap(QHash<Key, T> &other) { qSwap(d, other.d); }
bool operator==(const QHash<Key, T> &other) const;
inline bool operator!=(const QHash<Key, T> &other) const { return !(*this == other); }
@@ -925,6 +926,7 @@ class QMultiHash : public QHash<Key, T>
public:
QMultiHash() {}
QMultiHash(const QHash<Key, T> &other) : QHash<Key, T>(other) {}
+ inline void swap(QMultiHash<Key, T> &other) { QHash<Key, T>::swap(other); } // prevent QMultiHash<->QHash swaps
inline typename QHash<Key, T>::iterator replace(const Key &key, const T &value)
{ return QHash<Key, T>::insert(key, value); }
diff --git a/src/corelib/tools/qiterator.qdoc b/src/corelib/tools/qiterator.qdoc
index 1e7637b..9cec7ec 100644
--- a/src/corelib/tools/qiterator.qdoc
+++ b/src/corelib/tools/qiterator.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/src/corelib/tools/qlinkedlist.cpp b/src/corelib/tools/qlinkedlist.cpp
index 909d940..7b452fc 100644
--- a/src/corelib/tools/qlinkedlist.cpp
+++ b/src/corelib/tools/qlinkedlist.cpp
@@ -147,6 +147,13 @@ QLinkedListData QLinkedListData::shared_null = {
list.
*/
+/*! \fn void QLinkedList::swap(QLinkedList<T> &other)
+ \since 4.8
+
+ Swaps list \a other with this list. This operation is very
+ fast and never fails.
+*/
+
/*! \fn bool QLinkedList::operator==(const QLinkedList<T> &other) const
Returns true if \a other is equal to this list; otherwise returns
@@ -254,7 +261,7 @@ QLinkedListData QLinkedListData::shared_null = {
\sa insert()
*/
-/*!
+/*!
\fn bool QLinkedList::removeOne(const T &value)
\since 4.4
@@ -830,7 +837,7 @@ QLinkedListData QLinkedListData::shared_null = {
QLinkedList\<T\>::const_iterator allows you to iterate over a
QLinkedList\<T\>. If you want modify the QLinkedList as you iterate
- over it, you must use QLinkedList::const_iterator instead. It is
+ over it, you must use QLinkedList::iterator instead. It is
generally good practice to use QLinkedList::const_iterator on a
non-const QLinkedList as well, unless you need to change the
QLinkedList through the iterator. Const iterators are slightly
diff --git a/src/corelib/tools/qlinkedlist.h b/src/corelib/tools/qlinkedlist.h
index c087944..849bfd3 100644
--- a/src/corelib/tools/qlinkedlist.h
+++ b/src/corelib/tools/qlinkedlist.h
@@ -89,6 +89,7 @@ public:
inline QLinkedList<T> &operator=(QLinkedList<T> &&other)
{ qSwap(d, other.d); return *this; }
#endif
+ inline void swap(QLinkedList<T> &other) { qSwap(d, other.d); }
bool operator==(const QLinkedList<T> &l) const;
inline bool operator!=(const QLinkedList<T> &l) const { return !(*this == l); }
diff --git a/src/corelib/tools/qlist.cpp b/src/corelib/tools/qlist.cpp
index 6cc6fc1..5706171 100644
--- a/src/corelib/tools/qlist.cpp
+++ b/src/corelib/tools/qlist.cpp
@@ -602,6 +602,13 @@ void **QListData::erase(void **xi)
list.
*/
+/*! \fn void QList::swap(QList<T> &other)
+ \since 4.8
+
+ Swaps list \a other with this list. This operation is very
+ fast and never fails.
+*/
+
/*! \fn bool QList::operator==(const QList<T> &other) const
Returns true if \a other is equal to this list; otherwise returns
@@ -936,7 +943,7 @@ void **QListData::erase(void **xi)
This function requires the value type to have an implementation of
\c operator==().
- Note that QList uses 0-based indexes, just like C++ arrays. Negative
+ Note that QList uses 0-based indexes, just like C++ arrays. Negative
indexes are not supported with the exception of the value mentioned
above.
diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h
index 8f988d6..b1fcabf 100644
--- a/src/corelib/tools/qlist.h
+++ b/src/corelib/tools/qlist.h
@@ -126,6 +126,7 @@ public:
inline QList &operator=(QList &&other)
{ qSwap(d, other.d); return *this; }
#endif
+ inline void swap(QList<T> &other) { qSwap(d, other.d); }
#ifdef Q_COMPILER_INITIALIZER_LISTS
inline QList(std::initializer_list<T> args) : d(&QListData::shared_null)
{ d->ref.ref(); qCopy(args.begin(), args.end(), std::back_inserter(*this)); }
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index 6b1de5e..83d6dcd 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -77,7 +77,7 @@ QT_END_NAMESPACE
#include <qdebug.h>
#include <time.h>
-#if defined(Q_OS_LINUX) && !defined(__UCLIBC__)
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
# include <fenv.h>
#endif
@@ -6637,7 +6637,7 @@ Q_CORE_EXPORT char *qdtoa ( double d, int mode, int ndigits, int *decpt, int *si
_control87(MCW_EM, MCW_EM);
#endif
-#if defined(Q_OS_LINUX) && !defined(__UCLIBC__)
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
fenv_t envp;
feholdexcept(&envp);
#endif
@@ -6653,7 +6653,7 @@ Q_CORE_EXPORT char *qdtoa ( double d, int mode, int ndigits, int *decpt, int *si
#endif //_M_X64
#endif //Q_OS_WIN
-#if defined(Q_OS_LINUX) && !defined(__UCLIBC__)
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
fesetenv(&envp);
#endif
@@ -7308,6 +7308,7 @@ Q_CORE_EXPORT char *qdtoa( double d, int mode, int ndigits, int *decpt, int *sig
Q_CORE_EXPORT double qstrtod(const char *s00, const char **se, bool *ok)
{
+ errno = 0;
double ret = strtod((char*)s00, (char**)se);
if (ok) {
if((ret == 0.0l && errno == ERANGE)
diff --git a/src/corelib/tools/qlocale.h b/src/corelib/tools/qlocale.h
index 8b424bb..1af2cb4 100644
--- a/src/corelib/tools/qlocale.h
+++ b/src/corelib/tools/qlocale.h
@@ -114,7 +114,7 @@ class Q_CORE_EXPORT QLocale
friend class QString;
friend class QByteArray;
friend class QIntValidator;
- friend class QDoubleValidator;
+ friend class QDoubleValidatorPrivate;
friend class QTextStream;
friend class QTextStreamPrivate;
diff --git a/src/corelib/tools/qmap.cpp b/src/corelib/tools/qmap.cpp
index 3143ee4..5a5fffd 100644
--- a/src/corelib/tools/qmap.cpp
+++ b/src/corelib/tools/qmap.cpp
@@ -404,6 +404,20 @@ void QMapData::dump()
Assigns \a other to this map and returns a reference to this map.
*/
+/*! \fn void QMap::swap(QMap<Key, T> &other)
+ \since 4.8
+
+ Swaps map \a other with this map. This operation is very
+ fast and never fails.
+*/
+
+/*! \fn void QMultiMap::swap(QMultiMap<Key, T> &other)
+ \since 4.8
+
+ Swaps map \a other with this map. This operation is very
+ fast and never fails.
+*/
+
/*! \fn bool QMap::operator==(const QMap<Key, T> &other) const
Returns true if \a other is equal to this map; otherwise returns
diff --git a/src/corelib/tools/qmap.h b/src/corelib/tools/qmap.h
index ce8fd75..2897529 100644
--- a/src/corelib/tools/qmap.h
+++ b/src/corelib/tools/qmap.h
@@ -189,6 +189,7 @@ public:
inline QMap<Key, T> &operator=(QMap<Key, T> &&other)
{ qSwap(d, other.d); return *this; }
#endif
+ inline void swap(QMap<Key, T> &other) { qSwap(d, other.d); }
#ifndef QT_NO_STL
explicit QMap(const typename std::map<Key, T> &other);
std::map<Key, T> toStdMap() const;
@@ -973,6 +974,7 @@ class QMultiMap : public QMap<Key, T>
public:
QMultiMap() {}
QMultiMap(const QMap<Key, T> &other) : QMap<Key, T>(other) {}
+ inline void swap(QMultiMap<Key, T> &other) { QMap<Key, T>::swap(other); }
inline typename QMap<Key, T>::iterator replace(const Key &key, const T &value)
{ return QMap<Key, T>::insert(key, value); }
diff --git a/src/corelib/tools/qpair.qdoc b/src/corelib/tools/qpair.qdoc
index d49c09e..4ef151e 100644
--- a/src/corelib/tools/qpair.qdoc
+++ b/src/corelib/tools/qpair.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/src/corelib/tools/qpoint.cpp b/src/corelib/tools/qpoint.cpp
index 66f06e9..c297709 100644
--- a/src/corelib/tools/qpoint.cpp
+++ b/src/corelib/tools/qpoint.cpp
@@ -438,8 +438,12 @@ QDebug operator<<(QDebug d, const QPointF &p)
/*!
\fn bool QPointF::isNull() const
- Returns true if both the x and y coordinates are set to 0.0,
+ Returns true if both the x and y coordinates are set to +0.0;
otherwise returns false.
+
+ \note Since this function treats +0.0 and -0.0 differently, points
+ with zero-valued coordinates where either or both values have a
+ negative sign are not defined to be null points.
*/
diff --git a/src/corelib/tools/qqueue.cpp b/src/corelib/tools/qqueue.cpp
index 849bb0b..3602695 100644
--- a/src/corelib/tools/qqueue.cpp
+++ b/src/corelib/tools/qqueue.cpp
@@ -91,6 +91,14 @@
*/
/*!
+ \fn void QQueue::swap(QQueue<T> &other)
+ \since 4.8
+
+ Swaps queue \a other with this queue. This operation is very
+ fast and never fails.
+*/
+
+/*!
\fn void QQueue::enqueue(const T& t)
Adds value \a t to the tail of the queue.
diff --git a/src/corelib/tools/qqueue.h b/src/corelib/tools/qqueue.h
index c29134b..4ef1a61 100644
--- a/src/corelib/tools/qqueue.h
+++ b/src/corelib/tools/qqueue.h
@@ -56,6 +56,7 @@ class QQueue : public QList<T>
public:
inline QQueue() {}
inline ~QQueue() {}
+ inline void swap(QQueue<T> &other) { QList<T>::swap(other); } // prevent QList<->QQueue swaps
inline void enqueue(const T &t) { QList<T>::append(t); }
inline T dequeue() { return QList<T>::takeFirst(); }
inline T &head() { return QList<T>::first(); }
diff --git a/src/corelib/tools/qregexp.cpp b/src/corelib/tools/qregexp.cpp
index 7a26c4f..5d2a0e3 100644
--- a/src/corelib/tools/qregexp.cpp
+++ b/src/corelib/tools/qregexp.cpp
@@ -3858,6 +3858,14 @@ QRegExp &QRegExp::operator=(const QRegExp &rx)
}
/*!
+ \fn void QRegExp::swap(QRegExp &other)
+ \since 4.8
+
+ Swaps regular expression \a other with this regular
+ expression. This operation is very fast and never fails.
+*/
+
+/*!
Returns true if this regular expression is equal to \a rx;
otherwise returns false.
diff --git a/src/corelib/tools/qregexp.h b/src/corelib/tools/qregexp.h
index 0b4a702..4a74f90 100644
--- a/src/corelib/tools/qregexp.h
+++ b/src/corelib/tools/qregexp.h
@@ -80,6 +80,7 @@ public:
inline QRegExp &operator=(QRegExp &&other)
{ qSwap(priv,other.priv); return *this; }
#endif
+ inline void swap(QRegExp &other) { qSwap(priv, other.priv); }
bool operator==(const QRegExp &rx) const;
inline bool operator!=(const QRegExp &rx) const { return !operator==(rx); }
diff --git a/src/corelib/tools/qscopedpointer.h b/src/corelib/tools/qscopedpointer.h
index 40d3851..b3a6db6 100644
--- a/src/corelib/tools/qscopedpointer.h
+++ b/src/corelib/tools/qscopedpointer.h
@@ -186,6 +186,18 @@ template <class T, class Cleanup>
Q_INLINE_TEMPLATE void qSwap(QScopedPointer<T, Cleanup> &p1, QScopedPointer<T, Cleanup> &p2)
{ p1.swap(p2); }
+#ifndef QT_NO_STL
+QT_END_NAMESPACE
+namespace std {
+ template <class T, class Cleanup>
+ Q_INLINE_TEMPLATE void swap(QT_PREPEND_NAMESPACE(QScopedPointer)<T, Cleanup> &p1, QT_PREPEND_NAMESPACE(QScopedPointer)<T, Cleanup> &p2)
+ { p1.swap(p2); }
+}
+QT_BEGIN_NAMESPACE
+#endif
+
+
+
namespace QtPrivate {
template <typename X, typename Y> struct QScopedArrayEnsureSameType;
template <typename X> struct QScopedArrayEnsureSameType<X,X> { typedef X* Type; };
diff --git a/src/corelib/tools/qset.h b/src/corelib/tools/qset.h
index dc3c45a..472078f 100644
--- a/src/corelib/tools/qset.h
+++ b/src/corelib/tools/qset.h
@@ -65,6 +65,7 @@ public:
inline QSet<T> &operator=(QSet<T> &&other)
{ qSwap(q_hash, other.q_hash); return *this; }
#endif
+ inline void swap(QSet<T> &other) { q_hash.swap(other.q_hash); }
inline bool operator==(const QSet<T> &other) const
{ return q_hash == other.q_hash; }
diff --git a/src/corelib/tools/qset.qdoc b/src/corelib/tools/qset.qdoc
index d1aca4c..57368f0 100644
--- a/src/corelib/tools/qset.qdoc
+++ b/src/corelib/tools/qset.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -123,6 +123,13 @@
*/
/*!
+ \fn void QSet::swap(QSet<T> &other)
+
+ Swaps set \a other with this set. This operation is very fast and
+ never fails.
+*/
+
+/*!
\fn bool QSet::operator==(const QSet<T> &other) const
Returns true if the \a other set is equal to this set; otherwise
diff --git a/src/corelib/tools/qshareddata.h b/src/corelib/tools/qshareddata.h
index b646a9d..45456fe 100644
--- a/src/corelib/tools/qshareddata.h
+++ b/src/corelib/tools/qshareddata.h
@@ -263,6 +263,20 @@ template <class T>
Q_INLINE_TEMPLATE void qSwap(QExplicitlySharedDataPointer<T> &p1, QExplicitlySharedDataPointer<T> &p2)
{ p1.swap(p2); }
+#ifndef QT_NO_STL
+QT_END_NAMESPACE
+namespace std {
+ template <class T>
+ Q_INLINE_TEMPLATE void swap(QT_PREPEND_NAMESPACE(QSharedDataPointer)<T> &p1, QT_PREPEND_NAMESPACE(QSharedDataPointer)<T> &p2)
+ { p1.swap(p2); }
+
+ template <class T>
+ Q_INLINE_TEMPLATE void swap(QT_PREPEND_NAMESPACE(QExplicitlySharedDataPointer)<T> &p1, QT_PREPEND_NAMESPACE(QExplicitlySharedDataPointer)<T> &p2)
+ { p1.swap(p2); }
+}
+QT_BEGIN_NAMESPACE
+#endif
+
QT_END_NAMESPACE
QT_END_HEADER
diff --git a/src/corelib/tools/qsharedpointer.cpp b/src/corelib/tools/qsharedpointer.cpp
index 8f9559a..3cc9c45 100644
--- a/src/corelib/tools/qsharedpointer.cpp
+++ b/src/corelib/tools/qsharedpointer.cpp
@@ -395,7 +395,7 @@
\section1 Tracking QObject
- QWeakPointer can be used to track deletion classes derives from QObject,
+ QWeakPointer can be used to track deletion classes that derive from QObject,
even if they are not managed by QSharedPointer. When used in that role,
QWeakPointer replaces the older QPointer in all use-cases. QWeakPointer
is also more efficient than QPointer, so it should be preferred in all
@@ -1163,7 +1163,7 @@
\since 4.6
\brief The qSharedPointerObjectCast function is for casting a shared pointer.
-
+
Returns a shared pointer to the pointer held by \a other, using a
\l qobject_cast() to type \tt X to obtain an internal pointer of the
appropriate type. If the \tt qobject_cast fails, the object
@@ -1430,7 +1430,7 @@ void QtSharedPointer::internalSafetyCheckAdd2(const void *d_ptr, const volatile
Q_ASSERT(!kp->dPointers.contains(d_ptr));
//qDebug("Adding d=%p value=%p", d_ptr, ptr);
-
+
const void *other_d_ptr = kp->dataPointers.value(ptr, 0);
if (other_d_ptr) {
# ifdef BACKTRACE_SUPPORTED
diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h
index 20dda12..ef8c454 100644
--- a/src/corelib/tools/qsharedpointer_impl.h
+++ b/src/corelib/tools/qsharedpointer_impl.h
@@ -376,6 +376,13 @@ namespace QtSharedPointer {
inline ExternalRefCount() : d(0) { }
inline ExternalRefCount(Qt::Initialization i) : Basic<T>(i) { }
+
+ inline ExternalRefCount(T *ptr) : Basic<T>(Qt::Uninitialized) // throws
+ { internalConstruct(ptr); }
+ template <typename Deleter>
+ inline ExternalRefCount(T *ptr, Deleter deleter) : Basic<T>(Qt::Uninitialized) // throws
+ { internalConstruct(ptr, deleter); }
+
inline ExternalRefCount(const ExternalRefCount<T> &other) : Basic<T>(other), d(other.d)
{ if (d) ref(); }
template <class X>
@@ -453,11 +460,12 @@ public:
inline QSharedPointer() { }
// inline ~QSharedPointer() { }
- inline explicit QSharedPointer(T *ptr) : BaseClass(Qt::Uninitialized)
- { BaseClass::internalConstruct(ptr); }
+ inline explicit QSharedPointer(T *ptr) : BaseClass(ptr) // throws
+ { }
template <typename Deleter>
- inline QSharedPointer(T *ptr, Deleter d) { BaseClass::internalConstruct(ptr, d); }
+ inline QSharedPointer(T *ptr, Deleter d) : BaseClass(ptr, d) // throws
+ { }
inline QSharedPointer(const QSharedPointer<T> &other) : BaseClass(other) { }
inline QSharedPointer<T> &operator=(const QSharedPointer<T> &other)
@@ -776,6 +784,16 @@ inline void qSwap(QSharedPointer<T> &p1, QSharedPointer<T> &p2)
p1.swap(p2);
}
+#ifndef QT_NO_STL
+QT_END_NAMESPACE
+namespace std {
+ template <class T>
+ inline void swap(QT_PREPEND_NAMESPACE(QSharedPointer)<T> &p1, QT_PREPEND_NAMESPACE(QSharedPointer)<T> &p2)
+ { p1.swap(p2); }
+}
+QT_BEGIN_NAMESPACE
+#endif
+
namespace QtSharedPointer {
// helper functions:
template <class X, class T>
diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp
index b2fe2da..d44a9d0 100644
--- a/src/corelib/tools/qsimd.cpp
+++ b/src/corelib/tools/qsimd.cpp
@@ -72,7 +72,12 @@
QT_BEGIN_NAMESPACE
-#if defined (Q_OS_WINCE)
+#if defined (Q_OS_NACL)
+static inline uint detectProcessorFeatures()
+{
+ return 0;
+}
+#elif defined (Q_OS_WINCE)
static inline uint detectProcessorFeatures()
{
uint features = 0;
@@ -135,7 +140,7 @@ static inline uint detectProcessorFeatures()
#if defined(QT_HAVE_IWMMXT)
// runtime detection only available when running as a previlegied process
features = IWMMXT;
-#elif defined(QT_HAVE_NEON)
+#elif defined(QT_ALWAYS_HAVE_NEON)
features = NEON;
#endif
diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h
index 664543b..87fa770 100644
--- a/src/corelib/tools/qsimd_p.h
+++ b/src/corelib/tools/qsimd_p.h
@@ -105,7 +105,8 @@ QT_BEGIN_HEADER
#endif // defined(QT_HAVE_SSE2) && (defined(__SSE2__) || defined(Q_CC_MSVC))
// NEON intrinsics
-#if defined(QT_HAVE_NEON)
+#if defined __ARM_NEON__
+#define QT_ALWAYS_HAVE_NEON
#include <arm_neon.h>
#endif
diff --git a/src/corelib/tools/qsize.cpp b/src/corelib/tools/qsize.cpp
index 20ac344..12287ab 100644
--- a/src/corelib/tools/qsize.cpp
+++ b/src/corelib/tools/qsize.cpp
@@ -492,9 +492,13 @@ QDebug operator<<(QDebug dbg, const QSize &s) {
/*!
\fn bool QSizeF::isNull() const
- Returns true if both the width and height is 0; otherwise returns
+ Returns true if both the width and height are +0.0; otherwise returns
false.
+ \note Since this function treats +0.0 and -0.0 differently, sizes with
+ zero width and height where either or both values have a negative
+ sign are not defined to be null sizes.
+
\sa isValid(), isEmpty()
*/
diff --git a/src/corelib/tools/qstack.cpp b/src/corelib/tools/qstack.cpp
index fa14900..b42fe3b 100644
--- a/src/corelib/tools/qstack.cpp
+++ b/src/corelib/tools/qstack.cpp
@@ -91,6 +91,14 @@
*/
/*!
+ \fn void QStack::swap(QStack<T> &other)
+ \since 4.8
+
+ Swaps stack \a other with this stack. This operation is very fast and
+ never fails.
+*/
+
+/*!
\fn void QStack::push(const T& t)
Adds element \a t to the top of the stack.
diff --git a/src/corelib/tools/qstack.h b/src/corelib/tools/qstack.h
index 526c705..6ddc381 100644
--- a/src/corelib/tools/qstack.h
+++ b/src/corelib/tools/qstack.h
@@ -56,6 +56,7 @@ class QStack : public QVector<T>
public:
inline QStack() {}
inline ~QStack() {}
+ inline void swap(QStack<T> &other) { QVector<T>::swap(other); } // prevent QVector<->QStack swaps
inline void push(const T &t) { QVector<T>::append(t); }
T pop();
T &top();
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index cfffc4a..bb496c6 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -579,7 +579,7 @@ const QString::Null QString::null = { };
strings from a string list that contain a particular substring or
that match a particular QRegExp using the QStringList::filter()
function.
-:
+
\section1 Querying String Data
If you want to see if a QString starts or ends with a particular
@@ -1174,6 +1174,13 @@ QString::QString(QChar ch)
*/
+/*! \fn void QString::swap(QString &other)
+ \since 4.8
+
+ Swaps string \a other with this string. This operation is very fast and
+ never fails.
+*/
+
/*! \fn void QString::detach()
\internal
@@ -3599,7 +3606,7 @@ static QByteArray toLatin1_helper(const QChar *data, int length)
}
length = length % 16;
}
-#elif QT_HAVE_NEON
+#elif QT_ALWAYS_HAVE_NEON
// Refer to the documentation of the SSE2 implementation
// this use eactly the same method as for SSE except:
// 1) neon has unsigned comparison
@@ -3906,7 +3913,7 @@ QString QString::fromLocal8Bit(const char *str, int size)
/*!
Returns a QString initialized with the first \a size characters
- of the 8-bit string \a str.
+ from the string \a str.
If \a size is -1 (default), it is taken to be qstrlen(\a
str).
@@ -4290,7 +4297,7 @@ QString& QString::fill(QChar ch, int size)
Returns the number of characters in this string. Equivalent to
size().
- \sa setLength()
+ \sa resize()
*/
/*!
@@ -7460,31 +7467,17 @@ QDataStream &operator<<(QDataStream &out, const QString &str)
out << str.toLatin1();
} else {
if (!str.isNull() || out.version() < 3) {
- int byteOrder = out.byteOrder();
- const QChar* ub = str.unicode();
- static const uint auto_size = 1024;
- char t[auto_size];
- char *b;
- if (str.length()*sizeof(QChar) > auto_size) {
- b = new char[str.length()*sizeof(QChar)];
+ if ((out.byteOrder() == QDataStream::BigEndian) == (QSysInfo::ByteOrder == QSysInfo::BigEndian)) {
+ out.writeBytes(reinterpret_cast<const char *>(str.unicode()), sizeof(QChar) * str.length());
} else {
- b = t;
- }
- int l = str.length();
- char *c=b;
- while (l--) {
- if (byteOrder == QDataStream::BigEndian) {
- *c++ = (char)ub->row();
- *c++ = (char)ub->cell();
- } else {
- *c++ = (char)ub->cell();
- *c++ = (char)ub->row();
+ QVarLengthArray<ushort> buffer(str.length());
+ const ushort *data = reinterpret_cast<const ushort *>(str.constData());
+ for (int i = 0; i < str.length(); i++) {
+ buffer[i] = qbswap(*data);
+ ++data;
}
- ub++;
+ out.writeBytes(reinterpret_cast<const char *>(buffer.data()), sizeof(ushort) * buffer.size());
}
- out.writeBytes(b, sizeof(QChar)*str.length());
- if (str.length()*sizeof(QChar) > auto_size)
- delete [] b;
} else {
// write null marker
out << (quint32)0xffffffff;
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h
index 589fdc2..07f43ca 100644
--- a/src/corelib/tools/qstring.h
+++ b/src/corelib/tools/qstring.h
@@ -108,6 +108,7 @@ public:
inline QString &operator=(QString &&other)
{ qSwap(d, other.d); return *this; }
#endif
+ inline void swap(QString &other) { qSwap(d, other.d); }
inline int size() const { return d->size; }
inline int count() const { return d->size; }
inline int length() const;
diff --git a/src/corelib/tools/qvarlengtharray.h b/src/corelib/tools/qvarlengtharray.h
index 4a6bb4b..3882323 100644
--- a/src/corelib/tools/qvarlengtharray.h
+++ b/src/corelib/tools/qvarlengtharray.h
@@ -44,7 +44,10 @@
#include <QtCore/qcontainerfwd.h>
#include <QtCore/qglobal.h>
+#include <QtCore/qalgorithms.h>
+
#include <new>
+#include <string.h>
QT_BEGIN_HEADER
@@ -123,6 +126,18 @@ public:
}
}
void append(const T *buf, int size);
+ inline QVarLengthArray<T, Prealloc> &operator<<(const T &t)
+ { append(t); return *this; }
+ inline QVarLengthArray<T, Prealloc> &operator+=(const T &t)
+ { append(t); return *this; }
+
+ void prepend(const T &t);
+ void insert(int i, const T &t);
+ void insert(int i, int n, const T &t);
+ void replace(int i, const T &t);
+ void remove(int i);
+ void remove(int i, int n);
+
inline T *data() { return ptr; }
inline const T *data() const { return ptr; }
@@ -135,6 +150,21 @@ public:
typedef const value_type &const_reference;
typedef qptrdiff difference_type;
+
+ typedef T* iterator;
+ typedef const T* const_iterator;
+
+ inline iterator begin() { return ptr; }
+ inline const_iterator begin() const { return ptr; }
+ inline const_iterator constBegin() const { return ptr; }
+ inline iterator end() { return ptr + s; }
+ inline const_iterator end() const { return ptr + s; }
+ inline const_iterator constEnd() const { return ptr + s; }
+ iterator insert(iterator before, int n, const T &x);
+ inline iterator insert(iterator before, const T &x) { return insert(before, 1, x); }
+ iterator erase(iterator begin, iterator end);
+ inline iterator erase(iterator pos) { return erase(pos, pos+1); }
+
private:
friend class QPodList<T, Prealloc>;
void realloc(int size, int alloc);
@@ -272,6 +302,100 @@ Q_OUTOFLINE_TEMPLATE T QVarLengthArray<T, Prealloc>::value(int i, const T &defau
return (i < 0 || i >= size()) ? defaultValue : at(i);
}
+template <class T, int Prealloc>
+inline void QVarLengthArray<T, Prealloc>::insert(int i, const T &t)
+{ Q_ASSERT_X(i >= 0 && i <= s, "QVarLengthArray::insert", "index out of range");
+ insert(begin() + i, 1, t); }
+template <class T, int Prealloc>
+inline void QVarLengthArray<T, Prealloc>::insert(int i, int n, const T &t)
+{ Q_ASSERT_X(i >= 0 && i <= s, "QVarLengthArray::insert", "index out of range");
+ insert(begin() + i, n, t); }
+template <class T, int Prealloc>
+inline void QVarLengthArray<T, Prealloc>::remove(int i, int n)
+{ Q_ASSERT_X(i >= 0 && n >= 0 && i + n <= s, "QVarLengthArray::remove", "index out of range");
+ erase(begin() + i, begin() + i + n); }
+template <class T, int Prealloc>
+inline void QVarLengthArray<T, Prealloc>::remove(int i)
+{ Q_ASSERT_X(i >= 0 && i < s, "QVarLengthArray::remove", "index out of range");
+ erase(begin() + i, begin() + i + 1); }
+template <class T, int Prealloc>
+inline void QVarLengthArray<T, Prealloc>::prepend(const T &t)
+{ insert(begin(), 1, t); }
+
+template <class T, int Prealloc>
+inline void QVarLengthArray<T, Prealloc>::replace(int i, const T &t)
+{
+ Q_ASSERT_X(i >= 0 && i < s, "QVarLengthArray::replace", "index out of range");
+ const T copy(t);
+ data()[i] = copy;
+}
+
+
+template <class T, int Prealloc>
+Q_OUTOFLINE_TEMPLATE typename QVarLengthArray<T, Prealloc>::iterator QVarLengthArray<T, Prealloc>::insert(iterator before, size_type n, const T &t)
+{
+ int offset = int(before - ptr);
+ if (n != 0) {
+ resize(s + n);
+ const T copy(t);
+ if (QTypeInfo<T>::isStatic) {
+ T *b = ptr + offset;
+ T *j = ptr + s;
+ T *i = j - n;
+ while (i != b)
+ *--j = *--i;
+ i = b + n;
+ while (i != b)
+ *--i = copy;
+ } else {
+ T *b = ptr + offset;
+ T *i = b + n;
+ memmove(i, b, (s - offset - n) * sizeof(T));
+ while (i != b)
+ new (--i) T(copy);
+ }
+ }
+ return ptr + offset;
+}
+
+template <class T, int Prealloc>
+Q_OUTOFLINE_TEMPLATE typename QVarLengthArray<T, Prealloc>::iterator QVarLengthArray<T, Prealloc>::erase(iterator abegin, iterator aend)
+{
+ int f = int(abegin - ptr);
+ int l = int(aend - ptr);
+ int n = l - f;
+ if (QTypeInfo<T>::isComplex) {
+ qCopy(ptr + l, ptr + s, ptr + f);
+ T *i = ptr + s;
+ T *b = ptr + s - n;
+ while (i != b) {
+ --i;
+ i->~T();
+ }
+ } else {
+ memmove(ptr + f, ptr + l, (s - l) * sizeof(T));
+ }
+ s -= n;
+ return ptr + f;
+}
+
+template <typename T, int Prealloc1, int Prealloc2>
+bool operator==(const QVarLengthArray<T, Prealloc1> &l, const QVarLengthArray<T, Prealloc2> &r)
+{
+ if (l.size() != r.size())
+ return false;
+ for (int i = 0; i < l.size(); i++) {
+ if (l.at(i) != r.at(i))
+ return false;
+ }
+ return true;
+}
+
+template <typename T, int Prealloc1, int Prealloc2>
+bool operator!=(const QVarLengthArray<T, Prealloc1> &l, const QVarLengthArray<T, Prealloc2> &r)
+{
+ return !(l == r);
+}
QT_END_NAMESPACE
diff --git a/src/corelib/tools/qvarlengtharray.qdoc b/src/corelib/tools/qvarlengtharray.qdoc
index cbd81c7..4d5d5d1 100644
--- a/src/corelib/tools/qvarlengtharray.qdoc
+++ b/src/corelib/tools/qvarlengtharray.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
@@ -337,3 +337,211 @@
Typedef for const T &. Provided for STL compatibility.
*/
+/*! \fn void QVarLengthArray::prepend(const T &value)
+
+ \since 4.8
+ Inserts \a value at the beginning of the array.
+
+
+ This is the same as vector.insert(0, \a value).
+
+ For large arrays, this operation can be slow (\l{linear time}),
+ because it requires moving all the items in the vector by one
+ position further in memory. If you want a container class that
+ provides a fast prepend() function, use QList or QLinkedList
+ instead.
+
+ \sa append(), insert()
+*/
+
+/*! \fn void QVarLengthArray::replace(int i, const T &value)
+
+ \since 4.8
+ Replaces the item at index position \a i with \a value.
+
+ \a i must be a valid index position in the array (i.e., 0 <= \a
+ i < size()).
+
+ \sa operator[](), remove()
+*/
+
+/*! \fn void QVarLengthArray::remove(int i)
+
+ \overload
+ \since 4.8
+
+ Removes the element at index position \a i.
+
+ \sa insert(), replace()
+*/
+
+/*! \fn void QVarLengthArray::remove(int i, int count)
+
+ \overload
+ \since 4.8
+
+ Removes \a count elements from the middle of the array, starting at
+ index position \a i.
+
+ \sa insert(), replace()
+*/
+
+/*! \fn QVarLengthArray::iterator QVarLengthArray::begin()
+ \since 4.8
+
+ Returns an \l{STL-style iterator} pointing to the first item in
+ the array.
+
+ \sa constBegin(), end()
+*/
+
+/*! \fn QVarLengthArray::const_iterator QVarLengthArray::begin() const
+ \since 4.8
+ \overload
+*/
+
+/*! \fn QVarLengthArray::const_iterator QVarLengthArray::constBegin() const
+ \since 4.8
+
+ Returns a const \l{STL-style iterator} pointing to the first item
+ in the array.
+
+ \sa begin(), constEnd()
+*/
+
+/*! \fn QVarLengthArray::iterator QVarLengthArray::end()
+ \since 4.8
+
+ Returns an \l{STL-style iterator} pointing to the imaginary item
+ after the last item in the array.
+
+ \sa begin(), constEnd()
+*/
+
+/*! \fn QVarLengthArray::const_iterator QVarLengthArray::end() const
+ \since 4.8
+
+ \overload
+*/
+
+/*! \fn QVarLengthArray::const_iterator QVarLengthArray::constEnd() const
+ \since 4.8
+
+ Returns a const \l{STL-style iterator} pointing to the imaginary
+ item after the last item in the array.
+
+ \sa constBegin(), end()
+*/
+
+/*! \fn QVarLengthArray::iterator QVarLengthArray::erase(iterator pos)
+ \since 4.8
+
+ Removes the item pointed to by the iterator \a pos from the
+ vector, and returns an iterator to the next item in the vector
+ (which may be end()).
+
+ \sa insert(), remove()
+*/
+
+/*! \fn QVarLengthArray::iterator QVarLengthArray::erase(iterator begin, iterator end)
+
+ \overload
+ \since 4.8
+
+ Removes all the items from \a begin up to (but not including) \a
+ end. Returns an iterator to the same item that \a end referred to
+ before the call.
+*/
+
+/*! \fn void QVarLengthArray::insert(int i, const T &value)
+ \since 4.8
+
+ Inserts \a value at index position \a i in the array. If \a i is
+ 0, the value is prepended to the vector. If \a i is size(), the
+ value is appended to the vector.
+
+ For large arrays, this operation can be slow (\l{linear time}),
+ because it requires moving all the items at indexes \a i and
+ above by one position further in memory. If you want a container
+ class that provides a fast insert() function, use QLinkedList
+ instead.
+
+ \sa remove()
+*/
+
+/*! \fn void QVarLengthArray::insert(int i, int count, const T &value)
+
+ \overload
+ \since 4.8
+
+ Inserts \a count copies of \a value at index position \a i in the
+ vector.
+*/
+
+/*! \fn QVarLengthArray::iterator QVarLengthArray::insert(iterator before, const T &value)
+
+ \overload
+ \since 4.8
+
+ Inserts \a value in front of the item pointed to by the iterator
+ \a before. Returns an iterator pointing at the inserted item.
+*/
+
+/*! \fn QVarLengthArray::iterator QVarLengthArray::insert(iterator before, int count, const T &value)
+
+ \since 4.8
+ Inserts \a count copies of \a value in front of the item pointed to
+ by the iterator \a before. Returns an iterator pointing at the
+ first of the inserted items.
+*/
+
+
+
+/*! \fn bool operator==(const QVarLengthArray<T, Prealloc1> &left, const QVarLengthArray<T, Prealloc2> &right)
+
+ \relates QVarLengthArray
+ \since 4.8
+ Returns true if the two array are equal;
+
+ Two arrays are considered equal if they contain the same values
+ in the same order.
+
+ This function requires the value type to have an implementation
+ of \c operator==().
+
+ \sa operator!=()
+*/
+
+/*! \fn bool operator!=(const QVarLengthArray<T, Prealloc1> &left, const QVarLengthArray<T, Prealloc2> &right)
+
+ \relates QVarLengthArray
+ \since 4.8
+ Returns true if the two array are different;
+
+ Two arrays are considered equal if they contain the same values
+ in the same order.
+
+ This function requires the value type to have an implementation
+ of \c operator==().
+
+ \sa operator==()
+*/
+
+/*! \fn QVarLengthArray &QVarLengthArray::operator<<(const T &value)
+
+ \since 4.8
+ Appends \a value to the array and returns a reference to this
+ vector.
+
+ \sa append(), operator+=()
+*/
+
+/*! \fn QVarLengthArray &QVarLengthArray::operator+=(const T &value)
+
+ \since 4.8
+ Appends \a value to the array and returns a reference to this
+ vector.
+
+ \sa append(), operator<<()
+*/
+
diff --git a/src/corelib/tools/qvector.cpp b/src/corelib/tools/qvector.cpp
index 3a13540..0497211 100644
--- a/src/corelib/tools/qvector.cpp
+++ b/src/corelib/tools/qvector.cpp
@@ -285,6 +285,13 @@ int QVectorData::grow(int sizeofTypedData, int size, int sizeofT, bool excessive
vector.
*/
+/*! \fn void QVector::swap(QVector<T> &other)
+ \since 4.8
+
+ Swaps vector \a other with this vector. This operation is very fast and
+ never fails.
+*/
+
/*! \fn bool QVector::operator==(const QVector<T> &other) const
Returns true if \a other is equal to this vector; otherwise
diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h
index c16aefb..0f7db88 100644
--- a/src/corelib/tools/qvector.h
+++ b/src/corelib/tools/qvector.h
@@ -125,6 +125,7 @@ public:
inline QVector<T> operator=(QVector<T> &&other)
{ qSwap(p, other.p); return *this; }
#endif
+ inline void swap(QVector<T> &other) { qSwap(d, other.d); }
#ifdef Q_COMPILER_INITIALIZER_LISTS
inline QVector(std::initializer_list<T> args);
#endif
@@ -303,7 +304,7 @@ public:
#ifndef QT_NO_STL
static inline QVector<T> fromStdVector(const std::vector<T> &vector)
- { QVector<T> tmp; tmp.reserve(vector.size()); qCopy(vector.begin(), vector.end(), std::back_inserter(tmp)); return tmp; }
+ { QVector<T> tmp; tmp.reserve(int(vector.size())); qCopy(vector.begin(), vector.end(), std::back_inserter(tmp)); return tmp; }
inline std::vector<T> toStdVector() const
{ std::vector<T> tmp; tmp.reserve(size()); qCopy(constBegin(), constEnd(), std::back_inserter(tmp)); return tmp; }
#endif
@@ -439,9 +440,9 @@ QVector<T>::QVector(int asize, const T &t)
template <typename T>
QVector<T>::QVector(std::initializer_list<T> args)
{
- d = malloc(args.size());
+ d = malloc(int(args.size()));
d->ref = 1;
- d->alloc = d->size = args.size();
+ d->alloc = d->size = int(args.size());
d->sharable = true;
d->capacity = false;
T* i = p->array + d->size;
diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri
index d81ab04..03bb32d 100644
--- a/src/corelib/tools/tools.pri
+++ b/src/corelib/tools/tools.pri
@@ -83,7 +83,7 @@ SOURCES += \
symbian:SOURCES+=tools/qlocale_symbian.cpp
-mac:SOURCES += tools/qelapsedtimer_mac.cpp
+!nacl:mac:SOURCES += tools/qelapsedtimer_mac.cpp
else:symbian:SOURCES += tools/qelapsedtimer_symbian.cpp
else:unix:SOURCES += tools/qelapsedtimer_unix.cpp
else:win32:SOURCES += tools/qelapsedtimer_win.cpp
diff --git a/src/corelib/xml/qxmlstream.h b/src/corelib/xml/qxmlstream.h
index 402afa3..d7143bd 100644
--- a/src/corelib/xml/qxmlstream.h
+++ b/src/corelib/xml/qxmlstream.h
@@ -169,6 +169,7 @@ Q_DECLARE_TYPEINFO(QXmlStreamAttribute, Q_MOVABLE_TYPE);
class Q_XMLSTREAM_EXPORT QXmlStreamAttributes : public QVector<QXmlStreamAttribute>
{
public:
+ inline QXmlStreamAttributes() {}
QStringRef value(const QString &namespaceUri, const QString &name) const;
QStringRef value(const QString &namespaceUri, const QLatin1String &name) const;
QStringRef value(const QLatin1String &namespaceUri, const QLatin1String &name) const;
diff --git a/src/dbus/qdbusabstractinterface.cpp b/src/dbus/qdbusabstractinterface.cpp
index 9ff0ff1..943b965 100644
--- a/src/dbus/qdbusabstractinterface.cpp
+++ b/src/dbus/qdbusabstractinterface.cpp
@@ -560,7 +560,7 @@ void QDBusAbstractInterface::connectNotify(const char *signal)
if (!d->isValid)
return;
- // we end up recursing here, so optimise away
+ // we end up recursing here, so optimize away
if (qstrcmp(signal + 1, "destroyed(QObject*)") == 0)
return;
diff --git a/src/dbus/qdbusargument.h b/src/dbus/qdbusargument.h
index 30f2cda..84d0349 100644
--- a/src/dbus/qdbusargument.h
+++ b/src/dbus/qdbusargument.h
@@ -172,7 +172,7 @@ template<typename T> inline T qdbus_cast(const QVariant &v
return qvariant_cast<T>(v);
}
-// specialise for QVariant, allowing it to be used in place of QDBusVariant
+// specialize for QVariant, allowing it to be used in place of QDBusVariant
template<> inline QVariant qdbus_cast<QVariant>(const QDBusArgument &arg, QVariant *)
{
QDBusVariant item;
diff --git a/src/dbus/qdbusconnection.cpp b/src/dbus/qdbusconnection.cpp
index bf771a8..f68a8ca 100644
--- a/src/dbus/qdbusconnection.cpp
+++ b/src/dbus/qdbusconnection.cpp
@@ -140,9 +140,9 @@ void QDBusConnectionManager::setConnection(const QString &name, QDBusConnectionP
\fn QDBusConnection &QDBusConnection::sessionBus()
\relates QDBusConnection
- Returns a QDBusConnection object opened with the session bus. The object reference returned
- by this function is valid until the QCoreApplication's destructor is run, when the
- connection will be closed and the object, deleted.
+ Returns a QDBusConnection object opened with the session bus. The object
+ reference returned by this function is valid until the application terminates,
+ at which point the connection will be closed and the object deleted.
*/
/*!
\fn QDBusConnection &QDBusConnection::systemBus()
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index 35979d6..c7f62aa 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -801,7 +801,7 @@ bool QDBusConnectionPrivate::activateCall(QObject* object, int flags, const QDBu
++cacheIt;
if (cacheIt == slotCache.hash.constEnd() || cacheIt.key() != cacheKey)
{
- // not cached, analyse the meta object
+ // not cached, analyze the meta object
const QMetaObject *mo = object->metaObject();
QByteArray memberName = msg.member().toUtf8();
diff --git a/src/dbus/qdbusmarshaller.cpp b/src/dbus/qdbusmarshaller.cpp
index 8b174a1..e620152 100644
--- a/src/dbus/qdbusmarshaller.cpp
+++ b/src/dbus/qdbusmarshaller.cpp
@@ -507,7 +507,7 @@ bool QDBusMarshaller::appendCrossMarshalling(QDBusDemarshaller *demarshaller)
if (code == DBUS_TYPE_ARRAY) {
int element = q_dbus_message_iter_get_element_type(&demarshaller->iterator);
if (q_dbus_type_is_fixed(element)) {
- // another optimisation: fixed size arrays
+ // another optimization: fixed size arrays
// code is exactly like QDBusDemarshaller::toByteArray
DBusMessageIter sub;
q_dbus_message_iter_recurse(&demarshaller->iterator, &sub);
diff --git a/src/dbus/qdbusmessage.cpp b/src/dbus/qdbusmessage.cpp
index d838e37..10b2768 100644
--- a/src/dbus/qdbusmessage.cpp
+++ b/src/dbus/qdbusmessage.cpp
@@ -292,7 +292,7 @@ QDBusMessage QDBusMessagePrivate::makeLocal(const QDBusConnectionPrivate &conn,
}
// no complex types seen
- // optimise by using the variant list itself
+ // optimize by using the variant list itself
QDBusMessage retval;
QDBusMessagePrivate *d = retval.d_ptr;
d->arguments = asSent.d_ptr->arguments;
@@ -452,7 +452,7 @@ QDBusMessage QDBusMessage::createReply(const QVariantList &arguments) const
d_ptr->localReply = new QDBusMessage(reply); // keep an internal copy
}
- // the reply must have a msg or be a local-loop optimisation
+ // the reply must have a msg or be a local-loop optimization
Q_ASSERT(reply.d_ptr->reply || reply.d_ptr->localMessage);
return reply;
}
@@ -471,7 +471,7 @@ QDBusMessage QDBusMessage::createErrorReply(const QString name, const QString &m
d_ptr->localReply = new QDBusMessage(reply); // keep an internal copy
}
- // the reply must have a msg or be a local-loop optimisation
+ // the reply must have a msg or be a local-loop optimization
Q_ASSERT(reply.d_ptr->reply || reply.d_ptr->localMessage);
return reply;
}
diff --git a/src/dbus/qdbusmetatype.cpp b/src/dbus/qdbusmetatype.cpp
index cb377cb..821a227 100644
--- a/src/dbus/qdbusmetatype.cpp
+++ b/src/dbus/qdbusmetatype.cpp
@@ -242,7 +242,7 @@ bool QDBusMetaType::marshall(QDBusArgument &arg, int id, const void *data)
QReadLocker locker(customTypesLock());
QVector<QDBusCustomTypeInfo> *ct = customTypes();
if (id >= ct->size())
- return false; // non-existant
+ return false; // non-existent
const QDBusCustomTypeInfo &info = (*ct).at(id);
if (!info.marshall) {
@@ -271,7 +271,7 @@ bool QDBusMetaType::demarshall(const QDBusArgument &arg, int id, void *data)
QReadLocker locker(customTypesLock());
QVector<QDBusCustomTypeInfo> *ct = customTypes();
if (id >= ct->size())
- return false; // non-existant
+ return false; // non-existent
const QDBusCustomTypeInfo &info = (*ct).at(id);
if (!info.demarshall) {
diff --git a/src/dbus/qdbuspendingreply.h b/src/dbus/qdbuspendingreply.h
index 61e561e..918a46c 100644
--- a/src/dbus/qdbuspendingreply.h
+++ b/src/dbus/qdbuspendingreply.h
@@ -85,7 +85,7 @@ namespace QDBusPendingReplyTypes {
template<typename T1> inline int metaTypeFor(T1 * = 0)
{ return qMetaTypeId<T1>(); }
- // specialise for QVariant, allowing it to be used in place of QDBusVariant
+ // specialize for QVariant, allowing it to be used in place of QDBusVariant
template<> inline int metaTypeFor<QVariant>(QVariant *)
{ return qMetaTypeId<QDBusVariant>(); }
diff --git a/src/dbus/qdbusutil.cpp b/src/dbus/qdbusutil.cpp
index 2fcdc73..b7b0407 100644
--- a/src/dbus/qdbusutil.cpp
+++ b/src/dbus/qdbusutil.cpp
@@ -309,7 +309,7 @@ namespace QDBusUtil
Returns true if \a connName is a valid unique connection name.
Unique connection names start with a colon (":") and are followed by a list of dot-separated
- components composed of ASCII letters, digits, the hypen or the underscore ("_") character.
+ components composed of ASCII letters, digits, the hyphen or the underscore ("_") character.
*/
bool isValidUniqueConnectionName(const QString &connName)
{
diff --git a/src/declarative/debugger/qdeclarativedebug_p.h b/src/declarative/debugger/qdeclarativedebug_p.h
index 3d83e8a..9b8572b 100644
--- a/src/declarative/debugger/qdeclarativedebug_p.h
+++ b/src/declarative/debugger/qdeclarativedebug_p.h
@@ -45,6 +45,8 @@
#include <QtCore/qurl.h>
#include <QtCore/qvariant.h>
+#include <private/qdeclarativeglobal_p.h>
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -65,7 +67,7 @@ class QDeclarativeDebugObjectReference;
class QDeclarativeDebugFileReference;
class QDeclarativeDebugEngineReference;
class QDeclarativeEngineDebugPrivate;
-class Q_DECLARATIVE_EXPORT QDeclarativeEngineDebug : public QObject
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeEngineDebug : public QObject
{
Q_OBJECT
public:
@@ -111,7 +113,7 @@ private:
Q_DECLARE_PRIVATE(QDeclarativeEngineDebug)
};
-class Q_DECLARATIVE_EXPORT QDeclarativeDebugWatch : public QObject
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugWatch : public QObject
{
Q_OBJECT
public:
@@ -142,7 +144,7 @@ private:
int m_objectDebugId;
};
-class Q_DECLARATIVE_EXPORT QDeclarativeDebugPropertyWatch : public QDeclarativeDebugWatch
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugPropertyWatch : public QDeclarativeDebugWatch
{
Q_OBJECT
public:
@@ -155,7 +157,7 @@ private:
QString m_name;
};
-class Q_DECLARATIVE_EXPORT QDeclarativeDebugObjectExpressionWatch : public QDeclarativeDebugWatch
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugObjectExpressionWatch : public QDeclarativeDebugWatch
{
Q_OBJECT
public:
@@ -170,7 +172,7 @@ private:
};
-class Q_DECLARATIVE_EXPORT QDeclarativeDebugQuery : public QObject
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugQuery : public QObject
{
Q_OBJECT
public:
@@ -194,7 +196,7 @@ private:
State m_state;
};
-class Q_DECLARATIVE_EXPORT QDeclarativeDebugFileReference
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugFileReference
{
public:
QDeclarativeDebugFileReference();
@@ -215,7 +217,7 @@ private:
int m_columnNumber;
};
-class Q_DECLARATIVE_EXPORT QDeclarativeDebugEngineReference
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugEngineReference
{
public:
QDeclarativeDebugEngineReference();
@@ -232,7 +234,7 @@ private:
QString m_name;
};
-class Q_DECLARATIVE_EXPORT QDeclarativeDebugObjectReference
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugObjectReference
{
public:
QDeclarativeDebugObjectReference();
@@ -263,7 +265,7 @@ private:
QList<QDeclarativeDebugObjectReference> m_children;
};
-class Q_DECLARATIVE_EXPORT QDeclarativeDebugContextReference
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugContextReference
{
public:
QDeclarativeDebugContextReference();
@@ -284,7 +286,7 @@ private:
QList<QDeclarativeDebugContextReference> m_contexts;
};
-class Q_DECLARATIVE_EXPORT QDeclarativeDebugPropertyReference
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugPropertyReference
{
public:
QDeclarativeDebugPropertyReference();
@@ -309,7 +311,7 @@ private:
};
-class Q_DECLARATIVE_EXPORT QDeclarativeDebugEnginesQuery : public QDeclarativeDebugQuery
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugEnginesQuery : public QDeclarativeDebugQuery
{
Q_OBJECT
public:
@@ -324,7 +326,7 @@ private:
QList<QDeclarativeDebugEngineReference> m_engines;
};
-class Q_DECLARATIVE_EXPORT QDeclarativeDebugRootContextQuery : public QDeclarativeDebugQuery
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugRootContextQuery : public QDeclarativeDebugQuery
{
Q_OBJECT
public:
@@ -339,7 +341,7 @@ private:
QDeclarativeDebugContextReference m_context;
};
-class Q_DECLARATIVE_EXPORT QDeclarativeDebugObjectQuery : public QDeclarativeDebugQuery
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugObjectQuery : public QDeclarativeDebugQuery
{
Q_OBJECT
public:
@@ -355,7 +357,7 @@ private:
};
-class Q_DECLARATIVE_EXPORT QDeclarativeDebugExpressionQuery : public QDeclarativeDebugQuery
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugExpressionQuery : public QDeclarativeDebugQuery
{
Q_OBJECT
public:
diff --git a/src/declarative/debugger/qdeclarativedebugclient.cpp b/src/declarative/debugger/qdeclarativedebugclient.cpp
index 977e58e..f5c5751 100644
--- a/src/declarative/debugger/qdeclarativedebugclient.cpp
+++ b/src/declarative/debugger/qdeclarativedebugclient.cpp
@@ -93,7 +93,7 @@ QDeclarativeDebugConnectionPrivate::QDeclarativeDebugConnectionPrivate(QDeclarat
void QDeclarativeDebugConnectionPrivate::advertisePlugins()
{
- if (!q->isConnected() || !gotHello)
+ if (!q->isConnected())
return;
QPacket pack;
diff --git a/src/declarative/debugger/qdeclarativedebugclient_p.h b/src/declarative/debugger/qdeclarativedebugclient_p.h
index 8d1706d..47f87a5 100644
--- a/src/declarative/debugger/qdeclarativedebugclient_p.h
+++ b/src/declarative/debugger/qdeclarativedebugclient_p.h
@@ -44,6 +44,8 @@
#include <QtNetwork/qtcpsocket.h>
+#include <private/qdeclarativeglobal_p.h>
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -51,7 +53,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
class QDeclarativeDebugConnectionPrivate;
-class Q_DECLARATIVE_EXPORT QDeclarativeDebugConnection : public QTcpSocket
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugConnection : public QTcpSocket
{
Q_OBJECT
Q_DISABLE_COPY(QDeclarativeDebugConnection)
@@ -67,7 +69,7 @@ private:
};
class QDeclarativeDebugClientPrivate;
-class Q_DECLARATIVE_EXPORT QDeclarativeDebugClient : public QObject
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugClient : public QObject
{
Q_OBJECT
Q_DECLARE_PRIVATE(QDeclarativeDebugClient)
diff --git a/src/declarative/debugger/qdeclarativedebuggerstatus_p.h b/src/declarative/debugger/qdeclarativedebuggerstatus_p.h
index a3ba40a..a1499d8 100644
--- a/src/declarative/debugger/qdeclarativedebuggerstatus_p.h
+++ b/src/declarative/debugger/qdeclarativedebuggerstatus_p.h
@@ -44,13 +44,15 @@
#include <QtCore/qobject.h>
+#include <private/qdeclarativeglobal_p.h>
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class Q_DECLARATIVE_EXPORT QDeclarativeDebuggerStatus
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebuggerStatus
{
public:
virtual ~QDeclarativeDebuggerStatus();
diff --git a/src/declarative/debugger/qdeclarativedebughelper.cpp b/src/declarative/debugger/qdeclarativedebughelper.cpp
index 207ad2b..b003c12 100644
--- a/src/declarative/debugger/qdeclarativedebughelper.cpp
+++ b/src/declarative/debugger/qdeclarativedebughelper.cpp
@@ -48,6 +48,7 @@
#include <private/qdeclarativeengine_p.h>
#include <private/qabstractanimation_p.h>
+#include <private/qdeclarativeengine_p.h>
QT_BEGIN_NAMESPACE
@@ -63,4 +64,11 @@ void QDeclarativeDebugHelper::setAnimationSlowDownFactor(qreal factor)
timer->setSlowdownFactor(factor);
}
+void QDeclarativeDebugHelper::enableDebugging() {
+ if (!QDeclarativeEnginePrivate::qml_debugging_enabled) {
+ qWarning("Qml debugging is enabled. Only use this in a safe environment!");
+ }
+ QDeclarativeEnginePrivate::qml_debugging_enabled = true;
+}
+
QT_END_NAMESPACE
diff --git a/src/declarative/debugger/qdeclarativedebughelper_p.h b/src/declarative/debugger/qdeclarativedebughelper_p.h
index c9cb839..fcd7115 100644
--- a/src/declarative/debugger/qdeclarativedebughelper_p.h
+++ b/src/declarative/debugger/qdeclarativedebughelper_p.h
@@ -44,6 +44,8 @@
#include <QtCore/qglobal.h>
+#include <private/qdeclarativeglobal_p.h>
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -58,6 +60,10 @@ class Q_DECLARATIVE_EXPORT QDeclarativeDebugHelper
public:
static QScriptEngine *getScriptEngine(QDeclarativeEngine *engine);
static void setAnimationSlowDownFactor(qreal factor);
+
+ // Enables remote debugging functionality
+ // Only use this for debugging in a safe environment!
+ static void enableDebugging();
};
QT_END_NAMESPACE
diff --git a/src/declarative/debugger/qdeclarativedebugservice.cpp b/src/declarative/debugger/qdeclarativedebugservice.cpp
index b98cd5d..8c86ae8 100644
--- a/src/declarative/debugger/qdeclarativedebugservice.cpp
+++ b/src/declarative/debugger/qdeclarativedebugservice.cpp
@@ -42,6 +42,7 @@
#include "private/qdeclarativedebugservice_p.h"
#include "private/qpacketprotocol_p.h"
+#include "private/qdeclarativeengine_p.h"
#include <QtCore/qdebug.h>
#include <QtNetwork/qtcpserver.h>
@@ -204,13 +205,19 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance()
bool ok = false;
// format: qmljsdebugger=port:3768[,block]
- if (!appD->qmljsDebugArguments.isEmpty()) {
+ if (!appD->qmljsDebugArgumentsString().isEmpty()) {
+ if (!QDeclarativeEnginePrivate::qml_debugging_enabled) {
+ qWarning() << QString::fromLatin1("QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". "
+ "Debugging has not been enabled.").arg(
+ appD->qmljsDebugArgumentsString()).toAscii().constData();
+ return 0;
+ }
- if (appD->qmljsDebugArguments.indexOf(QLatin1String("port:")) == 0) {
- int separatorIndex = appD->qmljsDebugArguments.indexOf(QLatin1Char(','));
- port = appD->qmljsDebugArguments.mid(5, separatorIndex - 5).toInt(&ok);
+ if (appD->qmljsDebugArgumentsString().indexOf(QLatin1String("port:")) == 0) {
+ int separatorIndex = appD->qmljsDebugArgumentsString().indexOf(QLatin1Char(','));
+ port = appD->qmljsDebugArgumentsString().mid(5, separatorIndex - 5).toInt(&ok);
}
- block = appD->qmljsDebugArguments.contains(QLatin1String("block"));
+ block = appD->qmljsDebugArgumentsString().contains(QLatin1String("block"));
if (ok) {
server = new QDeclarativeDebugServer(port);
@@ -221,7 +228,7 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance()
} else {
qWarning(QString::fromAscii("QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". "
"Format is -qmljsdebugger=port:<port>[,block]").arg(
- appD->qmljsDebugArguments).toAscii().constData());
+ appD->qmljsDebugArgumentsString()).toAscii().constData());
}
}
#endif
diff --git a/src/declarative/debugger/qdeclarativedebugservice_p.h b/src/declarative/debugger/qdeclarativedebugservice_p.h
index 0cadbe5..da27b9a 100644
--- a/src/declarative/debugger/qdeclarativedebugservice_p.h
+++ b/src/declarative/debugger/qdeclarativedebugservice_p.h
@@ -44,6 +44,8 @@
#include <QtCore/qobject.h>
+#include <private/qdeclarativeglobal_p.h>
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -51,7 +53,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
class QDeclarativeDebugServicePrivate;
-class Q_DECLARATIVE_EXPORT QDeclarativeDebugService : public QObject
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugService : public QObject
{
Q_OBJECT
Q_DECLARE_PRIVATE(QDeclarativeDebugService)
diff --git a/src/declarative/debugger/qpacketprotocol_p.h b/src/declarative/debugger/qpacketprotocol_p.h
index cfdce4e..d153833 100644
--- a/src/declarative/debugger/qpacketprotocol_p.h
+++ b/src/declarative/debugger/qpacketprotocol_p.h
@@ -45,6 +45,8 @@
#include <QtCore/qobject.h>
#include <QtCore/qdatastream.h>
+#include <private/qdeclarativeglobal_p.h>
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -57,7 +59,7 @@ class QPacket;
class QPacketAutoSend;
class QPacketProtocolPrivate;
-class Q_DECLARATIVE_EXPORT QPacketProtocol : public QObject
+class Q_DECLARATIVE_PRIVATE_EXPORT QPacketProtocol : public QObject
{
Q_OBJECT
public:
@@ -87,7 +89,7 @@ private:
};
-class Q_DECLARATIVE_EXPORT QPacket : public QDataStream
+class Q_DECLARATIVE_PRIVATE_EXPORT QPacket : public QDataStream
{
public:
QPacket();
@@ -104,7 +106,7 @@ protected:
QBuffer * buf;
};
-class Q_DECLARATIVE_EXPORT QPacketAutoSend : public QPacket
+class Q_DECLARATIVE_PRIVATE_EXPORT QPacketAutoSend : public QPacket
{
public:
virtual ~QPacketAutoSend();
diff --git a/src/declarative/graphicsitems/qdeclarativeanchors.cpp b/src/declarative/graphicsitems/qdeclarativeanchors.cpp
index 26fb97f..c96ca0e 100644
--- a/src/declarative/graphicsitems/qdeclarativeanchors.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeanchors.cpp
@@ -272,7 +272,7 @@ void QDeclarativeAnchorsPrivate::addDepend(QGraphicsObject *item)
} else if(itemPrivate->isWidget) {
Q_Q(QDeclarativeAnchors);
QGraphicsWidget *widget = static_cast<QGraphicsWidget *>(item);
- QObject::connect(widget, SIGNAL(destroyed(QObject *)), q, SLOT(_q_widgetDestroyed(QObject *)));
+ QObject::connect(widget, SIGNAL(destroyed(QObject*)), q, SLOT(_q_widgetDestroyed(QObject*)));
QObject::connect(widget, SIGNAL(geometryChanged()), q, SLOT(_q_widgetGeometryChanged()));
}
}
@@ -289,7 +289,7 @@ void QDeclarativeAnchorsPrivate::remDepend(QGraphicsObject *item)
} else if(itemPrivate->isWidget) {
Q_Q(QDeclarativeAnchors);
QGraphicsWidget *widget = static_cast<QGraphicsWidget *>(item);
- QObject::disconnect(widget, SIGNAL(destroyed(QObject *)), q, SLOT(_q_widgetDestroyed(QObject *)));
+ QObject::disconnect(widget, SIGNAL(destroyed(QObject*)), q, SLOT(_q_widgetDestroyed(QObject*)));
QObject::disconnect(widget, SIGNAL(geometryChanged()), q, SLOT(_q_widgetGeometryChanged()));
}
}
diff --git a/src/declarative/graphicsitems/qdeclarativeanchors_p.h b/src/declarative/graphicsitems/qdeclarativeanchors_p.h
index c929797..8223b17 100644
--- a/src/declarative/graphicsitems/qdeclarativeanchors_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeanchors_p.h
@@ -48,6 +48,8 @@
#include <QtCore/QObject>
+#include <private/qdeclarativeglobal_p.h>
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -56,7 +58,7 @@ QT_MODULE(Declarative)
class QDeclarativeAnchorsPrivate;
class QDeclarativeAnchorLine;
-class Q_DECLARATIVE_EXPORT QDeclarativeAnchors : public QObject
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeAnchors : public QObject
{
Q_OBJECT
diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
index c58a08d..649c8fb 100644
--- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
@@ -361,6 +361,8 @@ QDeclarativeScaleGrid *QDeclarativeBorderImage::border()
\o BorderImage.Repeat - Tile the image until there is no more space. May crop the last image.
\o BorderImage.Round - Like Repeat, but scales the images down to ensure that the last image is not cropped.
\endlist
+
+ The default tile mode for each property is BorderImage.Stretch.
*/
QDeclarativeBorderImage::TileMode QDeclarativeBorderImage::horizontalTileMode() const
{
diff --git a/src/declarative/graphicsitems/qdeclarativeevents.cpp b/src/declarative/graphicsitems/qdeclarativeevents.cpp
index dbfb3fb..61fd562 100644
--- a/src/declarative/graphicsitems/qdeclarativeevents.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeevents.cpp
@@ -113,11 +113,13 @@ Item {
\qmlclass MouseEvent QDeclarativeMouseEvent
\since 4.7
\ingroup qml-event-elements
-
+
\brief The MouseEvent object provides information about a mouse event.
- The position of the mouse can be found via the x and y properties.
- The button that caused the event is available via the button property.
+ The position of the mouse can be found via the \l x and \l y properties.
+ The button that caused the event is available via the \l button property.
+
+ \sa MouseArea
*/
/*!
@@ -129,7 +131,7 @@ Item {
\qmlproperty int MouseEvent::x
\qmlproperty int MouseEvent::y
- These properties hold the position of the mouse event.
+ These properties hold the coordinates of the position supplied by the mouse event.
*/
@@ -186,7 +188,7 @@ Item {
It contains a bitwise combination of:
\list
\o Qt.NoModifier - No modifier key is pressed.
- \o Qt.ShiftModifier - A Shift key on the keyboard is pressed.
+ \o Qt.ShiftModifier - A Shift key on the keyboard is pressed.
\o Qt.ControlModifier - A Ctrl key on the keyboard is pressed.
\o Qt.AltModifier - An Alt key on the keyboard is pressed.
\o Qt.MetaModifier - A Meta key on the keyboard is pressed.
@@ -195,9 +197,12 @@ Item {
For example, to react to a Shift key + Left mouse button click:
\qml
-MouseArea {
- onClicked: { if (mouse.button == Qt.LeftButton && mouse.modifiers & Qt.ShiftModifier) doSomething(); }
-}
+ MouseArea {
+ onClicked: {
+ if (mouse.button == Qt.LeftButton && mouse.modifiers & Qt.ShiftModifier)
+ doSomething();
+ }
+ }
\endqml
*/
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
index 7c43e5b..0f786e3 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -53,9 +53,6 @@ QT_BEGIN_NAMESPACE
// before we perform a flick.
static const int FlickThreshold = 20;
-// Really slow flicks can be annoying.
-static const int MinimumFlickVelocity = 75;
-
QDeclarativeFlickableVisibleArea::QDeclarativeFlickableVisibleArea(QDeclarativeFlickable *parent)
: QObject(parent), flickable(parent), m_xPosition(0.), m_widthRatio(0.)
, m_yPosition(0.), m_heightRatio(0.)
@@ -85,7 +82,11 @@ qreal QDeclarativeFlickableVisibleArea::yPosition() const
void QDeclarativeFlickableVisibleArea::updateVisible()
{
QDeclarativeFlickablePrivate *p = static_cast<QDeclarativeFlickablePrivate *>(QGraphicsItemPrivate::get(flickable));
- bool pageChange = false;
+
+ bool changeX = false;
+ bool changeY = false;
+ bool changeWidth = false;
+ bool changeHeight = false;
// Vertical
const qreal viewheight = flickable->height();
@@ -95,11 +96,11 @@ void QDeclarativeFlickableVisibleArea::updateVisible()
if (pageSize != m_heightRatio) {
m_heightRatio = pageSize;
- pageChange = true;
+ changeHeight = true;
}
if (pagePos != m_yPosition) {
m_yPosition = pagePos;
- pageChange = true;
+ changeY = true;
}
// Horizontal
@@ -110,14 +111,21 @@ void QDeclarativeFlickableVisibleArea::updateVisible()
if (pageSize != m_widthRatio) {
m_widthRatio = pageSize;
- pageChange = true;
+ changeWidth = true;
}
if (pagePos != m_xPosition) {
m_xPosition = pagePos;
- pageChange = true;
+ changeX = true;
}
- if (pageChange)
- emit pageChanged();
+
+ if (changeX)
+ emit xPositionChanged(m_xPosition);
+ if (changeY)
+ emit yPositionChanged(m_yPosition);
+ if (changeWidth)
+ emit widthRatioChanged(m_widthRatio);
+ if (changeHeight)
+ emit heightRatioChanged(m_heightRatio);
}
@@ -466,15 +474,15 @@ QDeclarativeFlickable::~QDeclarativeFlickable()
qreal QDeclarativeFlickable::contentX() const
{
Q_D(const QDeclarativeFlickable);
- return -d->hData.move.value();
+ return -d->contentItem->x();
}
void QDeclarativeFlickable::setContentX(qreal pos)
{
Q_D(QDeclarativeFlickable);
- pos = qRound(pos);
d->timeline.reset(d->hData.move);
d->vTime = d->timeline.time();
+ movementXEnding();
if (-pos != d->hData.move.value()) {
d->hData.move.setValue(-pos);
viewportMoved();
@@ -484,15 +492,15 @@ void QDeclarativeFlickable::setContentX(qreal pos)
qreal QDeclarativeFlickable::contentY() const
{
Q_D(const QDeclarativeFlickable);
- return -d->vData.move.value();
+ return -d->contentItem->y();
}
void QDeclarativeFlickable::setContentY(qreal pos)
{
Q_D(QDeclarativeFlickable);
- pos = qRound(pos);
d->timeline.reset(d->vData.move);
d->vTime = d->timeline.time();
+ movementYEnding();
if (-pos != d->vData.move.value()) {
d->vData.move.setValue(-pos);
viewportMoved();
@@ -979,8 +987,8 @@ void QDeclarativeFlickable::viewportMoved()
{
Q_D(QDeclarativeFlickable);
- qreal prevY = d->lastFlickablePosition.x();
- qreal prevX = d->lastFlickablePosition.y();
+ qreal prevX = d->lastFlickablePosition.x();
+ qreal prevY = d->lastFlickablePosition.y();
d->velocityTimeline.clear();
if (d->pressed || d->calcVelocity) {
int elapsed = QDeclarativeItemPrivate::restart(d->velocityTime);
@@ -1001,7 +1009,7 @@ void QDeclarativeFlickable::viewportMoved()
}
}
- d->lastFlickablePosition = QPointF(d->vData.move.value(), d->hData.move.value());
+ d->lastFlickablePosition = QPointF(d->hData.move.value(), d->vData.move.value());
d->vTime = d->timeline.time();
d->updateBeginningEnd();
@@ -1021,6 +1029,13 @@ void QDeclarativeFlickable::geometryChanged(const QRectF &newGeometry,
d->contentItem->setWidth(width());
emit contentWidthChanged();
}
+ // Make sure that we're entirely in view.
+ if (!d->pressed && !d->movingHorizontally && !d->movingVertically) {
+ int oldDuration = d->fixupDuration;
+ d->fixupDuration = 0;
+ d->fixupX();
+ d->fixupDuration = oldDuration;
+ }
}
if (newGeometry.height() != oldGeometry.height()) {
if (yflick())
@@ -1029,6 +1044,13 @@ void QDeclarativeFlickable::geometryChanged(const QRectF &newGeometry,
d->contentItem->setHeight(height());
emit contentHeightChanged();
}
+ // Make sure that we're entirely in view.
+ if (!d->pressed && !d->movingHorizontally && !d->movingVertically) {
+ int oldDuration = d->fixupDuration;
+ d->fixupDuration = 0;
+ d->fixupY();
+ d->fixupDuration = oldDuration;
+ }
}
if (changed)
@@ -1150,19 +1172,18 @@ void QDeclarativeFlickable::setBoundsBehavior(BoundsBehavior b)
\qmlproperty real Flickable::contentWidth
\qmlproperty real Flickable::contentHeight
- The dimensions of the content (the surface controlled by Flickable). Typically this
- should be set to the combined size of the items placed in the Flickable. Note this
- can be set automatically using \l {Item::childrenRect.width}{childrenRect.width}
- and \l {Item::childrenRect.height}{childrenRect.height}. For example:
+ The dimensions of the content (the surface controlled by Flickable).
+ This should typically be set to the combined size of the items placed in the
+ Flickable.
- \code
- Flickable {
- width: 320; height: 480
- contentWidth: childrenRect.width; contentHeight: childrenRect.height
+ The following snippet shows how these properties are used to display
+ an image that is larger than the Flickable item itself:
- Image { id: image; source: "bigImage.png" }
- }
- \endcode
+ \snippet doc/src/snippets/declarative/flickable.qml document
+
+ In some cases, the the content dimensions can be automatically set
+ using the \l {Item::childrenRect.width}{childrenRect.width}
+ and \l {Item::childrenRect.height}{childrenRect.height} properties.
*/
qreal QDeclarativeFlickable::contentWidth() const
{
@@ -1484,6 +1505,15 @@ void QDeclarativeFlickable::movementStarting()
void QDeclarativeFlickable::movementEnding()
{
Q_D(QDeclarativeFlickable);
+ movementXEnding();
+ movementYEnding();
+ d->hData.smoothVelocity.setValue(0);
+ d->vData.smoothVelocity.setValue(0);
+}
+
+void QDeclarativeFlickable::movementXEnding()
+{
+ Q_D(QDeclarativeFlickable);
if (d->flickingHorizontally) {
d->flickingHorizontally = false;
emit flickingChanged();
@@ -1491,13 +1521,6 @@ void QDeclarativeFlickable::movementEnding()
if (!d->flickingVertically)
emit flickEnded();
}
- if (d->flickingVertically) {
- d->flickingVertically = false;
- emit flickingChanged();
- emit flickingVerticallyChanged();
- if (!d->flickingHorizontally)
- emit flickEnded();
- }
if (!d->pressed && !d->stealMouse) {
if (d->movingHorizontally) {
d->movingHorizontally = false;
@@ -1507,6 +1530,20 @@ void QDeclarativeFlickable::movementEnding()
if (!d->movingVertically)
emit movementEnded();
}
+ }
+}
+
+void QDeclarativeFlickable::movementYEnding()
+{
+ Q_D(QDeclarativeFlickable);
+ if (d->flickingVertically) {
+ d->flickingVertically = false;
+ emit flickingChanged();
+ emit flickingVerticallyChanged();
+ if (!d->flickingHorizontally)
+ emit flickEnded();
+ }
+ if (!d->pressed && !d->stealMouse) {
if (d->movingVertically) {
d->movingVertically = false;
d->vMoved = false;
@@ -1516,8 +1553,6 @@ void QDeclarativeFlickable::movementEnding()
emit movementEnded();
}
}
- d->hData.smoothVelocity.setValue(0);
- d->vData.smoothVelocity.setValue(0);
}
void QDeclarativeFlickablePrivate::updateVelocity()
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable_p.h b/src/declarative/graphicsitems/qdeclarativeflickable_p.h
index 44f2bcf..6e4d8ed 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeflickable_p.h
@@ -163,7 +163,6 @@ Q_SIGNALS:
void horizontalVelocityChanged();
void verticalVelocityChanged();
void isAtBoundaryChanged();
- void pageChanged();
void flickableDirectionChanged();
void interactiveChanged();
void boundsBehaviorChanged();
@@ -191,6 +190,8 @@ protected Q_SLOTS:
void movementEnding();
protected:
+ void movementXEnding();
+ void movementYEnding();
virtual qreal minXExtent() const;
virtual qreal minYExtent() const;
virtual qreal maxXExtent() const;
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h
index beee741..92cf748 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h
@@ -66,6 +66,9 @@
QT_BEGIN_NAMESPACE
+// Really slow flicks can be annoying.
+const qreal MinimumFlickVelocity = 75.0;
+
class QDeclarativeFlickableVisibleArea;
class QDeclarativeFlickablePrivate : public QDeclarativeItemPrivate, public QDeclarativeItemChangeListener
{
@@ -182,10 +185,10 @@ class QDeclarativeFlickableVisibleArea : public QObject
{
Q_OBJECT
- Q_PROPERTY(qreal xPosition READ xPosition NOTIFY pageChanged)
- Q_PROPERTY(qreal yPosition READ yPosition NOTIFY pageChanged)
- Q_PROPERTY(qreal widthRatio READ widthRatio NOTIFY pageChanged)
- Q_PROPERTY(qreal heightRatio READ heightRatio NOTIFY pageChanged)
+ Q_PROPERTY(qreal xPosition READ xPosition NOTIFY xPositionChanged)
+ Q_PROPERTY(qreal yPosition READ yPosition NOTIFY yPositionChanged)
+ Q_PROPERTY(qreal widthRatio READ widthRatio NOTIFY widthRatioChanged)
+ Q_PROPERTY(qreal heightRatio READ heightRatio NOTIFY heightRatioChanged)
public:
QDeclarativeFlickableVisibleArea(QDeclarativeFlickable *parent=0);
@@ -198,7 +201,10 @@ public:
void updateVisible();
signals:
- void pageChanged();
+ void xPositionChanged(qreal xPosition);
+ void yPositionChanged(qreal yPosition);
+ void widthRatioChanged(qreal widthRatio);
+ void heightRatioChanged(qreal heightRatio);
private:
QDeclarativeFlickable *flickable;
diff --git a/src/declarative/graphicsitems/qdeclarativeflipable.cpp b/src/declarative/graphicsitems/qdeclarativeflipable.cpp
index 4ecf87b..f118a85 100644
--- a/src/declarative/graphicsitems/qdeclarativeflipable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflipable.cpp
@@ -83,27 +83,28 @@ public:
\section1 Example Usage
- \beginfloatright
- \inlineimage flipable.gif
- \endfloat
-
The following example shows a Flipable item that flips whenever it is
clicked, rotating about the y-axis.
- The \l Rotation element is used to specify the angle and axis of the flip.
- When \c flipped is true, the item changes to the "back" state, where
- the angle is changed to 180 degrees to produce the flipping effect.
+ This flipable item has a \c flipped boolean property that is toggled
+ whenever the MouseArea within the flipable is clicked. When
+ \c flipped is true, the item changes to the "back" state; in this
+ state, the \c angle of the \l Rotation item is changed to 180
+ degrees to produce the flipping effect. When \c flipped is false, the
+ item reverts to the default state, in which the \c angle value is 0.
+
+ \snippet doc/src/snippets/declarative/flipable/flipable.qml 0
- \clearfloat
- \snippet doc/src/snippets/declarative/flipable/flipable-snippet.qml 0
+ \image flipable.gif
- The \l Transition creates the animation that changes the angle over the
- duration of one second. When the item changes between its "back" and
+ The \l Transition creates the animation that changes the angle over
+ four seconds. When the item changes between its "back" and
default states, the NumberAnimation animates the angle between
its old and new values.
- See the \l {QML States} and \l {QML Animation} documentation for more
- details on state changes and how animations work within transitions.
+ See \l {QML States} for details on state changes and the default
+ state, and \l {QML Animation} for more information on how animations
+ work within transitions.
\sa {declarative/ui-components/flipable}{Flipable example}
*/
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index 8216ab7..6f38f63 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -112,7 +112,7 @@ public:
, bufferMode(BufferBefore | BufferAfter), snapMode(QDeclarativeGridView::NoSnap)
, ownModel(false), wrap(false), autoHighlight(true)
, fixCurrentVisibility(false), lazyRelease(false), layoutScheduled(false)
- , deferredRelease(false), haveHighlightRange(false) {}
+ , deferredRelease(false), haveHighlightRange(false), currentIndexCleared(false) {}
void init();
void clear();
@@ -218,7 +218,14 @@ public:
return visibleItems.last()->rowPos() + rows * rowSize();
}
} else {
- return (modelIndex / columns) * rowSize();
+ qreal pos = (modelIndex / columns) * rowSize();
+ if (header) {
+ qreal headerSize = flow == QDeclarativeGridView::LeftToRight
+ ? header->item->height()
+ : header->item->width();
+ pos += headerSize;
+ }
+ return pos;
}
return 0;
}
@@ -385,6 +392,7 @@ public:
bool layoutScheduled : 1;
bool deferredRelease : 1;
bool haveHighlightRange : 1;
+ bool currentIndexCleared : 1;
};
void QDeclarativeGridViewPrivate::init()
@@ -723,6 +731,8 @@ void QDeclarativeGridViewPrivate::createHighlight()
QDeclarative_setParent_noEvent(item, q->contentItem());
item->setParentItem(q->contentItem());
highlight = new FxGridItem(item, q);
+ if (currentItem)
+ highlight->setPosition(currentItem->colPos(), currentItem->rowPos());
highlightXAnimator = new QSmoothedAnimation(q);
highlightXAnimator->target = QDeclarativeProperty(highlight->item, QLatin1String("x"));
highlightXAnimator->userDuration = highlightMoveDuration;
@@ -764,8 +774,11 @@ void QDeclarativeGridViewPrivate::updateCurrent(int modelIndex)
currentItem->attached->setIsCurrentItem(false);
releaseItem(currentItem);
currentItem = 0;
- currentIndex = -1;
+ currentIndex = modelIndex;
+ emit q->currentIndexChanged();
updateHighlight();
+ } else if (currentIndex != modelIndex) {
+ currentIndex = modelIndex;
emit q->currentIndexChanged();
}
return;
@@ -1204,7 +1217,7 @@ void QDeclarativeGridView::setModel(const QVariant &model)
disconnect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int)));
disconnect(d->model, SIGNAL(itemsMoved(int,int,int)), this, SLOT(itemsMoved(int,int,int)));
disconnect(d->model, SIGNAL(modelReset()), this, SLOT(modelReset()));
- disconnect(d->model, SIGNAL(createdItem(int, QDeclarativeItem*)), this, SLOT(createdItem(int,QDeclarativeItem*)));
+ disconnect(d->model, SIGNAL(createdItem(int,QDeclarativeItem*)), this, SLOT(createdItem(int,QDeclarativeItem*)));
disconnect(d->model, SIGNAL(destroyingItem(QDeclarativeItem*)), this, SLOT(destroyingItem(QDeclarativeItem*)));
}
d->clear();
@@ -1229,7 +1242,7 @@ void QDeclarativeGridView::setModel(const QVariant &model)
d->bufferMode = QDeclarativeGridViewPrivate::BufferBefore | QDeclarativeGridViewPrivate::BufferAfter;
if (isComponentComplete()) {
refill();
- if (d->currentIndex >= d->model->count() || d->currentIndex < 0) {
+ if ((d->currentIndex >= d->model->count() || d->currentIndex < 0) && !d->currentIndexCleared) {
setCurrentIndex(0);
} else {
d->moveReason = QDeclarativeGridViewPrivate::SetIndex;
@@ -1245,7 +1258,7 @@ void QDeclarativeGridView::setModel(const QVariant &model)
connect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int)));
connect(d->model, SIGNAL(itemsMoved(int,int,int)), this, SLOT(itemsMoved(int,int,int)));
connect(d->model, SIGNAL(modelReset()), this, SLOT(modelReset()));
- connect(d->model, SIGNAL(createdItem(int, QDeclarativeItem*)), this, SLOT(createdItem(int,QDeclarativeItem*)));
+ connect(d->model, SIGNAL(createdItem(int,QDeclarativeItem*)), this, SLOT(createdItem(int,QDeclarativeItem*)));
connect(d->model, SIGNAL(destroyingItem(QDeclarativeItem*)), this, SLOT(destroyingItem(QDeclarativeItem*)));
emit countChanged();
}
@@ -1317,7 +1330,8 @@ void QDeclarativeGridView::setDelegate(QDeclarativeComponent *delegate)
\qmlproperty Item GridView::currentItem
The \c currentIndex property holds the index of the current item, and
- \c currentItem holds the current item.
+ \c currentItem holds the current item. Setting the currentIndex to -1
+ will clear the highlight and set currentItem to null.
If highlightFollowsCurrentItem is \c true, setting either of these
properties will smoothly scroll the GridView so that the current
@@ -1337,10 +1351,13 @@ void QDeclarativeGridView::setCurrentIndex(int index)
Q_D(QDeclarativeGridView);
if (d->requestedIndex >= 0) // currently creating item
return;
- if (isComponentComplete() && d->isValid() && index != d->currentIndex && index < d->model->count() && index >= 0) {
+ d->currentIndexCleared = (index == -1);
+ if (index == d->currentIndex)
+ return;
+ if (isComponentComplete() && d->isValid()) {
d->moveReason = QDeclarativeGridViewPrivate::SetIndex;
d->updateCurrent(index);
- } else if (index != d->currentIndex) {
+ } else {
d->currentIndex = index;
emit currentIndexChanged();
}
@@ -1815,6 +1832,8 @@ void QDeclarativeGridView::viewportMoved()
{
Q_D(QDeclarativeGridView);
QDeclarativeFlickable::viewportMoved();
+ if (!d->itemCount)
+ return;
d->lazyRelease = true;
if (d->flickingHorizontally || d->flickingVertically) {
if (yflick()) {
@@ -1976,22 +1995,25 @@ void QDeclarativeGridView::keyPressEvent(QKeyEvent *event)
Move the currentIndex up one item in the view.
The current index will wrap if keyNavigationWraps is true and it
- is currently at the end.
+ is currently at the end. This method has no effect if the \l count is zero.
\bold Note: methods should only be called after the Component has completed.
*/
void QDeclarativeGridView::moveCurrentIndexUp()
{
Q_D(QDeclarativeGridView);
+ const int count = d->model ? d->model->count() : 0;
+ if (!count)
+ return;
if (d->flow == QDeclarativeGridView::LeftToRight) {
if (currentIndex() >= d->columns || d->wrap) {
int index = currentIndex() - d->columns;
- setCurrentIndex(index >= 0 ? index : d->model->count()-1);
+ setCurrentIndex((index >= 0 && index < count) ? index : count-1);
}
} else {
if (currentIndex() > 0 || d->wrap) {
int index = currentIndex() - 1;
- setCurrentIndex(index >= 0 ? index : d->model->count()-1);
+ setCurrentIndex((index >= 0 && index < count) ? index : count-1);
}
}
}
@@ -2001,22 +2023,25 @@ void QDeclarativeGridView::moveCurrentIndexUp()
Move the currentIndex down one item in the view.
The current index will wrap if keyNavigationWraps is true and it
- is currently at the end.
+ is currently at the end. This method has no effect if the \l count is zero.
\bold Note: methods should only be called after the Component has completed.
*/
void QDeclarativeGridView::moveCurrentIndexDown()
{
Q_D(QDeclarativeGridView);
+ const int count = d->model ? d->model->count() : 0;
+ if (!count)
+ return;
if (d->flow == QDeclarativeGridView::LeftToRight) {
- if (currentIndex() < d->model->count() - d->columns || d->wrap) {
+ if (currentIndex() < count - d->columns || d->wrap) {
int index = currentIndex()+d->columns;
- setCurrentIndex(index < d->model->count() ? index : 0);
+ setCurrentIndex((index >= 0 && index < count) ? index : 0);
}
} else {
- if (currentIndex() < d->model->count() - 1 || d->wrap) {
+ if (currentIndex() < count - 1 || d->wrap) {
int index = currentIndex() + 1;
- setCurrentIndex(index < d->model->count() ? index : 0);
+ setCurrentIndex((index >= 0 && index < count) ? index : 0);
}
}
}
@@ -2026,22 +2051,25 @@ void QDeclarativeGridView::moveCurrentIndexDown()
Move the currentIndex left one item in the view.
The current index will wrap if keyNavigationWraps is true and it
- is currently at the end.
+ is currently at the end. This method has no effect if the \l count is zero.
\bold Note: methods should only be called after the Component has completed.
*/
void QDeclarativeGridView::moveCurrentIndexLeft()
{
Q_D(QDeclarativeGridView);
+ const int count = d->model ? d->model->count() : 0;
+ if (!count)
+ return;
if (d->flow == QDeclarativeGridView::LeftToRight) {
if (currentIndex() > 0 || d->wrap) {
int index = currentIndex() - 1;
- setCurrentIndex(index >= 0 ? index : d->model->count()-1);
+ setCurrentIndex((index >= 0 && index < count) ? index : count-1);
}
} else {
if (currentIndex() >= d->columns || d->wrap) {
int index = currentIndex() - d->columns;
- setCurrentIndex(index >= 0 ? index : d->model->count()-1);
+ setCurrentIndex((index >= 0 && index < count) ? index : count-1);
}
}
}
@@ -2051,22 +2079,25 @@ void QDeclarativeGridView::moveCurrentIndexLeft()
Move the currentIndex right one item in the view.
The current index will wrap if keyNavigationWraps is true and it
- is currently at the end.
+ is currently at the end. This method has no effect if the \l count is zero.
\bold Note: methods should only be called after the Component has completed.
*/
void QDeclarativeGridView::moveCurrentIndexRight()
{
Q_D(QDeclarativeGridView);
+ const int count = d->model ? d->model->count() : 0;
+ if (!count)
+ return;
if (d->flow == QDeclarativeGridView::LeftToRight) {
- if (currentIndex() < d->model->count() - 1 || d->wrap) {
+ if (currentIndex() < count - 1 || d->wrap) {
int index = currentIndex() + 1;
- setCurrentIndex(index < d->model->count() ? index : 0);
+ setCurrentIndex((index >= 0 && index < count) ? index : 0);
}
} else {
- if (currentIndex() < d->model->count() - d->columns || d->wrap) {
+ if (currentIndex() < count - d->columns || d->wrap) {
int index = currentIndex()+d->columns;
- setCurrentIndex(index < d->model->count() ? index : 0);
+ setCurrentIndex((index >= 0 && index < count) ? index : 0);
}
}
}
@@ -2194,7 +2225,7 @@ void QDeclarativeGridView::componentComplete()
if (d->isValid()) {
refill();
d->moveReason = QDeclarativeGridViewPrivate::SetIndex;
- if (d->currentIndex < 0)
+ if (d->currentIndex < 0 && !d->currentIndexCleared)
d->updateCurrent(0);
else
d->updateCurrent(d->currentIndex);
@@ -2269,13 +2300,13 @@ void QDeclarativeGridView::itemsInserted(int modelIndex, int count)
return;
if (!d->visibleItems.count() || d->model->count() <= 1) {
d->scheduleLayout();
- if (d->currentIndex >= modelIndex) {
+ if (d->itemCount && d->currentIndex >= modelIndex) {
// adjust current item index
d->currentIndex += count;
if (d->currentItem)
d->currentItem->index = d->currentIndex;
emit currentIndexChanged();
- } else if (d->currentIndex < 0) {
+ } else if (!d->currentIndex || (d->currentIndex < 0 && !d->currentIndexCleared)) {
d->updateCurrent(0);
}
d->itemCount += count;
@@ -2383,7 +2414,7 @@ void QDeclarativeGridView::itemsInserted(int modelIndex, int count)
}
}
- if (d->currentIndex >= modelIndex) {
+ if (d->itemCount && d->currentIndex >= modelIndex) {
// adjust current item index
d->currentIndex += count;
if (d->currentItem) {
@@ -2470,8 +2501,8 @@ void QDeclarativeGridView::itemsRemoved(int modelIndex, int count)
if (removedVisible && d->visibleItems.isEmpty()) {
d->timeline.clear();
- d->setPosition(0);
if (d->itemCount == 0) {
+ d->setPosition(0);
d->updateHeader();
d->updateFooter();
update();
diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp
index 08d237f..3b08a9b 100644
--- a/src/declarative/graphicsitems/qdeclarativeimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp
@@ -259,8 +259,10 @@ void QDeclarativeImage::setFillMode(FillMode mode)
\qmlproperty real Image::paintedHeight
These properties hold the size of the image that is actually painted.
- In most cases it is the same as \c width and \c height, but when using a \c fillMode like
- \c PreserveAspectFit \c paintedWidth or \c paintedHeight can be smaller than \c width and \c height.
+ In most cases it is the same as \c width and \c height, but when using a
+ \c fillMode \c PreserveAspectFit or \c fillMode \c PreserveAspectCrop
+ \c paintedWidth or \c paintedHeight can be smaller or larger than
+ \c width and \c height of the Image element.
*/
qreal QDeclarativeImage::paintedWidth() const
{
@@ -288,23 +290,25 @@ qreal QDeclarativeImage::paintedHeight() const
Use this status to provide an update or respond to the status change in some way.
For example, you could:
- \e {Trigger a state change:}
- \qml
- State { name: 'loaded'; when: image.status = Image.Ready }
+ \list
+ \o Trigger a state change:
+ \qml
+ State { name: 'loaded'; when: image.status == Image.Ready }
\endqml
- \e {Implement an \c onStatusChanged signal handler:}
- \qml
+ \o Implement an \c onStatusChanged signal handler:
+ \qml
Image {
id: image
onStatusChanged: if (image.status == Image.Ready) console.log('Loaded')
}
\endqml
- \e {Bind to the status value:}
+ \o Bind to the status value:
\qml
- Text { text: image.status != Image.Ready ? 'Not Loaded' : 'Loaded' }
+ Text { text: image.status == Image.Ready ? 'Loaded' : 'Not loaded' }
\endqml
+ \endlist
\sa progress
*/
@@ -397,6 +401,19 @@ void QDeclarativeImage::updatePaintedGeometry()
if (heightValid() && !widthValid()) {
setImplicitWidth(d->paintedWidth);
}
+ } else if (d->fillMode == PreserveAspectCrop) {
+ if (!d->pix.width() || !d->pix.height())
+ return;
+ qreal widthScale = width() / qreal(d->pix.width());
+ qreal heightScale = height() / qreal(d->pix.height());
+ if (widthScale < heightScale) {
+ widthScale = heightScale;
+ } else if(heightScale < widthScale) {
+ heightScale = widthScale;
+ }
+
+ d->paintedHeight = heightScale * qreal(d->pix.height());
+ d->paintedWidth = widthScale * qreal(d->pix.width());
} else {
d->paintedWidth = width();
d->paintedHeight = height();
@@ -410,6 +427,12 @@ void QDeclarativeImage::geometryChanged(const QRectF &newGeometry, const QRectF
updatePaintedGeometry();
}
+QRectF QDeclarativeImage::boundingRect() const
+{
+ Q_D(const QDeclarativeImage);
+ return QRectF(0, 0, qMax(d->mWidth, d->paintedWidth), qMax(d->mHeight, d->paintedHeight));
+}
+
/*!
\qmlproperty url Image::source
@@ -494,7 +517,7 @@ void QDeclarativeImage::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWi
}
if (clip()) {
p->save();
- p->setClipRect(boundingRect(), Qt::IntersectClip);
+ p->setClipRect(QRectF(0, 0, d->mWidth, d->mHeight), Qt::IntersectClip);
}
scale.scale(widthScale, heightScale);
QTransform old = p->transform();
diff --git a/src/declarative/graphicsitems/qdeclarativeimage_p.h b/src/declarative/graphicsitems/qdeclarativeimage_p.h
index c8bb30b..0e8034e 100644
--- a/src/declarative/graphicsitems/qdeclarativeimage_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeimage_p.h
@@ -76,6 +76,7 @@ public:
qreal paintedHeight() const;
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
+ QRectF boundingRect() const;
Q_SIGNALS:
void fillModeChanged();
diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase.cpp b/src/declarative/graphicsitems/qdeclarativeimagebase.cpp
index 02b4807..c3bac2d 100644
--- a/src/declarative/graphicsitems/qdeclarativeimagebase.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeimagebase.cpp
@@ -46,8 +46,6 @@
#include <qdeclarativeinfo.h>
#include <qdeclarativepixmapcache_p.h>
-#include <QFile>
-
QT_BEGIN_NAMESPACE
QDeclarativeImageBase::QDeclarativeImageBase(QDeclarativeImageBasePrivate &dd, QDeclarativeItem *parent)
@@ -115,6 +113,7 @@ void QDeclarativeImageBase::setSourceSize(const QSize& size)
return;
d->sourcesize = size;
+ d->explicitSourceSize = true;
emit sourceSizeChanged();
if (isComponentComplete())
load();
@@ -123,7 +122,10 @@ void QDeclarativeImageBase::setSourceSize(const QSize& size)
QSize QDeclarativeImageBase::sourceSize() const
{
Q_D(const QDeclarativeImageBase);
- return d->sourcesize.isValid() ? d->sourcesize : QSize(implicitWidth(),implicitHeight());
+
+ int width = d->sourcesize.width();
+ int height = d->sourcesize.height();
+ return QSize(width != -1 ? width : implicitWidth(), height != -1 ? height : implicitHeight());
}
void QDeclarativeImageBase::load()
@@ -141,7 +143,7 @@ void QDeclarativeImageBase::load()
pixmapChange();
update();
} else {
- d->pix.load(qmlEngine(this), d->url, d->sourcesize, d->async);
+ d->pix.load(qmlEngine(this), d->url, d->explicitSourceSize ? sourceSize() : QSize(), d->async);
if (d->pix.isLoading()) {
d->progress = 0.0;
@@ -186,11 +188,8 @@ void QDeclarativeImageBase::requestFinished()
setImplicitWidth(d->pix.width());
setImplicitHeight(d->pix.height());
- if (d->sourcesize.width() != d->pix.width() || d->sourcesize.height() != d->pix.height()) {
- d->sourcesize.setWidth(d->pix.width());
- d->sourcesize.setHeight(d->pix.height());
+ if (d->sourcesize.width() != d->pix.width() || d->sourcesize.height() != d->pix.height())
emit sourceSizeChanged();
- }
if (d->status != oldStatus)
emit statusChanged(d->status);
diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase_p_p.h b/src/declarative/graphicsitems/qdeclarativeimagebase_p_p.h
index aee8b28..3d23ba9 100644
--- a/src/declarative/graphicsitems/qdeclarativeimagebase_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeimagebase_p_p.h
@@ -69,6 +69,7 @@ public:
QDeclarativeImageBasePrivate()
: status(QDeclarativeImageBase::Null),
progress(0.0),
+ explicitSourceSize(false),
async(false)
{
QGraphicsItemPrivate::flags = QGraphicsItemPrivate::flags & ~QGraphicsItem::ItemHasNoContents;
@@ -79,6 +80,7 @@ public:
QUrl url;
qreal progress;
QSize sourcesize;
+ bool explicitSourceSize : 1;
bool async : 1;
};
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index 250a43b..e0df751 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -56,7 +56,6 @@
#include <QDebug>
#include <QPen>
-#include <QFile>
#include <QEvent>
#include <QGraphicsSceneMouseEvent>
#include <QtCore/qnumeric.h>
@@ -729,41 +728,39 @@ void QDeclarativeKeyNavigationAttached::keyReleased(QKeyEvent *event, bool post)
\since 4.7
\brief The Keys attached property provides key handling to Items.
- All visual primitives support key handling via the \e Keys
- attached property. Keys can be handled via the \e onPressed
- and \e onReleased signal properties.
+ All visual primitives support key handling via the Keys
+ attached property. Keys can be handled via the onPressed
+ and onReleased signal properties.
The signal properties have a \l KeyEvent parameter, named
\e event which contains details of the event. If a key is
handled \e event.accepted should be set to true to prevent the
event from propagating up the item hierarchy.
- \code
- Item {
- focus: true
- Keys.onPressed: {
- if (event.key == Qt.Key_Left) {
- console.log("move left");
- event.accepted = true;
- }
- }
- }
- \endcode
+ \section1 Example Usage
+
+ The following example shows how the general onPressed handler can
+ be used to test for a certain key; in this case, the left cursor
+ key:
+
+ \snippet doc/src/snippets/declarative/keys/keys-pressed.qml key item
Some keys may alternatively be handled via specific signal properties,
for example \e onSelectPressed. These handlers automatically set
\e event.accepted to true.
- \code
- Item {
- focus: true
- Keys.onLeftPressed: console.log("move left")
- }
- \endcode
+ \snippet doc/src/snippets/declarative/keys/keys-handler.qml key item
+
+ See \l{Qt::Key}{Qt.Key} for the list of keyboard codes.
- See \l {Qt::Key}{Qt.Key} for the list of keyboard codes.
+ \section1 Key Handling Priorities
- If priority is Keys.BeforeItem (default) the order of key event processing is:
+ The Keys attached property can be configured to handle key events
+ before or after the item it is attached to. This makes it possible
+ to intercept events in order to override an item's default behavior,
+ or act as a fallback for keys not handled by the item.
+
+ If \l priority is Keys.BeforeItem (default) the order of key event processing is:
\list 1
\o Items specified in \c forwardTo
@@ -774,6 +771,7 @@ void QDeclarativeKeyNavigationAttached::keyReleased(QKeyEvent *event, bool post)
\endlist
If priority is Keys.AfterItem the order of key event processing is:
+
\list 1
\o Item specific key handling, e.g. TextInput key handling
\o Items specified in \c forwardTo
@@ -1181,7 +1179,7 @@ void QDeclarativeKeysAttached::keyPressed(QKeyEvent *event, bool post)
d->inPress = true;
for (int ii = 0; ii < d->targets.count(); ++ii) {
QGraphicsItem *i = d->finalFocusProxy(d->targets.at(ii));
- if (i) {
+ if (i && i->isVisible()) {
d->item->scene()->sendEvent(i, event);
if (event->isAccepted()) {
d->inPress = false;
@@ -1223,7 +1221,7 @@ void QDeclarativeKeysAttached::keyReleased(QKeyEvent *event, bool post)
d->inRelease = true;
for (int ii = 0; ii < d->targets.count(); ++ii) {
QGraphicsItem *i = d->finalFocusProxy(d->targets.at(ii));
- if (i) {
+ if (i && i->isVisible()) {
d->item->scene()->sendEvent(i, event);
if (event->isAccepted()) {
d->inRelease = false;
@@ -1248,7 +1246,7 @@ void QDeclarativeKeysAttached::inputMethodEvent(QInputMethodEvent *event, bool p
d->inIM = true;
for (int ii = 0; ii < d->targets.count(); ++ii) {
QGraphicsItem *i = d->finalFocusProxy(d->targets.at(ii));
- if (i && (i->flags() & QGraphicsItem::ItemAcceptsInputMethod)) {
+ if (i && i->isVisible() && (i->flags() & QGraphicsItem::ItemAcceptsInputMethod)) {
d->item->scene()->sendEvent(i, event);
if (event->isAccepted()) {
d->imeItem = i;
@@ -1276,7 +1274,7 @@ QVariant QDeclarativeKeysAttached::inputMethodQuery(Qt::InputMethodQuery query)
if (d->item) {
for (int ii = 0; ii < d->targets.count(); ++ii) {
QGraphicsItem *i = d->finalFocusProxy(d->targets.at(ii));
- if (i && (i->flags() & QGraphicsItem::ItemAcceptsInputMethod) && i == d->imeItem) { //### how robust is i == d->imeItem check?
+ if (i && i->isVisible() && (i->flags() & QGraphicsItem::ItemAcceptsInputMethod) && i == d->imeItem) { //### how robust is i == d->imeItem check?
QVariant v = static_cast<QDeclarativeItemAccessor *>(i)->doInputMethodQuery(query);
if (v.userType() == QVariant::RectF)
v = d->item->mapRectFromItem(i, v.toRectF()); //### cost?
@@ -1957,12 +1955,8 @@ void QDeclarativeItem::geometryChanged(const QRectF &newGeometry,
change.listener->itemGeometryChanged(this, newGeometry, oldGeometry);
}
- if (newGeometry.x() != oldGeometry.x())
- emit xChanged();
if (newGeometry.width() != oldGeometry.width())
emit widthChanged();
- if (newGeometry.y() != oldGeometry.y())
- emit yChanged();
if (newGeometry.height() != oldGeometry.height())
emit heightChanged();
}
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index 6b46bc5..6be49ba 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -124,8 +124,8 @@ public:
}
qreal endPosition() const {
return (view->orientation() == QDeclarativeListView::Vertical
- ? item->y() + (item->height() > 0 ? item->height() : 1)
- : item->x() + (item->width() > 0 ? item->width() : 1)) - 1;
+ ? item->y() + (item->height() >= 1.0 ? item->height() : 1)
+ : item->x() + (item->width() >= 1.0 ? item->width() : 1)) - 1;
}
void setPosition(qreal pos) {
if (view->orientation() == QDeclarativeListView::Vertical) {
@@ -182,7 +182,8 @@ public:
, bufferMode(BufferBefore | BufferAfter)
, ownModel(false), wrap(false), autoHighlight(true), haveHighlightRange(false)
, correctFlick(false), inFlickCorrection(false), lazyRelease(false)
- , deferredRelease(false), layoutScheduled(false), minExtentDirty(true), maxExtentDirty(true)
+ , deferredRelease(false), layoutScheduled(false), currentIndexCleared(false)
+ , minExtentDirty(true), maxExtentDirty(true)
{}
void init();
@@ -333,28 +334,9 @@ public:
return model && model->count() && model->isValid();
}
- int snapIndex() {
- int index = currentIndex;
- for (int i = 0; i < visibleItems.count(); ++i) {
- FxListItem *item = visibleItems[i];
- if (item->index == -1)
- continue;
- qreal itemTop = item->position();
- if (itemTop >= highlight->position()-item->size()/2 && itemTop < highlight->position()+item->size()/2)
- return item->index;
- }
- return index;
- }
-
qreal snapPosAt(qreal pos) {
- for (int i = 0; i < visibleItems.count(); ++i) {
- FxListItem *item = visibleItems[i];
- if (item->index == -1)
- continue;
- qreal itemTop = item->position();
- if (itemTop+item->size()/2 >= pos && itemTop <= pos)
- return item->position();
- }
+ if (FxListItem *snapItem = snapItemAt(pos))
+ return snapItem->position();
if (visibleItems.count()) {
qreal firstPos = visibleItems.first()->position();
qreal endPos = visibleItems.last()->position();
@@ -367,17 +349,18 @@ public:
}
FxListItem *snapItemAt(qreal pos) {
+ FxListItem *snapItem = 0;
for (int i = 0; i < visibleItems.count(); ++i) {
FxListItem *item = visibleItems[i];
if (item->index == -1)
continue;
qreal itemTop = item->position();
- if (item->index == model->count()-1 || (itemTop+item->size()/2 >= pos))
+ if (highlight && itemTop >= pos && item->endPosition() <= pos + highlight->size() - 1)
return item;
+ if (itemTop+item->size()/2 >= pos && itemTop-item->size()/2 < pos)
+ snapItem = item;
}
- if (visibleItems.count() && visibleItems.first()->position() <= pos)
- return visibleItems.first();
- return 0;
+ return snapItem;
}
int lastVisibleIndex() const {
@@ -393,44 +376,19 @@ public:
}
// map a model index to visibleItems index.
- // These may differ if removed items are still present in the visible list,
- // e.g. doing a removal animation
int mapFromModel(int modelIndex) const {
if (modelIndex < visibleIndex || modelIndex >= visibleIndex + visibleItems.count())
return -1;
for (int i = 0; i < visibleItems.count(); ++i) {
FxListItem *listItem = visibleItems.at(i);
if (listItem->index == modelIndex)
- return i + visibleIndex;
+ return i;
if (listItem->index > modelIndex)
return -1;
}
return -1; // Not in visibleList
}
- bool mapRangeFromModel(int &index, int &count) const {
- if (index + count < visibleIndex)
- return false;
-
- int lastIndex = -1;
- for (int i = visibleItems.count()-1; i >= 0; --i) {
- FxListItem *listItem = visibleItems.at(i);
- if (listItem->index != -1) {
- lastIndex = listItem->index;
- break;
- }
- }
-
- if (index > lastIndex)
- return false;
-
- int last = qMin(index + count - 1, lastIndex);
- index = qMax(index, visibleIndex);
- count = last - index + 1;
-
- return true;
- }
-
void updateViewport() {
Q_Q(QDeclarativeListView);
if (orient == QDeclarativeListView::Vertical) {
@@ -544,6 +502,7 @@ public:
bool lazyRelease : 1;
bool deferredRelease : 1;
bool layoutScheduled : 1;
+ bool currentIndexCleared : 1;
mutable bool minExtentDirty : 1;
mutable bool maxExtentDirty : 1;
};
@@ -775,10 +734,9 @@ void QDeclarativeListViewPrivate::layout()
setPosition(0);
return;
}
- updateSections();
if (!visibleItems.isEmpty()) {
qreal oldEnd = visibleItems.last()->endPosition();
- qreal pos = visibleItems.first()->endPosition() + spacing + 1;
+ qreal pos = visibleItems.first()->position() + visibleItems.first()->size() + spacing;
for (int i=1; i < visibleItems.count(); ++i) {
FxListItem *item = visibleItems.at(i);
item->setPosition(pos);
@@ -792,8 +750,10 @@ void QDeclarativeListViewPrivate::layout()
minExtentDirty = true;
maxExtentDirty = true;
updateHighlight();
- fixupPosition();
- q->refill();
+ if (!q->isMoving() && !q->isFlicking()) {
+ fixupPosition();
+ q->refill();
+ }
if (header)
updateHeader();
if (footer)
@@ -882,6 +842,7 @@ void QDeclarativeListViewPrivate::createHighlight()
} else {
highlight->item->setWidth(currentItem->item->width());
}
+ highlight->setPosition(currentItem->itemPosition());
}
QDeclarativeItemPrivate *itemPrivate = static_cast<QDeclarativeItemPrivate*>(QGraphicsItemPrivate::get(item));
itemPrivate->addItemChangeListener(this, QDeclarativeItemPrivate::Geometry);
@@ -934,6 +895,7 @@ void QDeclarativeListViewPrivate::createSection(FxListItem *listItem)
return;
if (listItem->attached->m_prevSection != listItem->attached->m_section) {
if (!listItem->section) {
+ qreal pos = listItem->position();
int i = sectionCacheSize-1;
while (i >= 0 && !sectionCache[i])
--i;
@@ -961,8 +923,10 @@ void QDeclarativeListViewPrivate::createSection(FxListItem *listItem)
delete context;
}
}
+ listItem->setPosition(pos);
}
} else if (listItem->section) {
+ qreal pos = listItem->position();
int i = 0;
do {
if (!sectionCache[i]) {
@@ -975,12 +939,13 @@ void QDeclarativeListViewPrivate::createSection(FxListItem *listItem)
} while (i < sectionCacheSize);
delete listItem->section;
listItem->section = 0;
+ listItem->setPosition(pos);
}
}
void QDeclarativeListViewPrivate::updateSections()
{
- if (sectionCriteria) {
+ if (sectionCriteria && !visibleItems.isEmpty()) {
QString prevSection;
if (visibleIndex > 0)
prevSection = sectionAt(visibleIndex-1);
@@ -990,6 +955,8 @@ void QDeclarativeListViewPrivate::updateSections()
if (visibleItems.at(i)->index != -1) {
QDeclarativeListViewAttached *attached = visibleItems.at(i)->attached;
attached->setPrevSection(prevSection);
+ QString propValue = model->stringValue(visibleItems.at(i)->index, sectionCriteria->property());
+ attached->setSection(sectionCriteria->sectionString(propValue));
if (prevAtt)
prevAtt->setNextSection(attached->section());
createSection(visibleItems.at(i));
@@ -1009,18 +976,27 @@ void QDeclarativeListViewPrivate::updateSections()
void QDeclarativeListViewPrivate::updateCurrentSection()
{
+ Q_Q(QDeclarativeListView);
if (!sectionCriteria || visibleItems.isEmpty()) {
- currentSection.clear();
+ if (!currentSection.isEmpty()) {
+ currentSection.clear();
+ emit q->currentSectionChanged();
+ }
return;
}
int index = 0;
while (index < visibleItems.count() && visibleItems.at(index)->endPosition() < position())
++index;
+ QString newSection = currentSection;
if (index < visibleItems.count())
- currentSection = visibleItems.at(index)->attached->section();
+ newSection = visibleItems.at(index)->attached->section();
else
- currentSection = visibleItems.first()->attached->section();
+ newSection = visibleItems.first()->attached->section();
+ if (newSection != currentSection) {
+ currentSection = newSection;
+ emit q->currentSectionChanged();
+ }
}
void QDeclarativeListViewPrivate::updateCurrent(int modelIndex)
@@ -1031,8 +1007,11 @@ void QDeclarativeListViewPrivate::updateCurrent(int modelIndex)
currentItem->attached->setIsCurrentItem(false);
releaseItem(currentItem);
currentItem = 0;
- currentIndex = -1;
+ currentIndex = modelIndex;
+ emit q->currentIndexChanged();
updateHighlight();
+ } else if (currentIndex != modelIndex) {
+ currentIndex = modelIndex;
emit q->currentIndexChanged();
}
return;
@@ -1178,33 +1157,39 @@ void QDeclarativeListViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m
|| (orient == QDeclarativeListView::Vertical && &data == &hData))
return;
+ correctFlick = false;
int oldDuration = fixupDuration;
fixupDuration = moveReason == Mouse ? fixupDuration : 0;
- if (snapMode != QDeclarativeListView::NoSnap) {
+ if (currentItem && haveHighlightRange && highlightRange == QDeclarativeListView::StrictlyEnforceRange) {
+ updateHighlight();
+ qreal pos = currentItem->itemPosition();
+ qreal viewPos = position();
+ if (viewPos < pos + currentItem->itemSize() - highlightRangeEnd)
+ viewPos = pos + currentItem->itemSize() - highlightRangeEnd;
+ if (viewPos > pos - highlightRangeStart)
+ viewPos = pos - highlightRangeStart;
+
+ timeline.reset(data.move);
+ if (viewPos != position()) {
+ if (fixupDuration)
+ timeline.move(data.move, -viewPos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2);
+ else
+ timeline.set(data.move, -viewPos);
+ }
+ vTime = timeline.time();
+ } else if (snapMode != QDeclarativeListView::NoSnap) {
FxListItem *topItem = snapItemAt(position()+highlightRangeStart);
FxListItem *bottomItem = snapItemAt(position()+highlightRangeEnd);
qreal pos;
- if (topItem && bottomItem && haveHighlightRange && highlightRange == QDeclarativeListView::StrictlyEnforceRange) {
- qreal topPos = qMin(topItem->position() - highlightRangeStart, -maxExtent);
- qreal bottomPos = qMax(bottomItem->position() - highlightRangeEnd, -minExtent);
- pos = qAbs(data.move + topPos) < qAbs(data.move + bottomPos) ? topPos : bottomPos;
- } else if (topItem) {
+ if (topItem) {
pos = qMax(qMin(topItem->position() - highlightRangeStart, -maxExtent), -minExtent);
} else if (bottomItem) {
- pos = qMax(qMin(bottomItem->position() - highlightRangeStart, -maxExtent), -minExtent);
+ pos = qMax(qMin(bottomItem->position() - highlightRangeStart, -maxExtent), -minExtent);
} else {
fixupDuration = oldDuration;
return;
}
- if (currentItem && haveHighlightRange && highlightRange == QDeclarativeListView::StrictlyEnforceRange) {
- updateHighlight();
- qreal currPos = currentItem->itemPosition();
- if (pos < currPos + currentItem->itemSize() - highlightRangeEnd)
- pos = currPos + currentItem->itemSize() - highlightRangeEnd;
- if (pos > currPos - highlightRangeStart)
- pos = currPos - highlightRangeStart;
- }
qreal dist = qAbs(data.move + pos);
if (dist > 0) {
@@ -1215,25 +1200,6 @@ void QDeclarativeListViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m
timeline.set(data.move, -pos);
vTime = timeline.time();
}
- } else if (haveHighlightRange && highlightRange == QDeclarativeListView::StrictlyEnforceRange) {
- if (currentItem) {
- updateHighlight();
- qreal pos = currentItem->itemPosition();
- qreal viewPos = position();
- if (viewPos < pos + currentItem->itemSize() - highlightRangeEnd)
- viewPos = pos + currentItem->itemSize() - highlightRangeEnd;
- if (viewPos > pos - highlightRangeStart)
- viewPos = pos - highlightRangeStart;
-
- timeline.reset(data.move);
- if (viewPos != position()) {
- if (fixupDuration)
- timeline.move(data.move, -viewPos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2);
- else
- timeline.set(data.move, -viewPos);
- }
- vTime = timeline.time();
- }
} else {
QDeclarativeFlickablePrivate::fixup(data, minExtent, maxExtent);
}
@@ -1355,12 +1321,15 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
qreal newtarget = data.flickTarget;
if (snapMode != QDeclarativeListView::NoSnap || highlightRange == QDeclarativeListView::StrictlyEnforceRange)
newtarget = -snapPosAt(-(data.flickTarget - highlightRangeStart)) + highlightRangeStart;
- if (velocity < 0 && newtarget < maxExtent)
- newtarget = maxExtent;
- else if (velocity > 0 && newtarget > minExtent)
- newtarget = minExtent;
- if (newtarget == data.flickTarget) // boundary unchanged - nothing to do
+ if (velocity < 0 && newtarget <= maxExtent)
+ newtarget = maxExtent - overshootDist;
+ else if (velocity > 0 && newtarget >= minExtent)
+ newtarget = minExtent + overshootDist;
+ if (newtarget == data.flickTarget) { // boundary unchanged - nothing to do
+ if (qAbs(velocity) < MinimumFlickVelocity)
+ correctFlick = false;
return;
+ }
data.flickTarget = newtarget;
qreal dist = -newtarget + data.move.value();
if ((v < 0 && dist < 0) || (v > 0 && dist > 0)) {
@@ -1370,7 +1339,7 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
return;
}
timeline.reset(data.move);
- timeline.accelDistance(data.move, v, -dist + (v < 0 ? -overshootDist : overshootDist));
+ timeline.accelDistance(data.move, v, -dist);
timeline.callback(QDeclarativeTimeLineCallback(&data.move, fixupCallback, this));
}
} else {
@@ -1551,8 +1520,9 @@ void QDeclarativeListView::setModel(const QVariant &model)
disconnect(d->model, SIGNAL(itemsInserted(int,int)), this, SLOT(itemsInserted(int,int)));
disconnect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int)));
disconnect(d->model, SIGNAL(itemsMoved(int,int,int)), this, SLOT(itemsMoved(int,int,int)));
+ disconnect(d->model, SIGNAL(itemsChanged(int,int)), this, SLOT(itemsChanged(int,int)));
disconnect(d->model, SIGNAL(modelReset()), this, SLOT(modelReset()));
- disconnect(d->model, SIGNAL(createdItem(int, QDeclarativeItem*)), this, SLOT(createdItem(int,QDeclarativeItem*)));
+ disconnect(d->model, SIGNAL(createdItem(int,QDeclarativeItem*)), this, SLOT(createdItem(int,QDeclarativeItem*)));
disconnect(d->model, SIGNAL(destroyingItem(QDeclarativeItem*)), this, SLOT(destroyingItem(QDeclarativeItem*)));
}
d->clear();
@@ -1581,8 +1551,9 @@ void QDeclarativeListView::setModel(const QVariant &model)
if (d->model) {
d->bufferMode = QDeclarativeListViewPrivate::BufferBefore | QDeclarativeListViewPrivate::BufferAfter;
if (isComponentComplete()) {
+ updateSections();
refill();
- if (d->currentIndex >= d->model->count() || d->currentIndex < 0) {
+ if ((d->currentIndex >= d->model->count() || d->currentIndex < 0) && !d->currentIndexCleared) {
setCurrentIndex(0);
} else {
d->moveReason = QDeclarativeListViewPrivate::SetIndex;
@@ -1596,8 +1567,9 @@ void QDeclarativeListView::setModel(const QVariant &model)
connect(d->model, SIGNAL(itemsInserted(int,int)), this, SLOT(itemsInserted(int,int)));
connect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int)));
connect(d->model, SIGNAL(itemsMoved(int,int,int)), this, SLOT(itemsMoved(int,int,int)));
+ connect(d->model, SIGNAL(itemsChanged(int,int)), this, SLOT(itemsChanged(int,int)));
connect(d->model, SIGNAL(modelReset()), this, SLOT(modelReset()));
- connect(d->model, SIGNAL(createdItem(int, QDeclarativeItem*)), this, SLOT(createdItem(int,QDeclarativeItem*)));
+ connect(d->model, SIGNAL(createdItem(int,QDeclarativeItem*)), this, SLOT(createdItem(int,QDeclarativeItem*)));
connect(d->model, SIGNAL(destroyingItem(QDeclarativeItem*)), this, SLOT(destroyingItem(QDeclarativeItem*)));
emit countChanged();
}
@@ -1653,6 +1625,7 @@ void QDeclarativeListView::setDelegate(QDeclarativeComponent *delegate)
d->visibleItems.clear();
d->releaseItem(d->currentItem);
d->currentItem = 0;
+ updateSections();
refill();
d->moveReason = QDeclarativeListViewPrivate::SetIndex;
d->updateCurrent(d->currentIndex);
@@ -1670,7 +1643,8 @@ void QDeclarativeListView::setDelegate(QDeclarativeComponent *delegate)
\qmlproperty Item ListView::currentItem
The \c currentIndex property holds the index of the current item, and
- \c currentItem holds the current item.
+ \c currentItem holds the current item. Setting the currentIndex to -1
+ will clear the highlight and set currentItem to null.
If highlightFollowsCurrentItem is \c true, setting either of these
properties will smoothly scroll the ListView so that the current
@@ -1690,10 +1664,13 @@ void QDeclarativeListView::setCurrentIndex(int index)
Q_D(QDeclarativeListView);
if (d->requestedIndex >= 0) // currently creating item
return;
- if (isComponentComplete() && d->isValid() && index != d->currentIndex && index < d->model->count() && index >= 0) {
+ d->currentIndexCleared = (index == -1);
+ if (index == d->currentIndex)
+ return;
+ if (isComponentComplete() && d->isValid()) {
d->moveReason = QDeclarativeListViewPrivate::SetIndex;
d->updateCurrent(index);
- } else if (index != d->currentIndex) {
+ } else if (d->currentIndex != index) {
d->currentIndex = index;
emit currentIndexChanged();
}
@@ -2066,8 +2043,10 @@ void QDeclarativeListView::setCacheBuffer(int b)
QDeclarativeViewSection *QDeclarativeListView::sectionCriteria()
{
Q_D(QDeclarativeListView);
- if (!d->sectionCriteria)
+ if (!d->sectionCriteria) {
d->sectionCriteria = new QDeclarativeViewSection(this);
+ connect(d->sectionCriteria, SIGNAL(propertyChanged()), this, SLOT(updateSections()));
+ }
return d->sectionCriteria;
}
@@ -2300,6 +2279,8 @@ void QDeclarativeListView::viewportMoved()
{
Q_D(QDeclarativeListView);
QDeclarativeFlickable::viewportMoved();
+ if (!d->itemCount)
+ return;
d->lazyRelease = true;
refill();
if (d->flickingHorizontally || d->flickingVertically || d->movingHorizontally || d->movingVertically)
@@ -2316,9 +2297,10 @@ void QDeclarativeListView::viewportMoved()
d->highlight->setPosition(qRound(pos));
// update current index
- int idx = d->snapIndex();
- if (idx >= 0 && idx != d->currentIndex)
- d->updateCurrent(idx);
+ if (FxListItem *snapItem = d->snapItemAt(d->highlight->position())) {
+ if (snapItem->index >= 0 && snapItem->index != d->currentIndex)
+ d->updateCurrent(snapItem->index);
+ }
}
}
@@ -2503,16 +2485,18 @@ void QDeclarativeListView::geometryChanged(const QRectF &newGeometry,
Increments the current index. The current index will wrap
if keyNavigationWraps is true and it is currently at the end.
+ This method has no effect if the \l count is zero.
\bold Note: methods should only be called after the Component has completed.
*/
void QDeclarativeListView::incrementCurrentIndex()
{
Q_D(QDeclarativeListView);
- if (currentIndex() < d->model->count() - 1 || d->wrap) {
+ int count = d->model ? d->model->count() : 0;
+ if (count && (currentIndex() < count - 1 || d->wrap)) {
d->moveReason = QDeclarativeListViewPrivate::SetIndex;
int index = currentIndex()+1;
- d->updateCurrent(index < d->model->count() ? index : 0);
+ setCurrentIndex((index >= 0 && index < count) ? index : 0);
}
}
@@ -2521,16 +2505,18 @@ void QDeclarativeListView::incrementCurrentIndex()
Decrements the current index. The current index will wrap
if keyNavigationWraps is true and it is currently at the beginning.
+ This method has no effect if the \l count is zero.
\bold Note: methods should only be called after the Component has completed.
*/
void QDeclarativeListView::decrementCurrentIndex()
{
Q_D(QDeclarativeListView);
- if (currentIndex() > 0 || d->wrap) {
+ int count = d->model ? d->model->count() : 0;
+ if (count && (currentIndex() > 0 || d->wrap)) {
d->moveReason = QDeclarativeListViewPrivate::SetIndex;
int index = currentIndex()-1;
- d->updateCurrent(index >= 0 ? index : d->model->count()-1);
+ setCurrentIndex((index >= 0 && index < count) ? index : count-1);
}
}
@@ -2660,10 +2646,11 @@ void QDeclarativeListView::componentComplete()
{
Q_D(QDeclarativeListView);
QDeclarativeFlickable::componentComplete();
+ updateSections();
if (d->isValid()) {
refill();
d->moveReason = QDeclarativeListViewPrivate::SetIndex;
- if (d->currentIndex < 0)
+ if (d->currentIndex < 0 && !d->currentIndexCleared)
d->updateCurrent(0);
else
d->updateCurrent(d->currentIndex);
@@ -2676,6 +2663,18 @@ void QDeclarativeListView::componentComplete()
}
}
+void QDeclarativeListView::updateSections()
+{
+ Q_D(QDeclarativeListView);
+ if (isComponentComplete() && d->model) {
+ QList<QByteArray> roles;
+ if (d->sectionCriteria && !d->sectionCriteria->property().isEmpty())
+ roles << d->sectionCriteria->property().toUtf8();
+ d->model->setWatchedRoles(roles);
+ d->updateSections();
+ }
+}
+
void QDeclarativeListView::refill()
{
Q_D(QDeclarativeListView);
@@ -2751,13 +2750,13 @@ void QDeclarativeListView::itemsInserted(int modelIndex, int count)
d->moveReason = QDeclarativeListViewPrivate::Other;
if (!d->visibleItems.count() || d->model->count() <= 1) {
d->scheduleLayout();
- if (d->currentIndex >= modelIndex) {
+ if (d->itemCount && d->currentIndex >= modelIndex) {
// adjust current item index
d->currentIndex += count;
if (d->currentItem)
d->currentItem->index = d->currentIndex;
emit currentIndexChanged();
- } else if (d->currentIndex < 0) {
+ } else if (!d->currentIndex || (d->currentIndex < 0 && !d->currentIndexCleared)) {
d->updateCurrent(0);
}
d->itemCount += count;
@@ -2765,15 +2764,15 @@ void QDeclarativeListView::itemsInserted(int modelIndex, int count)
return;
}
- int overlapCount = count;
- if (!d->mapRangeFromModel(modelIndex, overlapCount)) {
+ int index = d->mapFromModel(modelIndex);
+ if (index < 0) {
int i = d->visibleItems.count() - 1;
while (i > 0 && d->visibleItems.at(i)->index == -1)
--i;
if (d->visibleItems.at(i)->index + 1 == modelIndex
&& d->visibleItems.at(i)->endPosition() < d->buffer+d->position()+d->size()-1) {
// Special case of appending an item to the model.
- modelIndex = d->visibleIndex + d->visibleItems.count();
+ index = d->visibleItems.count();
} else {
if (modelIndex < d->visibleIndex) {
// Insert before visible items
@@ -2800,7 +2799,6 @@ void QDeclarativeListView::itemsInserted(int modelIndex, int count)
// At least some of the added items will be visible
- int index = modelIndex - d->visibleIndex;
// index can be the next item past the end of the visible items list (i.e. appended)
int pos = index < d->visibleItems.count() ? d->visibleItems.at(index)->position()
: d->visibleItems.at(index-1)->endPosition()+d->spacing+1;
@@ -2864,7 +2862,7 @@ void QDeclarativeListView::itemsInserted(int modelIndex, int count)
}
diff = pos - initialPos;
}
- if (d->currentIndex >= modelIndex) {
+ if (d->itemCount && d->currentIndex >= modelIndex) {
// adjust current item index
d->currentIndex += count;
if (d->currentItem) {
@@ -2885,6 +2883,7 @@ void QDeclarativeListView::itemsInserted(int modelIndex, int count)
for (int j = 0; j < added.count(); ++j)
added.at(j)->attached->emitAdd();
+ d->updateSections();
d->itemCount += count;
emit countChanged();
}
@@ -2977,6 +2976,7 @@ void QDeclarativeListView::itemsRemoved(int modelIndex, int count)
}
}
+ d->updateSections();
emit countChanged();
}
@@ -3098,6 +3098,14 @@ void QDeclarativeListView::itemsMoved(int from, int to, int count)
// Ensure we don't cause an ugly list scroll.
d->visibleItems.first()->setPosition(d->visibleItems.first()->position() + moveBy);
+ d->updateSections();
+ d->layout();
+}
+
+void QDeclarativeListView::itemsChanged(int, int)
+{
+ Q_D(QDeclarativeListView);
+ d->updateSections();
d->layout();
}
diff --git a/src/declarative/graphicsitems/qdeclarativelistview_p.h b/src/declarative/graphicsitems/qdeclarativelistview_p.h
index 735b248..2678b90 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview_p.h
+++ b/src/declarative/graphicsitems/qdeclarativelistview_p.h
@@ -250,11 +250,13 @@ protected:
virtual void componentComplete();
private Q_SLOTS:
+ void updateSections();
void refill();
void trackedPositionChanged();
void itemsInserted(int index, int count);
void itemsRemoved(int index, int count);
void itemsMoved(int from, int to, int count);
+ void itemsChanged(int index, int count);
void modelReset();
void destroyRemoved();
void createdItem(int index, QDeclarativeItem *item);
diff --git a/src/declarative/graphicsitems/qdeclarativeloader.cpp b/src/declarative/graphicsitems/qdeclarativeloader.cpp
index 5647b14..1119b92 100644
--- a/src/declarative/graphicsitems/qdeclarativeloader.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeloader.cpp
@@ -129,15 +129,41 @@ void QDeclarativeLoaderPrivate::initResize()
The loaded item can be accessed using the \l item property.
- Loader is like any other visual item and must be positioned and sized
- accordingly to become visible. Once the component is loaded, the Loader
- is automatically resized to the size of the component.
-
If the \l source or \l sourceComponent changes, any previously instantiated
items are destroyed. Setting \l source to an empty string or setting
\l sourceComponent to \c undefined destroys the currently loaded item,
freeing resources and leaving the Loader empty.
+ \section2 Loader sizing behavior
+
+ Loader is like any other visual item and must be positioned and sized
+ accordingly to become visible.
+
+ \list
+ \o If an explicit size is not specified for the Loader, the Loader
+ is automatically resized to the size of the loaded item once the
+ component is loaded.
+ \o If the size of the Loader is specified explicitly by setting
+ the width, height or by anchoring, the loaded item will be resized
+ to the size of the Loader.
+ \endlist
+
+ In both scenarios the size of the item and the Loader are identical.
+ This ensures that anchoring to the Loader is equivalent to anchoring
+ to the loaded item.
+
+ \table
+ \row
+ \o sizeloader.qml
+ \o sizeitem.qml
+ \row
+ \o \snippet doc/src/snippets/declarative/loader/sizeloader.qml 0
+ \o \snippet doc/src/snippets/declarative/loader/sizeitem.qml 0
+ \row
+ \o The red rectangle will be sized to the size of the root item.
+ \o The red rectangle will be 50x50, centered in the root item.
+ \endtable
+
\section2 Receiving signals from loaded items
@@ -216,7 +242,8 @@ QDeclarativeLoader::~QDeclarativeLoader()
cannot load non-visual components.
To unload the currently loaded item, set this property to an empty string,
- or set \l sourceComponent to \c undefined.
+ or set \l sourceComponent to \c undefined. Setting \c source to a
+ new URL will also cause the item created by the previous URL to be unloaded.
\sa sourceComponent, status, progress
*/
@@ -342,12 +369,14 @@ void QDeclarativeLoaderPrivate::_q_sourceLoaded()
QDeclarativeContext *ctxt = new QDeclarativeContext(creationContext);
ctxt->setContextObject(q);
- QDeclarativeComponent *c = component;
- QObject *obj = component->create(ctxt);
+ QDeclarativeGuard<QDeclarativeComponent> c = component;
+ QObject *obj = component->beginCreate(ctxt);
if (component != c) {
// component->create could trigger a change in source that causes
// component to be set to something else. In that case we just
// need to cleanup.
+ if (c)
+ c->completeCreate();
delete obj;
delete ctxt;
return;
@@ -372,6 +401,7 @@ void QDeclarativeLoaderPrivate::_q_sourceLoaded()
delete ctxt;
source = QUrl();
}
+ component->completeCreate();
emit q->sourceChanged();
emit q->statusChanged();
emit q->progressChanged();
@@ -394,23 +424,25 @@ void QDeclarativeLoaderPrivate::_q_sourceLoaded()
Use this status to provide an update or respond to the status change in some way.
For example, you could:
- \e {Trigger a state change:}
- \qml
- State { name: 'loaded'; when: loader.status = Loader.Ready }
+ \list
+ \o Trigger a state change:
+ \qml
+ State { name: 'loaded'; when: loader.status == Loader.Ready }
\endqml
- \e {Implement an \c onStatusChanged signal handler:}
- \qml
+ \o Implement an \c onStatusChanged signal handler:
+ \qml
Loader {
id: loader
onStatusChanged: if (loader.status == Loader.Ready) console.log('Loaded')
}
\endqml
- \e {Bind to the status value:}
+ \o Bind to the status value:
\qml
- Text { text: loader.status != Loader.Ready ? 'Not Loaded' : 'Loaded' }
+ Text { text: loader.status == Loader.Ready ? 'Loaded' : 'Not loaded' }
\endqml
+ \endlist
Note that if the source is a local file, the status will initially be Ready (or Error). While
there will be no onStatusChanged signal in that case, the onLoaded will still be invoked.
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
index a0208ef..d9edd11 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp
+++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
@@ -335,7 +335,7 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate()
If the \e accepted property of the \l {MouseEvent}{mouse} parameter is set to false
in the handler, the onPressed/onReleased/onClicked handlers will be called for the second
- click; otherwise they are supressed. The accepted property defaults to true.
+ click; otherwise they are suppressed. The accepted property defaults to true.
*/
/*!
@@ -557,6 +557,7 @@ void QDeclarativeMouseArea::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
ungrabMouse();
setKeepMouseGrab(false);
}
+ d->doubleClick = false;
}
void QDeclarativeMouseArea::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
@@ -565,14 +566,13 @@ void QDeclarativeMouseArea::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *even
if (!d->absorb) {
QDeclarativeItem::mouseDoubleClickEvent(event);
} else {
+ if (d->isDoubleClickConnected())
+ d->doubleClick = true;
d->saveEvent(event);
QDeclarativeMouseEvent me(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, true, false);
me.setAccepted(d->isDoubleClickConnected());
emit this->doubleClicked(&me);
- if (!me.isAccepted()) {
- // Only deliver the press event if we haven't accepted the double click.
- QDeclarativeItem::mouseDoubleClickEvent(event);
- }
+ QDeclarativeItem::mouseDoubleClickEvent(event);
}
}
@@ -841,7 +841,8 @@ bool QDeclarativeMouseArea::setPressed(bool p)
d->pressed = p;
QDeclarativeMouseEvent me(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, isclick, d->longPress);
if (d->pressed) {
- emit pressed(&me);
+ if (!d->doubleClick)
+ emit pressed(&me);
me.setX(d->lastPos.x());
me.setY(d->lastPos.y());
emit mousePositionChanged(&me);
@@ -849,7 +850,7 @@ bool QDeclarativeMouseArea::setPressed(bool p)
emit released(&me);
me.setX(d->lastPos.x());
me.setY(d->lastPos.y());
- if (isclick && !d->longPress)
+ if (isclick && !d->longPress && !d->doubleClick)
emit clicked(&me);
}
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h b/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h
index 48a56d9..06a01d3 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), stealMouse(false), drag(0)
+ moved(false), stealMouse(false), doubleClick(false), drag(0)
{
}
@@ -109,6 +109,7 @@ public:
bool dragX : 1;
bool dragY : 1;
bool stealMouse : 1;
+ bool doubleClick : 1;
QDeclarativeDrag *drag;
QPointF startScene;
qreal startX;
diff --git a/src/declarative/graphicsitems/qdeclarativepainteditem.cpp b/src/declarative/graphicsitems/qdeclarativepainteditem.cpp
index a6db1fa..b470b3a 100644
--- a/src/declarative/graphicsitems/qdeclarativepainteditem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepainteditem.cpp
@@ -44,7 +44,6 @@
#include <QDebug>
#include <QPen>
-#include <QFile>
#include <QEvent>
#include <QApplication>
#include <QGraphicsSceneMouseEvent>
diff --git a/src/declarative/graphicsitems/qdeclarativepath.cpp b/src/declarative/graphicsitems/qdeclarativepath.cpp
index d526688..966c51b 100644
--- a/src/declarative/graphicsitems/qdeclarativepath.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepath.cpp
@@ -871,7 +871,7 @@ void QDeclarativePathCubic::addToPath(QPainterPath &path)
*/
/*!
- \qmlproperty real value
+ \qmlproperty real PathPercent::value
The proporation of items that should be laid out up to this point.
This value should always be higher than the last value specified
diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp
index 31943b2..7c79afe 100644
--- a/src/declarative/graphicsitems/qdeclarativepathview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp
@@ -373,7 +373,21 @@ 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.
+ PathView does not automatically handle keyboard navigation. This is because
+ the keys to use for navigation will depend upon the shape of the path. Navigation
+ can be added quite simply by setting \c focus to \c true and calling
+ \l decrementCurrentIndex() or \l incrementCurrentIndex(), for example to navigate
+ using the left and right arrow keys:
+
+ \code
+ PathView {
+ ...
+ focus: true
+ Keys.onLeftPressed: decrementCurrentIndex()
+ Keys.onRightPressed: incrementCurrentIndex()
+ }
+ \endcode
+
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.
@@ -467,7 +481,7 @@ void QDeclarativePathView::setModel(const QVariant &model)
disconnect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int)));
disconnect(d->model, SIGNAL(itemsMoved(int,int,int)), this, SLOT(itemsMoved(int,int,int)));
disconnect(d->model, SIGNAL(modelReset()), this, SLOT(modelReset()));
- disconnect(d->model, SIGNAL(createdItem(int, QDeclarativeItem*)), this, SLOT(createdItem(int,QDeclarativeItem*)));
+ disconnect(d->model, SIGNAL(createdItem(int,QDeclarativeItem*)), this, SLOT(createdItem(int,QDeclarativeItem*)));
for (int i=0; i<d->items.count(); i++){
QDeclarativeItem *p = d->items[i];
d->model->release(p);
@@ -498,7 +512,7 @@ void QDeclarativePathView::setModel(const QVariant &model)
connect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int)));
connect(d->model, SIGNAL(itemsMoved(int,int,int)), this, SLOT(itemsMoved(int,int,int)));
connect(d->model, SIGNAL(modelReset()), this, SLOT(modelReset()));
- connect(d->model, SIGNAL(createdItem(int, QDeclarativeItem*)), this, SLOT(createdItem(int,QDeclarativeItem*)));
+ connect(d->model, SIGNAL(createdItem(int,QDeclarativeItem*)), this, SLOT(createdItem(int,QDeclarativeItem*)));
d->modelCount = d->model->count();
if (d->model->count())
d->offset = qmlMod(d->offset, qreal(d->model->count()));
@@ -523,7 +537,6 @@ int QDeclarativePathView::count() const
/*!
\qmlproperty Path PathView::path
- \default
This property holds the path used to lay out the items.
For more information see the \l Path documentation.
*/
@@ -607,6 +620,8 @@ void QDeclarativePathView::setCurrentIndex(int idx)
*/
void QDeclarativePathView::incrementCurrentIndex()
{
+ Q_D(QDeclarativePathView);
+ d->moveDirection = QDeclarativePathViewPrivate::Positive;
setCurrentIndex(currentIndex()+1);
}
@@ -625,6 +640,7 @@ void QDeclarativePathView::decrementCurrentIndex()
int idx = currentIndex()-1;
if (idx < 0)
idx = d->modelCount - 1;
+ d->moveDirection = QDeclarativePathViewPrivate::Negative;
setCurrentIndex(idx);
}
}
@@ -995,6 +1011,7 @@ void QDeclarativePathView::setDelegate(QDeclarativeComponent *delegate)
}
if (QDeclarativeVisualDataModel *dataModel = qobject_cast<QDeclarativeVisualDataModel*>(d->model)) {
dataModel->setDelegate(delegate);
+ d->modelCount = dataModel->count();
d->regenerate();
emit delegateChanged();
}
@@ -1112,16 +1129,16 @@ void QDeclarativePathViewPrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent
if (!interactive || !lastPosTime.isValid())
return;
+ qreal newPc;
+ QPointF pathPoint = pointNear(event->pos(), &newPc);
if (!stealMouse) {
- QPointF delta = event->pos() - startPoint;
+ QPointF delta = pathPoint - startPoint;
if (qAbs(delta.x()) > QApplication::startDragDistance() || qAbs(delta.y()) > QApplication::startDragDistance())
stealMouse = true;
}
if (stealMouse) {
moveReason = QDeclarativePathViewPrivate::Mouse;
- qreal newPc;
- pointNear(event->pos(), &newPc);
qreal diff = (newPc - startPc)*modelCount*mappedRange;
if (diff) {
setOffset(offset + diff);
@@ -1636,7 +1653,7 @@ void QDeclarativePathViewPrivate::snapToCurrent()
if (!model || modelCount <= 0)
return;
- qreal targetOffset = modelCount - currentIndex;
+ qreal targetOffset = qmlMod(modelCount - currentIndex, modelCount);
moveReason = Other;
offsetAdj = 0.0;
@@ -1645,19 +1662,28 @@ void QDeclarativePathViewPrivate::snapToCurrent()
const int duration = highlightMoveDuration;
- if (targetOffset - offset > modelCount/2) {
+ if (moveDirection == Positive || (moveDirection == Shortest && targetOffset - offset > modelCount/2)) {
qreal distance = modelCount - targetOffset + offset;
- tl.move(moveOffset, 0.0, QEasingCurve(QEasingCurve::InQuad), int(duration * offset / distance));
- tl.set(moveOffset, modelCount);
- tl.move(moveOffset, targetOffset, QEasingCurve(QEasingCurve::OutQuad), int(duration * (modelCount-targetOffset) / distance));
- } else if (targetOffset - offset <= -modelCount/2) {
+ if (targetOffset > moveOffset) {
+ tl.move(moveOffset, 0.0, QEasingCurve(QEasingCurve::InQuad), int(duration * offset / distance));
+ tl.set(moveOffset, modelCount);
+ tl.move(moveOffset, targetOffset, QEasingCurve(offset == 0.0 ? QEasingCurve::InOutQuad : QEasingCurve::OutQuad), int(duration * (modelCount-targetOffset) / distance));
+ } else {
+ tl.move(moveOffset, targetOffset, QEasingCurve(QEasingCurve::InOutQuad), duration);
+ }
+ } else if (moveDirection == Negative || targetOffset - offset <= -modelCount/2) {
qreal distance = modelCount - offset + targetOffset;
- tl.move(moveOffset, modelCount, QEasingCurve(QEasingCurve::InQuad), int(duration * (modelCount-offset) / distance));
- tl.set(moveOffset, 0.0);
- tl.move(moveOffset, targetOffset, QEasingCurve(QEasingCurve::OutQuad), int(duration * targetOffset / distance));
+ if (targetOffset < moveOffset) {
+ tl.move(moveOffset, modelCount, QEasingCurve(targetOffset == 0 ? QEasingCurve::InOutQuad : QEasingCurve::InQuad), int(duration * (modelCount-offset) / distance));
+ tl.set(moveOffset, 0.0);
+ tl.move(moveOffset, targetOffset, QEasingCurve(QEasingCurve::OutQuad), int(duration * targetOffset / distance));
+ } else {
+ tl.move(moveOffset, targetOffset, QEasingCurve(QEasingCurve::InOutQuad), duration);
+ }
} else {
tl.move(moveOffset, targetOffset, QEasingCurve(QEasingCurve::InOutQuad), duration);
}
+ moveDirection = Shortest;
}
QDeclarativePathViewAttached *QDeclarativePathView::qmlAttachedProperties(QObject *obj)
diff --git a/src/declarative/graphicsitems/qdeclarativepathview_p_p.h b/src/declarative/graphicsitems/qdeclarativepathview_p_p.h
index b217216..6232b83 100644
--- a/src/declarative/graphicsitems/qdeclarativepathview_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativepathview_p_p.h
@@ -82,7 +82,7 @@ public:
, dragMargin(0), deceleration(100)
, moveOffset(this, &QDeclarativePathViewPrivate::setAdjustedOffset)
, firstIndex(-1), pathItems(-1), requestedIndex(-1)
- , moveReason(Other), attType(0), highlightComponent(0), highlightItem(0)
+ , moveReason(Other), moveDirection(Shortest), attType(0), highlightComponent(0), highlightItem(0)
, moveHighlight(this, &QDeclarativePathViewPrivate::setHighlightPosition)
, highlightPosition(0)
, highlightRangeStart(0), highlightRangeEnd(0)
@@ -173,6 +173,8 @@ public:
QVariant modelVariant;
enum MovementReason { Other, SetIndex, Mouse };
MovementReason moveReason;
+ enum MovementDirection { Shortest, Negative, Positive };
+ MovementDirection moveDirection;
QDeclarativeOpenMetaObjectType *attType;
QDeclarativeComponent *highlightComponent;
QDeclarativeItem *highlightItem;
diff --git a/src/declarative/graphicsitems/qdeclarativepositioners_p.h b/src/declarative/graphicsitems/qdeclarativepositioners_p.h
index 15b91e5..d3ae926 100644
--- a/src/declarative/graphicsitems/qdeclarativepositioners_p.h
+++ b/src/declarative/graphicsitems/qdeclarativepositioners_p.h
@@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
class QDeclarativeBasePositionerPrivate;
-class Q_DECLARATIVE_EXPORT QDeclarativeBasePositioner : public QDeclarativeItem
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeBasePositioner : public QDeclarativeItem
{
Q_OBJECT
diff --git a/src/declarative/graphicsitems/qdeclarativerectangle.cpp b/src/declarative/graphicsitems/qdeclarativerectangle.cpp
index 9831d5f..fc3954f 100644
--- a/src/declarative/graphicsitems/qdeclarativerectangle.cpp
+++ b/src/declarative/graphicsitems/qdeclarativerectangle.cpp
@@ -261,9 +261,9 @@ void QDeclarativeRectangle::doUpdate()
A width of 1 creates a thin line. For no line, use a width of 0 or a transparent color.
If \c border.width is an odd number, the rectangle is painted at a half-pixel offset to retain
- border smoothness. Also, the border is rendered evenly on either side of the
+ border smoothness. Also, the border is rendered evenly on either side of the
rectangle's boundaries, and the spare pixel is rendered to the right and below the
- rectangle (as documented for QRect rendering). This can cause unintended effects if
+ rectangle (as documented for QRect rendering). This can cause unintended effects if
\c border.width is 1 and the rectangle is \l{Item::clip}{clipped} by a parent item:
\beginfloatright
@@ -477,7 +477,8 @@ void QDeclarativeRectangle::drawRect(QPainter &p)
{
Q_D(QDeclarativeRectangle);
if ((d->gradient && d->gradient->gradient())
- || d->radius > width()/2 || d->radius > height()/2) {
+ || d->radius > width()/2 || d->radius > height()/2
+ || width() < 3 || height() < 3) {
// XXX This path is still slower than the image path
// Image path won't work for gradients or invalid radius though
bool oldAA = p.testRenderHint(QPainter::Antialiasing);
diff --git a/src/declarative/graphicsitems/qdeclarativerectangle_p.h b/src/declarative/graphicsitems/qdeclarativerectangle_p.h
index ecc3fbf..99dca1b 100644
--- a/src/declarative/graphicsitems/qdeclarativerectangle_p.h
+++ b/src/declarative/graphicsitems/qdeclarativerectangle_p.h
@@ -46,12 +46,14 @@
#include <QtGui/qbrush.h>
+#include <private/qdeclarativeglobal_p.h>
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class Q_DECLARATIVE_EXPORT QDeclarativePen : public QObject
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativePen : public QObject
{
Q_OBJECT
@@ -131,7 +133,7 @@ private:
};
class QDeclarativeRectanglePrivate;
-class Q_DECLARATIVE_EXPORT QDeclarativeRectangle : public QDeclarativeItem
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeRectangle : public QDeclarativeItem
{
Q_OBJECT
diff --git a/src/declarative/graphicsitems/qdeclarativerepeater.cpp b/src/declarative/graphicsitems/qdeclarativerepeater.cpp
index cb64212..6f46c7b 100644
--- a/src/declarative/graphicsitems/qdeclarativerepeater.cpp
+++ b/src/declarative/graphicsitems/qdeclarativerepeater.cpp
@@ -202,7 +202,7 @@ void QDeclarativeRepeater::setModel(const QVariant &model)
disconnect(d->model, SIGNAL(itemsMoved(int,int,int)), this, SLOT(itemsMoved(int,int,int)));
disconnect(d->model, SIGNAL(modelReset()), this, SLOT(modelReset()));
/*
- disconnect(d->model, SIGNAL(createdItem(int, QDeclarativeItem*)), this, SLOT(createdItem(int,QDeclarativeItem*)));
+ disconnect(d->model, SIGNAL(createdItem(int,QDeclarativeItem*)), this, SLOT(createdItem(int,QDeclarativeItem*)));
disconnect(d->model, SIGNAL(destroyingItem(QDeclarativeItem*)), this, SLOT(destroyingItem(QDeclarativeItem*)));
*/
}
@@ -230,7 +230,7 @@ void QDeclarativeRepeater::setModel(const QVariant &model)
connect(d->model, SIGNAL(itemsMoved(int,int,int)), this, SLOT(itemsMoved(int,int,int)));
connect(d->model, SIGNAL(modelReset()), this, SLOT(modelReset()));
/*
- connect(d->model, SIGNAL(createdItem(int, QDeclarativeItem*)), this, SLOT(createdItem(int,QDeclarativeItem*)));
+ connect(d->model, SIGNAL(createdItem(int,QDeclarativeItem*)), this, SLOT(createdItem(int,QDeclarativeItem*)));
connect(d->model, SIGNAL(destroyingItem(QDeclarativeItem*)), this, SLOT(destroyingItem(QDeclarativeItem*)));
*/
regenerate();
diff --git a/src/declarative/graphicsitems/qdeclarativescalegrid_p_p.h b/src/declarative/graphicsitems/qdeclarativescalegrid_p_p.h
index 42813dd..c6d4629 100644
--- a/src/declarative/graphicsitems/qdeclarativescalegrid_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativescalegrid_p_p.h
@@ -42,21 +42,22 @@
#ifndef QDECLARATIVESCALEGRID_H
#define QDECLARATIVESCALEGRID_H
-#include "private/qdeclarativeborderimage_p.h"
-
-#include <private/qdeclarativepixmapcache_p.h>
#include <qdeclarative.h>
#include <QtCore/QString>
#include <QtCore/QObject>
+#include <private/qdeclarativeborderimage_p.h>
+#include <private/qdeclarativepixmapcache_p.h>
+#include <private/qdeclarativeglobal_p.h>
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class Q_DECLARATIVE_EXPORT QDeclarativeScaleGrid : public QObject
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeScaleGrid : public QObject
{
Q_OBJECT
Q_ENUMS(TileRule)
@@ -94,7 +95,7 @@ private:
int _bottom;
};
-class Q_DECLARATIVE_EXPORT QDeclarativeGridScaledImage
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeGridScaledImage
{
public:
QDeclarativeGridScaledImage();
diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp
index 65f1564..82c444e 100644
--- a/src/declarative/graphicsitems/qdeclarativetext.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetext.cpp
@@ -82,15 +82,16 @@ private:
static QSet<QUrl> errors;
};
-DEFINE_BOOL_CONFIG_OPTION(disableImageCache, QML_DISABLE_IMAGE_CACHE);
+DEFINE_BOOL_CONFIG_OPTION(enableImageCache, QML_ENABLE_TEXT_IMAGE_CACHE);
QDeclarativeTextPrivate::QDeclarativeTextPrivate()
-: color((QRgb)0), style(QDeclarativeText::Normal),
- hAlign(QDeclarativeText::AlignLeft), vAlign(QDeclarativeText::AlignTop), elideMode(QDeclarativeText::ElideNone),
- imgDirty(true), dirty(true), richText(false), singleline(false), cache(true), internalWidthUpdate(false), doc(0),
- format(QDeclarativeText::AutoText), wrapMode(QDeclarativeText::NoWrap)
+: color((QRgb)0), style(QDeclarativeText::Normal), hAlign(QDeclarativeText::AlignLeft),
+ vAlign(QDeclarativeText::AlignTop), elideMode(QDeclarativeText::ElideNone),
+ format(QDeclarativeText::AutoText), wrapMode(QDeclarativeText::NoWrap), imageCacheDirty(true),
+ updateOnComponentComplete(true), richText(false), singleline(false), cacheAllTextAsImage(true),
+ internalWidthUpdate(false), doc(0)
{
- cache = !disableImageCache();
+ cacheAllTextAsImage = enableImageCache();
QGraphicsItemPrivate::acceptedMouseButtons = Qt::LeftButton;
QGraphicsItemPrivate::flags = QGraphicsItemPrivate::flags & ~QGraphicsItem::ItemHasNoContents;
}
@@ -151,7 +152,6 @@ void QTextDocumentWithImageResources::requestFinished()
#endif
QDeclarativeTextPrivate *d = QDeclarativeTextPrivate::get(textItem);
d->updateLayout();
- d->markImgDirty();
}
}
@@ -172,6 +172,384 @@ void QTextDocumentWithImageResources::setText(const QString &text)
QSet<QUrl> QTextDocumentWithImageResources::errors;
+QDeclarativeTextPrivate::~QDeclarativeTextPrivate()
+{
+}
+
+void QDeclarativeTextPrivate::updateLayout()
+{
+ Q_Q(QDeclarativeText);
+ if (!q->isComponentComplete()) {
+ updateOnComponentComplete = true;
+ return;
+ }
+
+ // Setup instance of QTextLayout for all cases other than richtext
+ if (!richText) {
+ layout.clearLayout();
+ layout.setFont(font);
+ if (format != QDeclarativeText::StyledText) {
+ QString tmp = text;
+ tmp.replace(QLatin1Char('\n'), QChar::LineSeparator);
+ singleline = !tmp.contains(QChar::LineSeparator);
+ if (singleline && elideMode != QDeclarativeText::ElideNone && q->widthValid()) {
+ QFontMetrics fm(font);
+ tmp = fm.elidedText(tmp,(Qt::TextElideMode)elideMode,q->width()); // XXX still worth layout...?
+ }
+ layout.setText(tmp);
+ } else {
+ singleline = false;
+ QDeclarativeStyledText::parse(text, layout);
+ }
+ }
+
+ updateSize();
+}
+
+void QDeclarativeTextPrivate::updateSize()
+{
+ Q_Q(QDeclarativeText);
+
+ if (!q->isComponentComplete()) {
+ updateOnComponentComplete = true;
+ return;
+ }
+
+ invalidateImageCache();
+
+ QFontMetrics fm(font);
+ if (text.isEmpty()) {
+ q->setImplicitWidth(0);
+ q->setImplicitHeight(fm.height());
+ emit q->paintedSizeChanged();
+ q->update();
+ return;
+ }
+
+ int dy = q->height();
+ QSize size(0, 0);
+
+ //setup instance of QTextLayout for all cases other than richtext
+ if (!richText) {
+ size = setupTextLayout();
+ if (layedOutTextSize != size) {
+ q->prepareGeometryChange();
+ layedOutTextSize = size;
+ }
+ dy -= size.height();
+ } else {
+ singleline = false; // richtext can't elide or be optimized for single-line case
+ ensureDoc();
+ doc->setDefaultFont(font);
+ QTextOption option((Qt::Alignment)int(hAlign | vAlign));
+ option.setWrapMode(QTextOption::WrapMode(wrapMode));
+ doc->setDefaultTextOption(option);
+ if (wrapMode != QDeclarativeText::NoWrap && q->widthValid())
+ doc->setTextWidth(q->width());
+ else
+ doc->setTextWidth(doc->idealWidth()); // ### Text does not align if width is not set (QTextDoc bug)
+ dy -= (int)doc->size().height();
+ QSize dsize = doc->size().toSize();
+ if (dsize != layedOutTextSize) {
+ q->prepareGeometryChange();
+ layedOutTextSize = dsize;
+ }
+ size = QSize(int(doc->idealWidth()),dsize.height());
+ }
+ int yoff = 0;
+
+ if (q->heightValid()) {
+ if (vAlign == QDeclarativeText::AlignBottom)
+ yoff = dy;
+ else if (vAlign == QDeclarativeText::AlignVCenter)
+ yoff = dy/2;
+ }
+ q->setBaselineOffset(fm.ascent() + yoff);
+
+ //### need to comfirm cost of always setting these for richText
+ internalWidthUpdate = true;
+ q->setImplicitWidth(size.width());
+ internalWidthUpdate = false;
+ q->setImplicitHeight(size.height());
+ emit q->paintedSizeChanged();
+ q->update();
+}
+
+/*!
+ Lays out the QDeclarativeTextPrivate::layout QTextLayout in the constraints of the QDeclarativeText.
+
+ Returns the size of the final text. This can be used to position the text vertically (the text is
+ already absolutely positioned horizontally).
+*/
+QSize QDeclarativeTextPrivate::setupTextLayout()
+{
+ // ### text layout handling should be profiled and optimized as needed
+ // what about QStackTextEngine engine(tmp, d->font.font()); QTextLayout textLayout(&engine);
+ Q_Q(QDeclarativeText);
+ layout.setCacheEnabled(true);
+
+ qreal height = 0;
+ qreal widthUsed = 0;
+ qreal lineWidth = 0;
+
+ //set manual width
+ if ((wrapMode != QDeclarativeText::NoWrap || elideMode != QDeclarativeText::ElideNone) && q->widthValid())
+ lineWidth = q->width();
+
+ QTextOption textOption = layout.textOption();
+ textOption.setWrapMode(QTextOption::WrapMode(wrapMode));
+ layout.setTextOption(textOption);
+
+ layout.beginLayout();
+ forever {
+ QTextLine line = layout.createLine();
+ if (!line.isValid())
+ break;
+
+ if (lineWidth)
+ line.setLineWidth(lineWidth);
+ }
+ layout.endLayout();
+
+ for (int i = 0; i < layout.lineCount(); ++i) {
+ QTextLine line = layout.lineAt(i);
+ widthUsed = qMax(widthUsed, line.naturalTextWidth());
+ }
+
+ qreal layoutWidth = q->widthValid() ? q->width() : widthUsed;
+
+ qreal x = 0;
+ for (int i = 0; i < layout.lineCount(); ++i) {
+ QTextLine line = layout.lineAt(i);
+ line.setPosition(QPointF(0, height));
+ height += line.height();
+
+ if (!cacheAllTextAsImage) {
+ if (hAlign == QDeclarativeText::AlignLeft) {
+ x = 0;
+ } else if (hAlign == QDeclarativeText::AlignRight) {
+ x = layoutWidth - line.naturalTextWidth();
+ } else if (hAlign == QDeclarativeText::AlignHCenter) {
+ x = (layoutWidth - line.naturalTextWidth()) / 2;
+ }
+ line.setPosition(QPointF(x, line.y()));
+ }
+ }
+
+ return layout.boundingRect().toAlignedRect().size();
+}
+
+/*!
+ Returns a painted version of the QDeclarativeTextPrivate::layout QTextLayout.
+ If \a drawStyle is true, the style color overrides all colors in the document.
+*/
+QPixmap QDeclarativeTextPrivate::textLayoutImage(bool drawStyle)
+{
+ //do layout
+ QSize size = layedOutTextSize;
+
+ qreal x = 0;
+ for (int i = 0; i < layout.lineCount(); ++i) {
+ QTextLine line = layout.lineAt(i);
+ if (hAlign == QDeclarativeText::AlignLeft) {
+ x = 0;
+ } else if (hAlign == QDeclarativeText::AlignRight) {
+ x = size.width() - line.naturalTextWidth();
+ } else if (hAlign == QDeclarativeText::AlignHCenter) {
+ x = (size.width() - line.naturalTextWidth()) / 2;
+ }
+ line.setPosition(QPointF(x, line.y()));
+ }
+
+ //paint text
+ 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
+ drawTextLayout(&p, QPointF(0,0), drawStyle);
+ }
+ return img;
+}
+
+/*!
+ Paints the QDeclarativeTextPrivate::layout QTextLayout into \a painter at \a pos. If
+ \a drawStyle is true, the style color overrides all colors in the document.
+*/
+void QDeclarativeTextPrivate::drawTextLayout(QPainter *painter, const QPointF &pos, bool drawStyle)
+{
+ if (drawStyle)
+ painter->setPen(styleColor);
+ else
+ painter->setPen(color);
+ painter->setFont(font);
+ layout.draw(painter, pos);
+}
+
+/*!
+ Returns a painted version of the QDeclarativeTextPrivate::doc QTextDocument.
+ If \a drawStyle is true, the style color overrides all colors in the document.
+*/
+QPixmap QDeclarativeTextPrivate::textDocumentImage(bool drawStyle)
+{
+ QSize size = doc->size().toSize();
+
+ //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;
+
+ QTextOption oldOption(doc->defaultTextOption());
+ if (drawStyle) {
+ context.palette.setColor(QPalette::Text, styleColor);
+ QTextOption colorOption(doc->defaultTextOption());
+ colorOption.setFlags(QTextOption::SuppressColors);
+ doc->setDefaultTextOption(colorOption);
+ } else {
+ context.palette.setColor(QPalette::Text, color);
+ }
+ doc->documentLayout()->draw(&p, context);
+ if (drawStyle)
+ doc->setDefaultTextOption(oldOption);
+ return img;
+}
+
+/*!
+ Mark the image cache as dirty.
+*/
+void QDeclarativeTextPrivate::invalidateImageCache()
+{
+ Q_Q(QDeclarativeText);
+
+ if (imageCacheDirty)
+ return;
+
+ imageCacheDirty = true;
+ imageCache = QPixmap();
+
+ if (q->isComponentComplete())
+ q->update();
+}
+
+/*!
+ Tests if the image cache is dirty, and repaints it if it is.
+*/
+void QDeclarativeTextPrivate::checkImageCache()
+{
+ if (!imageCacheDirty)
+ return;
+
+ if (text.isEmpty()) {
+
+ imageCache = QPixmap();
+
+ } else {
+
+ QPixmap textImage;
+ QPixmap styledImage;
+
+ if (richText) {
+ textImage = textDocumentImage(false);
+ if (style != QDeclarativeText::Normal)
+ styledImage = textDocumentImage(true); //### should use styleColor
+ } else {
+ textImage = textLayoutImage(false);
+ if (style != QDeclarativeText::Normal)
+ styledImage = textLayoutImage(true); //### should use styleColor
+ }
+
+ switch (style) {
+ case QDeclarativeText::Outline:
+ imageCache = drawOutline(textImage, styledImage);
+ break;
+ case QDeclarativeText::Sunken:
+ imageCache = drawOutline(textImage, styledImage, -1);
+ break;
+ case QDeclarativeText::Raised:
+ imageCache = drawOutline(textImage, styledImage, 1);
+ break;
+ default:
+ imageCache = textImage;
+ break;
+ }
+
+ }
+
+ imageCacheDirty = false;
+}
+
+/*!
+ Ensures the QDeclarativeTextPrivate::doc variable is set to a valid text document
+*/
+void QDeclarativeTextPrivate::ensureDoc()
+{
+ if (!doc) {
+ Q_Q(QDeclarativeText);
+ doc = new QTextDocumentWithImageResources(q);
+ doc->setDocumentMargin(0);
+ }
+}
+
+/*!
+ Draw \a styleSource as an outline around \a source and return the new image.
+*/
+QPixmap QDeclarativeTextPrivate::drawOutline(const QPixmap &source, const QPixmap &styleSource)
+{
+ QPixmap img = QPixmap(styleSource.width() + 2, styleSource.height() + 2);
+ img.fill(Qt::transparent);
+
+ QPainter ppm(&img);
+
+ QPoint pos(0, 0);
+ pos += QPoint(-1, 0);
+ ppm.drawPixmap(pos, styleSource);
+ pos += QPoint(2, 0);
+ ppm.drawPixmap(pos, styleSource);
+ pos += QPoint(-1, -1);
+ ppm.drawPixmap(pos, styleSource);
+ pos += QPoint(0, 2);
+ ppm.drawPixmap(pos, styleSource);
+
+ pos += QPoint(0, -1);
+ ppm.drawPixmap(pos, source);
+ ppm.end();
+
+ return img;
+}
+
+/*!
+ Draw \a styleSource below \a source at \a yOffset and return the new image.
+*/
+QPixmap QDeclarativeTextPrivate::drawOutline(const QPixmap &source, const QPixmap &styleSource, int yOffset)
+{
+ QPixmap img = QPixmap(styleSource.width() + 2, styleSource.height() + 2);
+ img.fill(Qt::transparent);
+
+ QPainter ppm(&img);
+
+ ppm.drawPixmap(QPoint(0, yOffset), styleSource);
+ ppm.drawPixmap(0, 0, source);
+
+ ppm.end();
+
+ return img;
+}
+
/*!
\qmlclass Text QDeclarativeText
\ingroup qml-basic-visual-elements
@@ -211,10 +589,44 @@ QDeclarativeText::~QDeclarativeText()
{
}
+/*!
+ \qmlproperty bool Text::clip
+ This property holds whether the text is clipped.
-QDeclarativeTextPrivate::~QDeclarativeTextPrivate()
-{
-}
+ 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.
+*/
+
+/*!
+ \qmlproperty bool Text::smooth
+
+ This property holds whether the text is smoothly scaled or transformed.
+
+ Smooth filtering gives better visual quality, but is slower. If
+ the item is displayed at its natural size, this property has no visual or
+ performance effect.
+
+ \note Generally scaling artifacts are only visible if the item is stationary on
+ the screen. A common pattern when animating an item is to disable smooth
+ filtering at the beginning of the animation and reenable it at the conclusion.
+*/
+
+/*!
+ \qmlsignal Text::onLinkActivated(string link)
+
+ This handler is called when the user clicks on a link embedded in the text.
+ The link must be in rich text or HTML format and the
+ \a link string provides access to the particular link.
+
+ \snippet doc/src/snippets/declarative/text/onLinkActivated.qml 0
+
+ The example code will display the text
+ "The main website is at \l{http://qt.nokia.com}{Nokia Qt DF}."
+
+ Clicking on the highlighted link will output
+ \tt{http://qt.nokia.com link activated} to the console.
+*/
/*!
\qmlproperty string Text::font.family
@@ -320,7 +732,6 @@ QDeclarativeTextPrivate::~QDeclarativeTextPrivate()
Text { text: "Hello"; font.capitalization: Font.AllLowercase }
\endqml
*/
-
QFont QDeclarativeText::font() const
{
Q_D(const QDeclarativeText);
@@ -334,30 +745,9 @@ void QDeclarativeText::setFont(const QFont &font)
return;
d->font = font;
-
d->updateLayout();
- d->markImgDirty();
- emit fontChanged(d->font);
-}
-void QDeclarativeText::setText(const QString &n)
-{
- Q_D(QDeclarativeText);
- if (d->text == n)
- return;
-
- d->richText = d->format == RichText || (d->format == AutoText && Qt::mightBeRichText(n));
- if (d->richText) {
- if (isComponentComplete()) {
- d->ensureDoc();
- d->doc->setText(n);
- }
- }
-
- d->text = n;
- d->updateLayout();
- d->markImgDirty();
- emit textChanged(d->text);
+ emit fontChanged(d->font);
}
/*!
@@ -374,17 +764,25 @@ QString QDeclarativeText::text() const
return d->text;
}
-void QDeclarativeText::setColor(const QColor &color)
+void QDeclarativeText::setText(const QString &n)
{
Q_D(QDeclarativeText);
- if (d->color == color)
+ if (d->text == n)
return;
- d->color = color;
- d->markImgDirty();
- emit colorChanged(d->color);
+ d->richText = d->format == RichText || (d->format == AutoText && Qt::mightBeRichText(n));
+ if (d->richText && isComponentComplete()) {
+ d->ensureDoc();
+ d->doc->setText(n);
+ }
+
+ d->text = n;
+ d->updateLayout();
+
+ emit textChanged(d->text);
}
+
/*!
\qmlproperty color Text::color
@@ -398,13 +796,23 @@ void QDeclarativeText::setColor(const QColor &color)
Text { color: "steelblue"; ... }
\endqml
*/
-
QColor QDeclarativeText::color() const
{
Q_D(const QDeclarativeText);
return d->color;
}
+void QDeclarativeText::setColor(const QColor &color)
+{
+ Q_D(QDeclarativeText);
+ if (d->color == color)
+ return;
+
+ d->color = color;
+ d->invalidateImageCache();
+ emit colorChanged(d->color);
+}
+
/*!
\qmlproperty enumeration Text::style
@@ -445,21 +853,10 @@ void QDeclarativeText::setStyle(QDeclarativeText::TextStyle style)
if (isComponentComplete() && (d->style == Normal || style == Normal))
prepareGeometryChange();
d->style = style;
- d->markImgDirty();
+ d->invalidateImageCache();
emit styleChanged(d->style);
}
-void QDeclarativeText::setStyleColor(const QColor &color)
-{
- Q_D(QDeclarativeText);
- if (d->styleColor == color)
- return;
-
- d->styleColor = color;
- d->markImgDirty();
- emit styleColorChanged(d->styleColor);
-}
-
/*!
\qmlproperty color Text::styleColor
@@ -481,6 +878,18 @@ QColor QDeclarativeText::styleColor() const
return d->styleColor;
}
+void QDeclarativeText::setStyleColor(const QColor &color)
+{
+ Q_D(QDeclarativeText);
+ if (d->styleColor == color)
+ return;
+
+ d->styleColor = color;
+ d->invalidateImageCache();
+ emit styleColorChanged(d->styleColor);
+}
+
+
/*!
\qmlproperty enumeration Text::horizontalAlignment
\qmlproperty enumeration Text::verticalAlignment
@@ -493,7 +902,7 @@ QColor QDeclarativeText::styleColor() const
and \c Text.AlignVCenter.
Note that for a single line of text, the size of the text is the area of the text. In this common case,
- all alignments are equivalent. If you want the text to be, say, centered in it parent, then you will
+ all alignments are equivalent. If you want the text to be, say, centered in its parent, then you will
need to either modify the Item::anchors, or set horizontalAlignment to Text.AlignHCenter and bind the width to
that of the parent.
*/
@@ -511,7 +920,10 @@ void QDeclarativeText::setHAlign(HAlignment align)
if (isComponentComplete())
prepareGeometryChange();
+
d->hAlign = align;
+ d->updateLayout();
+
emit horizontalAlignmentChanged(align);
}
@@ -559,9 +971,8 @@ void QDeclarativeText::setWrapMode(WrapMode mode)
return;
d->wrapMode = mode;
-
d->updateLayout();
- d->markImgDirty();
+
emit wrapModeChanged();
}
@@ -621,7 +1032,6 @@ Column {
\o \image declarative-textformat.png
\endtable
*/
-
QDeclarativeText::TextFormat QDeclarativeText::textFormat() const
{
Q_D(const QDeclarativeText);
@@ -637,19 +1047,13 @@ void QDeclarativeText::setTextFormat(TextFormat format)
bool wasRich = d->richText;
d->richText = format == RichText || (format == AutoText && Qt::mightBeRichText(d->text));
- if (wasRich && !d->richText) {
- //### delete control? (and vice-versa below)
- d->updateLayout();
- d->markImgDirty();
- } else if (!wasRich && d->richText) {
- if (isComponentComplete()) {
- d->ensureDoc();
- d->doc->setText(d->text);
- }
- d->updateLayout();
- d->markImgDirty();
+ if (!wasRich && d->richText && isComponentComplete()) {
+ d->ensureDoc();
+ d->doc->setText(d->text);
}
+ d->updateLayout();
+
emit textFormatChanged(d->format);
}
@@ -659,7 +1063,7 @@ void QDeclarativeText::setTextFormat(TextFormat format)
Set this property to elide parts of the text fit to the Text item's width.
The text will only elide if an explicit width has been set.
- This property cannot be used with wrapping enabled or with rich text.
+ This property cannot be used with multi-line text or with rich text.
Eliding can be:
\list
@@ -688,12 +1092,12 @@ void QDeclarativeText::setElideMode(QDeclarativeText::TextElideMode mode)
return;
d->elideMode = mode;
-
d->updateLayout();
- d->markImgDirty();
+
emit elideModeChanged(d->elideMode);
}
+/*! \internal */
QRectF QDeclarativeText::boundingRect() const
{
Q_D(const QDeclarativeText);
@@ -704,7 +1108,7 @@ QRectF QDeclarativeText::boundingRect() const
int x = 0;
int y = 0;
- QSize size = d->cachedLayoutSize;
+ QSize size = d->layedOutTextSize;
if (d->style != Normal)
size += QSize(2,2);
@@ -737,117 +1141,24 @@ QRectF QDeclarativeText::boundingRect() const
return QRectF(x,y,size.width(),size.height());
}
-void QDeclarativeText::geometryChanged(const QRectF &newGeometry,
- const QRectF &oldGeometry)
+/*! \internal */
+void QDeclarativeText::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
{
Q_D(QDeclarativeText);
- if (!d->internalWidthUpdate && newGeometry.width() != oldGeometry.width()) {
- if (d->wrapMode != QDeclarativeText::NoWrap || d->elideMode != QDeclarativeText::ElideNone) {
- //re-elide if needed
- if (d->singleline && d->elideMode != QDeclarativeText::ElideNone &&
- isComponentComplete() && widthValid()) {
-
- QFontMetrics fm(d->font);
- QString tmp = fm.elidedText(d->text,(Qt::TextElideMode)d->elideMode,width()); // XXX still worth layout...?
- d->layout.setText(tmp);
- }
-
- d->imgDirty = true;
+ if ((!d->internalWidthUpdate && newGeometry.width() != oldGeometry.width())
+ && (d->wrapMode != QDeclarativeText::NoWrap
+ || d->elideMode != QDeclarativeText::ElideNone
+ || d->hAlign != QDeclarativeText::AlignLeft)) {
+ if (d->singleline && d->elideMode != QDeclarativeText::ElideNone && widthValid()) {
+ // We need to re-elide
+ d->updateLayout();
+ } else {
+ // We just need to re-layout
d->updateSize();
}
}
- QDeclarativeItem::geometryChanged(newGeometry, oldGeometry);
-}
-
-void QDeclarativeTextPrivate::updateLayout()
-{
- Q_Q(QDeclarativeText);
- if (q->isComponentComplete()) {
- //setup instance of QTextLayout for all cases other than richtext
- if (!richText) {
- layout.clearLayout();
- layout.setFont(font);
- if (format != QDeclarativeText::StyledText) {
- QString tmp = text;
- tmp.replace(QLatin1Char('\n'), QChar::LineSeparator);
- singleline = !tmp.contains(QChar::LineSeparator);
- if (singleline && elideMode != QDeclarativeText::ElideNone && q->widthValid()) {
- QFontMetrics fm(font);
- tmp = fm.elidedText(tmp,(Qt::TextElideMode)elideMode,q->width()); // XXX still worth layout...?
- }
- layout.setText(tmp);
- } else {
- singleline = false;
- QDeclarativeStyledText::parse(text, layout);
- }
- }
- updateSize();
- } else {
- dirty = true;
- }
-}
-
-
-void QDeclarativeTextPrivate::updateSize()
-{
- Q_Q(QDeclarativeText);
- if (q->isComponentComplete()) {
- QFontMetrics fm(font);
- if (text.isEmpty()) {
- q->setImplicitHeight(fm.height());
- emit q->paintedSizeChanged();
- return;
- }
-
- int dy = q->height();
- QSize size(0, 0);
-
- //setup instance of QTextLayout for all cases other than richtext
- if (!richText) {
- size = setupTextLayout();
- if (cachedLayoutSize != size) {
- q->prepareGeometryChange();
- cachedLayoutSize = size;
- }
- dy -= size.height();
- } else {
- singleline = false; // richtext can't elide or be optimized for single-line case
- ensureDoc();
- doc->setDefaultFont(font);
- QTextOption option((Qt::Alignment)int(hAlign | vAlign));
- option.setWrapMode(QTextOption::WrapMode(wrapMode));
- doc->setDefaultTextOption(option);
- if (wrapMode != QDeclarativeText::NoWrap && q->widthValid())
- doc->setTextWidth(q->width());
- else
- doc->setTextWidth(doc->idealWidth()); // ### Text does not align if width is not set (QTextDoc bug)
- dy -= (int)doc->size().height();
- QSize dsize = doc->size().toSize();
- if (dsize != cachedLayoutSize) {
- q->prepareGeometryChange();
- cachedLayoutSize = dsize;
- }
- size = QSize(int(doc->idealWidth()),dsize.height());
- }
- int yoff = 0;
-
- if (q->heightValid()) {
- if (vAlign == QDeclarativeText::AlignBottom)
- yoff = dy;
- else if (vAlign == QDeclarativeText::AlignVCenter)
- yoff = dy/2;
- }
- q->setBaselineOffset(fm.ascent() + yoff);
- //### need to comfirm cost of always setting these for richText
- internalWidthUpdate = true;
- q->setImplicitWidth(size.width());
- internalWidthUpdate = false;
- q->setImplicitHeight(size.height());
- emit q->paintedSizeChanged();
- } else {
- dirty = true;
- }
+ QDeclarativeItem::geometryChanged(newGeometry, oldGeometry);
}
/*!
@@ -872,228 +1183,6 @@ qreal QDeclarativeText::paintedHeight() const
return implicitHeight();
}
-
-
-// ### text layout handling should be profiled and optimized as needed
-// what about QStackTextEngine engine(tmp, d->font.font()); QTextLayout textLayout(&engine);
-
-void QDeclarativeTextPrivate::drawOutline()
-{
- QPixmap img = QPixmap(imgStyleCache.width()+2,imgStyleCache.height()+2);
- img.fill(Qt::transparent);
-
- QPainter ppm(&img);
-
- QPoint pos(imgCache.rect().topLeft());
- pos += QPoint(-1, 0);
- ppm.drawPixmap(pos, imgStyleCache);
- pos += QPoint(2, 0);
- ppm.drawPixmap(pos, imgStyleCache);
- pos += QPoint(-1, -1);
- ppm.drawPixmap(pos, imgStyleCache);
- pos += QPoint(0, 2);
- ppm.drawPixmap(pos, imgStyleCache);
-
- pos += QPoint(0, -1);
- ppm.drawPixmap(pos, imgCache);
- ppm.end();
-
- imgCache = img;
-}
-
-void QDeclarativeTextPrivate::drawOutline(int yOffset)
-{
- QPixmap img = QPixmap(imgStyleCache.width()+2,imgStyleCache.height()+2);
- img.fill(Qt::transparent);
-
- QPainter ppm(&img);
-
- QPoint pos(imgCache.rect().topLeft());
- pos += QPoint(0, yOffset);
- ppm.drawPixmap(pos, imgStyleCache);
-
- pos += QPoint(0, -yOffset);
- ppm.drawPixmap(pos, imgCache);
- ppm.end();
-
- imgCache = img;
-}
-
-QSize QDeclarativeTextPrivate::setupTextLayout()
-{
- Q_Q(QDeclarativeText);
- layout.setCacheEnabled(true);
-
- int height = 0;
- qreal widthUsed = 0;
- qreal lineWidth = 0;
-
- //set manual width
- if ((wrapMode != QDeclarativeText::NoWrap || elideMode != QDeclarativeText::ElideNone) && q->widthValid())
- lineWidth = q->width();
-
- QTextOption textOption = layout.textOption();
- textOption.setWrapMode(QTextOption::WrapMode(wrapMode));
- layout.setTextOption(textOption);
-
- layout.beginLayout();
-
- while (1) {
- QTextLine line = layout.createLine();
- if (!line.isValid())
- break;
-
- if ((wrapMode != QDeclarativeText::NoWrap || elideMode != QDeclarativeText::ElideNone) && q->widthValid())
- line.setLineWidth(lineWidth);
- }
- layout.endLayout();
-
- int x = 0;
- for (int i = 0; i < layout.lineCount(); ++i) {
- QTextLine line = layout.lineAt(i);
- widthUsed = qMax(widthUsed, line.naturalTextWidth());
- line.setPosition(QPointF(0, height));
- height += int(line.height());
-
- if (!cache) {
- if (hAlign == QDeclarativeText::AlignLeft) {
- x = 0;
- } else if (hAlign == QDeclarativeText::AlignRight) {
- x = q->width() - (int)line.naturalTextWidth();
- } else if (hAlign == QDeclarativeText::AlignHCenter) {
- x = (q->width() - (int)line.naturalTextWidth()) / 2;
- }
- line.setPosition(QPoint(x, (int)line.y()));
- }
- }
-
- return QSize(qCeil(widthUsed), height);
-}
-
-QPixmap QDeclarativeTextPrivate::wrappedTextImage(bool drawStyle)
-{
- //do layout
- QSize size = cachedLayoutSize;
-
- int x = 0;
- for (int i = 0; i < layout.lineCount(); ++i) {
- QTextLine line = layout.lineAt(i);
- if (hAlign == QDeclarativeText::AlignLeft) {
- x = 0;
- } else if (hAlign == QDeclarativeText::AlignRight) {
- x = size.width() - (int)line.naturalTextWidth();
- } else if (hAlign == QDeclarativeText::AlignHCenter) {
- x = (size.width() - (int)line.naturalTextWidth()) / 2;
- }
- line.setPosition(QPoint(x, (int)line.y()));
- }
-
- //paint text
- 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;
-}
-
-void QDeclarativeTextPrivate::drawWrappedText(QPainter *p, const QPointF &pos, bool drawStyle)
-{
- if (drawStyle)
- p->setPen(styleColor);
- else
- p->setPen(color);
- p->setFont(font);
- layout.draw(p , pos);
-}
-
-QPixmap QDeclarativeTextPrivate::richTextImage(bool drawStyle)
-{
- QSize size = doc->size().toSize();
-
- //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;
-
- QTextOption oldOption(doc->defaultTextOption());
- if (drawStyle) {
- context.palette.setColor(QPalette::Text, styleColor);
- QTextOption colorOption(doc->defaultTextOption());
- colorOption.setFlags(QTextOption::SuppressColors);
- doc->setDefaultTextOption(colorOption);
- } else {
- context.palette.setColor(QPalette::Text, color);
- }
- doc->documentLayout()->draw(&p, context);
- if (drawStyle)
- doc->setDefaultTextOption(oldOption);
- return img;
-}
-
-void QDeclarativeTextPrivate::checkImgCache()
-{
- if (!imgDirty)
- return;
-
- bool empty = text.isEmpty();
- QPixmap newImgCache;
- if (empty) {
- imgStyleCache = QPixmap();
- } else if (richText) {
- newImgCache = richTextImage(false);
- if (style != QDeclarativeText::Normal)
- imgStyleCache = richTextImage(true); //### should use styleColor
- } else {
- newImgCache = wrappedTextImage(false);
- if (style != QDeclarativeText::Normal)
- imgStyleCache = wrappedTextImage(true); //### should use styleColor
- }
- imgCache = newImgCache;
- if (!empty)
- switch (style) {
- case QDeclarativeText::Outline:
- drawOutline();
- break;
- case QDeclarativeText::Sunken:
- drawOutline(-1);
- break;
- case QDeclarativeText::Raised:
- drawOutline(1);
- break;
- default:
- break;
- }
-
- imgDirty = false;
-}
-
-void QDeclarativeTextPrivate::ensureDoc()
-{
- if (!doc) {
- Q_Q(QDeclarativeText);
- doc = new QTextDocumentWithImageResources(q);
- doc->setDocumentMargin(0);
- }
-}
-
/*!
Returns the number of resources (images) that are being loaded asynchronously.
*/
@@ -1103,22 +1192,14 @@ 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.
-*/
-
+/*! \internal */
void QDeclarativeText::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
{
Q_D(QDeclarativeText);
- if (d->cache || d->style != Normal) {
- d->checkImgCache();
- if (d->imgCache.isNull())
+ if (d->cacheAllTextAsImage || d->style != Normal) {
+ d->checkImageCache();
+ if (d->imageCache.isNull())
return;
bool oldAA = p->testRenderHint(QPainter::Antialiasing);
@@ -1128,23 +1209,23 @@ void QDeclarativeText::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWid
QRect br = boundingRect().toRect();
- bool needClip = clip() && (d->imgCache.width() > width() ||
- d->imgCache.height() > height());
+ bool needClip = clip() && (d->imageCache.width() > width() ||
+ d->imageCache.height() > height());
if (needClip)
- p->drawPixmap(0, 0, width(), height(), d->imgCache, -br.x(), -br.y(), width(), height());
+ p->drawPixmap(0, 0, width(), height(), d->imageCache, -br.x(), -br.y(), width(), height());
else
- p->drawPixmap(br.x(), br.y(), d->imgCache);
+ p->drawPixmap(br.x(), br.y(), d->imageCache);
if (d->smooth) {
p->setRenderHint(QPainter::Antialiasing, oldAA);
p->setRenderHint(QPainter::SmoothPixmapTransform, oldSmooth);
}
} else {
- qreal y = boundingRect().y();
+ QRectF bounds = boundingRect();
- bool needClip = clip() && (d->cachedLayoutSize.width() > width() ||
- d->cachedLayoutSize.height() > height());
+ bool needClip = clip() && (d->layedOutTextSize.width() > width() ||
+ d->layedOutTextSize.height() > height());
if (needClip) {
p->save();
@@ -1153,49 +1234,35 @@ void QDeclarativeText::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWid
if (d->richText) {
QAbstractTextDocumentLayout::PaintContext context;
context.palette.setColor(QPalette::Text, d->color);
- p->translate(0, y);
+ p->translate(bounds.x(), bounds.y());
d->doc->documentLayout()->draw(p, context);
- p->translate(0, -y);
+ p->translate(-bounds.x(), -bounds.y());
} else {
- d->drawWrappedText(p, QPointF(0,y), false);
+ d->drawTextLayout(p, QPointF(0, bounds.y()), false);
}
- if (needClip)
+
+ if (needClip) {
p->restore();
+ }
}
}
-/*!
- \qmlproperty bool Text::smooth
-
- This property holds whether the text is smoothly scaled or transformed.
-
- Smooth filtering gives better visual quality, but is slower. If
- the item is displayed at its natural size, this property has no visual or
- performance effect.
-
- \note Generally scaling artifacts are only visible if the item is stationary on
- the screen. A common pattern when animating an item is to disable smooth
- filtering at the beginning of the animation and reenable it at the conclusion.
-*/
-
+/*! \internal */
void QDeclarativeText::componentComplete()
{
Q_D(QDeclarativeText);
QDeclarativeItem::componentComplete();
- if (d->dirty) {
+ if (d->updateOnComponentComplete) {
+ d->updateOnComponentComplete = false;
if (d->richText) {
d->ensureDoc();
d->doc->setText(d->text);
}
d->updateLayout();
- d->dirty = false;
}
}
-/*!
- \overload
- Handles the given mouse \a event.
- */
+/*! \internal */
void QDeclarativeText::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
Q_D(QDeclarativeText);
@@ -1214,26 +1281,7 @@ void QDeclarativeText::mousePressEvent(QGraphicsSceneMouseEvent *event)
}
-/*!
- \qmlsignal Text::onLinkActivated(string link)
-
- This handler is called when the user clicks on a link embedded in the text.
- The link must be in rich text or HTML format and the
- \a link string provides access to the particular link.
-
- \snippet doc/src/snippets/declarative/text/onLinkActivated.qml 0
-
- The example code will display the text
- "The main website is at \l{http://qt.nokia.com}{Nokia Qt DF}."
-
- Clicking on the highlighted link will output
- \tt{http://qt.nokia.com link activated} to the console.
-*/
-
-/*!
- \overload
- Handles the given mouse \a event.
- */
+/*! \internal */
void QDeclarativeText::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
Q_D(QDeclarativeText);
diff --git a/src/declarative/graphicsitems/qdeclarativetext_p.h b/src/declarative/graphicsitems/qdeclarativetext_p.h
index 2cc4d52..51434d5 100644
--- a/src/declarative/graphicsitems/qdeclarativetext_p.h
+++ b/src/declarative/graphicsitems/qdeclarativetext_p.h
@@ -45,13 +45,15 @@
#include <QtGui/qtextoption.h>
#include "qdeclarativeitem.h"
+#include <private/qdeclarativeglobal_p.h>
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
class QDeclarativeTextPrivate;
-class Q_DECLARATIVE_EXPORT QDeclarativeText : public QDeclarativeItem
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeText : public QDeclarativeItem
{
Q_OBJECT
Q_ENUMS(HAlignment)
diff --git a/src/declarative/graphicsitems/qdeclarativetext_p_p.h b/src/declarative/graphicsitems/qdeclarativetext_p_p.h
index db68558..e37f477 100644
--- a/src/declarative/graphicsitems/qdeclarativetext_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativetext_p_p.h
@@ -74,24 +74,8 @@ public:
~QDeclarativeTextPrivate();
- void ensureDoc();
void updateSize();
void updateLayout();
- void markImgDirty() {
- Q_Q(QDeclarativeText);
- imgDirty = true;
- if (q->isComponentComplete())
- q->update();
- }
- void checkImgCache();
-
- void drawOutline();
- void drawOutline(int yOffset);
-
- QPixmap wrappedTextImage(bool drawStyle);
- void drawWrappedText(QPainter *p, const QPointF &pos, bool drawStyle);
- QPixmap richTextImage(bool drawStyle);
- QSize setupTextLayout();
QString text;
QFont font;
@@ -99,23 +83,37 @@ public:
QDeclarativeText::TextStyle style;
QColor styleColor;
QString activeLink;
- QPixmap imgCache;
- QPixmap imgStyleCache;
QDeclarativeText::HAlignment hAlign;
QDeclarativeText::VAlignment vAlign;
QDeclarativeText::TextElideMode elideMode;
- bool imgDirty:1;
- bool dirty:1;
+ QDeclarativeText::TextFormat format;
+ QDeclarativeText::WrapMode wrapMode;
+
+ void invalidateImageCache();
+ void checkImageCache();
+ QPixmap imageCache;
+
+ bool imageCacheDirty:1;
+ bool updateOnComponentComplete:1;
bool richText:1;
bool singleline:1;
- bool cache:1;
+ bool cacheAllTextAsImage:1;
bool internalWidthUpdate:1;
+
+ QSize layedOutTextSize;
+
+ void ensureDoc();
+ QPixmap textDocumentImage(bool drawStyle);
QTextDocumentWithImageResources *doc;
+
+ QSize setupTextLayout();
+ QPixmap textLayoutImage(bool drawStyle);
+ void drawTextLayout(QPainter *p, const QPointF &pos, bool drawStyle);
QDeclarativeTextLayout layout;
- QSize cachedLayoutSize;
- QDeclarativeText::TextFormat format;
- QDeclarativeText::WrapMode wrapMode;
-
+
+ static QPixmap drawOutline(const QPixmap &source, const QPixmap &styleSource);
+ static QPixmap drawOutline(const QPixmap &source, const QPixmap &styleSource, int yOffset);
+
static inline QDeclarativeTextPrivate *get(QDeclarativeText *t) {
return t->d_func();
}
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
index 6f5608a..e05f4e4 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
@@ -319,6 +319,7 @@ void QDeclarativeTextEdit::setTextFormat(TextFormat format)
updateSize();
}
d->format = format;
+ d->control->setAcceptRichText(d->format != PlainText);
emit textFormatChanged(d->format);
}
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index 637dd77..0deacf8 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -460,10 +460,9 @@ QRect QDeclarativeTextInput::cursorRectangle() const
text edit.
Note that if selectionStart == selectionEnd then there is no current
- selection. If you attempt to set selectionStart to a value outside of
- the current text, selectionStart will not be changed.
+ selection.
- \sa selectionEnd, cursorPosition, selectedText
+ \sa selectionEnd, cursorPosition, selectedText, select()
*/
int QDeclarativeTextInput::selectionStart() const
{
@@ -479,10 +478,9 @@ int QDeclarativeTextInput::selectionStart() const
text edit.
Note that if selectionStart == selectionEnd then there is no current
- selection. If you attempt to set selectionEnd to a value outside of
- the current text, selectionEnd will not be changed.
+ selection.
- \sa selectionStart, cursorPosition, selectedText
+ \sa selectionStart, cursorPosition, selectedText, select()
*/
int QDeclarativeTextInput::selectionEnd() const
{
@@ -490,6 +488,19 @@ int QDeclarativeTextInput::selectionEnd() const
return d->lastSelectionEnd;
}
+/*!
+ \qmlmethod void TextInput::select(int start, int end)
+
+ Causes the text from \a start to \a end to be selected.
+
+ If either start or end is out of range, the selection is not changed.
+
+ After calling this, selectionStart will become the lesser
+ and selectionEnd will become the greater (regardless of the order passed
+ to this method).
+
+ \sa selectionStart, selectionEnd
+*/
void QDeclarativeTextInput::select(int start, int end)
{
Q_D(QDeclarativeTextInput);
@@ -792,7 +803,7 @@ void QDeclarativeTextInput::setCursorDelegate(QDeclarativeComponent* c)
d->cursorComponent = c;
if(!c){
//note that the components are owned by something else
- disconnect(d->control, SIGNAL(cursorPositionChanged(int, int)),
+ disconnect(d->control, SIGNAL(cursorPositionChanged(int,int)),
this, SLOT(moveCursor()));
delete d->cursorItem;
}else{
@@ -805,7 +816,7 @@ void QDeclarativeTextInput::setCursorDelegate(QDeclarativeComponent* c)
void QDeclarativeTextInputPrivate::startCreatingCursor()
{
Q_Q(QDeclarativeTextInput);
- q->connect(control, SIGNAL(cursorPositionChanged(int, int)),
+ q->connect(control, SIGNAL(cursorPositionChanged(int,int)),
q, SLOT(moveCursor()));
if(cursorComponent->isReady()){
q->createCursor();
@@ -1446,7 +1457,7 @@ void QDeclarativeTextInputPrivate::init()
q, SLOT(cursorPosChanged()));
q->connect(control, SIGNAL(selectionChanged()),
q, SLOT(selectionChanged()));
- q->connect(control, SIGNAL(textChanged(const QString &)),
+ q->connect(control, SIGNAL(textChanged(QString)),
q, SLOT(q_textChanged()));
q->connect(control, SIGNAL(accepted()),
q, SIGNAL(accepted()));
@@ -1464,6 +1475,7 @@ void QDeclarativeTextInputPrivate::init()
void QDeclarativeTextInput::cursorPosChanged()
{
Q_D(QDeclarativeTextInput);
+ d->updateHorizontalScroll();
updateRect();//TODO: Only update rect between pos's
updateMicroFocus();
emit cursorPositionChanged();
diff --git a/src/declarative/graphicsitems/qdeclarativetextlayout.cpp b/src/declarative/graphicsitems/qdeclarativetextlayout.cpp
index e8b5fb2..e8da367 100644
--- a/src/declarative/graphicsitems/qdeclarativetextlayout.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextlayout.cpp
@@ -94,7 +94,7 @@ class DrawTextItemRecorder: public QPaintEngine
if (!m_inertText->items.isEmpty()) {
QStaticTextItem &last = m_inertText->items[m_inertText->items.count() - 1];
- if (last.fontEngine == ti.fontEngine && last.font == ti.font() &&
+ if (last.fontEngine() == ti.fontEngine && last.font == ti.font() &&
(!m_dirtyPen || last.color == state->pen().color())) {
needFreshCurrentItem = false;
@@ -107,7 +107,7 @@ class DrawTextItemRecorder: public QPaintEngine
if (needFreshCurrentItem) {
QStaticTextItem currentItem;
- currentItem.fontEngine = ti.fontEngine;
+ currentItem.setFontEngine(ti.fontEngine);
currentItem.font = ti.font();
currentItem.charOffset = charOffset;
currentItem.numChars = ti.num_chars;
@@ -285,6 +285,19 @@ void QDeclarativeTextLayout::beginLayout()
QTextLayout::beginLayout();
}
+void QDeclarativeTextLayout::clearLayout()
+{
+ if (d && d->cached) {
+ d->cached = false;
+ d->items.clear();
+ d->positions.clear();
+ d->glyphs.clear();
+ d->chars.clear();
+ d->position = QPointF();
+ }
+ QTextLayout::clearLayout();
+}
+
void QDeclarativeTextLayout::prepare()
{
if (!d || !d->cached) {
@@ -321,7 +334,7 @@ void QDeclarativeTextLayout::draw(QPainter *painter, const QPointF &p)
priv->extended->type() == QPaintEngine::OpenVG ||
priv->extended->type() == QPaintEngine::OpenGL);
- if (!paintEngineSupportsTransformations) {
+ if (!paintEngineSupportsTransformations || !priv->state->matrix.isAffine()) {
QTextLayout::draw(painter, p);
return;
}
diff --git a/src/declarative/graphicsitems/qdeclarativetextlayout_p.h b/src/declarative/graphicsitems/qdeclarativetextlayout_p.h
index 90bf0e0..8b81db3 100644
--- a/src/declarative/graphicsitems/qdeclarativetextlayout_p.h
+++ b/src/declarative/graphicsitems/qdeclarativetextlayout_p.h
@@ -59,6 +59,7 @@ public:
~QDeclarativeTextLayout();
void beginLayout();
+ void clearLayout();
void prepare();
void draw(QPainter *, const QPointF & = QPointF());
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
index 439f500..4fe6c4c 100644
--- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
@@ -403,6 +403,8 @@ public:
QDeclarativeListAccessor *m_listAccessor;
QModelIndex m_root;
+ QList<QByteArray> watchedRoles;
+ QList<int> watchedRoleIds;
};
class QDeclarativeVisualDataModelDataMetaObject : public QDeclarativeOpenMetaObject
@@ -712,14 +714,14 @@ void QDeclarativeVisualDataModel::setModel(const QVariant &model)
this, SLOT(_q_itemsMoved(int,int,int)));
d->m_listModelInterface = 0;
} else if (d->m_abstractItemModel) {
- QObject::disconnect(d->m_abstractItemModel, SIGNAL(rowsInserted(const QModelIndex &,int,int)),
- this, SLOT(_q_rowsInserted(const QModelIndex &,int,int)));
- QObject::disconnect(d->m_abstractItemModel, SIGNAL(rowsRemoved(const QModelIndex &,int,int)),
- this, SLOT(_q_rowsRemoved(const QModelIndex &,int,int)));
- QObject::disconnect(d->m_abstractItemModel, SIGNAL(dataChanged(const QModelIndex&,const QModelIndex&)),
- this, SLOT(_q_dataChanged(const QModelIndex&,const QModelIndex&)));
- QObject::disconnect(d->m_abstractItemModel, SIGNAL(rowsMoved(const QModelIndex&,int,int,const QModelIndex&,int)),
- this, SLOT(_q_rowsMoved(const QModelIndex&,int,int,const QModelIndex&,int)));
+ QObject::disconnect(d->m_abstractItemModel, SIGNAL(rowsInserted(QModelIndex,int,int)),
+ this, SLOT(_q_rowsInserted(QModelIndex,int,int)));
+ QObject::disconnect(d->m_abstractItemModel, SIGNAL(rowsRemoved(QModelIndex,int,int)),
+ this, SLOT(_q_rowsRemoved(QModelIndex,int,int)));
+ QObject::disconnect(d->m_abstractItemModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
+ this, SLOT(_q_dataChanged(QModelIndex,QModelIndex)));
+ QObject::disconnect(d->m_abstractItemModel, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)),
+ this, SLOT(_q_rowsMoved(QModelIndex,int,int,QModelIndex,int)));
QObject::disconnect(d->m_abstractItemModel, SIGNAL(modelReset()), this, SLOT(_q_modelReset()));
QObject::disconnect(d->m_abstractItemModel, SIGNAL(layoutChanged()), this, SLOT(_q_layoutChanged()));
d->m_abstractItemModel = 0;
@@ -760,14 +762,14 @@ void QDeclarativeVisualDataModel::setModel(const QVariant &model)
emit itemsInserted(0, d->m_listModelInterface->count());
return;
} else if (object && (d->m_abstractItemModel = qobject_cast<QAbstractItemModel *>(object))) {
- QObject::connect(d->m_abstractItemModel, SIGNAL(rowsInserted(const QModelIndex &,int,int)),
- this, SLOT(_q_rowsInserted(const QModelIndex &,int,int)));
- QObject::connect(d->m_abstractItemModel, SIGNAL(rowsRemoved(const QModelIndex &,int,int)),
- this, SLOT(_q_rowsRemoved(const QModelIndex &,int,int)));
- QObject::connect(d->m_abstractItemModel, SIGNAL(dataChanged(const QModelIndex&,const QModelIndex&)),
- this, SLOT(_q_dataChanged(const QModelIndex&,const QModelIndex&)));
- QObject::connect(d->m_abstractItemModel, SIGNAL(rowsMoved(const QModelIndex&,int,int,const QModelIndex&,int)),
- this, SLOT(_q_rowsMoved(const QModelIndex&,int,int,const QModelIndex&,int)));
+ QObject::connect(d->m_abstractItemModel, SIGNAL(rowsInserted(QModelIndex,int,int)),
+ this, SLOT(_q_rowsInserted(QModelIndex,int,int)));
+ QObject::connect(d->m_abstractItemModel, SIGNAL(rowsRemoved(QModelIndex,int,int)),
+ this, SLOT(_q_rowsRemoved(QModelIndex,int,int)));
+ QObject::connect(d->m_abstractItemModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
+ this, SLOT(_q_dataChanged(QModelIndex,QModelIndex)));
+ QObject::connect(d->m_abstractItemModel, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)),
+ this, SLOT(_q_rowsMoved(QModelIndex,int,int,QModelIndex,int)));
QObject::connect(d->m_abstractItemModel, SIGNAL(modelReset()), this, SLOT(_q_modelReset()));
QObject::connect(d->m_abstractItemModel, SIGNAL(layoutChanged()), this, SLOT(_q_layoutChanged()));
d->m_metaDataCacheable = true;
@@ -935,6 +937,10 @@ void QDeclarativeVisualDataModel::setPart(const QString &part)
int QDeclarativeVisualDataModel::count() const
{
Q_D(const QDeclarativeVisualDataModel);
+ if (d->m_visualItemModel)
+ return d->m_visualItemModel->count();
+ if (!d->m_delegate)
+ return 0;
return d->modelCount();
}
@@ -1170,10 +1176,25 @@ int QDeclarativeVisualDataModel::indexOf(QDeclarativeItem *item, QObject *) cons
return -1;
}
+void QDeclarativeVisualDataModel::setWatchedRoles(QList<QByteArray> roles)
+{
+ Q_D(QDeclarativeVisualDataModel);
+ d->watchedRoles = roles;
+ d->watchedRoleIds.clear();
+}
+
void QDeclarativeVisualDataModel::_q_itemsChanged(int index, int count,
const QList<int> &roles)
{
Q_D(QDeclarativeVisualDataModel);
+ bool changed = false;
+ if (!d->watchedRoles.isEmpty() && d->watchedRoleIds.isEmpty()) {
+ foreach (QByteArray r, d->watchedRoles) {
+ if (d->m_roleNames.contains(r))
+ d->watchedRoleIds << d->m_roleNames.value(r);
+ }
+ }
+
for (QHash<int,QDeclarativeVisualDataModelPrivate::ObjectRef>::ConstIterator iter = d->m_cache.begin();
iter != d->m_cache.end(); ++iter) {
const int idx = iter.key();
@@ -1183,6 +1204,8 @@ void QDeclarativeVisualDataModel::_q_itemsChanged(int index, int count,
QDeclarativeVisualDataModelData *data = d->data(objRef.obj);
for (int roleIdx = 0; roleIdx < roles.count(); ++roleIdx) {
int role = roles.at(roleIdx);
+ if (!changed && !d->watchedRoleIds.isEmpty() && d->watchedRoleIds.contains(role))
+ changed = true;
int propId = data->propForRole(role);
if (propId != -1) {
if (data->hasValue(propId)) {
@@ -1217,6 +1240,8 @@ void QDeclarativeVisualDataModel::_q_itemsChanged(int index, int count,
}
}
}
+ if (changed)
+ emit itemsChanged(index, count);
}
void QDeclarativeVisualDataModel::_q_itemsInserted(int index, int count)
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h b/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h
index f09d8dd..5e187c2 100644
--- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h
@@ -79,6 +79,7 @@ public:
virtual bool completePending() const = 0;
virtual void completeItem() = 0;
virtual QString stringValue(int, const QString &) = 0;
+ virtual void setWatchedRoles(QList<QByteArray> roles) = 0;
virtual int indexOf(QDeclarativeItem *item, QObject *objectContext) const = 0;
@@ -87,6 +88,7 @@ Q_SIGNALS:
void itemsInserted(int index, int count);
void itemsRemoved(int index, int count);
void itemsMoved(int from, int to, int count);
+ void itemsChanged(int index, int count);
void modelReset();
void createdItem(int index, QDeclarativeItem *item);
void destroyingItem(QDeclarativeItem *item);
@@ -120,6 +122,7 @@ public:
virtual bool completePending() const;
virtual void completeItem();
virtual QString stringValue(int index, const QString &role);
+ virtual void setWatchedRoles(QList<QByteArray>) {}
virtual int indexOf(QDeclarativeItem *item, QObject *objectContext) const;
@@ -174,6 +177,7 @@ public:
bool completePending() const;
void completeItem();
virtual QString stringValue(int index, const QString &role);
+ virtual void setWatchedRoles(QList<QByteArray> roles);
int indexOf(QDeclarativeItem *item, QObject *objectContext) const;
diff --git a/src/declarative/qml/parser/qdeclarativejs.g b/src/declarative/qml/parser/qdeclarativejs.g
index 1b66ba0..c84f0b3 100644
--- a/src/declarative/qml/parser/qdeclarativejs.g
+++ b/src/declarative/qml/parser/qdeclarativejs.g
@@ -1254,7 +1254,7 @@ case $rule_number: {
else
node = makeAstNode<AST::ObjectLiteral> (driver->nodePool());
node->lbraceToken = loc(1);
- node->lbraceToken = loc(3);
+ node->rbraceToken = loc(3);
sym(1).Node = node;
} break;
./
@@ -1265,7 +1265,7 @@ case $rule_number: {
AST::ObjectLiteral *node = makeAstNode<AST::ObjectLiteral> (driver->nodePool(),
sym(2).PropertyNameAndValueList->finish ());
node->lbraceToken = loc(1);
- node->lbraceToken = loc(4);
+ node->rbraceToken = loc(4);
sym(1).Node = node;
} break;
./
diff --git a/src/declarative/qml/parser/qdeclarativejslexer.cpp b/src/declarative/qml/parser/qdeclarativejslexer.cpp
index 1eb42e4..52f6210 100644
--- a/src/declarative/qml/parser/qdeclarativejslexer.cpp
+++ b/src/declarative/qml/parser/qdeclarativejslexer.cpp
@@ -510,15 +510,18 @@ int Lexer::lex()
setDone(Eof);
}
} else if (isLineTerminator()) {
- shiftWindowsLineBreak();
- yylineno++;
- yycolumn = 0;
- bol = true;
- terminator = true;
- syncProhibitAutomaticSemicolon();
if (restrKeyword) {
+ // automatic semicolon insertion
+ recordStartPos();
token = QDeclarativeJSGrammar::T_SEMICOLON;
setDone(Other);
+ } else {
+ shiftWindowsLineBreak();
+ yylineno++;
+ yycolumn = 0;
+ bol = true;
+ terminator = true;
+ syncProhibitAutomaticSemicolon();
}
} else if (current == '"' || current == '\'') {
recordStartPos();
diff --git a/src/declarative/qml/parser/qdeclarativejsparser.cpp b/src/declarative/qml/parser/qdeclarativejsparser.cpp
index 8afb93d..28ef17d 100644
--- a/src/declarative/qml/parser/qdeclarativejsparser.cpp
+++ b/src/declarative/qml/parser/qdeclarativejsparser.cpp
@@ -679,7 +679,7 @@ case 85: {
else
node = makeAstNode<AST::ObjectLiteral> (driver->nodePool());
node->lbraceToken = loc(1);
- node->lbraceToken = loc(3);
+ node->rbraceToken = loc(3);
sym(1).Node = node;
} break;
@@ -687,7 +687,7 @@ case 86: {
AST::ObjectLiteral *node = makeAstNode<AST::ObjectLiteral> (driver->nodePool(),
sym(2).PropertyNameAndValueList->finish ());
node->lbraceToken = loc(1);
- node->lbraceToken = loc(4);
+ node->rbraceToken = loc(4);
sym(1).Node = node;
} break;
diff --git a/src/declarative/qml/qdeclarativebinding_p.h b/src/declarative/qml/qdeclarativebinding_p.h
index 941a1b3..0b9bde6 100644
--- a/src/declarative/qml/qdeclarativebinding_p.h
+++ b/src/declarative/qml/qdeclarativebinding_p.h
@@ -64,7 +64,7 @@
QT_BEGIN_NAMESPACE
-class Q_DECLARATIVE_EXPORT QDeclarativeAbstractBinding
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeAbstractBinding
{
public:
typedef QWeakPointer<QDeclarativeAbstractBinding> Pointer;
@@ -138,7 +138,7 @@ private:
class QDeclarativeContext;
class QDeclarativeBindingPrivate;
-class Q_DECLARATIVE_EXPORT QDeclarativeBinding : public QDeclarativeExpression, public QDeclarativeAbstractBinding
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeBinding : public QDeclarativeExpression, public QDeclarativeAbstractBinding
{
Q_OBJECT
public:
diff --git a/src/declarative/qml/qdeclarativecompiledbindings.cpp b/src/declarative/qml/qdeclarativecompiledbindings.cpp
index 5f0fd56..fbe5829 100644
--- a/src/declarative/qml/qdeclarativecompiledbindings.cpp
+++ b/src/declarative/qml/qdeclarativecompiledbindings.cpp
@@ -601,7 +601,7 @@ struct QDeclarativeBindingCompilerPrivate
QDeclarativeImports imports;
QDeclarativeEnginePrivate *engine;
- QString contextName() const { return QLatin1String("$$$SCOPE_") + QString::number((intptr_t)context, 16); }
+ QString contextName() const { return QLatin1String("$$$SCOPE_") + QString::number((quintptr)context, 16); }
bool compile(QDeclarativeJS::AST::Node *);
diff --git a/src/declarative/qml/qdeclarativecompileddata.cpp b/src/declarative/qml/qdeclarativecompileddata.cpp
index 5d73d89..a4ecc77 100644
--- a/src/declarative/qml/qdeclarativecompileddata.cpp
+++ b/src/declarative/qml/qdeclarativecompileddata.cpp
@@ -205,7 +205,7 @@ const QMetaObject *QDeclarativeCompiledData::TypeReference::metaObject() const
return type->metaObject();
} else {
Q_ASSERT(component);
- return static_cast<QDeclarativeComponentPrivate *>(QObjectPrivate::get(component))->cc->root;
+ return component->root;
}
}
diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp
index dc28e22..b2740b8 100644
--- a/src/declarative/qml/qdeclarativecompiler.cpp
+++ b/src/declarative/qml/qdeclarativecompiler.cpp
@@ -590,7 +590,7 @@ bool QDeclarativeCompiler::compile(QDeclarativeEngine *engine,
COMPILE_EXCEPTION(parserRef->refObjects.first(), err);
}
} else if (tref.typeData) {
- ref.component = tref.typeData->component();
+ ref.component = tref.typeData->compiledData();
ref.ref = tref.typeData;
ref.ref->addref();
}
@@ -722,7 +722,7 @@ bool QDeclarativeCompiler::buildObject(Object *obj, const BindingContext &ctxt)
obj->metatype = tr.metaObject();
if (tr.component)
- obj->url = tr.component->url();
+ obj->url = tr.component->url;
if (tr.type)
obj->typeName = tr.type->qmlTypeName();
obj->className = tr.className;
@@ -940,7 +940,7 @@ void QDeclarativeCompiler::genObject(QDeclarativeParser::Object *obj)
// ### Surely the creation of this property cache could be more efficient
QDeclarativePropertyCache *propertyCache = 0;
if (tr.component)
- propertyCache = QDeclarativeComponentPrivate::get(tr.component)->cc->rootPropertyCache->copy();
+ propertyCache = tr.component->rootPropertyCache->copy();
else
propertyCache = enginePrivate->cache(obj->metaObject()->superClass())->copy();
@@ -957,7 +957,7 @@ void QDeclarativeCompiler::genObject(QDeclarativeParser::Object *obj)
output->bytecode << meta;
} else if (obj == unitRoot) {
if (tr.component)
- output->rootPropertyCache = QDeclarativeComponentPrivate::get(tr.component)->cc->rootPropertyCache;
+ output->rootPropertyCache = tr.component->rootPropertyCache;
else
output->rootPropertyCache = enginePrivate->cache(obj->metaObject());
@@ -1932,6 +1932,9 @@ bool QDeclarativeCompiler::buildPropertyAssignment(QDeclarativeParser::Property
{
obj->addValueProperty(prop);
+ if (prop->values.count() > 1)
+ COMPILE_EXCEPTION(prop->values.at(0), tr( "Cannot assign multiple values to a singular property") );
+
for (int ii = 0; ii < prop->values.count(); ++ii) {
Value *v = prop->values.at(ii);
if (v->object) {
@@ -2562,8 +2565,8 @@ bool QDeclarativeCompiler::compileAlias(QMetaObjectBuilder &builder,
QStringList alias = astNodeToStringList(node);
- if (alias.count() != 1 && alias.count() != 2)
- COMPILE_EXCEPTION(prop.defaultValue, tr("Invalid alias reference. An alias reference must be specified as <id> or <id>.<property>"));
+ if (alias.count() < 1 || alias.count() > 3)
+ COMPILE_EXCEPTION(prop.defaultValue, tr("Invalid alias reference. An alias reference must be specified as <id>, <id>.<property> or <id>.<value property>.<property>"));
if (!compileState.ids.contains(alias.at(0)))
COMPILE_EXCEPTION(prop.defaultValue, tr("Invalid alias reference. Unable to find id \"%1\"").arg(alias.at(0)));
@@ -2575,11 +2578,14 @@ bool QDeclarativeCompiler::compileAlias(QMetaObjectBuilder &builder,
int propIdx = -1;
int flags = 0;
bool writable = false;
- if (alias.count() == 2) {
+ if (alias.count() == 2 || alias.count() == 3) {
propIdx = idObject->metaObject()->indexOfProperty(alias.at(1).toUtf8().constData());
- if (-1 == propIdx)
+ if (-1 == propIdx) {
COMPILE_EXCEPTION(prop.defaultValue, tr("Invalid alias location"));
+ } else if (propIdx > 0xFFFF) {
+ COMPILE_EXCEPTION(prop.defaultValue, tr("Alias property exceeds alias bounds"));
+ }
QMetaProperty aliasProperty = idObject->metaObject()->property(propIdx);
if (!aliasProperty.isScriptable())
@@ -2587,6 +2593,22 @@ bool QDeclarativeCompiler::compileAlias(QMetaObjectBuilder &builder,
writable = aliasProperty.isWritable();
+ if (alias.count() == 3) {
+ QDeclarativeValueType *valueType = enginePrivate->valueTypes[aliasProperty.type()];
+ if (!valueType)
+ COMPILE_EXCEPTION(prop.defaultValue, tr("Invalid alias location"));
+
+ propIdx |= ((unsigned int)aliasProperty.type()) << 24;
+
+ int valueTypeIndex = valueType->metaObject()->indexOfProperty(alias.at(2).toUtf8().constData());
+ if (valueTypeIndex == -1)
+ COMPILE_EXCEPTION(prop.defaultValue, tr("Invalid alias location"));
+ Q_ASSERT(valueTypeIndex <= 0xFF);
+
+ aliasProperty = valueType->metaObject()->property(valueTypeIndex);
+ propIdx |= (valueTypeIndex << 16);
+ }
+
if (aliasProperty.isEnumType())
typeName = "int"; // Avoid introducing a dependency on the aliased metaobject
else
diff --git a/src/declarative/qml/qdeclarativecompiler_p.h b/src/declarative/qml/qdeclarativecompiler_p.h
index 89eef09..43a0901 100644
--- a/src/declarative/qml/qdeclarativecompiler_p.h
+++ b/src/declarative/qml/qdeclarativecompiler_p.h
@@ -93,10 +93,11 @@ public:
QByteArray className;
QDeclarativeType *type;
- QDeclarativeComponent *component;
+// QDeclarativeComponent *component;
+ QDeclarativeCompiledData *component;
QDeclarativeRefCount *ref;
- QObject *createInstance(QDeclarativeContextData *, const QBitField &) const;
+ QObject *createInstance(QDeclarativeContextData *, const QBitField &, QList<QDeclarativeError> *) const;
const QMetaObject *metaObject() const;
};
QList<TypeReference> types;
diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp
index b532b0c..2686ce3 100644
--- a/src/declarative/qml/qdeclarativecomponent.cpp
+++ b/src/declarative/qml/qdeclarativecomponent.cpp
@@ -57,7 +57,6 @@
#include <QStack>
#include <QStringList>
-#include <QFileInfo>
#include <QtCore/qdebug.h>
#include <QApplication>
@@ -99,6 +98,43 @@ class QByteArray;
int width = item->width(); // width = 200
\endcode
+
+ \section2 Network Components
+
+ If the URL passed to QDeclarativeComponent is a network resource, or if the QML document references a
+ network resource, the QDeclarativeComponent has to fetch the network data before it is able to create
+ objects. In this case, the QDeclarativeComponent will have a \l {QDeclarativeComponent::Loading}{Loading}
+ \l {QDeclarativeComponent::status()}{status}. An application will have to wait until the component
+ is \l {QDeclarativeComponent::Ready}{Ready} before calling \l {QDeclarativeComponent::create()}.
+
+ The following example shows how to load a QML file from a network resource. After creating
+ the QDeclarativeComponent, it tests whether the component is loading. If it is, it connects to the
+ QDeclarativeComponent::statusChanged() signal and otherwise calls the \c {continueLoading()} method
+ directly. Note that QDeclarativeComponent::isLoading() may be false for a network component if the
+ component has been cached and is ready immediately.
+
+ \code
+ MyApplication::MyApplication()
+ {
+ // ...
+ component = new QDeclarativeComponent(engine, QUrl("http://www.example.com/main.qml"));
+ if (component->isLoading())
+ QObject::connect(component, SIGNAL(statusChanged(QDeclarativeComponent::Status)),
+ this, SLOT(continueLoading()));
+ else
+ continueLoading();
+ }
+
+ void MyApplication::continueLoading()
+ {
+ if (component->isError()) {
+ qWarning() << component->errors();
+ } else {
+ QObject *myObject = component->create();
+ }
+ }
+ \endcode
+
\sa {Using QML in C++ Applications}, {Integrating QML with existing Qt UI code}
*/
@@ -734,48 +770,45 @@ QDeclarativeComponentPrivate::beginCreate(QDeclarativeContextData *context, cons
return 0;
}
- QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine);
+ return begin(context, creationContext, cc, start, count, &state, 0, bindings);
+}
+
+QObject * QDeclarativeComponentPrivate::begin(QDeclarativeContextData *parentContext,
+ QDeclarativeContextData *componentCreationContext,
+ QDeclarativeCompiledData *component, int start, int count,
+ ConstructionState *state, QList<QDeclarativeError> *errors,
+ const QBitField &bindings)
+{
+ QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(parentContext->engine);
+ bool isRoot = !enginePriv->inBeginCreate;
+
+ Q_ASSERT(!isRoot || state); // Either this isn't a root component, or a state data must be provided
+ Q_ASSERT((state != 0) ^ (errors != 0)); // One of state or errors (but not both) must be provided
- bool isRoot = !ep->inBeginCreate;
if (isRoot)
QDeclarativeDebugTrace::startRange(QDeclarativeDebugTrace::Creating);
- QDeclarativeDebugTrace::rangeData(QDeclarativeDebugTrace::Creating, cc->url);
QDeclarativeContextData *ctxt = new QDeclarativeContextData;
ctxt->isInternal = true;
- ctxt->url = cc->url;
- ctxt->imports = cc->importCache;
+ ctxt->url = component->url;
+ ctxt->imports = component->importCache;
// Nested global imports
- if (creationContext && start != -1)
- ctxt->importedScripts = creationContext->importedScripts;
-
- cc->importCache->addref();
- ctxt->setParent(context);
-
- QObject *rv = begin(ctxt, ep, cc, start, count, &state, bindings);
+ if (componentCreationContext && start != -1)
+ ctxt->importedScripts = componentCreationContext->importedScripts;
- if (ep->isDebugging && rv) {
- if (!context->isInternal)
- context->asQDeclarativeContextPrivate()->instances.append(rv);
- QDeclarativeEngineDebugServer::instance()->objectCreated(engine, rv);
- }
-
- return rv;
-}
+ component->importCache->addref();
+ ctxt->setParent(parentContext);
-QObject * QDeclarativeComponentPrivate::begin(QDeclarativeContextData *ctxt, QDeclarativeEnginePrivate *enginePriv,
- QDeclarativeCompiledData *component, int start, int count,
- ConstructionState *state, const QBitField &bindings)
-{
- bool isRoot = !enginePriv->inBeginCreate;
enginePriv->inBeginCreate = true;
QDeclarativeVME vme;
QObject *rv = vme.run(ctxt, component, start, count, bindings);
- if (vme.isError())
- state->errors = vme.errors();
+ if (vme.isError()) {
+ if(errors) *errors = vme.errors();
+ else state->errors = vme.errors();
+ }
if (isRoot) {
enginePriv->inBeginCreate = false;
@@ -795,6 +828,12 @@ QObject * QDeclarativeComponentPrivate::begin(QDeclarativeContextData *ctxt, QDe
enginePriv->inProgressCreations++;
}
+ if (enginePriv->isDebugging && rv) {
+ if (!parentContext->isInternal)
+ parentContext->asQDeclarativeContextPrivate()->instances.append(rv);
+ QDeclarativeEngineDebugServer::instance()->objectCreated(parentContext->engine, rv);
+ }
+
return rv;
}
diff --git a/src/declarative/qml/qdeclarativecomponent_p.h b/src/declarative/qml/qdeclarativecomponent_p.h
index a551cc8..7b30bad 100644
--- a/src/declarative/qml/qdeclarativecomponent_p.h
+++ b/src/declarative/qml/qdeclarativecomponent_p.h
@@ -109,9 +109,10 @@ public:
};
ConstructionState state;
- static QObject *begin(QDeclarativeContextData *ctxt, QDeclarativeEnginePrivate *enginePriv,
- QDeclarativeCompiledData *component, int start, int count,
- ConstructionState *state, const QBitField &bindings = QBitField());
+ static QObject *begin(QDeclarativeContextData *parentContext, QDeclarativeContextData *componentCreationContext,
+ QDeclarativeCompiledData *component, int start, int count,
+ ConstructionState *state, QList<QDeclarativeError> *errors,
+ const QBitField &bindings = QBitField());
static void beginDeferred(QDeclarativeEnginePrivate *enginePriv, QObject *object,
ConstructionState *state);
static void complete(QDeclarativeEnginePrivate *enginePriv, ConstructionState *state);
diff --git a/src/declarative/qml/qdeclarativecontext.cpp b/src/declarative/qml/qdeclarativecontext.cpp
index 59d5cfa..3ee0e6f 100644
--- a/src/declarative/qml/qdeclarativecontext.cpp
+++ b/src/declarative/qml/qdeclarativecontext.cpp
@@ -86,9 +86,14 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate()
QDeclarativeComponent component(&engine);
component.setData("import QtQuick 1.0\nListView { model: myModel }", QUrl());
- component.create(context);
+ QObject *window = component.create(context);
\endcode
+ Note it is the responsibility of the creator to delete any QDeclarativeContext it
+ constructs. If the \c context object in the example is no longer needed when the
+ \c window component instance is destroyed, the \c context must be destroyed explicitly.
+ The simplest way to ensure this is to set \c window as the parent of \c context.
+
To simplify binding and maintaining larger data sets, a context object can be set
on a QDeclarativeContext. All the properties of the context object are available
by name in the context, as though they were all individually added through calls
@@ -119,11 +124,13 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate()
All properties added explicitly by QDeclarativeContext::setContextProperty() take
precedence over the context object's properties.
- Contexts form a hierarchy. The root of this hierarchy is the QDeclarativeEngine's
- \l {QDeclarativeEngine::rootContext()}{root context}. A component instance can
- access the data in its own context, as well as all its ancestor contexts. Data
- can be made available to all instances by modifying the
- \l {QDeclarativeEngine::rootContext()}{root context}.
+ \section2 The Context Hierarchy
+
+ Contexts form a hierarchy. The root of this hierarchy is the QML engine's
+ \l {QDeclarativeEngine::rootContext()}{root context}. Child contexts inherit
+ the context properties of their parents; if a child context sets a context property
+ that already exists in its parent, the new context property overrides that of the
+ parent.
The following example defines two contexts - \c context1 and \c context2. The
second context overrides the "b" context property inherited from the first with a
@@ -144,7 +151,7 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate()
context, their bindings are. If a context is destroyed, the property bindings of
outstanding QML objects will stop evaluating.
- \note Setting the context object or adding new context properties after an object
+ \warning Setting the context object or adding new context properties after an object
has been created in that context is an expensive operation (essentially forcing all bindings
to reevaluate). Thus whenever possible you should complete "setup" of the context
before using it to create any objects.
@@ -467,7 +474,7 @@ int QDeclarativeContextPrivate::context_count(QDeclarativeListProperty<QObject>
{
QDeclarativeContext *context = static_cast<QDeclarativeContext*>(prop->object);
QDeclarativeContextPrivate *d = QDeclarativeContextPrivate::get(context);
- int contextProperty = (int)(intptr_t)prop->data;
+ int contextProperty = (int)(quintptr)prop->data;
if (d->propertyValues.at(contextProperty).userType() != qMetaTypeId<QList<QObject*> >()) {
return 0;
@@ -480,7 +487,7 @@ QObject *QDeclarativeContextPrivate::context_at(QDeclarativeListProperty<QObject
{
QDeclarativeContext *context = static_cast<QDeclarativeContext*>(prop->object);
QDeclarativeContextPrivate *d = QDeclarativeContextPrivate::get(context);
- int contextProperty = (int)(intptr_t)prop->data;
+ int contextProperty = (int)(quintptr)prop->data;
if (d->propertyValues.at(contextProperty).userType() != qMetaTypeId<QList<QObject*> >()) {
return 0;
diff --git a/src/declarative/qml/qdeclarativedata_p.h b/src/declarative/qml/qdeclarativedata_p.h
index e916273..def4188 100644
--- a/src/declarative/qml/qdeclarativedata_p.h
+++ b/src/declarative/qml/qdeclarativedata_p.h
@@ -64,6 +64,7 @@ class QDeclarativeAbstractBinding;
class QDeclarativeContext;
class QDeclarativePropertyCache;
class QDeclarativeContextData;
+class QDeclarativeNotifier;
// This class is structured in such a way, that simply zero'ing it is the
// default state for elemental object allocations. This is crucial in the
// workings of the QDeclarativeInstruction::CreateSimpleObject instruction.
@@ -75,20 +76,23 @@ public:
: ownMemory(true), ownContext(false), indestructible(true), explicitIndestructibleSet(false),
context(0), outerContext(0), bindings(0), nextContextObject(0), prevContextObject(0), bindingBitsSize(0),
bindingBits(0), lineNumber(0), columnNumber(0), deferredComponent(0), deferredIdx(0),
- attachedProperties(0), scriptValue(0), objectDataRefCount(0), propertyCache(0), guards(0) {
+ scriptValue(0), objectDataRefCount(0), propertyCache(0), guards(0), extendedData(0) {
init();
}
static inline void init() {
QAbstractDeclarativeData::destroyed = destroyed;
QAbstractDeclarativeData::parentChanged = parentChanged;
+ QAbstractDeclarativeData::objectNameChanged = objectNameChanged;
}
static void destroyed(QAbstractDeclarativeData *, QObject *);
static void parentChanged(QAbstractDeclarativeData *, QObject *, QObject *);
+ static void objectNameChanged(QAbstractDeclarativeData *, QObject *);
void destroyed(QObject *);
void parentChanged(QObject *, QObject *);
+ void objectNameChanged(QObject *);
void setImplicitDestructible() {
if (!explicitIndestructibleSet) indestructible = false;
@@ -123,8 +127,6 @@ public:
QDeclarativeCompiledData *deferredComponent; // Can't this be found from the context?
unsigned int deferredIdx;
- QHash<int, QObject *> *attachedProperties;
-
// ### Can we make this QScriptValuePrivate so we incur no additional allocation
// cost?
QScriptValue *scriptValue;
@@ -147,6 +149,18 @@ public:
return 0;
}
}
+
+ QDeclarativeNotifier *objectNameNotifier() const;
+ QHash<int, QObject *> *attachedProperties() const;
+
+ struct ExtendedData {
+ ExtendedData();
+ ~ExtendedData();
+
+ QHash<int, QObject *> attachedProperties;
+ void *objectNameNotifier;
+ };
+ mutable ExtendedData *extendedData;
};
template<class T>
diff --git a/src/declarative/qml/qdeclarativedom_p.h b/src/declarative/qml/qdeclarativedom_p.h
index 6043ead..ee3625c 100644
--- a/src/declarative/qml/qdeclarativedom_p.h
+++ b/src/declarative/qml/qdeclarativedom_p.h
@@ -58,6 +58,8 @@
#include <QtCore/qlist.h>
#include <QtCore/qshareddata.h>
+#include <private/qdeclarativeglobal_p.h>
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -76,7 +78,7 @@ class QIODevice;
class QDeclarativeDomDocumentPrivate;
-class Q_DECLARATIVE_EXPORT QDeclarativeDomDocument
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomDocument
{
public:
QDeclarativeDomDocument();
@@ -96,7 +98,7 @@ private:
};
class QDeclarativeDomPropertyPrivate;
-class Q_DECLARATIVE_EXPORT QDeclarativeDomProperty
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomProperty
{
public:
QDeclarativeDomProperty();
@@ -123,7 +125,7 @@ private:
};
class QDeclarativeDomDynamicPropertyPrivate;
-class Q_DECLARATIVE_EXPORT QDeclarativeDomDynamicProperty
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomDynamicProperty
{
public:
QDeclarativeDomDynamicProperty();
@@ -151,7 +153,7 @@ private:
};
class QDeclarativeDomObjectPrivate;
-class Q_DECLARATIVE_EXPORT QDeclarativeDomObject
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomObject
{
public:
QDeclarativeDomObject();
@@ -196,7 +198,7 @@ private:
class QDeclarativeDomValuePrivate;
class QDeclarativeDomBasicValuePrivate;
-class Q_DECLARATIVE_EXPORT QDeclarativeDomValueLiteral
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomValueLiteral
{
public:
QDeclarativeDomValueLiteral();
@@ -211,7 +213,7 @@ private:
QSharedDataPointer<QDeclarativeDomBasicValuePrivate> d;
};
-class Q_DECLARATIVE_EXPORT QDeclarativeDomValueBinding
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomValueBinding
{
public:
QDeclarativeDomValueBinding();
@@ -226,7 +228,7 @@ private:
QSharedDataPointer<QDeclarativeDomBasicValuePrivate> d;
};
-class Q_DECLARATIVE_EXPORT QDeclarativeDomValueValueSource
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomValueValueSource
{
public:
QDeclarativeDomValueValueSource();
@@ -241,7 +243,7 @@ private:
QSharedDataPointer<QDeclarativeDomBasicValuePrivate> d;
};
-class Q_DECLARATIVE_EXPORT QDeclarativeDomValueValueInterceptor
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomValueValueInterceptor
{
public:
QDeclarativeDomValueValueInterceptor();
@@ -257,7 +259,7 @@ private:
};
-class Q_DECLARATIVE_EXPORT QDeclarativeDomComponent : public QDeclarativeDomObject
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomComponent : public QDeclarativeDomObject
{
public:
QDeclarativeDomComponent();
@@ -268,7 +270,7 @@ public:
QDeclarativeDomObject componentRoot() const;
};
-class Q_DECLARATIVE_EXPORT QDeclarativeDomValue
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomValue
{
public:
enum Type {
@@ -312,7 +314,7 @@ private:
QSharedDataPointer<QDeclarativeDomValuePrivate> d;
};
-class Q_DECLARATIVE_EXPORT QDeclarativeDomList
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomList
{
public:
QDeclarativeDomList();
@@ -333,7 +335,7 @@ private:
};
class QDeclarativeDomImportPrivate;
-class Q_DECLARATIVE_EXPORT QDeclarativeDomImport
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomImport
{
public:
enum Type { Library, File };
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index 9ca7858..cd11336 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -68,6 +68,7 @@
#include "private/qdeclarativelist_p.h"
#include "private/qdeclarativetypenamecache_p.h"
#include "private/qdeclarativeinclude_p.h"
+#include "private/qdeclarativenotifier_p.h"
#include <QtCore/qmetaobject.h>
#include <QScriptClass>
@@ -104,6 +105,7 @@
#ifdef Q_OS_WIN // for %APPDATA%
#include <qt_windows.h>
#include <qlibrary.h>
+#include <windows.h>
#define CSIDL_APPDATA 0x001a // <username>\Application Data
#endif
@@ -174,6 +176,7 @@ struct StaticQtMetaObject : public QObject
};
static bool qt_QmlQtModule_registered = false;
+bool QDeclarativeEnginePrivate::qml_debugging_enabled = false;
void QDeclarativeEnginePrivate::defineModule()
{
@@ -468,6 +471,11 @@ void QDeclarativeData::parentChanged(QAbstractDeclarativeData *d, QObject *o, QO
static_cast<QDeclarativeData *>(d)->parentChanged(o, p);
}
+void QDeclarativeData::objectNameChanged(QAbstractDeclarativeData *d, QObject *o)
+{
+ static_cast<QDeclarativeData *>(d)->objectNameChanged(o);
+}
+
void QDeclarativeEnginePrivate::init()
{
Q_Q(QDeclarativeEngine);
@@ -601,7 +609,7 @@ QDeclarativeContext *QDeclarativeEngine::rootContext() const
QNetworkAccessManager with specialized caching, proxy and cookie
support.
- The factory must be set before exceuting the engine.
+ The factory must be set before executing the engine.
*/
void QDeclarativeEngine::setNetworkAccessManagerFactory(QDeclarativeNetworkAccessManagerFactory *factory)
{
@@ -871,7 +879,7 @@ void QDeclarativeEngine::setContextForObject(QObject *object, QDeclarativeContex
created by calling QDeclarativeCompnent::create() or
QDeclarativeComponent::beginCreate() which have CppOwnership by
default. The ownership of these root-level objects is considered to
- have been transfered to the C++ caller.
+ have been transferred to the C++ caller.
Objects not-created by QML have CppOwnership by default. The
exception to this is objects returned from a C++ method call. The
@@ -949,7 +957,7 @@ QObject *qmlAttachedPropertiesObjectById(int id, const QObject *object, bool cre
if (!data)
return 0; // Attached properties are only on objects created by QML
- QObject *rv = data->attachedProperties?data->attachedProperties->value(id):0;
+ QObject *rv = data->extendedData?data->attachedProperties()->value(id):0;
if (rv || !create)
return rv;
@@ -959,11 +967,8 @@ QObject *qmlAttachedPropertiesObjectById(int id, const QObject *object, bool cre
rv = pf(const_cast<QObject *>(object));
- if (rv) {
- if (!data->attachedProperties)
- data->attachedProperties = new QHash<int, QObject *>();
- data->attachedProperties->insert(id, rv);
- }
+ if (rv)
+ data->attachedProperties()->insert(id, rv);
return rv;
}
@@ -984,8 +989,6 @@ void QDeclarativeData::destroyed(QObject *object)
{
if (deferredComponent)
deferredComponent->release();
- if (attachedProperties)
- delete attachedProperties;
if (nextContextObject)
nextContextObject->prevContextObject = prevContextObject;
@@ -1019,6 +1022,9 @@ void QDeclarativeData::destroyed(QObject *object)
if (scriptValue)
delete scriptValue;
+ if (extendedData)
+ delete extendedData;
+
if (ownMemory)
delete this;
}
@@ -1028,6 +1034,11 @@ void QDeclarativeData::parentChanged(QObject *, QObject *parent)
if (!parent && scriptValue) { delete scriptValue; scriptValue = 0; }
}
+void QDeclarativeData::objectNameChanged(QObject *)
+{
+ if (extendedData) objectNameNotifier()->notify();
+}
+
bool QDeclarativeData::hasBindingBit(int bit) const
{
if (bindingBitsSize > bit)
@@ -1064,6 +1075,28 @@ void QDeclarativeData::setBindingBit(QObject *obj, int bit)
bindingBits[bit / 32] |= (1 << (bit % 32));
}
+QDeclarativeData::ExtendedData::ExtendedData()
+: objectNameNotifier(0)
+{
+}
+
+QDeclarativeData::ExtendedData::~ExtendedData()
+{
+ ((QDeclarativeNotifier *)&objectNameNotifier)->~QDeclarativeNotifier();
+}
+
+QDeclarativeNotifier *QDeclarativeData::objectNameNotifier() const
+{
+ if (!extendedData) extendedData = new ExtendedData;
+ return (QDeclarativeNotifier *)&extendedData->objectNameNotifier;
+}
+
+QHash<int, QObject *> *QDeclarativeData::attachedProperties() const
+{
+ if (!extendedData) extendedData = new ExtendedData;
+ return &extendedData->attachedProperties;
+}
+
/*!
Creates a QScriptValue allowing you to use \a object in QML script.
\a engine is the QDeclarativeEngine it is to be created in.
@@ -2159,4 +2192,42 @@ const QMetaObject *QDeclarativeEnginePrivate::metaObjectForType(int t) const
}
}
+bool QDeclarative_isFileCaseCorrect(const QString &fileName)
+{
+#if defined(Q_OS_MAC) || defined(Q_OS_WIN32)
+ QFileInfo info(fileName);
+
+ QString absolute = info.absoluteFilePath();
+
+#if defined(Q_OS_MAC)
+ QString canonical = info.canonicalFilePath();
+#elif defined(Q_OS_WIN32)
+ wchar_t buffer[1024];
+
+ DWORD rv = ::GetShortPathName((wchar_t*)absolute.utf16(), buffer, 1024);
+ if (rv == 0 || rv >= 1024) return true;
+ rv = ::GetLongPathName(buffer, buffer, 1024);
+ if (rv == 0 || rv >= 1024) return true;
+
+ QString canonical((QChar *)buffer);
+#endif
+
+ int absoluteLength = absolute.length();
+ int canonicalLength = canonical.length();
+
+ int length = qMin(absoluteLength, canonicalLength);
+ for (int ii = 0; ii < length; ++ii) {
+ const QChar &a = absolute.at(absoluteLength - 1 - ii);
+ const QChar &c = canonical.at(canonicalLength - 1 - ii);
+
+ if (a.toLower() != c.toLower())
+ return true;
+ if (a != c)
+ return false;
+ }
+#endif
+
+ return true;
+}
+
QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativeengine_p.h b/src/declarative/qml/qdeclarativeengine_p.h
index 8539fbf..deb4a77 100644
--- a/src/declarative/qml/qdeclarativeengine_p.h
+++ b/src/declarative/qml/qdeclarativeengine_p.h
@@ -321,6 +321,8 @@ public:
static QString urlToLocalFileOrQrc(const QUrl& url);
static void defineModule();
+
+ static bool qml_debugging_enabled;
};
/*!
diff --git a/src/declarative/qml/qdeclarativeenginedebug.cpp b/src/declarative/qml/qdeclarativeenginedebug.cpp
index ed28185..bffe681 100644
--- a/src/declarative/qml/qdeclarativeenginedebug.cpp
+++ b/src/declarative/qml/qdeclarativeenginedebug.cpp
@@ -502,7 +502,8 @@ void QDeclarativeEngineDebugServer::setBinding(int objectId,
property.write(expression);
} else if (hasValidSignal(object, propertyName)) {
QDeclarativeExpression *declarativeExpression = new QDeclarativeExpression(context, object, expression.toString());
- QDeclarativePropertyPrivate::setSignalExpression(property, declarativeExpression);
+ QDeclarativeExpression *oldExpression = QDeclarativePropertyPrivate::setSignalExpression(property, declarativeExpression);
+ declarativeExpression->setSourceLocation(oldExpression->sourceFile(), oldExpression->lineNumber());
} else if (property.isProperty()) {
QDeclarativeBinding *binding = new QDeclarativeBinding(expression.toString(), object, context);
binding->setTarget(property);
diff --git a/src/declarative/qml/qdeclarativeenginedebug_p.h b/src/declarative/qml/qdeclarativeenginedebug_p.h
index 613f1fe..97b8121 100644
--- a/src/declarative/qml/qdeclarativeenginedebug_p.h
+++ b/src/declarative/qml/qdeclarativeenginedebug_p.h
@@ -117,10 +117,10 @@ private:
QList<QDeclarativeEngine *> m_engines;
QDeclarativeWatcher *m_watch;
};
-Q_DECLARATIVE_EXPORT QDataStream &operator<<(QDataStream &, const QDeclarativeEngineDebugServer::QDeclarativeObjectData &);
-Q_DECLARATIVE_EXPORT QDataStream &operator>>(QDataStream &, QDeclarativeEngineDebugServer::QDeclarativeObjectData &);
-Q_DECLARATIVE_EXPORT QDataStream &operator<<(QDataStream &, const QDeclarativeEngineDebugServer::QDeclarativeObjectProperty &);
-Q_DECLARATIVE_EXPORT QDataStream &operator>>(QDataStream &, QDeclarativeEngineDebugServer::QDeclarativeObjectProperty &);
+Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator<<(QDataStream &, const QDeclarativeEngineDebugServer::QDeclarativeObjectData &);
+Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator>>(QDataStream &, QDeclarativeEngineDebugServer::QDeclarativeObjectData &);
+Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator<<(QDataStream &, const QDeclarativeEngineDebugServer::QDeclarativeObjectProperty &);
+Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator>>(QDataStream &, QDeclarativeEngineDebugServer::QDeclarativeObjectProperty &);
QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativefastproperties.cpp b/src/declarative/qml/qdeclarativefastproperties.cpp
index eb69b6a..78e3afd 100644
--- a/src/declarative/qml/qdeclarativefastproperties.cpp
+++ b/src/declarative/qml/qdeclarativefastproperties.cpp
@@ -51,10 +51,19 @@ QT_BEGIN_NAMESPACE
// primarily read from bindings is a candidate for inclusion as a fast
// property.
+static void QObject_objectName(QObject *object, void *output, QDeclarativeNotifierEndpoint *endpoint)
+{
+ if (endpoint)
+ endpoint->connect(QDeclarativeData::get(object, true)->objectNameNotifier());
+ *((QString *)output) = object->objectName();
+}
+
QDeclarativeFastProperties::QDeclarativeFastProperties()
{
add(&QDeclarativeItem::staticMetaObject, QDeclarativeItem::staticMetaObject.indexOfProperty("parent"),
QDeclarativeItemPrivate::parentProperty);
+ add(&QObject::staticMetaObject, QObject::staticMetaObject.indexOfProperty("objectName"),
+ QObject_objectName);
}
int QDeclarativeFastProperties::accessorIndexForProperty(const QMetaObject *metaObject, int propertyIndex)
diff --git a/src/declarative/qml/qdeclarativeglobal_p.h b/src/declarative/qml/qdeclarativeglobal_p.h
index 1041992..31fbb1e 100644
--- a/src/declarative/qml/qdeclarativeglobal_p.h
+++ b/src/declarative/qml/qdeclarativeglobal_p.h
@@ -64,6 +64,12 @@ QT_MODULE(Declarative)
return status == Yes; \
}
+#ifdef Q_OS_SYMBIAN
+#define Q_DECLARATIVE_PRIVATE_EXPORT
+#else
+#define Q_DECLARATIVE_PRIVATE_EXPORT Q_DECLARATIVE_EXPORT
+#endif
+
struct QDeclarativeGraphics_DerivedObject : public QObject
{
void setParent_noEvent(QObject *parent) {
@@ -75,6 +81,19 @@ struct QDeclarativeGraphics_DerivedObject : public QObject
};
/*!
+ Returns true if the case of \a fileName is equivalent to the file case of
+ \a fileName on disk, and false otherwise.
+
+ This is used to ensure that the behavior of QML on a case-insensitive file
+ system is the same as on a case-sensitive file system. This function
+ performs a "best effort" attempt to determine the real case of the file.
+ It may have false positives (say the case is correct when it isn't), but it
+ should never have a false negative (say the case is incorrect when it is
+ correct).
+*/
+bool QDeclarative_isFileCaseCorrect(const QString &fileName);
+
+/*!
Makes the \a object a child of \a parent. Note that when using this method,
neither \a parent nor the object's previous parent (if it had one) will
receive ChildRemoved or ChildAdded events.
diff --git a/src/declarative/qml/qdeclarativeimport.cpp b/src/declarative/qml/qdeclarativeimport.cpp
index fe4ed48..6f5216a 100644
--- a/src/declarative/qml/qdeclarativeimport.cpp
+++ b/src/declarative/qml/qdeclarativeimport.cpp
@@ -351,7 +351,11 @@ bool QDeclarativeImportsPrivate::importExtension(const QString &absoluteFilePath
{
QFile file(absoluteFilePath);
QString filecontent;
- if (file.open(QFile::ReadOnly)) {
+ if (!QDeclarative_isFileCaseCorrect(absoluteFilePath)) {
+ if (errorString)
+ *errorString = QDeclarativeImportDatabase::tr("cannot load module \"%1\": File name case mismatch for \"%2\"").arg(uri).arg(absoluteFilePath);
+ return false;
+ } else if (file.open(QFile::ReadOnly)) {
filecontent = QString::fromUtf8(file.readAll());
if (qmlImportTrace())
qDebug().nospace() << "QDeclarativeImports(" << qPrintable(base.toString()) << "::importExtension: "
@@ -913,6 +917,11 @@ bool QDeclarativeImportDatabase::importPlugin(const QString &filePath, const QSt
}
if (!engineInitialized || !typesRegistered) {
+ if (!QDeclarative_isFileCaseCorrect(absoluteFilePath)) {
+ if (errorString)
+ *errorString = tr("File name case mismatch for \"%2\"").arg(absoluteFilePath);
+ return false;
+ }
QPluginLoader loader(absoluteFilePath);
if (!loader.load()) {
diff --git a/src/declarative/qml/qdeclarativeinfo.cpp b/src/declarative/qml/qdeclarativeinfo.cpp
index c6560dd..56c0599 100644
--- a/src/declarative/qml/qdeclarativeinfo.cpp
+++ b/src/declarative/qml/qdeclarativeinfo.cpp
@@ -55,7 +55,8 @@ QT_BEGIN_NAMESPACE
\fn QDeclarativeInfo qmlInfo(const QObject *object)
\relates QDeclarativeEngine
- \brief Prints warnings messages that include the file and line number for QML types.
+ Prints warning messages that include the file and line number for the
+ specified QML \a object.
When QML types display warning messages, it improves traceability
if they include the QML file and line number on which the
diff --git a/src/declarative/qml/qdeclarativemetatype_p.h b/src/declarative/qml/qdeclarativemetatype_p.h
index 382abd2..9c486d3 100644
--- a/src/declarative/qml/qdeclarativemetatype_p.h
+++ b/src/declarative/qml/qdeclarativemetatype_p.h
@@ -58,6 +58,7 @@
#include <QtCore/qglobal.h>
#include <QtCore/qvariant.h>
#include <QtCore/qbitarray.h>
+#include <private/qdeclarativeglobal_p.h>
QT_BEGIN_NAMESPACE
@@ -65,7 +66,7 @@ class QDeclarativeType;
class QDeclarativeCustomParser;
class QDeclarativeTypePrivate;
-class Q_DECLARATIVE_EXPORT QDeclarativeMetaType
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeMetaType
{
public:
static bool copy(int type, void *data, const void *copy = 0);
@@ -105,7 +106,7 @@ public:
static QList<QDeclarativePrivate::AutoParentFunction> parentFunctions();
};
-class Q_DECLARATIVE_EXPORT QDeclarativeType
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeType
{
public:
QByteArray typeName() const;
diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
index ab6ff74..eff59df 100644
--- a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
+++ b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
@@ -239,8 +239,13 @@ QDeclarativeObjectScriptClass::property(QObject *obj, const Identifier &name)
}
} else {
if (enginePriv->captureProperties && !(lastData->flags & QDeclarativePropertyCache::Data::IsConstant)) {
- enginePriv->capturedProperties <<
- QDeclarativeEnginePrivate::CapturedProperty(obj, lastData->coreIndex, lastData->notifyIndex);
+ if (lastData->coreIndex == 0) {
+ enginePriv->capturedProperties <<
+ QDeclarativeEnginePrivate::CapturedProperty(QDeclarativeData::get(obj, true)->objectNameNotifier());
+ } else {
+ enginePriv->capturedProperties <<
+ QDeclarativeEnginePrivate::CapturedProperty(obj, lastData->coreIndex, lastData->notifyIndex);
+ }
}
if (QDeclarativeValueTypeFactory::isValueType((uint)lastData->propType)) {
@@ -416,7 +421,7 @@ QScriptValue QDeclarativeObjectScriptClass::tostring(QScriptContext *context, QS
ret += QString::fromUtf8(obj->metaObject()->className());
ret += QLatin1String("(0x");
- ret += QString::number((intptr_t)obj,16);
+ ret += QString::number((quintptr)obj,16);
if (!objectName.isEmpty()) {
ret += QLatin1String(", \"");
@@ -833,9 +838,19 @@ QDeclarativeObjectMethodScriptClass::Value QDeclarativeObjectMethodScriptClass::
{
MethodData *method = static_cast<MethodData *>(o);
- if (method->data.flags & QDeclarativePropertyCache::Data::HasArguments) {
+ if (method->data.relatedIndex == -1)
+ return callPrecise(method->object, method->data, ctxt);
+ else
+ return callOverloaded(method, ctxt);
+}
+
+QDeclarativeObjectMethodScriptClass::Value
+QDeclarativeObjectMethodScriptClass::callPrecise(QObject *object, const QDeclarativePropertyCache::Data &data,
+ QScriptContext *ctxt)
+{
+ if (data.flags & QDeclarativePropertyCache::Data::HasArguments) {
- QMetaMethod m = method->object->metaObject()->method(method->data.coreIndex);
+ QMetaMethod m = object->metaObject()->method(data.coreIndex);
QList<QByteArray> argTypeNames = m.parameterTypes();
QVarLengthArray<int, 9> argTypes(argTypeNames.count());
@@ -843,7 +858,7 @@ QDeclarativeObjectMethodScriptClass::Value QDeclarativeObjectMethodScriptClass::
for (int ii = 0; ii < argTypeNames.count(); ++ii) {
argTypes[ii] = QMetaType::type(argTypeNames.at(ii));
if (argTypes[ii] == QVariant::Invalid)
- argTypes[ii] = enumType(method->object->metaObject(), QString::fromLatin1(argTypeNames.at(ii)));
+ argTypes[ii] = enumType(object->metaObject(), QString::fromLatin1(argTypeNames.at(ii)));
if (argTypes[ii] == QVariant::Invalid)
return Value(ctxt, ctxt->throwError(QString::fromLatin1("Unknown method parameter type: %1").arg(QLatin1String(argTypeNames.at(ii)))));
}
@@ -851,39 +866,301 @@ QDeclarativeObjectMethodScriptClass::Value QDeclarativeObjectMethodScriptClass::
if (argTypes.count() > ctxt->argumentCount())
return Value(ctxt, ctxt->throwError(QLatin1String("Insufficient arguments")));
- QVarLengthArray<MetaCallArgument, 9> args(argTypes.count() + 1);
- args[0].initAsType(method->data.propType, engine);
+ return callMethod(object, data.coreIndex, data.propType, argTypes.count(), argTypes.data(), ctxt);
- for (int ii = 0; ii < argTypes.count(); ++ii)
+ } else {
+
+ return callMethod(object, data.coreIndex, data.propType, 0, 0, ctxt);
+
+ }
+}
+
+QDeclarativeObjectMethodScriptClass::Value
+QDeclarativeObjectMethodScriptClass::callMethod(QObject *object, int index,
+ int returnType, int argCount, int *argTypes,
+ QScriptContext *ctxt)
+{
+ if (argCount > 0) {
+
+ QVarLengthArray<MetaCallArgument, 9> args(argCount + 1);
+ args[0].initAsType(returnType, engine);
+
+ for (int ii = 0; ii < argCount; ++ii)
args[ii + 1].fromScriptValue(argTypes[ii], engine, ctxt->argument(ii));
QVarLengthArray<void *, 9> argData(args.count());
for (int ii = 0; ii < args.count(); ++ii)
argData[ii] = args[ii].dataPtr();
- QMetaObject::metacall(method->object, QMetaObject::InvokeMetaMethod, method->data.coreIndex, argData.data());
+ QMetaObject::metacall(object, QMetaObject::InvokeMetaMethod, index, argData.data());
return args[0].toValue(engine);
- } else if (method->data.propType != 0) {
-
+ } else if (returnType != 0) {
+
MetaCallArgument arg;
- arg.initAsType(method->data.propType, engine);
+ arg.initAsType(returnType, engine);
void *args[] = { arg.dataPtr() };
- QMetaObject::metacall(method->object, QMetaObject::InvokeMetaMethod, method->data.coreIndex, args);
+ QMetaObject::metacall(object, QMetaObject::InvokeMetaMethod, index, args);
return arg.toValue(engine);
} else {
void *args[] = { 0 };
- QMetaObject::metacall(method->object, QMetaObject::InvokeMetaMethod, method->data.coreIndex, args);
+ QMetaObject::metacall(object, QMetaObject::InvokeMetaMethod, index, args);
return Value();
}
- return Value();
+}
+
+/*!
+Resolve the overloaded method to call. The algorithm works conceptually like this:
+ 1. Resolve the set of overloads it is *possible* to call.
+ Impossible overloads include those that have too many parameters or have parameters
+ of unknown type.
+ 2. Filter the set of overloads to only contain those with the closest number of
+ parameters.
+ For example, if we are called with 3 parameters and there are 2 overloads that
+ take 2 parameters and one that takes 3, eliminate the 2 parameter overloads.
+ 3. Find the best remaining overload based on its match score.
+ If two or more overloads have the same match score, call the last one. The match
+ score is constructed by adding the matchScore() result for each of the parameters.
+*/
+QDeclarativeObjectMethodScriptClass::Value
+QDeclarativeObjectMethodScriptClass::callOverloaded(MethodData *method, QScriptContext *ctxt)
+{
+ int argumentCount = ctxt->argumentCount();
+
+ QDeclarativePropertyCache::Data *best = 0;
+ int bestParameterScore = INT_MAX;
+ int bestMatchScore = INT_MAX;
+
+ QDeclarativePropertyCache::Data dummy;
+ QDeclarativePropertyCache::Data *attempt = &method->data;
+
+ do {
+ QList<QByteArray> methodArgTypeNames;
+
+ if (attempt->flags & QDeclarativePropertyCache::Data::HasArguments)
+ methodArgTypeNames = method->object->metaObject()->method(attempt->coreIndex).parameterTypes();
+
+ int methodArgumentCount = methodArgTypeNames.count();
+
+ if (methodArgumentCount > argumentCount)
+ continue; // We don't have sufficient arguments to call this method
+
+ int methodParameterScore = argumentCount - methodArgumentCount;
+ if (methodParameterScore > bestParameterScore)
+ continue; // We already have a better option
+
+ int methodMatchScore = 0;
+ QVarLengthArray<int, 9> methodArgTypes(methodArgumentCount);
+
+ bool unknownArgument = false;
+ for (int ii = 0; ii < methodArgumentCount; ++ii) {
+ methodArgTypes[ii] = QMetaType::type(methodArgTypeNames.at(ii));
+ if (methodArgTypes[ii] == QVariant::Invalid)
+ methodArgTypes[ii] = enumType(method->object->metaObject(),
+ QString::fromLatin1(methodArgTypeNames.at(ii)));
+ if (methodArgTypes[ii] == QVariant::Invalid) {
+ unknownArgument = true;
+ break;
+ }
+ methodMatchScore += matchScore(ctxt->argument(ii), methodArgTypes[ii], methodArgTypeNames.at(ii));
+ }
+ if (unknownArgument)
+ continue; // We don't understand all the parameters
+
+ if (bestParameterScore > methodParameterScore || bestMatchScore > methodMatchScore) {
+ best = attempt;
+ bestParameterScore = methodParameterScore;
+ bestMatchScore = methodMatchScore;
+ }
+
+ if (bestParameterScore == 0 && bestMatchScore == 0)
+ break; // We can't get better than that
+
+ } while((attempt = relatedMethod(method->object, attempt, dummy)) != 0);
+
+ if (best) {
+ return callPrecise(method->object, *best, ctxt);
+ } else {
+ QString error = QLatin1String("Unable to determine callable overload. Candidates are:");
+ QDeclarativePropertyCache::Data *candidate = &method->data;
+ while (candidate) {
+ error += QLatin1String("\n ") + QString::fromUtf8(method->object->metaObject()->method(candidate->coreIndex).signature());
+ candidate = relatedMethod(method->object, candidate, dummy);
+ }
+ return Value(ctxt, ctxt->throwError(error));
+ }
+}
+
+/*!
+ Returns the match score for converting \a actual to be of type \a conversionType. A
+ zero score means "perfect match" whereas a higher score is worse.
+
+ The conversion table is copied out of the QtScript callQtMethod() function.
+*/
+int QDeclarativeObjectMethodScriptClass::matchScore(const QScriptValue &actual, int conversionType,
+ const QByteArray &conversionTypeName)
+{
+ if (actual.isNumber()) {
+ switch (conversionType) {
+ case QMetaType::Double:
+ return 0;
+ case QMetaType::Float:
+ return 1;
+ case QMetaType::LongLong:
+ case QMetaType::ULongLong:
+ return 2;
+ case QMetaType::Long:
+ case QMetaType::ULong:
+ return 3;
+ case QMetaType::Int:
+ case QMetaType::UInt:
+ return 4;
+ case QMetaType::Short:
+ case QMetaType::UShort:
+ return 5;
+ break;
+ case QMetaType::Char:
+ case QMetaType::UChar:
+ return 6;
+ default:
+ return 10;
+ }
+ } else if (actual.isString()) {
+ switch (conversionType) {
+ case QMetaType::QString:
+ return 0;
+ default:
+ return 10;
+ }
+ } else if (actual.isBoolean()) {
+ switch (conversionType) {
+ case QMetaType::Bool:
+ return 0;
+ default:
+ return 10;
+ }
+ } else if (actual.isDate()) {
+ switch (conversionType) {
+ case QMetaType::QDateTime:
+ return 0;
+ case QMetaType::QDate:
+ return 1;
+ case QMetaType::QTime:
+ return 2;
+ default:
+ return 10;
+ }
+ } else if (actual.isRegExp()) {
+ switch (conversionType) {
+ case QMetaType::QRegExp:
+ return 0;
+ default:
+ return 10;
+ }
+ } else if (actual.isVariant()) {
+ if (conversionType == qMetaTypeId<QVariant>())
+ return 0;
+ else if (actual.toVariant().userType() == conversionType)
+ return 0;
+ else
+ return 10;
+ } else if (actual.isArray()) {
+ switch (conversionType) {
+ case QMetaType::QStringList:
+ case QMetaType::QVariantList:
+ return 5;
+ default:
+ return 10;
+ }
+ } else if (actual.isQObject()) {
+ switch (conversionType) {
+ case QMetaType::QObjectStar:
+ return 0;
+ default:
+ return 10;
+ }
+ } else if (actual.isNull()) {
+ switch (conversionType) {
+ case QMetaType::VoidStar:
+ case QMetaType::QObjectStar:
+ return 0;
+ default:
+ if (!conversionTypeName.endsWith('*'))
+ return 10;
+ else
+ return 0;
+ }
+ } else {
+ return 10;
+ }
+}
+
+static inline int QMetaObject_methods(const QMetaObject *metaObject)
+{
+ struct Private
+ {
+ int revision;
+ int className;
+ int classInfoCount, classInfoData;
+ int methodCount, methodData;
+ };
+
+ return reinterpret_cast<const Private *>(metaObject->d.data)->methodCount;
+}
+
+static QByteArray QMetaMethod_name(const QMetaMethod &m)
+{
+ QByteArray sig = m.signature();
+ int paren = sig.indexOf('(');
+ if (paren == -1)
+ return sig;
+ else
+ return sig.left(paren);
+}
+
+/*!
+Returns the next related method, if one, or 0.
+*/
+QDeclarativePropertyCache::Data *
+QDeclarativeObjectMethodScriptClass::relatedMethod(QObject *object, QDeclarativePropertyCache::Data *current,
+ QDeclarativePropertyCache::Data &dummy)
+{
+ QDeclarativePropertyCache *cache = QDeclarativeData::get(object)->propertyCache;
+ if (current->relatedIndex == -1)
+ return 0;
+
+ if (cache) {
+ return cache->method(current->relatedIndex);
+ } else {
+ const QMetaObject *mo = object->metaObject();
+ int methodOffset = mo->methodCount() - QMetaObject_methods(mo);
+
+ while (methodOffset > current->relatedIndex) {
+ mo = mo->superClass();
+ methodOffset -= QMetaObject_methods(mo);
+ }
+
+ QMetaMethod method = mo->method(current->relatedIndex);
+ dummy.load(method);
+
+ // Look for overloaded methods
+ QByteArray methodName = QMetaMethod_name(method);
+ for (int ii = current->relatedIndex - 1; ii >= methodOffset; --ii) {
+ if (methodName == QMetaMethod_name(mo->method(ii))) {
+ dummy.relatedIndex = ii;
+ return &dummy;
+ }
+ }
+
+ return &dummy;
+ }
}
QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass_p.h b/src/declarative/qml/qdeclarativeobjectscriptclass_p.h
index 75e384c..7956c40 100644
--- a/src/declarative/qml/qdeclarativeobjectscriptclass_p.h
+++ b/src/declarative/qml/qdeclarativeobjectscriptclass_p.h
@@ -65,6 +65,7 @@ class QDeclarativeEngine;
class QScriptContext;
class QScriptEngine;
class QDeclarativeContextData;
+class MethodData;
class Q_AUTOTEST_EXPORT QDeclarativeObjectMethodScriptClass : public QScriptDeclarativeClass
{
@@ -82,6 +83,14 @@ protected:
private:
int enumType(const QMetaObject *, const QString &);
+ Value callPrecise(QObject *, const QDeclarativePropertyCache::Data &, QScriptContext *);
+ Value callOverloaded(MethodData *, QScriptContext *);
+ Value callMethod(QObject *, int index, int returnType, int argCount, int *argTypes, QScriptContext *ctxt);
+
+ int matchScore(const QScriptValue &, int, const QByteArray &);
+ QDeclarativePropertyCache::Data *relatedMethod(QObject *, QDeclarativePropertyCache::Data *current,
+ QDeclarativePropertyCache::Data &dummy);
+
PersistentIdentifier m_connectId;
PersistentIdentifier m_disconnectId;
QScriptValue m_connect;
diff --git a/src/declarative/qml/qdeclarativeparser_p.h b/src/declarative/qml/qdeclarativeparser_p.h
index c58aebc..77184c2 100644
--- a/src/declarative/qml/qdeclarativeparser_p.h
+++ b/src/declarative/qml/qdeclarativeparser_p.h
@@ -54,7 +54,6 @@
//
#include "qdeclarative.h"
-#include "private/qdeclarativerefcount_p.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qlist.h>
@@ -63,6 +62,8 @@
#include <QtCore/qstringlist.h>
#include <private/qobject_p.h>
+#include <private/qdeclarativerefcount_p.h>
+#include <private/qdeclarativeglobal_p.h>
QT_BEGIN_HEADER
@@ -355,7 +356,7 @@ namespace QDeclarativeParser
// True if the setting of this property will be deferred. Set by the
// QDeclarativeCompiler
bool isDeferred;
- // True if this property is a value-type psuedo-property
+ // True if this property is a value-type pseudo-property
bool isValueTypeSubProperty;
LocationSpan location;
diff --git a/src/declarative/qml/qdeclarativeprivate.h b/src/declarative/qml/qdeclarativeprivate.h
index d45ddbc..388c92e 100644
--- a/src/declarative/qml/qdeclarativeprivate.h
+++ b/src/declarative/qml/qdeclarativeprivate.h
@@ -55,9 +55,6 @@
#include <QtCore/qglobal.h>
#include <QtCore/qvariant.h>
-#ifndef Q_OS_WIN
-#include <stdint.h>
-#endif
QT_BEGIN_HEADER
@@ -105,7 +102,7 @@ namespace QDeclarativePrivate
template<class From, class To>
struct StaticCastSelectorClass<From, To, sizeof(int)>
{
- static inline int cast() { return int(reinterpret_cast<intptr_t>(static_cast<To *>(reinterpret_cast<From *>(0x10000000)))) - 0x10000000; }
+ static inline int cast() { return int(reinterpret_cast<quintptr>(static_cast<To *>(reinterpret_cast<From *>(0x10000000)))) - 0x10000000; }
};
template<class From, class To>
diff --git a/src/declarative/qml/qdeclarativeproperty.cpp b/src/declarative/qml/qdeclarativeproperty.cpp
index b5fb619..1395e97 100644
--- a/src/declarative/qml/qdeclarativeproperty.cpp
+++ b/src/declarative/qml/qdeclarativeproperty.cpp
@@ -1408,8 +1408,8 @@ static inline void flush_vme_signal(const QObject *object, int index)
int methodOffset = metaObject->methodOffset();
while (methodOffset > index) {
- methodOffset -= QMetaObject_methods(metaObject);
metaObject = metaObject->d.superdata;
+ methodOffset -= QMetaObject_methods(metaObject);
}
QDeclarativeVMEMetaObject *vme =
diff --git a/src/declarative/qml/qdeclarativeproperty_p.h b/src/declarative/qml/qdeclarativeproperty_p.h
index a8438c8..a9d6979 100644
--- a/src/declarative/qml/qdeclarativeproperty_p.h
+++ b/src/declarative/qml/qdeclarativeproperty_p.h
@@ -55,17 +55,17 @@
#include "qdeclarativeproperty.h"
-#include "private/qdeclarativepropertycache_p.h"
-#include "private/qdeclarativeguard_p.h"
-
#include <private/qobject_p.h>
+#include <private/qdeclarativeglobal_p.h>
+#include <private/qdeclarativepropertycache_p.h>
+#include <private/qdeclarativeguard_p.h>
QT_BEGIN_NAMESPACE
class QDeclarativeContext;
class QDeclarativeEnginePrivate;
class QDeclarativeExpression;
-class Q_DECLARATIVE_EXPORT QDeclarativePropertyPrivate
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativePropertyPrivate
{
public:
enum WriteFlag { BypassInterceptor = 0x01, DontRemoveBinding = 0x02 };
diff --git a/src/declarative/qml/qdeclarativepropertycache.cpp b/src/declarative/qml/qdeclarativepropertycache.cpp
index 9e1ceb8..0adcdbd 100644
--- a/src/declarative/qml/qdeclarativepropertycache.cpp
+++ b/src/declarative/qml/qdeclarativepropertycache.cpp
@@ -93,6 +93,7 @@ void QDeclarativePropertyCache::Data::load(const QMetaProperty &p, QDeclarativeE
void QDeclarativePropertyCache::Data::load(const QMetaMethod &m)
{
coreIndex = m.methodIndex();
+ relatedIndex = -1;
flags |= Data::IsFunction;
if (m.methodType() == QMetaMethod::Signal)
flags |= Data::IsSignal;
@@ -140,15 +141,25 @@ void QDeclarativePropertyCache::clear()
if (indexCache.at(ii)) indexCache.at(ii)->release();
}
+ for (int ii = 0; ii < methodIndexCache.count(); ++ii) {
+ RData *data = methodIndexCache.at(ii);
+ if (data) data->release();
+ }
+
for (StringCache::ConstIterator iter = stringCache.begin();
- iter != stringCache.end(); ++iter)
- (*iter)->release();
+ iter != stringCache.end(); ++iter) {
+ RData *data = (*iter);
+ data->release();
+ }
for (IdentifierCache::ConstIterator iter = identifierCache.begin();
- iter != identifierCache.end(); ++iter)
- (*iter)->release();
+ iter != identifierCache.end(); ++iter) {
+ RData *data = (*iter);
+ data->release();
+ }
indexCache.clear();
+ methodIndexCache.clear();
stringCache.clear();
identifierCache.clear();
}
@@ -202,12 +213,16 @@ QDeclarativePropertyCache *QDeclarativePropertyCache::copy() const
{
QDeclarativePropertyCache *cache = new QDeclarativePropertyCache(engine);
cache->indexCache = indexCache;
+ cache->methodIndexCache = methodIndexCache;
cache->stringCache = stringCache;
cache->identifierCache = identifierCache;
for (int ii = 0; ii < indexCache.count(); ++ii) {
if (indexCache.at(ii)) indexCache.at(ii)->addref();
}
+ for (int ii = 0; ii < methodIndexCache.count(); ++ii) {
+ if (methodIndexCache.at(ii)) methodIndexCache.at(ii)->addref();
+ }
for (StringCache::ConstIterator iter = stringCache.begin(); iter != stringCache.end(); ++iter)
(*iter)->addref();
for (IdentifierCache::ConstIterator iter = identifierCache.begin(); iter != identifierCache.end(); ++iter)
@@ -221,43 +236,14 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb
{
QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(engine);
- int propCount = metaObject->propertyCount();
- int propOffset = metaObject->propertyOffset();
-
- indexCache.resize(propCount);
- for (int ii = propOffset; ii < propCount; ++ii) {
- QMetaProperty p = metaObject->property(ii);
- if (!p.isScriptable())
- continue;
-
- QString propName = QString::fromUtf8(p.name());
-
- RData *data = new RData;
- data->identifier = enginePriv->objectClass->createPersistentIdentifier(propName);
-
- data->load(p, engine);
- data->flags |= propertyFlags;
-
- indexCache[ii] = data;
-
- if (stringCache.contains(propName)) {
- stringCache[propName]->release();
- identifierCache[data->identifier.identifier]->release();
- }
-
- stringCache.insert(propName, data);
- identifierCache.insert(data->identifier.identifier, data);
- data->addref();
- data->addref();
- }
-
int methodCount = metaObject->methodCount();
- int methodOffset = qMax(2, metaObject->methodOffset()); // 2 to block the destroyed signal
+ // 3 to block the destroyed signal and the deleteLater() slot
+ int methodOffset = qMax(3, metaObject->methodOffset());
methodIndexCache.resize(methodCount);
for (int ii = methodOffset; ii < methodCount; ++ii) {
QMetaMethod m = metaObject->method(ii);
- if (m.access() == QMetaMethod::Private)
+ if (m.access() == QMetaMethod::Private)
continue;
QString methodName = QString::fromUtf8(m.signature());
@@ -267,11 +253,7 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb
RData *data = new RData;
data->identifier = enginePriv->objectClass->createPersistentIdentifier(methodName);
-
- if (stringCache.contains(methodName)) {
- stringCache[methodName]->release();
- identifierCache[data->identifier.identifier]->release();
- }
+ methodIndexCache[ii] = data;
data->load(m);
if (m.methodType() == QMetaMethod::Slot || m.methodType() == QMetaMethod::Method)
@@ -279,73 +261,74 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb
else if (m.methodType() == QMetaMethod::Signal)
data->flags |= signalFlags;
- methodIndexCache[ii] = data;
+ if (stringCache.contains(methodName)) {
+ RData *old = stringCache[methodName];
+ // We only overload methods in the same class, exactly like C++
+ if (old->flags & Data::IsFunction && old->coreIndex >= methodOffset)
+ data->relatedIndex = old->coreIndex;
+ stringCache[methodName]->release();
+ identifierCache[data->identifier.identifier]->release();
+ }
stringCache.insert(methodName, data);
identifierCache.insert(data->identifier.identifier, data);
data->addref();
+ data->addref();
}
-}
-void QDeclarativePropertyCache::update(QDeclarativeEngine *engine, const QMetaObject *metaObject)
-{
- Q_ASSERT(engine);
- Q_ASSERT(metaObject);
- QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(engine);
-
- clear();
-
- // ### The properties/methods should probably be spliced on a per-metaobject basis
int propCount = metaObject->propertyCount();
+ int propOffset = metaObject->propertyOffset();
indexCache.resize(propCount);
- for (int ii = propCount - 1; ii >= 0; --ii) {
+ for (int ii = propOffset; ii < propCount; ++ii) {
QMetaProperty p = metaObject->property(ii);
- if (!p.isScriptable()) {
- indexCache[ii] = 0;
+ if (!p.isScriptable())
continue;
- }
+
QString propName = QString::fromUtf8(p.name());
RData *data = new RData;
data->identifier = enginePriv->objectClass->createPersistentIdentifier(propName);
+ indexCache[ii] = data;
data->load(p, engine);
+ data->flags |= propertyFlags;
- indexCache[ii] = data;
-
- if (stringCache.contains(propName))
- continue;
+ if (stringCache.contains(propName)) {
+ stringCache[propName]->release();
+ identifierCache[data->identifier.identifier]->release();
+ }
stringCache.insert(propName, data);
identifierCache.insert(data->identifier.identifier, data);
data->addref();
data->addref();
}
+}
- int methodCount = metaObject->methodCount();
- for (int ii = methodCount - 1; ii >= 3; --ii) { // >=3 to block the destroyed signal and deleteLater() slot
- QMetaMethod m = metaObject->method(ii);
- if (m.access() == QMetaMethod::Private)
- continue;
- QString methodName = QString::fromUtf8(m.signature());
+void QDeclarativePropertyCache::updateRecur(QDeclarativeEngine *engine, const QMetaObject *metaObject)
+{
+ if (!metaObject)
+ return;
- int parenIdx = methodName.indexOf(QLatin1Char('('));
- Q_ASSERT(parenIdx != -1);
- methodName = methodName.left(parenIdx);
+ updateRecur(engine, metaObject->superClass());
- if (stringCache.contains(methodName))
- continue;
+ append(engine, metaObject);
+}
- RData *data = new RData;
- data->identifier = enginePriv->objectClass->createPersistentIdentifier(methodName);
+void QDeclarativePropertyCache::update(QDeclarativeEngine *engine, const QMetaObject *metaObject)
+{
+ Q_ASSERT(engine);
+ Q_ASSERT(metaObject);
+ QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(engine);
- data->load(m);
+ clear();
- stringCache.insert(methodName, data);
- identifierCache.insert(data->identifier.identifier, data);
- data->addref();
- }
+ // Optimization to prevent unnecessary reallocation of lists
+ indexCache.reserve(metaObject->propertyCount());
+ methodIndexCache.reserve(metaObject->methodCount());
+
+ updateRecur(engine,metaObject);
}
QDeclarativePropertyCache::Data *
diff --git a/src/declarative/qml/qdeclarativepropertycache_p.h b/src/declarative/qml/qdeclarativepropertycache_p.h
index 79b126d..922010d 100644
--- a/src/declarative/qml/qdeclarativepropertycache_p.h
+++ b/src/declarative/qml/qdeclarativepropertycache_p.h
@@ -96,7 +96,7 @@ public:
IsVMEFunction = 0x00000400,
HasArguments = 0x00000800,
IsSignal = 0x00001000,
- IsVMESignal = 0x00002000,
+ IsVMESignal = 0x00002000
};
Q_DECLARE_FLAGS(Flags, Flag)
@@ -105,7 +105,10 @@ public:
Flags flags;
int propType;
int coreIndex;
- int notifyIndex;
+ union {
+ int notifyIndex; // When !IsFunction
+ int relatedIndex; // When IsFunction
+ };
static Flags flagsForProperty(const QMetaProperty &, QDeclarativeEngine *engine = 0);
void load(const QMetaProperty &, QDeclarativeEngine *engine = 0);
@@ -152,6 +155,8 @@ private:
typedef QHash<QString, RData *> StringCache;
typedef QHash<QScriptDeclarativeClass::Identifier, RData *> IdentifierCache;
+ void updateRecur(QDeclarativeEngine *, const QMetaObject *);
+
QDeclarativeEngine *engine;
IndexCache indexCache;
IndexCache methodIndexCache;
diff --git a/src/declarative/qml/qdeclarativestringconverters_p.h b/src/declarative/qml/qdeclarativestringconverters_p.h
index e6b0abe..b632222 100644
--- a/src/declarative/qml/qdeclarativestringconverters_p.h
+++ b/src/declarative/qml/qdeclarativestringconverters_p.h
@@ -56,6 +56,8 @@
#include <QtCore/qglobal.h>
#include <QtCore/qvariant.h>
+#include <private/qdeclarativeglobal_p.h>
+
QT_BEGIN_NAMESPACE
class QColor;
@@ -69,19 +71,19 @@ class QVector3D;
// XXX - Bauhaus currently uses these methods which is why they're exported
namespace QDeclarativeStringConverters
{
- QVariant Q_DECLARATIVE_EXPORT variantFromString(const QString &);
- QVariant Q_DECLARATIVE_EXPORT variantFromString(const QString &, int preferredType, bool *ok = 0);
+ QVariant Q_DECLARATIVE_PRIVATE_EXPORT variantFromString(const QString &);
+ QVariant Q_DECLARATIVE_PRIVATE_EXPORT variantFromString(const QString &, int preferredType, bool *ok = 0);
- QColor Q_DECLARATIVE_EXPORT colorFromString(const QString &, bool *ok = 0);
+ QColor Q_DECLARATIVE_PRIVATE_EXPORT colorFromString(const QString &, bool *ok = 0);
#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);
+ QDate Q_DECLARATIVE_PRIVATE_EXPORT dateFromString(const QString &, bool *ok = 0);
+ QTime Q_DECLARATIVE_PRIVATE_EXPORT timeFromString(const QString &, bool *ok = 0);
+ QDateTime Q_DECLARATIVE_PRIVATE_EXPORT dateTimeFromString(const QString &, bool *ok = 0);
#endif
- QPointF Q_DECLARATIVE_EXPORT pointFFromString(const QString &, bool *ok = 0);
- QSizeF Q_DECLARATIVE_EXPORT sizeFFromString(const QString &, bool *ok = 0);
- QRectF Q_DECLARATIVE_EXPORT rectFFromString(const QString &, bool *ok = 0);
- QVector3D Q_DECLARATIVE_EXPORT vector3DFromString(const QString &, bool *ok = 0);
+ QPointF Q_DECLARATIVE_PRIVATE_EXPORT pointFFromString(const QString &, bool *ok = 0);
+ QSizeF Q_DECLARATIVE_PRIVATE_EXPORT sizeFFromString(const QString &, bool *ok = 0);
+ QRectF Q_DECLARATIVE_PRIVATE_EXPORT rectFFromString(const QString &, bool *ok = 0);
+ QVector3D Q_DECLARATIVE_PRIVATE_EXPORT vector3DFromString(const QString &, bool *ok = 0);
}
QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativetypeloader.cpp b/src/declarative/qml/qdeclarativetypeloader.cpp
index 061f309..c015519 100644
--- a/src/declarative/qml/qdeclarativetypeloader.cpp
+++ b/src/declarative/qml/qdeclarativetypeloader.cpp
@@ -44,6 +44,7 @@
#include <private/qdeclarativeengine_p.h>
#include <private/qdeclarativecompiler_p.h>
#include <private/qdeclarativecomponent_p.h>
+#include <private/qdeclarativeglobal_p.h>
#include <QtDeclarative/qdeclarativecomponent.h>
#include <QtCore/qdebug.h>
@@ -493,6 +494,13 @@ void QDeclarativeDataLoader::load(QDeclarativeDataBlob *blob)
QString lf = QDeclarativeEnginePrivate::urlToLocalFileOrQrc(blob->m_url);
if (!lf.isEmpty()) {
+ if (!QDeclarative_isFileCaseCorrect(lf)) {
+ QDeclarativeError error;
+ error.setUrl(blob->m_url);
+ error.setDescription(QLatin1String("File name case mismatch"));
+ blob->setError(error);
+ return;
+ }
QFile file(lf);
if (file.open(QFile::ReadOnly)) {
QByteArray data = file.readAll();
@@ -711,7 +719,7 @@ void QDeclarativeTypeLoader::clearCache()
QDeclarativeTypeData::QDeclarativeTypeData(const QUrl &url, QDeclarativeTypeLoader::Options options,
QDeclarativeTypeLoader *manager)
: QDeclarativeDataBlob(url, QmlFile), m_options(options), m_typesResolved(false),
- m_compiledData(0), m_component(0), m_typeLoader(manager)
+ m_compiledData(0), m_typeLoader(manager)
{
}
@@ -760,23 +768,6 @@ QDeclarativeCompiledData *QDeclarativeTypeData::compiledData() const
return m_compiledData;
}
-QDeclarativeComponent *QDeclarativeTypeData::component() const
-{
- if (!m_component) {
-
- if (m_compiledData) {
- m_component = new QDeclarativeComponent(typeLoader()->engine(), m_compiledData, -1, -1, 0);
- } else {
- m_component = new QDeclarativeComponent(typeLoader()->engine());
- QDeclarativeComponentPrivate::get(m_component)->url = finalUrl();
- QDeclarativeComponentPrivate::get(m_component)->state.errors = errors();
- }
-
- }
-
- return m_component;
-}
-
void QDeclarativeTypeData::registerCallback(TypeDataCallback *callback)
{
Q_ASSERT(!m_callbacks.contains(callback));
diff --git a/src/declarative/qml/qdeclarativetypeloader_p.h b/src/declarative/qml/qdeclarativetypeloader_p.h
index 7381f28..718537a 100644
--- a/src/declarative/qml/qdeclarativetypeloader_p.h
+++ b/src/declarative/qml/qdeclarativetypeloader_p.h
@@ -243,7 +243,6 @@ public:
const QList<ScriptReference> &resolvedScripts() const;
QDeclarativeCompiledData *compiledData() const;
- QDeclarativeComponent *component() const;
// Used by QDeclarativeComponent to get notifications
struct TypeDataCallback {
@@ -278,7 +277,6 @@ private:
bool m_typesResolved:1;
QDeclarativeCompiledData *m_compiledData;
- mutable QDeclarativeComponent *m_component;
QList<TypeDataCallback *> m_callbacks;
diff --git a/src/declarative/qml/qdeclarativevaluetype_p.h b/src/declarative/qml/qdeclarativevaluetype_p.h
index 4b1bbd6..06c8669 100644
--- a/src/declarative/qml/qdeclarativevaluetype_p.h
+++ b/src/declarative/qml/qdeclarativevaluetype_p.h
@@ -70,7 +70,7 @@
QT_BEGIN_NAMESPACE
-class Q_DECLARATIVE_EXPORT QDeclarativeValueType : public QObject
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeValueType : public QObject
{
Q_OBJECT
public:
@@ -81,7 +81,7 @@ public:
virtual void setValue(QVariant) = 0;
};
-class Q_DECLARATIVE_EXPORT QDeclarativeValueTypeFactory
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeValueTypeFactory
{
public:
QDeclarativeValueTypeFactory();
diff --git a/src/declarative/qml/qdeclarativevme.cpp b/src/declarative/qml/qdeclarativevme.cpp
index 360186c..db90aff 100644
--- a/src/declarative/qml/qdeclarativevme.cpp
+++ b/src/declarative/qml/qdeclarativevme.cpp
@@ -185,12 +185,9 @@ QObject *QDeclarativeVME::run(QDeclarativeVMEStack<QObject *> &stack,
bindings = bindings.united(bindingSkipList);
QObject *o =
- types.at(instr.create.type).createInstance(ctxt, bindings);
+ types.at(instr.create.type).createInstance(ctxt, bindings, &vmeErrors);
if (!o) {
- if(types.at(instr.create.type).component)
- vmeErrors << types.at(instr.create.type).component->errors();
-
VME_EXCEPTION(QCoreApplication::translate("QDeclarativeVME","Unable to create object of type %1").arg(QString::fromLatin1(types.at(instr.create.type).className)));
}
@@ -933,8 +930,9 @@ QList<QDeclarativeError> QDeclarativeVME::errors() const
}
QObject *
-QDeclarativeCompiledData::TypeReference::createInstance(QDeclarativeContextData *ctxt,
- const QBitField &bindings) const
+QDeclarativeCompiledData::TypeReference::createInstance(QDeclarativeContextData *ctxt,
+ const QBitField &bindings,
+ QList<QDeclarativeError> *errors) const
{
if (type) {
QObject *rv = 0;
@@ -948,7 +946,7 @@ QDeclarativeCompiledData::TypeReference::createInstance(QDeclarativeContextData
return rv;
} else {
Q_ASSERT(component);
- return QDeclarativeComponentPrivate::get(component)->create(ctxt, bindings);
+ return QDeclarativeComponentPrivate::begin(ctxt, 0, component, -1, -1, 0, errors, bindings);
}
}
diff --git a/src/declarative/qml/qdeclarativevmemetaobject.cpp b/src/declarative/qml/qdeclarativevmemetaobject.cpp
index 37f08fc..e28062b 100644
--- a/src/declarative/qml/qdeclarativevmemetaobject.cpp
+++ b/src/declarative/qml/qdeclarativevmemetaobject.cpp
@@ -459,7 +459,7 @@ int QDeclarativeVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a)
id -= propOffset;
if (id < metaData->propertyCount) {
- int t = (metaData->propertyData() + id)->propertyType;
+ int t = (metaData->propertyData() + id)->propertyType;
bool needActivate = false;
if (t == -1) {
@@ -586,11 +586,26 @@ int QDeclarativeVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a)
connectAlias(id);
- if (d->propertyIdx == -1) {
+ if (d->isObjectAlias()) {
*reinterpret_cast<QObject **>(a[0]) = target;
return -1;
+ } else if (d->isValueTypeAlias()) {
+ // Value type property
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(ctxt->engine);
+
+ QDeclarativeValueType *valueType = ep->valueTypes[d->valueType()];
+ Q_ASSERT(valueType);
+
+ valueType->read(target, d->propertyIndex());
+ int rv = QMetaObject::metacall(valueType, c, d->valueTypeIndex(), a);
+
+ if (c == QMetaObject::WriteProperty)
+ valueType->write(target, d->propertyIndex(), 0x00);
+
+ return rv;
+
} else {
- return QMetaObject::metacall(target, c, d->propertyIdx, a);
+ return QMetaObject::metacall(target, c, d->propertyIndex(), a);
}
}
@@ -823,8 +838,8 @@ void QDeclarativeVMEMetaObject::connectAlias(int aliasId)
int sigIdx = methodOffset + aliasId + metaData->propertyCount;
QMetaObject::connect(context, d->contextIdx + ctxtPriv->notifyIndex, object, sigIdx);
- if (d->propertyIdx != -1) {
- QMetaProperty prop = target->metaObject()->property(d->propertyIdx);
+ if (!d->isObjectAlias()) {
+ QMetaProperty prop = target->metaObject()->property(d->propertyIndex());
if (prop.hasNotifySignal())
QDeclarativePropertyPrivate::connect(target, prop.notifySignalIndex(), object, sigIdx);
}
diff --git a/src/declarative/qml/qdeclarativevmemetaobject_p.h b/src/declarative/qml/qdeclarativevmemetaobject_p.h
index 4ccaa73..5134763 100644
--- a/src/declarative/qml/qdeclarativevmemetaobject_p.h
+++ b/src/declarative/qml/qdeclarativevmemetaobject_p.h
@@ -84,6 +84,25 @@ struct QDeclarativeVMEMetaData
int contextIdx;
int propertyIdx;
int flags;
+
+ bool isObjectAlias() const {
+ return propertyIdx == -1;
+ }
+ bool isPropertyAlias() const {
+ return !isObjectAlias() && !(propertyIdx & 0xFF000000);
+ }
+ bool isValueTypeAlias() const {
+ return !isObjectAlias() && (propertyIdx & 0xFF000000);
+ }
+ int propertyIndex() const {
+ return propertyIdx & 0x0000FFFF;
+ }
+ int valueTypeIndex() const {
+ return (propertyIdx & 0x00FF0000) >> 16;
+ }
+ int valueType() const {
+ return ((unsigned int)propertyIdx) >> 24;
+ }
};
struct PropertyData {
diff --git a/src/declarative/qml/qdeclarativeworkerscript.cpp b/src/declarative/qml/qdeclarativeworkerscript.cpp
index 509ca6b..ae7a80d 100644
--- a/src/declarative/qml/qdeclarativeworkerscript.cpp
+++ b/src/declarative/qml/qdeclarativeworkerscript.cpp
@@ -514,7 +514,7 @@ void QDeclarativeWorkerScriptEngine::run()
/*!
\qmlclass WorkerScript QDeclarativeWorkerScript
- \ingroup qml-utility-elements
+ \ingroup qml-utility-elements
\brief The WorkerScript element enables the use of threads in QML.
Use WorkerScript to run operations in a new thread.
@@ -528,7 +528,7 @@ void QDeclarativeWorkerScriptEngine::run()
\snippet doc/src/snippets/declarative/workerscript.qml 0
- The above worker script specifies a javascript file, "script.js", that handles
+ The above worker script specifies a JavaScript file, "script.js", that handles
the operations to be performed in the new thread. Here is \c script.js:
\qml
@@ -543,6 +543,19 @@ void QDeclarativeWorkerScriptEngine::run()
\tt script.js. This in turn sends a reply message that is then received
by the \tt onMessage() handler of \tt myWorker.
+
+ \section3 Restrictions
+
+ Since the \c WorkerScript.onMessage() function is run in a separate thread, the
+ JavaScript file is evaluated in a context separate from the main QML engine. This means
+ that unlike an ordinary JavaScript file that is imported into QML, the \c script.js
+ in the above example cannot access the properties, methods or other attributes
+ of the QML item, nor can it access any context properties set on the QML object
+ through QDeclarativeContext.
+
+ Additionally, there are restrictions on the types of values that can be passed to and
+ from the worker script. See the sendMessage() documentation for details.
+
\sa {declarative/threading/workerscript}{WorkerScript example},
{declarative/threading/threadedlistmodel}{Threaded ListModel example}
*/
@@ -586,6 +599,19 @@ void QDeclarativeWorkerScript::setSource(const QUrl &source)
Sends the given \a message to a worker script handler in another
thread. The other worker script handler can receive this message
through the onMessage() handler.
+
+ The \c message object may only contain values of the following
+ types:
+
+ \list
+ \o boolean, number, string
+ \o JavaScript objects and arrays
+ \o ListModel objects (any other type of QObject* is not allowed)
+ \endlist
+
+ All objects and arrays are copied to the \c message. With the exception
+ of ListModel objects, any modifications by the other thread to an object
+ passed in \c message will not be reflected in the original object.
*/
void QDeclarativeWorkerScript::sendMessage(const QScriptValue &message)
{
diff --git a/src/declarative/qml/qmetaobjectbuilder.cpp b/src/declarative/qml/qmetaobjectbuilder.cpp
index 58f8811..dfe89f8 100644
--- a/src/declarative/qml/qmetaobjectbuilder.cpp
+++ b/src/declarative/qml/qmetaobjectbuilder.cpp
@@ -41,10 +41,6 @@
#include "private/qmetaobjectbuilder_p.h"
-#ifndef Q_OS_WIN
-#include <stdint.h>
-#endif
-
QT_BEGIN_NAMESPACE
/*!
@@ -1264,8 +1260,8 @@ static int buildMetaObject(QMetaObjectBuilderPrivate *d, char *buf,
char *str = reinterpret_cast<char *>(buf + size);
if (buf) {
if (relocatable) {
- meta->d.stringdata = reinterpret_cast<const char *>((intptr_t)size);
- meta->d.data = reinterpret_cast<uint *>((intptr_t)pmetaSize);
+ meta->d.stringdata = reinterpret_cast<const char *>((quintptr)size);
+ meta->d.data = reinterpret_cast<uint *>((quintptr)pmetaSize);
} else {
meta->d.stringdata = str;
meta->d.data = reinterpret_cast<uint *>(data);
@@ -1502,8 +1498,8 @@ void QMetaObjectBuilder::fromRelocatableData(QMetaObject *output,
const char *buf = data.constData();
const QMetaObject *dataMo = reinterpret_cast<const QMetaObject *>(buf);
- intptr_t stringdataOffset = (intptr_t)dataMo->d.stringdata;
- intptr_t dataOffset = (intptr_t)dataMo->d.data;
+ quintptr stringdataOffset = (quintptr)dataMo->d.stringdata;
+ quintptr dataOffset = (quintptr)dataMo->d.data;
output->d.superdata = superclass;
output->d.stringdata = buf + stringdataOffset;
diff --git a/src/declarative/qml/qmetaobjectbuilder_p.h b/src/declarative/qml/qmetaobjectbuilder_p.h
index dbaf9e6..a90ba63 100644
--- a/src/declarative/qml/qmetaobjectbuilder_p.h
+++ b/src/declarative/qml/qmetaobjectbuilder_p.h
@@ -58,6 +58,8 @@
#include <QtCore/qdatastream.h>
#include <QtCore/qmap.h>
+#include <private/qdeclarativeglobal_p.h>
+
QT_BEGIN_NAMESPACE
class QMetaObjectBuilderPrivate;
@@ -68,7 +70,7 @@ class QMetaPropertyBuilderPrivate;
class QMetaEnumBuilder;
class QMetaEnumBuilderPrivate;
-class Q_DECLARATIVE_EXPORT QMetaObjectBuilder
+class Q_DECLARATIVE_PRIVATE_EXPORT QMetaObjectBuilder
{
public:
enum AddMember
@@ -193,7 +195,7 @@ private:
friend class QMetaEnumBuilder;
};
-class Q_DECLARATIVE_EXPORT QMetaMethodBuilder
+class Q_DECLARATIVE_PRIVATE_EXPORT QMetaMethodBuilder
{
public:
QMetaMethodBuilder() : _mobj(0), _index(0) {}
@@ -231,7 +233,7 @@ private:
QMetaMethodBuilderPrivate *d_func() const;
};
-class Q_DECLARATIVE_EXPORT QMetaPropertyBuilder
+class Q_DECLARATIVE_PRIVATE_EXPORT QMetaPropertyBuilder
{
public:
QMetaPropertyBuilder() : _mobj(0), _index(0) {}
@@ -282,7 +284,7 @@ private:
QMetaPropertyBuilderPrivate *d_func() const;
};
-class Q_DECLARATIVE_EXPORT QMetaEnumBuilder
+class Q_DECLARATIVE_PRIVATE_EXPORT QMetaEnumBuilder
{
public:
QMetaEnumBuilder() : _mobj(0), _index(0) {}
diff --git a/src/declarative/util/qdeclarativeanimation_p.h b/src/declarative/util/qdeclarativeanimation_p.h
index 8cb17e4..cd90417 100644
--- a/src/declarative/util/qdeclarativeanimation_p.h
+++ b/src/declarative/util/qdeclarativeanimation_p.h
@@ -63,7 +63,7 @@ QT_MODULE(Declarative)
class QDeclarativeAbstractAnimationPrivate;
class QDeclarativeAnimationGroup;
-class Q_DECLARATIVE_EXPORT QDeclarativeAbstractAnimation : public QObject, public QDeclarativePropertyValueSource, public QDeclarativeParserStatus
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeAbstractAnimation : public QObject, public QDeclarativePropertyValueSource, public QDeclarativeParserStatus
{
Q_OBJECT
Q_DECLARE_PRIVATE(QDeclarativeAbstractAnimation)
@@ -165,7 +165,7 @@ protected:
};
class QDeclarativeScriptActionPrivate;
-class Q_DECLARATIVE_EXPORT QDeclarativeScriptAction : public QDeclarativeAbstractAnimation
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeScriptAction : public QDeclarativeAbstractAnimation
{
Q_OBJECT
Q_DECLARE_PRIVATE(QDeclarativeScriptAction)
diff --git a/src/declarative/util/qdeclarativeanimation_p_p.h b/src/declarative/util/qdeclarativeanimation_p_p.h
index 26c04d4..b8c2c6d 100644
--- a/src/declarative/util/qdeclarativeanimation_p_p.h
+++ b/src/declarative/util/qdeclarativeanimation_p_p.h
@@ -327,7 +327,7 @@ public:
QDeclarativeBulkValueAnimator *va;
- // for animations that dont use the QDeclarativeBulkValueAnimator
+ // for animations that don't use the QDeclarativeBulkValueAnimator
QDeclarativeStateActions *actions;
static QVariant interpolateVariant(const QVariant &from, const QVariant &to, qreal progress);
diff --git a/src/declarative/util/qdeclarativebehavior_p.h b/src/declarative/util/qdeclarativebehavior_p.h
index 9801fb2..80ed984 100644
--- a/src/declarative/util/qdeclarativebehavior_p.h
+++ b/src/declarative/util/qdeclarativebehavior_p.h
@@ -57,7 +57,7 @@ QT_MODULE(Declarative)
class QDeclarativeAbstractAnimation;
class QDeclarativeBehaviorPrivate;
-class Q_DECLARATIVE_EXPORT QDeclarativeBehavior : public QObject, public QDeclarativePropertyValueInterceptor
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeBehavior : public QObject, public QDeclarativePropertyValueInterceptor
{
Q_OBJECT
Q_DECLARE_PRIVATE(QDeclarativeBehavior)
diff --git a/src/declarative/util/qdeclarativefontloader.cpp b/src/declarative/util/qdeclarativefontloader.cpp
index 3e4a81a..03a0561 100644
--- a/src/declarative/util/qdeclarativefontloader.cpp
+++ b/src/declarative/util/qdeclarativefontloader.cpp
@@ -49,7 +49,6 @@
#include <QDebug>
#include <QNetworkRequest>
#include <QNetworkReply>
-#include <QFile>
#include <QFontDatabase>
#include <private/qobject_p.h>
@@ -221,15 +220,15 @@ void QDeclarativeFontLoader::setSource(const QUrl &url)
fo->download(d->url, qmlEngine(this)->networkAccessManager());
d->status = Loading;
emit statusChanged();
- QObject::connect(fo, SIGNAL(fontDownloaded(QString, QDeclarativeFontLoader::Status)),
- this, SLOT(updateFontInfo(QString, QDeclarativeFontLoader::Status)));
+ QObject::connect(fo, SIGNAL(fontDownloaded(QString,QDeclarativeFontLoader::Status)),
+ this, SLOT(updateFontInfo(QString,QDeclarativeFontLoader::Status)));
} else {
QDeclarativeFontObject *fo = d->fonts[d->url];
if (fo->id == -1) {
d->status = Loading;
emit statusChanged();
- QObject::connect(fo, SIGNAL(fontDownloaded(QString, QDeclarativeFontLoader::Status)),
- this, SLOT(updateFontInfo(QString, QDeclarativeFontLoader::Status)));
+ QObject::connect(fo, SIGNAL(fontDownloaded(QString,QDeclarativeFontLoader::Status)),
+ this, SLOT(updateFontInfo(QString,QDeclarativeFontLoader::Status)));
}
else
updateFontInfo(QFontDatabase::applicationFontFamilies(fo->id).at(0), Ready);
@@ -298,23 +297,25 @@ void QDeclarativeFontLoader::setName(const QString &name)
Use this status to provide an update or respond to the status change in some way.
For example, you could:
- \e {Trigger a state change:}
- \qml
- State { name: 'loaded'; when: loader.status = FontLoader.Ready }
+ \list
+ \o Trigger a state change:
+ \qml
+ State { name: 'loaded'; when: loader.status == FontLoader.Ready }
\endqml
- \e {Implement an \c onStatusChanged signal handler:}
- \qml
+ \o Implement an \c onStatusChanged signal handler:
+ \qml
FontLoader {
id: loader
onStatusChanged: if (loader.status == FontLoader.Ready) console.log('Loaded')
}
\endqml
- \e {Bind to the status value:}
+ \o Bind to the status value:
\qml
- Text { text: loader.status != FontLoader.Ready ? 'Not Loaded' : 'Loaded' }
+ Text { text: loader.status == FontLoader.Ready ? 'Loaded' : 'Not loaded' }
\endqml
+ \endlist
*/
QDeclarativeFontLoader::Status QDeclarativeFontLoader::status() const
{
diff --git a/src/declarative/util/qdeclarativelistmodel_p.h b/src/declarative/util/qdeclarativelistmodel_p.h
index e9673c8..90036f9 100644
--- a/src/declarative/util/qdeclarativelistmodel_p.h
+++ b/src/declarative/util/qdeclarativelistmodel_p.h
@@ -64,7 +64,7 @@ class NestedListModel;
class QDeclarativeListModelWorkerAgent;
struct ModelNode;
class FlatListScriptClass;
-class Q_DECLARATIVE_EXPORT QDeclarativeListModel : public QListModelInterface
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeListModel : public QListModelInterface
{
Q_OBJECT
Q_PROPERTY(int count READ count NOTIFY countChanged)
diff --git a/src/declarative/util/qdeclarativelistmodelworkeragent.cpp b/src/declarative/util/qdeclarativelistmodelworkeragent.cpp
index 6804d4a..852b055 100644
--- a/src/declarative/util/qdeclarativelistmodelworkeragent.cpp
+++ b/src/declarative/util/qdeclarativelistmodelworkeragent.cpp
@@ -208,7 +208,7 @@ bool QDeclarativeListModelWorkerAgent::event(QEvent *e)
const QList<Change> &changes = s->data.changes;
if (m_copy) {
- bool cc = m_copy->count() != s->list->count();
+ bool cc = m_orig->count() != s->list->count();
FlatListModel *orig = m_orig->m_flat;
FlatListModel *copy = s->list->m_flat;
diff --git a/src/declarative/util/qdeclarativeopenmetaobject_p.h b/src/declarative/util/qdeclarativeopenmetaobject_p.h
index c18fa3d..dff6776 100644
--- a/src/declarative/util/qdeclarativeopenmetaobject_p.h
+++ b/src/declarative/util/qdeclarativeopenmetaobject_p.h
@@ -42,10 +42,11 @@
#ifndef QDECLARATIVEOPENMETAOBJECT_H
#define QDECLARATIVEOPENMETAOBJECT_H
-#include <private/qdeclarativerefcount_p.h>
#include <QtCore/QMetaObject>
#include <QtCore/QObject>
+#include <private/qdeclarativerefcount_p.h>
+#include <private/qdeclarativeglobal_p.h>
#include <private/qobject_p.h>
QT_BEGIN_HEADER
@@ -57,7 +58,7 @@ QT_MODULE(Declarative)
class QDeclarativeEngine;
class QMetaPropertyBuilder;
class QDeclarativeOpenMetaObjectTypePrivate;
-class Q_DECLARATIVE_EXPORT QDeclarativeOpenMetaObjectType : public QDeclarativeRefCount
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeOpenMetaObjectType : public QDeclarativeRefCount
{
public:
QDeclarativeOpenMetaObjectType(const QMetaObject *base, QDeclarativeEngine *engine);
@@ -78,7 +79,7 @@ private:
};
class QDeclarativeOpenMetaObjectPrivate;
-class Q_DECLARATIVE_EXPORT QDeclarativeOpenMetaObject : public QAbstractDynamicMetaObject
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeOpenMetaObject : public QAbstractDynamicMetaObject
{
public:
QDeclarativeOpenMetaObject(QObject *, bool = true);
diff --git a/src/declarative/util/qdeclarativepixmapcache.cpp b/src/declarative/util/qdeclarativepixmapcache.cpp
index 4fc52f5..a07b1bb 100644
--- a/src/declarative/util/qdeclarativepixmapcache.cpp
+++ b/src/declarative/util/qdeclarativepixmapcache.cpp
@@ -93,6 +93,7 @@ public:
QDeclarativePixmapData *data;
QDeclarativePixmapReader *reader;
+ QSize requestSize;
bool loading;
int redirectCount;
@@ -366,7 +367,7 @@ void QDeclarativePixmapReader::networkRequestDone(QNetworkReply *reply)
QByteArray all = reply->readAll();
QBuffer buff(&all);
buff.open(QIODevice::ReadOnly);
- if (!readImage(reply->url(), &buff, &image, &errorString, &readSize, job->data->requestSize)) {
+ if (!readImage(reply->url(), &buff, &image, &errorString, &readSize, job->requestSize)) {
error = QDeclarativePixmapReply::Decoding;
}
}
@@ -683,7 +684,7 @@ void QDeclarativePixmapStore::timerEvent(QTimerEvent *)
}
QDeclarativePixmapReply::QDeclarativePixmapReply(QDeclarativePixmapData *d)
-: data(d), reader(0), loading(false), redirectCount(0)
+: data(d), reader(0), loading(false), redirectCount(0), requestSize(d->requestSize)
{
if (finishedIndex == -1) {
finishedIndex = QDeclarativePixmapReply::staticMetaObject.indexOfSignal("finished()");
diff --git a/src/declarative/util/qdeclarativepropertychanges_p.h b/src/declarative/util/qdeclarativepropertychanges_p.h
index 199928f..449574c 100644
--- a/src/declarative/util/qdeclarativepropertychanges_p.h
+++ b/src/declarative/util/qdeclarativepropertychanges_p.h
@@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
class QDeclarativePropertyChangesPrivate;
-class Q_DECLARATIVE_EXPORT QDeclarativePropertyChanges : public QDeclarativeStateOperation
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativePropertyChanges : public QDeclarativeStateOperation
{
Q_OBJECT
Q_DECLARE_PRIVATE(QDeclarativePropertyChanges)
diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp
index 0f5413e..3915485 100644
--- a/src/declarative/util/qdeclarativestate.cpp
+++ b/src/declarative/util/qdeclarativestate.cpp
@@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE
DEFINE_BOOL_CONFIG_OPTION(stateChangeDebug, STATECHANGE_DEBUG);
QDeclarativeAction::QDeclarativeAction()
-: restore(true), actionDone(false), reverseEvent(false), deletableToBinding(false), fromBinding(0), toBinding(0), event(0),
+: restore(true), actionDone(false), reverseEvent(false), deletableToBinding(false), fromBinding(0), event(0),
specifiedObject(0)
{
}
@@ -67,7 +67,7 @@ QDeclarativeAction::QDeclarativeAction(QObject *target, const QString &propertyN
const QVariant &value)
: restore(true), actionDone(false), reverseEvent(false), deletableToBinding(false),
property(target, propertyName), toValue(value),
- fromBinding(0), toBinding(0), event(0),
+ fromBinding(0), event(0),
specifiedObject(target), specifiedProperty(propertyName)
{
if (property.isValid())
@@ -78,7 +78,7 @@ QDeclarativeAction::QDeclarativeAction(QObject *target, const QString &propertyN
QDeclarativeContext *context, const QVariant &value)
: restore(true), actionDone(false), reverseEvent(false), deletableToBinding(false),
property(target, propertyName, context), toValue(value),
- fromBinding(0), toBinding(0), event(0),
+ fromBinding(0), event(0),
specifiedObject(target), specifiedProperty(propertyName)
{
if (property.isValid())
@@ -503,11 +503,11 @@ void QDeclarativeState::addEntriesToRevertList(const QList<QDeclarativeAction> &
const QDeclarativeAction &action = actionListIterator.next();
QDeclarativeSimpleAction simpleAction(action);
action.property.write(action.toValue);
- if (action.toBinding) {
+ if (!action.toBinding.isNull()) {
QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(simpleAction.property());
if (oldBinding)
QDeclarativePropertyPrivate::setBinding(simpleAction.property(), 0);
- QDeclarativePropertyPrivate::setBinding(simpleAction.property(), action.toBinding, QDeclarativePropertyPrivate::DontRemoveBinding);
+ QDeclarativePropertyPrivate::setBinding(simpleAction.property(), action.toBinding.data(), QDeclarativePropertyPrivate::DontRemoveBinding);
}
simpleActionList.append(simpleAction);
@@ -675,7 +675,7 @@ void QDeclarativeState::apply(QDeclarativeStateGroup *group, QDeclarativeTransit
a.property = d->revertList.at(ii).property();
a.fromValue = cur;
a.toValue = d->revertList.at(ii).value();
- a.toBinding = d->revertList.at(ii).binding();
+ a.toBinding = QDeclarativeAbstractBinding::getPointer(d->revertList.at(ii).binding());
a.specifiedObject = d->revertList.at(ii).specifiedObject();
a.specifiedProperty = d->revertList.at(ii).specifiedProperty();
a.event = d->revertList.at(ii).event();
diff --git a/src/declarative/util/qdeclarativestate_p.h b/src/declarative/util/qdeclarativestate_p.h
index a0ab11b..7b9c18a 100644
--- a/src/declarative/util/qdeclarativestate_p.h
+++ b/src/declarative/util/qdeclarativestate_p.h
@@ -45,6 +45,8 @@
#include <qdeclarative.h>
#include <qdeclarativeproperty.h>
#include <QtCore/qobject.h>
+#include <private/qdeclarativebinding_p.h>
+#include <private/qdeclarativeglobal_p.h>
QT_BEGIN_HEADER
@@ -56,7 +58,7 @@ class QDeclarativeActionEvent;
class QDeclarativeAbstractBinding;
class QDeclarativeBinding;
class QDeclarativeExpression;
-class Q_DECLARATIVE_EXPORT QDeclarativeAction
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeAction
{
public:
QDeclarativeAction();
@@ -74,7 +76,7 @@ public:
QVariant toValue;
QDeclarativeAbstractBinding *fromBinding;
- QDeclarativeAbstractBinding *toBinding;
+ QDeclarativeAbstractBinding::Pointer toBinding;
QDeclarativeActionEvent *event;
//strictly for matching
diff --git a/src/declarative/util/qdeclarativestate_p_p.h b/src/declarative/util/qdeclarativestate_p_p.h
index 4fd8f21..98c3f7b 100644
--- a/src/declarative/util/qdeclarativestate_p_p.h
+++ b/src/declarative/util/qdeclarativestate_p_p.h
@@ -85,7 +85,7 @@ public:
m_reverseEvent = true;
} else {
m_value = a.toValue;
- m_binding = QDeclarativeAbstractBinding::getPointer(a.toBinding);
+ m_binding = a.toBinding;
m_reverseEvent = false;
}
}
diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp
index 8cb813c..d1d7822 100644
--- a/src/declarative/util/qdeclarativestateoperations.cpp
+++ b/src/declarative/util/qdeclarativestateoperations.cpp
@@ -648,7 +648,7 @@ void QDeclarativeStateChangeScript::setScript(const QDeclarativeScriptString &s)
}
/*!
- \qmlproperty script StateChangeScript::script
+ \qmlproperty string StateChangeScript::name
This property holds the name of the script. This name can be used by a
ScriptAction to target a specific script.
diff --git a/src/declarative/util/qdeclarativetimer_p.h b/src/declarative/util/qdeclarativetimer_p.h
index 08c3d4e..ee3d038 100644
--- a/src/declarative/util/qdeclarativetimer_p.h
+++ b/src/declarative/util/qdeclarativetimer_p.h
@@ -47,6 +47,8 @@
#include <QtCore/qobject.h>
#include <QtCore/qabstractanimation.h>
+#include <private/qdeclarativeglobal_p.h>
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -54,7 +56,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
class QDeclarativeTimerPrivate;
-class Q_DECLARATIVE_EXPORT QDeclarativeTimer : public QObject, public QDeclarativeParserStatus
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeTimer : public QObject, public QDeclarativeParserStatus
{
Q_OBJECT
Q_DECLARE_PRIVATE(QDeclarativeTimer)
diff --git a/src/declarative/util/qdeclarativetransition.cpp b/src/declarative/util/qdeclarativetransition.cpp
index 478c7f4..c8bc7b3 100644
--- a/src/declarative/util/qdeclarativetransition.cpp
+++ b/src/declarative/util/qdeclarativetransition.cpp
@@ -86,12 +86,16 @@ QT_BEGIN_NAMESPACE
Item {
...
transitions: [
- Transition { ... },
+ Transition { to: "state1" ... },
Transition { ... }
]
}
\endqml
+ If multiple Transitions are specified, only a single (best-matching) Transition will be applied for any particular
+ state change. In the example above, when changing to \c state1, the first transition will be used, rather
+ than the more generic second transition.
+
If a state change has a Transition that matches the same property as a
\l Behavior, the Transition animation overrides the \l Behavior for that
state change.
diff --git a/src/declarative/util/qdeclarativetransitionmanager.cpp b/src/declarative/util/qdeclarativetransitionmanager.cpp
index 89b0044..d19e6f2 100644
--- a/src/declarative/util/qdeclarativetransitionmanager.cpp
+++ b/src/declarative/util/qdeclarativetransitionmanager.cpp
@@ -99,8 +99,8 @@ void QDeclarativeTransitionManager::complete()
void QDeclarativeTransitionManagerPrivate::applyBindings()
{
foreach(const QDeclarativeAction &action, bindingsList) {
- if (action.toBinding) {
- QDeclarativePropertyPrivate::setBinding(action.property, action.toBinding);
+ if (!action.toBinding.isNull()) {
+ QDeclarativePropertyPrivate::setBinding(action.property, action.toBinding.data());
} else if (action.event) {
if (action.reverseEvent)
action.event->reverse();
@@ -145,8 +145,8 @@ void QDeclarativeTransitionManager::transition(const QList<QDeclarativeAction> &
// Apply all the property and binding changes
for (int ii = 0; ii < applyList.size(); ++ii) {
const QDeclarativeAction &action = applyList.at(ii);
- if (action.toBinding) {
- QDeclarativePropertyPrivate::setBinding(action.property, action.toBinding, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding);
+ if (!action.toBinding.isNull()) {
+ QDeclarativePropertyPrivate::setBinding(action.property, action.toBinding.data(), QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding);
} else if (!action.event) {
QDeclarativePropertyPrivate::write(action.property, action.toValue, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding);
} else if (action.event->isReversable()) {
@@ -165,7 +165,7 @@ void QDeclarativeTransitionManager::transition(const QList<QDeclarativeAction> &
continue;
}
const QDeclarativeProperty &prop = action->property;
- if (action->toBinding || !action->toValue.isValid()) {
+ if (!action->toBinding.isNull() || !action->toValue.isValid()) {
action->toValue = prop.read();
}
}
@@ -259,10 +259,10 @@ void QDeclarativeTransitionManager::cancel()
for(int i = 0; i < d->bindingsList.count(); ++i) {
QDeclarativeAction action = d->bindingsList[i];
- if (action.toBinding && action.deletableToBinding) {
+ if (!action.toBinding.isNull() && action.deletableToBinding) {
QDeclarativePropertyPrivate::setBinding(action.property, 0);
- action.toBinding->destroy();
- action.toBinding = 0;
+ action.toBinding.data()->destroy();
+ action.toBinding.clear();
action.deletableToBinding = false;
} else if (action.event) {
//### what do we do here?
diff --git a/src/declarative/util/qdeclarativeview.cpp b/src/declarative/util/qdeclarativeview.cpp
index 163f626..c4d8dde 100644
--- a/src/declarative/util/qdeclarativeview.cpp
+++ b/src/declarative/util/qdeclarativeview.cpp
@@ -72,6 +72,7 @@
QT_BEGIN_NAMESPACE
DEFINE_BOOL_CONFIG_OPTION(frameRateDebug, QML_SHOW_FRAMERATE)
+extern Q_GUI_EXPORT bool qt_applefontsmoothing_enabled;
class QDeclarativeScene : public QGraphicsScene
{
@@ -696,7 +697,14 @@ void QDeclarativeView::paintEvent(QPaintEvent *event)
if (frameRateDebug())
time = d->frameTimer.restart();
+#ifdef Q_WS_MAC
+ bool oldSmooth = qt_applefontsmoothing_enabled;
+ qt_applefontsmoothing_enabled = false;
+#endif
QGraphicsView::paintEvent(event);
+#ifdef Q_WS_MAC
+ qt_applefontsmoothing_enabled = oldSmooth;
+#endif
QDeclarativeDebugTrace::endRange(QDeclarativeDebugTrace::Painting);
diff --git a/src/declarative/util/qlistmodelinterface.cpp b/src/declarative/util/qlistmodelinterface.cpp
index acf4dd6..1e2dfb7 100644
--- a/src/declarative/util/qlistmodelinterface.cpp
+++ b/src/declarative/util/qlistmodelinterface.cpp
@@ -46,6 +46,7 @@ QT_BEGIN_NAMESPACE
/*!
\internal
\class QListModelInterface
+ \since 4.7
\brief The QListModelInterface class can be subclassed to provide C++ models to QDeclarativeGraphics Views
This class is comprised primarily of pure virtual functions which
@@ -70,15 +71,10 @@ QT_BEGIN_NAMESPACE
Returns the number of data entries in the model.
*/
-/*! \fn QHash<int,QVariant> QListModelInterface::data(int index, const QList<int>& roles) const
+/*! \fn QVariant QListModelInterface::data(int index, int role) const
Returns the data at the given \a index for the specified \a roles.
*/
-/*! \fn bool QListModelInterface::setData(int index, const QHash<int,QVariant>& values)
- Sets the data at the given \a index. \a values is a mapping of
- QVariant values to roles. Returns false.
-*/
-
/*! \fn QList<int> QListModelInterface::roles() const
Returns the list of roles for which the list model interface
provides data.
diff --git a/src/declarative/util/qlistmodelinterface_p.h b/src/declarative/util/qlistmodelinterface_p.h
index 8c8ebb3..8b62fc4 100644
--- a/src/declarative/util/qlistmodelinterface_p.h
+++ b/src/declarative/util/qlistmodelinterface_p.h
@@ -45,13 +45,15 @@
#include <QtCore/QHash>
#include <QtCore/QVariant>
+#include <private/qdeclarativeglobal_p.h>
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class Q_DECLARATIVE_EXPORT QListModelInterface : public QObject
+class Q_DECLARATIVE_PRIVATE_EXPORT QListModelInterface : public QObject
{
Q_OBJECT
public:
diff --git a/src/gui/accessible/accessible.pri b/src/gui/accessible/accessible.pri
index ad2fb4c..31362ff 100644
--- a/src/gui/accessible/accessible.pri
+++ b/src/gui/accessible/accessible.pri
@@ -12,7 +12,7 @@ contains(QT_CONFIG, accessibility) {
accessible/qaccessiblewidget.cpp \
accessible/qaccessibleplugin.cpp
- mac:!embedded {
+ mac:!embedded:!qpa {
HEADERS += accessible/qaccessible_mac_p.h
OBJECTIVE_SOURCES += accessible/qaccessible_mac.mm \
accessible/qaccessible_mac_cocoa.mm
diff --git a/src/gui/accessible/qaccessible_mac_p.h b/src/gui/accessible/qaccessible_mac_p.h
index 4ee3a2d..e417cb6 100644
--- a/src/gui/accessible/qaccessible_mac_p.h
+++ b/src/gui/accessible/qaccessible_mac_p.h
@@ -122,7 +122,7 @@ private:
QAccessibleInterfaceWrapper wrapper class.
It has the same API as QAccessibleInterface, minus the child parameter
- in the funcitons.
+ in the functions.
*/
class Q_AUTOTEST_EXPORT QAInterface : public QAccessible
{
@@ -432,7 +432,7 @@ public:
/*
QAccessibleHierarchyManager bridges the Mac and Qt accessibility hierarchies.
There is a one-to-one relationship between QAElements on the Mac side
- and QAInterfaces on the Qt side, and this class provies lookup funcitons
+ and QAInterfaces on the Qt side, and this class provides lookup functions
that translates between these to items.
The identity of a QAInterface is determined by its QAccessibleInterface and
diff --git a/src/gui/dialogs/dialogs.pri b/src/gui/dialogs/dialogs.pri
index 4e1b9a7..cd8e71a 100644
--- a/src/gui/dialogs/dialogs.pri
+++ b/src/gui/dialogs/dialogs.pri
@@ -27,7 +27,7 @@ HEADERS += \
dialogs/qwizard.h \
dialogs/qprintpreviewdialog.h
-!embedded:mac {
+!embedded:!qpa:mac {
OBJECTIVE_SOURCES += dialogs/qfiledialog_mac.mm \
dialogs/qfontdialog_mac.mm \
dialogs/qnspanelproxy_mac.mm \
@@ -61,7 +61,7 @@ win32 {
!win32-borland:!wince*: LIBS += -lshell32 # the filedialog needs this library
}
-!mac:!embedded:!symbian:unix {
+!mac:!embedded:!symbian:unix|qpa {
HEADERS += dialogs/qpagesetupdialog_unix_p.h
SOURCES += dialogs/qprintdialog_unix.cpp \
dialogs/qpagesetupdialog_unix.cpp
diff --git a/src/gui/dialogs/qdialog.cpp b/src/gui/dialogs/qdialog.cpp
index 5a791fc..6970b76 100644
--- a/src/gui/dialogs/qdialog.cpp
+++ b/src/gui/dialogs/qdialog.cpp
@@ -1111,7 +1111,7 @@ QSize QDialog::sizeHint() const
// if size is not fixed, try to adjust it according to S60 layoutting
if (minimumSize() != maximumSize()) {
// In S60, dialogs are always the width of screen (in portrait, regardless of current layout)
- return QSize(qMax(S60->screenHeightInPixels, S60->screenWidthInPixels), QWidget::sizeHint().height());
+ return QSize(qMin(S60->screenHeightInPixels, S60->screenWidthInPixels), QWidget::sizeHint().height());
} else {
return QWidget::sizeHint();
}
diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp
index 624610b..1b9d127 100644
--- a/src/gui/dialogs/qfiledialog.cpp
+++ b/src/gui/dialogs/qfiledialog.cpp
@@ -3261,7 +3261,10 @@ QString QFSCompleter::pathFromIndex(const QModelIndex &index) const
if (currentLocation == QDir::separator())
return path.mid(currentLocation.length());
#endif
- return path.mid(currentLocation.length() + 1);
+ if (currentLocation.endsWith('/'))
+ return path.mid(currentLocation.length());
+ else
+ return path.mid(currentLocation.length()+1);
}
return index.data(QFileSystemModel::FilePathRole).toString();
}
diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm
index 87850a7..6c1d7f6 100644
--- a/src/gui/dialogs/qfiledialog_mac.mm
+++ b/src/gui/dialogs/qfiledialog_mac.mm
@@ -63,6 +63,7 @@
#include <qdesktopwidget.h>
#include <stdlib.h>
#include <qabstracteventdispatcher.h>
+#import <AppKit/NSSavePanel.h>
#include "ui_qfiledialog.h"
QT_BEGIN_NAMESPACE
@@ -84,7 +85,13 @@ QT_USE_NAMESPACE
@class QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate);
-@interface QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) : NSObject {
+@interface QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate)
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+ : NSObject<NSOpenSavePanelDelegate>
+#else
+ : NSObject
+#endif
+{
@public
NSOpenPanel *mOpenPanel;
NSSavePanel *mSavePanel;
diff --git a/src/gui/dialogs/qfiledialog_win.cpp b/src/gui/dialogs/qfiledialog_win.cpp
index 5b192b4..feec804 100644
--- a/src/gui/dialogs/qfiledialog_win.cpp
+++ b/src/gui/dialogs/qfiledialog_win.cpp
@@ -60,7 +60,6 @@
#endif
#ifdef Q_WS_WINCE
-#include <shlobj.h>
#include <commdlg.h>
bool qt_priv_ptr_valid = false;
#else
@@ -603,7 +602,7 @@ QString qt_win_CID_get_existing_directory(const QFileDialogArgs &args)
// Set the FOS_PICKFOLDERS flag
DWORD newOptions;
hr = pfd->GetOptions(&newOptions);
- newOptions |= FOS_PICKFOLDERS;
+ newOptions |= (FOS_PICKFOLDERS | FOS_FORCEFILESYSTEM);
if (SUCCEEDED(hr) && SUCCEEDED((hr = pfd->SetOptions(newOptions)))) {
QWidget *parentWindow = args.parent;
if (parentWindow)
diff --git a/src/gui/dialogs/qfileinfogatherer_p.h b/src/gui/dialogs/qfileinfogatherer_p.h
index 8681eb5..b28509b 100644
--- a/src/gui/dialogs/qfileinfogatherer_p.h
+++ b/src/gui/dialogs/qfileinfogatherer_p.h
@@ -84,10 +84,13 @@ public:
&& permissions() == fileInfo.permissions();
}
+#ifndef QT_NO_FSFILEENGINE
bool isCaseSensitive() const {
QFSFileEngine fe(mFileInfo.absoluteFilePath());
return fe.caseSensitive();
}
+#endif
+
QFile::Permissions permissions() const {
return mFileInfo.permissions();
}
diff --git a/src/gui/dialogs/qfilesystemmodel.cpp b/src/gui/dialogs/qfilesystemmodel.cpp
index be4261d..6552370 100644
--- a/src/gui/dialogs/qfilesystemmodel.cpp
+++ b/src/gui/dialogs/qfilesystemmodel.cpp
@@ -80,11 +80,43 @@ QT_BEGIN_NAMESPACE
directories. In the simplest case, it can be used with a suitable display
widget as part of a browser or filter.
- QFileSystemModel will not fetch any files or directories until setRootPath
+ QFileSystemModel can be accessed using the standard interface provided by
+ QAbstractItemModel, but it also provides some convenience functions that are
+ specific to a directory model.
+ The fileInfo(), isDir(), name(), and path() functions provide information
+ about the underlying files and directories related to items in the model.
+ Directories can be created and removed using mkdir(), rmdir().
+
+ \note QFileSystemModel requires an instance of a GUI application.
+
+ \section1 Example Usage
+
+ A directory model that displays the contents of a default directory
+ is usually constructed with a parent object:
+
+ \snippet doc/src/snippets/shareddirmodel/main.cpp 2
+
+ A tree view can be used to display the contents of the model
+
+ \snippet doc/src/snippets/shareddirmodel/main.cpp 4
+
+ and the contents of a particular directory can be displayed by
+ setting the tree view's root index:
+
+ \snippet doc/src/snippets/shareddirmodel/main.cpp 7
+
+ The view's root index can be used to control how much of a
+ hierarchical model is displayed. QDirModel provides a convenience
+ function that returns a suitable model index for a path to a
+ directory within the model.
+
+ \section1 Caching and Performance
+
+ QFileSystemModel will not fetch any files or directories until setRootPath()
is called. This will prevent any unnecessary querying on the file system
until that point such as listing the drives on Windows.
- Unlike the QDirModel, QFileSystemModel uses a separate thread to populate
+ Unlike QDirModel, QFileSystemModel uses a separate thread to populate
itself so it will not cause the main thread to hang as the file system
is being queried. Calls to rowCount() will return 0 until the model
populates a directory.
@@ -92,15 +124,6 @@ QT_BEGIN_NAMESPACE
QFileSystemModel keeps a cache with file information. The cache is
automatically kept up to date using the QFileSystemWatcher.
- QFileSystemModel can be accessed using the standard interface provided by
- QAbstractItemModel, but it also provides some convenience functions that are
- specific to a directory model.
- The fileInfo(), isDir(), name(), and path() functions provide information
- about the underlying files and directories related to items in the model.
- Directories can be created and removed using mkdir(), rmdir().
-
- \note QFileSystemModel requires an instance of a GUI application.
-
\sa {Model Classes}
*/
diff --git a/src/gui/dialogs/qfontdialog_mac.mm b/src/gui/dialogs/qfontdialog_mac.mm
index 9c63dfa..6fb363b 100644
--- a/src/gui/dialogs/qfontdialog_mac.mm
+++ b/src/gui/dialogs/qfontdialog_mac.mm
@@ -496,7 +496,7 @@ void QFontDialogPrivate::setFont(void *delegate, const QFont &font)
QMacCocoaAutoReleasePool pool;
QFontEngine *fe = font.d->engineForScript(QUnicodeTables::Common);
NSFontManager *mgr = [NSFontManager sharedFontManager];
- NSFont *nsFont = 0;
+ const NSFont *nsFont = 0;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
if (qstrcmp(fe->name(), "CoreText") == 0) {
@@ -522,7 +522,7 @@ void QFontDialogPrivate::setFont(void *delegate, const QFont &font)
size:fontInfo.pointSize()];
}
- [mgr setSelectedFont:nsFont isMultiple:NO];
+ [mgr setSelectedFont:const_cast<NSFont *>(nsFont) isMultiple:NO];
[static_cast<QT_MANGLE_NAMESPACE(QCocoaFontPanelDelegate) *>(delegate) setQtFont:font];
}
diff --git a/src/gui/dialogs/qinputdialog.cpp b/src/gui/dialogs/qinputdialog.cpp
index e996ee9..9e4b9b6 100644
--- a/src/gui/dialogs/qinputdialog.cpp
+++ b/src/gui/dialogs/qinputdialog.cpp
@@ -231,7 +231,10 @@ void QInputDialogPrivate::ensureLayout()
QObject::connect(buttonBox, SIGNAL(rejected()), q, SLOT(reject()));
mainLayout = new QVBoxLayout(q);
+ //we want to let the input dialog grow to available size on Symbian.
+#ifndef Q_OS_SYMBIAN
mainLayout->setSizeConstraint(QLayout::SetMinAndMaxSize);
+#endif
mainLayout->addWidget(label);
mainLayout->addWidget(inputWidget);
mainLayout->addWidget(buttonBox);
@@ -244,6 +247,9 @@ void QInputDialogPrivate::ensureLineEdit()
Q_Q(QInputDialog);
if (!lineEdit) {
lineEdit = new QLineEdit(q);
+#ifndef QT_NO_IM
+ qt_widget_private(lineEdit)->inheritsInputMethodHints = 1;
+#endif
lineEdit->hide();
QObject::connect(lineEdit, SIGNAL(textChanged(QString)),
q, SLOT(_q_textChanged(QString)));
@@ -255,6 +261,9 @@ void QInputDialogPrivate::ensureComboBox()
Q_Q(QInputDialog);
if (!comboBox) {
comboBox = new QComboBox(q);
+#ifndef QT_NO_IM
+ qt_widget_private(comboBox)->inheritsInputMethodHints = 1;
+#endif
comboBox->hide();
QObject::connect(comboBox, SIGNAL(editTextChanged(QString)),
q, SLOT(_q_textChanged(QString)));
@@ -552,6 +561,9 @@ void QInputDialog::setLabelText(const QString &text)
} else {
d->label->setText(text);
}
+#ifdef Q_OS_SYMBIAN
+ d->label->setWordWrap(true);
+#endif
}
QString QInputDialog::labelText() const
@@ -1122,6 +1134,8 @@ void QInputDialog::done(int result)
be entered).
\a text is the default text which is placed in the line edit.
\a mode is the echo mode the line edit will use.
+ \a inputMethodHints is the input method hints that will be used in the
+ edit widget if an input method is active.
If \a ok is nonnull \e *\a ok will be set to true if the user pressed
\gui OK and to false if the user pressed \gui Cancel. The dialog's parent
@@ -1144,13 +1158,14 @@ void QInputDialog::done(int result)
QString QInputDialog::getText(QWidget *parent, const QString &title, const QString &label,
QLineEdit::EchoMode mode, const QString &text, bool *ok,
- Qt::WindowFlags flags)
+ Qt::WindowFlags flags, Qt::InputMethodHints inputMethodHints)
{
QInputDialog dialog(parent, flags);
dialog.setWindowTitle(title);
dialog.setLabelText(label);
dialog.setTextValue(text);
dialog.setTextEchoMode(mode);
+ dialog.setInputMethodHints(inputMethodHints);
int ret = dialog.exec();
if (ok)
@@ -1163,6 +1178,17 @@ QString QInputDialog::getText(QWidget *parent, const QString &title, const QStri
}
/*!
+ \internal
+*/
+// ### Qt 5: Use only the version above.
+QString QInputDialog::getText(QWidget *parent, const QString &title, const QString &label,
+ QLineEdit::EchoMode mode, const QString &text, bool *ok,
+ Qt::WindowFlags flags)
+{
+ return getText(parent, title, label, mode, text, ok, flags, Qt::ImhNone);
+}
+
+/*!
\since 4.5
Static convenience function to get an integer input from the user.
@@ -1272,6 +1298,8 @@ double QInputDialog::getDouble(QWidget *parent, const QString &title, const QStr
be entered).
\a items is the string list which is inserted into the combobox.
\a current is the number of the item which should be the current item.
+ \a inputMethodHints is the input method hints that will be used if the
+ combobox is editable and an input method is active.
If \a editable is true the user can enter their own text; otherwise the
user may only select one of the existing items.
@@ -1296,7 +1324,7 @@ double QInputDialog::getDouble(QWidget *parent, const QString &title, const QStr
QString QInputDialog::getItem(QWidget *parent, const QString &title, const QString &label,
const QStringList &items, int current, bool editable, bool *ok,
- Qt::WindowFlags flags)
+ Qt::WindowFlags flags, Qt::InputMethodHints inputMethodHints)
{
QString text(items.value(current));
@@ -1306,6 +1334,7 @@ QString QInputDialog::getItem(QWidget *parent, const QString &title, const QStri
dialog.setComboBoxItems(items);
dialog.setTextValue(text);
dialog.setComboBoxEditable(editable);
+ dialog.setInputMethodHints(inputMethodHints);
int ret = dialog.exec();
if (ok)
@@ -1318,6 +1347,17 @@ QString QInputDialog::getItem(QWidget *parent, const QString &title, const QStri
}
/*!
+ \internal
+*/
+// ### Qt 5: Use only the version above.
+QString QInputDialog::getItem(QWidget *parent, const QString &title, const QString &label,
+ const QStringList &items, int current, bool editable, bool *ok,
+ Qt::WindowFlags flags)
+{
+ return getItem(parent, title, label, items, current, editable, ok, flags, Qt::ImhNone);
+}
+
+/*!
\obsolete
Use getInt() instead.
diff --git a/src/gui/dialogs/qinputdialog.h b/src/gui/dialogs/qinputdialog.h
index 02868c1..25e27b0 100644
--- a/src/gui/dialogs/qinputdialog.h
+++ b/src/gui/dialogs/qinputdialog.h
@@ -167,18 +167,37 @@ public:
void setVisible(bool visible);
+#ifdef Q_QDOC
+ static QString getText(QWidget *parent, const QString &title, const QString &label,
+ QLineEdit::EchoMode echo = QLineEdit::Normal,
+ const QString &text = QString(), bool *ok = 0, Qt::WindowFlags flags = 0,
+ Qt::InputMethodHints inputMethodHints = Qt::ImhNone);
+ static QString getItem(QWidget *parent, const QString &title, const QString &label,
+ const QStringList &items, int current = 0, bool editable = true,
+ bool *ok = 0, Qt::WindowFlags flags = 0,
+ Qt::InputMethodHints inputMethodHints = Qt::ImhNone);
+#else
static QString getText(QWidget *parent, const QString &title, const QString &label,
QLineEdit::EchoMode echo = QLineEdit::Normal,
const QString &text = QString(), bool *ok = 0, Qt::WindowFlags flags = 0);
+ static QString getItem(QWidget *parent, const QString &title, const QString &label,
+ const QStringList &items, int current = 0, bool editable = true,
+ bool *ok = 0, Qt::WindowFlags flags = 0);
+ static QString getText(QWidget *parent, const QString &title, const QString &label,
+ QLineEdit::EchoMode echo,
+ const QString &text, bool *ok, Qt::WindowFlags flags,
+ Qt::InputMethodHints inputMethodHints);
+ static QString getItem(QWidget *parent, const QString &title, const QString &label,
+ const QStringList &items, int current, bool editable,
+ bool *ok, Qt::WindowFlags flags,
+ Qt::InputMethodHints inputMethodHints);
+#endif
static int getInt(QWidget *parent, const QString &title, const QString &label, int value = 0,
int minValue = -2147483647, int maxValue = 2147483647,
int step = 1, bool *ok = 0, Qt::WindowFlags flags = 0);
static double getDouble(QWidget *parent, const QString &title, const QString &label, double value = 0,
double minValue = -2147483647, double maxValue = 2147483647,
int decimals = 1, bool *ok = 0, Qt::WindowFlags flags = 0);
- static QString getItem(QWidget *parent, const QString &title, const QString &label,
- const QStringList &items, int current = 0, bool editable = true,
- bool *ok = 0, Qt::WindowFlags flags = 0);
// obsolete
static int getInteger(QWidget *parent, const QString &title, const QString &label, int value = 0,
diff --git a/src/gui/dialogs/qprintdialog.qdoc b/src/gui/dialogs/qprintdialog.qdoc
index bd406c1..b75fe2e 100644
--- a/src/gui/dialogs/qprintdialog.qdoc
+++ b/src/gui/dialogs/qprintdialog.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/src/gui/egl/egl.pri b/src/gui/egl/egl.pri
index c6c020d..8e8664c 100644
--- a/src/gui/egl/egl.pri
+++ b/src/gui/egl/egl.pri
@@ -6,9 +6,21 @@ contains(QT_CONFIG, egl): {
egl/qeglcontext_p.h \
egl/qeglproperties_p.h
- SOURCES += \
- egl/qegl.cpp \
- egl/qeglproperties.cpp
+ SOURCES += \
+ egl/qegl.cpp \
+ egl/qeglproperties.cpp
+ unix {
+ !isEmpty(QMAKE_INCDIR_EGL){
+ INCLUDEPATH += $$QMAKE_INCDIR_EGL
+ }
+ !isEmpty(QMAKE_LIBDIR_EGL){
+ for(p, QMAKE_LIBDIR_EGL) {
+ exists($$p):LIBS += -L$$p
+ }
+ }
+
+ !isEmpty(QMAKE_LIBS_EGL): LIBS += $$QMAKE_LIBS_EGL
+ }
wince*: SOURCES += egl/qegl_wince.cpp
@@ -16,10 +28,14 @@ contains(QT_CONFIG, egl): {
embedded {
SOURCES += egl/qegl_qws.cpp
} else {
- symbian {
- SOURCES += egl/qegl_symbian.cpp
+ qpa {
+ SOURCES += egl/qegl_qpa.cpp
} else {
- SOURCES += egl/qegl_x11.cpp
+ symbian {
+ SOURCES += egl/qegl_symbian.cpp
+ } else {
+ SOURCES += egl/qegl_x11.cpp
+ }
}
}
}
diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp
index af3b79a..66cb843 100644
--- a/src/gui/egl/qegl.cpp
+++ b/src/gui/egl/qegl.cpp
@@ -210,7 +210,7 @@ EGLConfig QEgl::defaultConfig(int devType, API api, ConfigOptions options)
else
configId = qgetenv("QT_GL_EGL_CONFIG");
if (!configId.isEmpty()) {
- // Overriden, so get the EGLConfig for the specified config ID:
+ // Overridden, so get the EGLConfig for the specified config ID:
EGLint properties[] = {
EGL_CONFIG_ID, (EGLint)configId.toInt(),
EGL_NONE
@@ -267,7 +267,7 @@ EGLConfig QEgl::defaultConfig(int devType, API api, ConfigOptions options)
configAttribs.setValue(EGL_STENCIL_SIZE, 1);
configAttribs.setValue(EGL_SAMPLE_BUFFERS, 1);
#ifndef QT_OPENGL_ES_2
- // Aditionally, the GL1 engine likes to have a depth buffer for clipping
+ // Additionally, the GL1 engine likes to have a depth buffer for clipping
configAttribs.setValue(EGL_DEPTH_SIZE, 1);
#endif
}
@@ -394,7 +394,7 @@ bool QEglContext::createContext(QEglContext *shareContext, const QEglProperties
}
}
if (ctx == EGL_NO_CONTEXT) {
- ctx = eglCreateContext(display(), cfg, 0, contextProps.properties());
+ ctx = eglCreateContext(display(), cfg, EGL_NO_CONTEXT, contextProps.properties());
if (ctx == EGL_NO_CONTEXT) {
qWarning() << "QEglContext::createContext(): Unable to create EGL context:" << QEgl::errorString();
return false;
diff --git a/src/gui/egl/qegl_qpa.cpp b/src/gui/egl/qegl_qpa.cpp
new file mode 100644
index 0000000..10caf46
--- /dev/null
+++ b/src/gui/egl/qegl_qpa.cpp
@@ -0,0 +1,111 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the 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 <QtGui/qpaintdevice.h>
+#include <QtGui/qpixmap.h>
+#include <QtGui/qwidget.h>
+#include "qeglcontext_p.h"
+
+#if !defined(QT_NO_EGL)
+
+#include <QtGui/private/qgraphicssystem_p.h>
+#include <QtGui/private/qapplication_p.h>
+#include <QtGui/qdesktopwidget.h>
+
+QT_BEGIN_NAMESPACE
+
+EGLNativeDisplayType QEgl::nativeDisplay()
+{
+ return EGLNativeDisplayType(EGL_DEFAULT_DISPLAY);
+}
+
+EGLNativeWindowType QEgl::nativeWindow(QWidget* widget)
+{
+ return (EGLNativeWindowType)(widget->winId());
+}
+
+EGLNativePixmapType QEgl::nativePixmap(QPixmap* pixmap)
+{
+ Q_UNUSED(pixmap);
+ return 0;
+}
+
+//EGLDisplay QEglContext::display()
+//{
+// return eglGetDisplay(EGLNativeDisplayType(EGL_DEFAULT_DISPLAY));
+//}
+
+static QPlatformScreen *screenForDevice(QPaintDevice *device)
+{
+ QPlatformIntegration *pi = QApplicationPrivate::platformIntegration();
+
+ QList<QPlatformScreen *> screens = pi->screens();
+
+ int screenNumber;
+ if (device && device->devType() == QInternal::Widget)
+ screenNumber = qApp->desktop()->screenNumber(static_cast<QWidget *>(device));
+ else
+ screenNumber = 0;
+ if (screenNumber < 0 || screenNumber >= screens.size())
+ return 0;
+ return screens[screenNumber];
+}
+
+// Set pixel format and other properties based on a paint device.
+void QEglProperties::setPaintDeviceFormat(QPaintDevice *dev)
+{
+ if (!dev)
+ return;
+
+ // Find the QGLScreen for this paint device.
+ QPlatformScreen *screen = screenForDevice(dev);
+ if (!screen)
+ return;
+ int devType = dev->devType();
+ if (devType == QInternal::Image)
+ setPixelFormat(static_cast<QImage *>(dev)->format());
+ else
+ setPixelFormat(screen->format());
+}
+
+QT_END_NAMESPACE
+
+#endif // !QT_NO_EGL
diff --git a/src/gui/embedded/qcopchannel_qws.cpp b/src/gui/embedded/qcopchannel_qws.cpp
index 5786866..0d9d9d3 100644
--- a/src/gui/embedded/qcopchannel_qws.cpp
+++ b/src/gui/embedded/qcopchannel_qws.cpp
@@ -502,7 +502,7 @@ void QCopChannel::answer(QWSClient *cl, const QString& ch,
bool known = qcopServerMap && qcopServerMap->contains(c)
&& !((*qcopServerMap)[c]).isEmpty();
// Yes, it's a typo, it's not user-visible, and we choose not to fix it for compatibility
- QLatin1String ans = QLatin1String(known ? "known" : "unkown");
+ QLatin1String ans = QLatin1String(known ? "known" : "unknown");
QWSServerPrivate::sendQCopEvent(cl, QLatin1String(""),
ans, data, true);
return;
diff --git a/src/gui/embedded/qkbd_defaultmap_qws_p.h b/src/gui/embedded/qkbd_defaultmap_qws_p.h
index 16c3459..703dfcd 100644
--- a/src/gui/embedded/qkbd_defaultmap_qws_p.h
+++ b/src/gui/embedded/qkbd_defaultmap_qws_p.h
@@ -642,7 +642,14 @@ const QWSKeyboard::Mapping QWSKbPrivate::s_keymap_default[] = {
{ 111, 0xffff, 0x01000007, 0x00, 0x00, 0x0000 },
{ 111, 0xffff, 0x01000000, 0x06, 0x08, 0x0200 },
{ 111, 0xffff, 0x01000000, 0x0c, 0x08, 0x0200 },
+ { 113, 0xffff, 0x01000071, 0x00, 0x00, 0x0000 },
+ { 114, 0xffff, 0x01000070, 0x00, 0x00, 0x0000 },
+ { 115, 0xffff, 0x01000072, 0x00, 0x00, 0x0000 },
+ { 116, 0xffff, 0x0100010b, 0x00, 0x00, 0x0000 },
{ 119, 0xffff, 0x01000008, 0x00, 0x00, 0x0000 },
+ { 138, 0xffff, 0x01000058, 0x00, 0x00, 0x0000 },
+ { 139, 0xffff, 0x01000055, 0x00, 0x00, 0x0000 },
+
};
const QWSKeyboard::Composing QWSKbPrivate::s_keycompose_default[] = {
diff --git a/src/gui/embedded/qkbd_qws.cpp b/src/gui/embedded/qkbd_qws.cpp
index b28e293..1999ddb 100644
--- a/src/gui/embedded/qkbd_qws.cpp
+++ b/src/gui/embedded/qkbd_qws.cpp
@@ -48,8 +48,16 @@
#include <QDataStream>
#include <QStringList>
+#ifdef Q_WS_QWS
#include "qwindowsystem_qws.h"
#include "qscreen_qws.h"
+#endif
+
+#ifdef Q_WS_QPA
+#include <QWindowSystemInterface>
+#include <QKeyEvent>
+#endif
+
#include "qtimer.h"
#include <stdlib.h>
@@ -352,7 +360,15 @@ QWSKeyboardHandler::~QWSKeyboardHandler()
void QWSKeyboardHandler::processKeyEvent(int unicode, int keycode, Qt::KeyboardModifiers modifiers,
bool isPress, bool autoRepeat)
{
+#if defined(Q_WS_QWS)
qwsServer->processKeyEvent(unicode, keycode, modifiers, isPress, autoRepeat);
+#elif defined(Q_WS_QPA)
+ QEvent::Type type = isPress ? QEvent::KeyPress : QEvent::KeyRelease;
+ QString str;
+ if (unicode != 0xffff)
+ str = QString(unicode);
+ QWindowSystemInterface::handleKeyEvent(0, type, keycode, modifiers, str);
+#endif
}
/*!
@@ -375,6 +391,7 @@ void QWSKeyboardHandler::processKeyEvent(int unicode, int keycode, Qt::KeyboardM
*/
int QWSKeyboardHandler::transformDirKey(int key)
{
+#ifdef Q_WS_QWS
static int dir_keyrot = -1;
if (dir_keyrot < 0) {
// get the rotation
@@ -387,6 +404,9 @@ int QWSKeyboardHandler::transformDirKey(int key)
}
int xf = qt_screen->transformOrientation() + dir_keyrot;
return (key-Qt::Key_Left+xf)%4+Qt::Key_Left;
+#else
+ return 0;
+#endif
}
/*!
@@ -450,9 +470,11 @@ void QWSKeyboardHandler::endAutoRepeat()
/*!
\fn QWSKeyboardHandler::KeycodeAction QWSKeyboardHandler::processKeycode(quint16 keycode, bool isPress, bool autoRepeat)
+ \since 4.6
+
Maps \a keycode according to a keymap and sends that key event to the
\l{Qt for Embedded Linux} server application.
-
+
Please see the \l{Qt for Embedded Linux Character Input} and the \l
{kmap2qmap} documentations for a description on how to create and use
keymap files.
diff --git a/src/gui/embedded/qtransportauth_qws.cpp b/src/gui/embedded/qtransportauth_qws.cpp
index 9a50702..90e90d1 100644
--- a/src/gui/embedded/qtransportauth_qws.cpp
+++ b/src/gui/embedded/qtransportauth_qws.cpp
@@ -445,7 +445,7 @@ QIODevice *QTransportAuth::passThroughByClient( QWSClient *client ) const
/*!
\internal
Return a QIODevice pointer (to an internal QBuffer) which can be used
- to receive data after authorisation on transport \a d.
+ to receive data after authorization on transport \a d.
The return QIODevice will act as a pass-through.
@@ -468,7 +468,7 @@ QAuthDevice *QTransportAuth::recvBuf( QTransportAuth::Data *data, QIODevice *iod
/*!
Return a QIODevice pointer (to an internal QBuffer) which can be used
- to write data onto, for authorisation on transport \a d.
+ to write data onto, for authorization on transport \a d.
The return QIODevice will act as a pass-through.
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 83aafe9..e9a2f9f 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -2365,7 +2365,7 @@ void QGraphicsItemPrivate::setVisibleHelper(bool newVisible, bool explicitly, bo
while (fsi->d_ptr->focusScopeItem && fsi->d_ptr->focusScopeItem->isVisible())
fsi = fsi->d_ptr->focusScopeItem;
fsi->d_ptr->setFocusHelper(Qt::OtherFocusReason, /* climb = */ true,
- /* focusFromShow = */ true);
+ /* focusFromHide = */ false);
}
break;
}
@@ -2375,6 +2375,10 @@ void QGraphicsItemPrivate::setVisibleHelper(bool newVisible, bool explicitly, bo
QGraphicsItem *fi = subFocusItem;
if (fi && fi != scene->focusItem()) {
scene->setFocusItem(fi);
+ } else if (flags & QGraphicsItem::ItemIsFocusScope &&
+ !scene->focusItem() &&
+ q->isAncestorOf(scene->d_func()->lastFocusItem)) {
+ q_ptr->setFocus();
}
}
} else {
@@ -2385,7 +2389,7 @@ void QGraphicsItemPrivate::setVisibleHelper(bool newVisible, bool explicitly, bo
if (p->flags() & QGraphicsItem::ItemIsFocusScope) {
if (p->d_ptr->visible) {
p->d_ptr->setFocusHelper(Qt::OtherFocusReason, /* climb = */ true,
- /* focusFromShow = */ true);
+ /* focusFromHide = */ true);
}
break;
}
@@ -3245,13 +3249,13 @@ bool QGraphicsItem::hasFocus() const
*/
void QGraphicsItem::setFocus(Qt::FocusReason focusReason)
{
- d_ptr->setFocusHelper(focusReason, /* climb = */ true, /* focusFromShow = */ false);
+ d_ptr->setFocusHelper(focusReason, /* climb = */ true, /* focusFromHide = */ false);
}
/*!
\internal
*/
-void QGraphicsItemPrivate::setFocusHelper(Qt::FocusReason focusReason, bool climb, bool focusFromShow)
+void QGraphicsItemPrivate::setFocusHelper(Qt::FocusReason focusReason, bool climb, bool focusFromHide)
{
// Disabled / unfocusable items cannot accept focus.
if (!q_ptr->isEnabled() || !(flags & QGraphicsItem::ItemIsFocusable))
@@ -3272,7 +3276,7 @@ void QGraphicsItemPrivate::setFocusHelper(Qt::FocusReason focusReason, bool clim
if (p->flags() & QGraphicsItem::ItemIsFocusScope) {
QGraphicsItem *oldFocusScopeItem = p->d_ptr->focusScopeItem;
p->d_ptr->focusScopeItem = q_ptr;
- if (!p->focusItem() && !focusFromShow) {
+ if (!p->focusItem() && !focusFromHide) {
if (oldFocusScopeItem)
oldFocusScopeItem->d_ptr->focusScopeItemChange(false);
focusScopeItemChange(true);
@@ -3318,8 +3322,7 @@ void QGraphicsItemPrivate::setFocusHelper(Qt::FocusReason focusReason, bool clim
*/
void QGraphicsItem::clearFocus()
{
- if (hasFocus())
- d_ptr->clearFocusHelper(/* giveFocusToParent = */ true);
+ d_ptr->clearFocusHelper(/* giveFocusToParent = */ true);
}
/*!
@@ -3333,8 +3336,14 @@ void QGraphicsItemPrivate::clearFocusHelper(bool giveFocusToParent)
QGraphicsItem *p = parent;
while (p) {
if (p->flags() & QGraphicsItem::ItemIsFocusScope) {
- p->d_ptr->setFocusHelper(Qt::OtherFocusReason, /* climb = */ false,
- /* focusFromShow = */ false);
+ if (p->d_ptr->focusScopeItem == q_ptr) {
+ p->d_ptr->focusScopeItem = 0;
+ if (!q_ptr->hasFocus()) //if it has focus, focusScopeItemChange is called elsewhere
+ focusScopeItemChange(false);
+ }
+ if (q_ptr->hasFocus())
+ p->d_ptr->setFocusHelper(Qt::OtherFocusReason, /* climb = */ false,
+ /* focusFromHide = */ false);
return;
}
p = p->d_ptr->parent;
@@ -3342,10 +3351,10 @@ void QGraphicsItemPrivate::clearFocusHelper(bool giveFocusToParent)
}
}
- // Invisible items with focus must explicitly clear subfocus.
- clearSubFocus(q_ptr);
-
if (q_ptr->hasFocus()) {
+ // Invisible items with focus must explicitly clear subfocus.
+ clearSubFocus(q_ptr);
+
// If this item has the scene's input focus, clear it.
scene->setFocusItem(0);
}
@@ -3702,6 +3711,8 @@ void QGraphicsItem::setPos(const QPointF &pos)
d_ptr->setPosHelper(pos);
if (d_ptr->isWidget)
static_cast<QGraphicsWidget *>(this)->d_func()->setGeometryFromSetPos();
+ if (d_ptr->scenePosDescendants)
+ d_ptr->sendScenePosChange();
return;
}
@@ -4384,8 +4395,10 @@ void QGraphicsItem::setTransform(const QTransform &matrix, bool combine)
return;
// Update and set the new transformation.
- if (!(d_ptr->flags & ItemSendsGeometryChanges)) {
+ if (!(d_ptr->flags & (ItemSendsGeometryChanges | ItemSendsScenePositionChanges))) {
d_ptr->setTransformHelper(newTransform);
+ if (d_ptr->scenePosDescendants)
+ d_ptr->sendScenePosChange();
return;
}
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h
index c8a7699..1b7aa97 100644
--- a/src/gui/graphicsview/qgraphicsitem_p.h
+++ b/src/gui/graphicsview/qgraphicsitem_p.h
@@ -477,7 +477,7 @@ public:
inline void markParentDirty(bool updateBoundingRect = false);
- void setFocusHelper(Qt::FocusReason focusReason, bool climb, bool focusFromShow);
+ void setFocusHelper(Qt::FocusReason focusReason, bool climb, bool focusFromHide);
void clearFocusHelper(bool giveFocusToParent);
void setSubFocus(QGraphicsItem *rootItem = 0);
void clearSubFocus(QGraphicsItem *rootItem = 0);
@@ -722,7 +722,7 @@ public:
/*!
Returns true if \a item1 is on top of \a item2.
- The items dont need to be siblings.
+ The items don't need to be siblings.
\internal
*/
@@ -776,7 +776,7 @@ inline bool qt_closestItemFirst(const QGraphicsItem *item1, const QGraphicsItem
/*!
Returns true if \a item2 is on top of \a item1.
- The items dont need to be siblings.
+ The items don't need to be siblings.
\internal
*/
diff --git a/src/gui/graphicsview/qgraphicslayoutitem.cpp b/src/gui/graphicsview/qgraphicslayoutitem.cpp
index 34ec4e0..fab1bbb 100644
--- a/src/gui/graphicsview/qgraphicslayoutitem.cpp
+++ b/src/gui/graphicsview/qgraphicslayoutitem.cpp
@@ -140,11 +140,9 @@ QSizeF *QGraphicsLayoutItemPrivate::effectiveSizeHints(const QSizeF &constraint)
if (!sizeHintCacheDirty && cachedConstraint == constraint)
return cachedSizeHints;
- const bool hasConstraint = constraint.width() >= 0 || constraint.height() >= 0;
-
for (int i = 0; i < Qt::NSizeHints; ++i) {
cachedSizeHints[i] = constraint;
- if (userSizeHints && !hasConstraint)
+ if (userSizeHints)
combineSize(cachedSizeHints[i], userSizeHints[i]);
}
diff --git a/src/gui/graphicsview/qgraphicsproxywidget.cpp b/src/gui/graphicsview/qgraphicsproxywidget.cpp
index 320395e..bf61150 100644
--- a/src/gui/graphicsview/qgraphicsproxywidget.cpp
+++ b/src/gui/graphicsview/qgraphicsproxywidget.cpp
@@ -266,8 +266,8 @@ void QGraphicsProxyWidgetPrivate::sendWidgetMouseEvent(QGraphicsSceneMouseEvent
}
if (!lastWidgetUnderMouse) {
- QApplicationPrivate::dispatchEnterLeave(embeddedMouseGrabber ? embeddedMouseGrabber : widget, 0);
- lastWidgetUnderMouse = widget;
+ QApplicationPrivate::dispatchEnterLeave(embeddedMouseGrabber ? embeddedMouseGrabber : receiver, 0);
+ lastWidgetUnderMouse = receiver;
}
// Map event position from us to the receiver
@@ -1508,7 +1508,7 @@ int QGraphicsProxyWidget::type() const
Creates a proxy widget for the given \a child of the widget
contained in this proxy.
- This function makes it possible to aquire proxies for
+ This function makes it possible to acquire proxies for
non top-level widgets. For instance, you can embed a dialog,
and then transform only one of its widgets.
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 5b1da9e..981fbbc 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -3461,7 +3461,8 @@ bool QGraphicsScene::event(QEvent *event)
break;
}
case QEvent::Leave:
- d->leaveScene();
+ // hackieshly unpacking the viewport pointer from the leave event.
+ d->leaveScene(reinterpret_cast<QWidget *>(event->d));
break;
case QEvent::GraphicsSceneHelp:
helpEvent(static_cast<QGraphicsSceneHelpEvent *>(event));
@@ -3933,20 +3934,19 @@ bool QGraphicsScenePrivate::dispatchHoverEvent(QGraphicsSceneHoverEvent *hoverEv
Handles all actions necessary to clean up the scene when the mouse leaves
the view.
*/
-void QGraphicsScenePrivate::leaveScene()
+void QGraphicsScenePrivate::leaveScene(QWidget *viewport)
{
- Q_Q(QGraphicsScene);
#ifndef QT_NO_TOOLTIP
QToolTip::hideText();
#endif
+ QGraphicsView *view = qobject_cast<QGraphicsView *>(viewport->parent());
// Send HoverLeave events to all existing hover items, topmost first.
- QGraphicsView *senderWidget = qobject_cast<QGraphicsView *>(q->sender());
QGraphicsSceneHoverEvent hoverEvent;
- hoverEvent.setWidget(senderWidget);
+ hoverEvent.setWidget(viewport);
- if (senderWidget) {
+ if (view) {
QPoint cursorPos = QCursor::pos();
- hoverEvent.setScenePos(senderWidget->mapToScene(senderWidget->mapFromGlobal(cursorPos)));
+ hoverEvent.setScenePos(view->mapToScene(viewport->mapFromGlobal(cursorPos)));
hoverEvent.setLastScenePos(hoverEvent.scenePos());
hoverEvent.setScreenPos(cursorPos);
hoverEvent.setLastScreenPos(hoverEvent.screenPos());
diff --git a/src/gui/graphicsview/qgraphicsscene_p.h b/src/gui/graphicsview/qgraphicsscene_p.h
index f28dfe9..2818fb2 100644
--- a/src/gui/graphicsview/qgraphicsscene_p.h
+++ b/src/gui/graphicsview/qgraphicsscene_p.h
@@ -201,7 +201,7 @@ public:
bool dispatchHoverEvent(QGraphicsSceneHoverEvent *hoverEvent);
bool itemAcceptsHoverEvents_helper(const QGraphicsItem *item) const;
- void leaveScene();
+ void leaveScene(QWidget *viewport);
void cloneDragDropEvent(QGraphicsSceneDragDropEvent *dest,
QGraphicsSceneDragDropEvent *source);
diff --git a/src/gui/graphicsview/qgraphicssceneevent.cpp b/src/gui/graphicsview/qgraphicssceneevent.cpp
index a0ecd4c..d9ff655 100644
--- a/src/gui/graphicsview/qgraphicssceneevent.cpp
+++ b/src/gui/graphicsview/qgraphicssceneevent.cpp
@@ -1629,7 +1629,7 @@ QGraphicsSceneMoveEvent::~QGraphicsSceneMoveEvent()
}
/*!
- Returns the old position (i.e., the position immediatly before the widget
+ Returns the old position (i.e., the position immediately before the widget
was moved).
\sa newPos(), QGraphicsItem::setPos()
diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp
index 2db29b9..73f1493 100644
--- a/src/gui/graphicsview/qgraphicsview.cpp
+++ b/src/gui/graphicsview/qgraphicsview.cpp
@@ -80,9 +80,7 @@ static const int QGRAPHICSVIEW_PREALLOC_STYLE_OPTIONS = 503; // largest prime <
yourself, you can call setSceneRect(). This will adjust the scroll bars'
ranges appropriately. Note that although the scene supports a virtually
unlimited size, the range of the scroll bars will never exceed the range of
- an integer (INT_MIN, INT_MAX). When the scene is larger than the scroll
- bars' values, you can choose to use translate() to navigate the scene
- instead.
+ an integer (INT_MIN, INT_MAX).
QGraphicsView visualizes the scene by calling render(). By default, the
items are drawn onto the viewport by using a regular QPainter, and using
@@ -101,7 +99,8 @@ static const int QGRAPHICSVIEW_PREALLOC_STYLE_OPTIONS = 503; // largest prime <
convenience functions rotate(), scale(), translate() or shear(). The most
two common transformations are scaling, which is used to implement
zooming, and rotation. QGraphicsView keeps the center of the view fixed
- during a transformation.
+ during a transformation. Because of the scene alignment (setAligment()),
+ translating the view will have no visual impact.
You can interact with the items on the scene by using the mouse and
keyboard. QGraphicsView translates the mouse and key events into \e scene
@@ -2790,6 +2789,9 @@ bool QGraphicsView::viewportEvent(QEvent *event)
d->scene->d_func()->removePopup(d->scene->d_func()->popupWidgets.first());
}
d->useLastMouseEvent = false;
+ // a hack to pass a viewport pointer to the scene inside the leave event
+ Q_ASSERT(event->d == 0);
+ event->d = reinterpret_cast<QEventPrivate *>(viewport());
QApplication::sendEvent(d->scene, event);
break;
#ifndef QT_NO_TOOLTIP
diff --git a/src/gui/graphicsview/qgraphicsview_p.h b/src/gui/graphicsview/qgraphicsview_p.h
index 62be800..38c3bca 100644
--- a/src/gui/graphicsview/qgraphicsview_p.h
+++ b/src/gui/graphicsview/qgraphicsview_p.h
@@ -184,7 +184,7 @@ public:
#ifdef Q_WS_MAC
// QWidget::update() works slightly different on the Mac without the raster engine;
// it's not part of our backing store so it needs special threatment.
- if (QApplicationPrivate::graphics_system_name != "raster") {
+ if (QApplicationPrivate::graphics_system_name != QLatin1String("raster")) {
// At this point either HIViewSetNeedsDisplay (Carbon) or setNeedsDisplay: YES (Cocoa)
// is called, which means there's a pending update request. We want to dispatch it
// now because otherwise graphics view updates would require two
diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp
index 1bfe266..e48f9a7 100644
--- a/src/gui/graphicsview/qgraphicswidget.cpp
+++ b/src/gui/graphicsview/qgraphicswidget.cpp
@@ -450,7 +450,7 @@ void QGraphicsWidget::setGeometry(const QRectF &rect)
bottom.
Contents margins are used by the assigned layout to define the placement
- of subwidgets and layouts. Margins are particularily useful for widgets
+ of subwidgets and layouts. Margins are particularly useful for widgets
that constrain subwidgets to only a section of its own geometry. For
example, a group box with a layout will place subwidgets inside its frame,
but below the title.
@@ -750,6 +750,22 @@ QSizeF QGraphicsWidget::sizeHint(Qt::SizeHint which, const QSizeF &constraint) c
/*!
\property QGraphicsWidget::layout
\brief The layout of the widget
+
+ Any existing layout manager is deleted before the new layout is assigned. If
+ \a layout is 0, the widget is left without a layout. Existing subwidgets'
+ geometries will remain unaffected.
+
+ QGraphicsWidget takes ownership of \a layout.
+
+ All widgets that are currently managed by \a layout or all of its
+ sublayouts, are automatically reparented to this item. The layout is then
+ invalidated, and the child widget geometries are adjusted according to
+ this item's geometry() and contentsMargins(). Children who are not
+ explicitly managed by \a layout remain unaffected by the layout after
+ it has been assigned to this widget.
+
+ If no layout is currently managing this widget, layout() will return 0.
+
*/
/*!
diff --git a/src/gui/graphicsview/qgridlayoutengine.cpp b/src/gui/graphicsview/qgridlayoutengine.cpp
index f8cd593..7f8d574 100644
--- a/src/gui/graphicsview/qgridlayoutengine.cpp
+++ b/src/gui/graphicsview/qgridlayoutengine.cpp
@@ -631,14 +631,17 @@ QRectF QGridLayoutItem::geometryWithin(qreal x, qreal y, qreal width, qreal heig
qreal cellWidth = width;
qreal cellHeight = height;
- QSize constraint;
+
+ QSizeF size = effectiveMaxSize(QSizeF(-1,-1));
if (hasDynamicConstraint()) {
- if (dynamicConstraintOrientation() == Qt::Vertical)
- constraint.setWidth(cellWidth);
- else
- constraint.setHeight(cellHeight);
+ if (dynamicConstraintOrientation() == Qt::Vertical) {
+ if (size.width() > cellWidth)
+ size = effectiveMaxSize(QSizeF(cellWidth, -1));
+ } else if(size.height() > cellHeight) {
+ size = effectiveMaxSize(QSizeF(-1, cellHeight));
+ }
}
- QSizeF size = effectiveMaxSize(constraint).boundedTo(QSizeF(cellWidth, cellHeight));
+ size = size.boundedTo(QSizeF(cellWidth, cellHeight));
width = size.width();
height = size.height();
@@ -714,7 +717,7 @@ QSizeF QGridLayoutItem::effectiveMaxSize(const QSizeF &constraint) const
}
if (!size.isValid()) {
- QSizeF maxSize = layoutItem()->effectiveSizeHint(Qt::MaximumSize, constraint);
+ QSizeF maxSize = layoutItem()->effectiveSizeHint(Qt::MaximumSize, size);
if (size.width() == -1)
size.setWidth(maxSize.width());
if (size.height() == -1)
@@ -1111,20 +1114,76 @@ QRectF QGridLayoutEngine::cellRect(const QLayoutStyleInfo &styleInfo,
QSizeF QGridLayoutEngine::sizeHint(const QLayoutStyleInfo &styleInfo, Qt::SizeHint which,
const QSizeF &constraint) const
{
- ensureColumnAndRowData(styleInfo);
+ QGridLayoutBox sizehint_totalBoxes[NOrientations];
- if (hasDynamicConstraint())
- return dynamicallyConstrainedSizeHint(which, constraint);
+ if(rowCount() < 1 || columnCount() < 1 || !hasDynamicConstraint()) {
+ //No items with height for width, so it doesn't matter which order we do these in
+ if(q_cachedDataForStyleInfo != styleInfo) {
+ ensureColumnAndRowData(&q_columnData, &sizehint_totalBoxes[Hor], styleInfo, NULL, NULL, Qt::Horizontal);
+ ensureColumnAndRowData(&q_rowData, &sizehint_totalBoxes[Ver], styleInfo, NULL, NULL, Qt::Vertical);
+ } else {
+ sizehint_totalBoxes[Hor] = q_totalBoxes[Hor];
+ sizehint_totalBoxes[Ver] = q_totalBoxes[Ver];
+ }
+ } else if(constraintOrientation() == Qt::Vertical) {
+ //We have items whose width depends on their height
+ if(q_cachedDataForStyleInfo != styleInfo)
+ ensureColumnAndRowData(&q_columnData, &sizehint_totalBoxes[Hor], styleInfo, NULL, NULL, Qt::Horizontal);
+ else
+ sizehint_totalBoxes[Hor] = q_totalBoxes[Hor];
+ QVector<qreal> sizehint_xx;
+ QVector<qreal> sizehint_widths;
+
+ sizehint_xx.resize(columnCount());
+ sizehint_widths.resize(columnCount());
+ qreal width = constraint.width();
+ if(width < 0) {
+ /* It's not obvious what the behaviour should be. */
+/* if(which == Qt::MaximumSize)
+ width = sizehint_totalBoxes[Hor].q_maximumSize;
+ else if(which == Qt::MinimumSize)
+ width = sizehint_totalBoxes[Hor].q_minimumSize;
+ else*/
+ width = sizehint_totalBoxes[Hor].q_preferredSize;
+ }
+ //Calculate column widths and positions, and put results in q_xx.data() and q_widths.data() so that we can use this information as
+ //constraints to find the row heights
+ q_columnData.calculateGeometries(0, columnCount(), width, sizehint_xx.data(), sizehint_widths.data(),
+ 0, sizehint_totalBoxes[Hor]);
+ ensureColumnAndRowData(&q_rowData, &sizehint_totalBoxes[Ver], styleInfo, sizehint_xx.data(), sizehint_widths.data(), Qt::Vertical);
+ } else {
+ //We have items whose height depends on their width
+ ensureColumnAndRowData(&q_rowData, &sizehint_totalBoxes[Ver], styleInfo, NULL, NULL, Qt::Vertical);
+ QVector<qreal> sizehint_yy;
+ QVector<qreal> sizehint_heights;
+
+ sizehint_yy.resize(rowCount());
+ sizehint_heights.resize(rowCount());
+ qreal height = constraint.height();
+ if(height < 0) {
+/* if(which == Qt::MaximumSize)
+ height = sizehint_totalBoxes[Ver].q_maximumSize;
+ else if(which == Qt::MinimumSize)
+ height = sizehint_totalBoxes[Ver].q_minimumSize;
+ else*/
+ height = sizehint_totalBoxes[Ver].q_preferredSize;
+ }
+ //Calculate row heights and positions, and put results in q_yy.data() and q_heights.data() so that we can use this information as
+ //constraints to find the column widths
+ q_rowData.calculateGeometries(0, rowCount(), height, sizehint_yy.data(), sizehint_heights.data(),
+ 0, sizehint_totalBoxes[Ver]);
+ ensureColumnAndRowData(&q_columnData, &sizehint_totalBoxes[Hor], styleInfo, sizehint_yy.data(), sizehint_heights.data(), Qt::Vertical);
+ }
switch (which) {
case Qt::MinimumSize:
- return QSizeF(q_totalBoxes[Hor].q_minimumSize, q_totalBoxes[Ver].q_minimumSize);
+ return QSizeF(sizehint_totalBoxes[Hor].q_minimumSize, sizehint_totalBoxes[Ver].q_minimumSize);
case Qt::PreferredSize:
- return QSizeF(q_totalBoxes[Hor].q_preferredSize, q_totalBoxes[Ver].q_preferredSize);
+ return QSizeF(sizehint_totalBoxes[Hor].q_preferredSize, sizehint_totalBoxes[Ver].q_preferredSize);
case Qt::MaximumSize:
- return QSizeF(q_totalBoxes[Hor].q_maximumSize, q_totalBoxes[Ver].q_maximumSize);
+ return QSizeF(sizehint_totalBoxes[Hor].q_maximumSize, sizehint_totalBoxes[Ver].q_maximumSize);
case Qt::MinimumDescent:
- return QSizeF(-1.0, q_totalBoxes[Hor].q_minimumDescent); // ### doesn't work
+ return QSizeF(-1.0, sizehint_totalBoxes[Hor].q_minimumDescent); // ### doesn't work
default:
break;
}
@@ -1300,6 +1359,7 @@ void QGridLayoutEngine::insertOrRemoveRows(int row, int delta, Qt::Orientation o
}
void QGridLayoutEngine::fillRowData(QGridLayoutRowData *rowData, const QLayoutStyleInfo &styleInfo,
+ qreal *colPositions, qreal *colSizes,
Qt::Orientation orientation) const
{
const int ButtonMask = QSizePolicy::ButtonBox | QSizePolicy::PushButton;
@@ -1413,11 +1473,21 @@ void QGridLayoutEngine::fillRowData(QGridLayoutRowData *rowData, const QLayoutSt
box = &multiCell.q_box;
multiCell.q_stretch = itemStretch;
}
- // Items with constraints are not included in the orientation that
- // they are constrained (since it depends on the hfw/constraint function).
- // They must be combined at a later stage.
- if (!item->hasDynamicConstraint() || orientation != item->dynamicConstraintOrientation())
+ // Items with constraints need to be passed the constraint
+ if (colSizes && colPositions && item->hasDynamicConstraint() && orientation == item->dynamicConstraintOrientation()) {
+ /* Get the width of the item by summing up the widths of the columns that it spans.
+ * We need to have already calculated the widths of the columns by calling
+ * q_columns->calculateGeometries() before hand and passing the value in the colSizes
+ * and colPositions parameters.
+ * The variable name is still colSizes even when it actually has the row sizes
+ */
+ qreal length = colSizes[item->lastColumn(orientation)];
+ if (item->columnSpan(orientation) != 1)
+ length += colPositions[item->lastColumn(orientation)] - colPositions[item->firstColumn(orientation)];
+ box->combine(item->box(orientation, length));
+ } else {
box->combine(item->box(orientation));
+ }
if (effectiveRowSpan == 1) {
QSizePolicy::ControlTypes controls = item->controlTypes(top);
@@ -1554,115 +1624,18 @@ void QGridLayoutEngine::ensureEffectiveFirstAndLastRows() const
}
}
-void QGridLayoutEngine::ensureColumnAndRowData(const QLayoutStyleInfo &styleInfo) const
+void QGridLayoutEngine::ensureColumnAndRowData(QGridLayoutRowData *rowData, QGridLayoutBox *totalBox,
+ const QLayoutStyleInfo &styleInfo,
+ qreal *colPositions, qreal *colSizes,
+ Qt::Orientation orientation) const
{
- if (q_cachedDataForStyleInfo == styleInfo)
- return;
-
- q_columnData.reset(columnCount());
- q_rowData.reset(rowCount());
-
- fillRowData(&q_columnData, styleInfo, Qt::Horizontal);
- fillRowData(&q_rowData, styleInfo, Qt::Vertical);
-
- q_columnData.distributeMultiCells();
- q_rowData.distributeMultiCells();
-
- q_totalBoxes[Hor] = q_columnData.totalBox(0, columnCount());
- q_totalBoxes[Ver] = q_rowData.totalBox(0, rowCount());
-
- q_cachedDataForStyleInfo = styleInfo;
+ rowData->reset(rowCount(orientation));
+ fillRowData(rowData, styleInfo, colPositions, colSizes, orientation);
+ rowData->distributeMultiCells();
+ *totalBox = rowData->totalBox(0, rowCount(orientation));
+ //We have items whose width depends on their height
}
-QSizeF QGridLayoutEngine::dynamicallyConstrainedSizeHint(Qt::SizeHint which,
- const QSizeF &constraint) const
-{
- Q_ASSERT(hasDynamicConstraint());
- if (constraint.width() < 0 && constraint.height() < 0) {
- // Process the hfw / wfh items that we did not process in fillRowData()
- const Qt::Orientation constraintOrient = constraintOrientation();
-
- QGridLayoutRowData rowData = constraintOrient == Qt::Vertical ? q_rowData : q_columnData;
- for (int i = q_items.count() - 1; i >= 0; --i) {
- QGridLayoutItem *item = q_items.at(i);
- if (item->hasDynamicConstraint()) {
- QGridLayoutBox box = item->box(constraintOrient);
- QGridLayoutBox &rowBox = rowData.boxes[item->firstRow(constraintOrient)];
- rowBox.combine(box);
- }
- }
-
- QGridLayoutBox totalBoxes[2];
- if (constraintOrient == Qt::Vertical) {
- totalBoxes[Hor] = q_columnData.totalBox(0, columnCount());
- totalBoxes[Ver] = rowData.totalBox(0, rowCount());
- } else {
- totalBoxes[Hor] = rowData.totalBox(0, columnCount());
- totalBoxes[Ver] = q_rowData.totalBox(0, rowCount());
- }
- return QSizeF(totalBoxes[Hor].q_sizes(which), totalBoxes[Ver].q_sizes(which));
- }
-
-
- Q_ASSERT(constraint.width() >= 0 || constraint.height() >= 0);
- q_xx.resize(columnCount());
- q_yy.resize(rowCount());
- q_widths.resize(columnCount());
- q_heights.resize(rowCount());
- q_descents.resize(rowCount());
-
-
- const Qt::Orientation orientation = constraintOrientation();
- QGridLayoutRowData *colData;
- QGridLayoutRowData constrainedRowData;
- QGridLayoutBox *totalBox;
- qreal *sizes;
- qreal *pos;
- qreal *descents;
- qreal targetSize;
- qreal cCount;
- qreal rCount;
-
- if (orientation == Qt::Vertical) {
- // height for width
- colData = &q_columnData;
- totalBox = &q_totalBoxes[Hor];
- sizes = q_widths.data();
- pos = q_xx.data();
- descents = 0;
- targetSize = constraint.width();
- cCount = columnCount();
- rCount = rowCount();
- constrainedRowData = q_rowData;
- } else {
- // width for height
- colData = &q_rowData;
- totalBox = &q_totalBoxes[Ver];
- sizes = q_heights.data();
- pos = q_yy.data();
- descents = q_descents.data();
- targetSize = constraint.height();
- cCount = rowCount();
- rCount = columnCount();
- constrainedRowData = q_columnData;
- }
- colData->calculateGeometries(0, cCount, targetSize, pos, sizes, descents, *totalBox);
- for (int i = q_items.count() - 1; i >= 0; --i) {
- QGridLayoutItem *item = q_items.at(i);
-
- if (item->hasDynamicConstraint()) {
- const qreal size = sizes[item->firstColumn(orientation)];
- QGridLayoutBox box = item->box(orientation, size);
- QGridLayoutBox &rowBox = constrainedRowData.boxes[item->firstRow(orientation)];
- rowBox.combine(box);
- }
- }
- const qreal newSize = constrainedRowData.totalBox(0, rCount).q_sizes(which);
-
- return (orientation == Qt::Vertical) ? QSizeF(targetSize, newSize) : QSizeF(newSize, targetSize);
-}
-
-
/**
returns false if the layout has contradicting constraints (i.e. some items with a horizontal
constraint and other items with a vertical constraint)
@@ -1709,85 +1682,41 @@ Qt::Orientation QGridLayoutEngine::constraintOrientation() const
void QGridLayoutEngine::ensureGeometries(const QLayoutStyleInfo &styleInfo,
const QSizeF &size) const
{
- ensureColumnAndRowData(styleInfo);
- if (q_cachedSize == size)
+ if (q_cachedDataForStyleInfo == styleInfo && q_cachedSize == size)
return;
+ q_cachedDataForStyleInfo = styleInfo;
+ q_cachedSize = size;
+
q_xx.resize(columnCount());
- q_yy.resize(rowCount());
q_widths.resize(columnCount());
+ q_yy.resize(rowCount());
q_heights.resize(rowCount());
q_descents.resize(rowCount());
-
- Qt::Orientation orientation = Qt::Vertical;
- if (hasDynamicConstraint())
- orientation = constraintOrientation();
-
- /*
- In order to do hfw we need to first distribute the columns, then the rows.
- In order to do wfh we need to first distribute the rows, then the columns.
-
- If there is no constraint, the order of distributing the rows or columns first is irrelevant.
- We choose horizontal just to keep the same behaviour as before (however, there shouldn't
- be any behaviour difference).
- */
-
- QGridLayoutRowData *colData;
- QGridLayoutRowData rowData;
- qreal *widths;
- qreal *heights;
- qreal *xx;
- qreal *yy;
- qreal *xdescents = 0;
- qreal *ydescents = 0;
- qreal cCount;
- qreal rCount;
- QSizeF oSize = size;
- if (orientation == Qt::Vertical) {
- // height for width
- colData = &q_columnData;
- rowData = q_rowData;
- widths = q_widths.data();
- heights = q_heights.data();
- xx = q_xx.data();
- yy = q_yy.data();
- cCount = columnCount();
- rCount = rowCount();
- ydescents = q_descents.data();
+ if(constraintOrientation() != Qt::Horizontal) {
+ //We might have items whose width depends on their height
+ ensureColumnAndRowData(&q_columnData, &q_totalBoxes[Hor], styleInfo, NULL, NULL, Qt::Horizontal);
+ //Calculate column widths and positions, and put results in q_xx.data() and q_widths.data() so that we can use this information as
+ //constraints to find the row heights
+ q_columnData.calculateGeometries(0, columnCount(), size.width(), q_xx.data(), q_widths.data(),
+ 0, q_totalBoxes[Hor]);
+ ensureColumnAndRowData(&q_rowData, &q_totalBoxes[Ver], styleInfo, q_xx.data(), q_widths.data(), Qt::Vertical);
+ //Calculate row heights and positions, and put results in q_yy.data() and q_heights.data()
+ q_rowData.calculateGeometries(0, rowCount(), size.height(), q_yy.data(), q_heights.data(),
+ q_descents.data(), q_totalBoxes[Ver]);
} else {
- // width for height
- colData = &q_rowData;
- rowData = q_columnData;
- widths = q_heights.data();
- heights = q_widths.data();
- xx = q_yy.data();
- yy = q_xx.data();
- cCount = rowCount();
- rCount = columnCount();
- xdescents = q_descents.data();
- oSize.transpose();
+ //We have items whose height depends on their width
+ ensureColumnAndRowData(&q_rowData, &q_totalBoxes[Ver], styleInfo, NULL, NULL, Qt::Vertical);
+ //Calculate row heights and positions, and put results in q_yy.data() and q_heights.data() so that we can use this information as
+ //constraints to find the column widths
+ q_rowData.calculateGeometries(0, rowCount(), size.height(), q_yy.data(), q_heights.data(),
+ q_descents.data(), q_totalBoxes[Ver]);
+ ensureColumnAndRowData(&q_columnData, &q_totalBoxes[Hor], styleInfo, q_yy.data(), q_heights.data(), Qt::Horizontal);
+ //Calculate row heights and positions, and put results in q_yy.data() and q_heights.data()
+ q_columnData.calculateGeometries(0, columnCount(), size.width(), q_xx.data(), q_widths.data(),
+ 0, q_totalBoxes[Hor]);
}
-
- colData->calculateGeometries(0, cCount, oSize.width(), xx, widths,
- xdescents, q_totalBoxes[orientation == Qt::Horizontal]);
- for (int i = q_items.count() - 1; i >= 0; --i) {
- QGridLayoutItem *item = q_items.at(i);
- const int col = item->firstColumn(orientation);
- const int row = item->firstRow(orientation);
- if (item->hasDynamicConstraint()) {
- const qreal sz = widths[col];
- QGridLayoutBox box = item->box(orientation, sz);
- rowData.boxes[row].combine(box);
- }
- }
-
- QGridLayoutBox &totalBox = q_totalBoxes[orientation == Qt::Vertical];
- totalBox = rowData.totalBox(0, rCount);
- rowData.calculateGeometries(0, rCount, oSize.height(), yy, heights,
- ydescents, totalBox);
-
- q_cachedSize = size;
}
QT_END_NAMESPACE
diff --git a/src/gui/graphicsview/qgridlayoutengine_p.h b/src/gui/graphicsview/qgridlayoutengine_p.h
index 55451d7..7c77b2a 100644
--- a/src/gui/graphicsview/qgridlayoutengine_p.h
+++ b/src/gui/graphicsview/qgridlayoutengine_p.h
@@ -93,8 +93,8 @@ enum LayoutSide {
enum {
NoConstraint,
- HorizontalConstraint,
- VerticalConstraint,
+ HorizontalConstraint, // Width depends on the height
+ VerticalConstraint, // Height depends on the width
UnknownConstraint, // need to update cache
UnfeasibleConstraint // not feasible, it be has some items with Vertical and others with Horizontal constraints
};
@@ -411,9 +411,14 @@ private:
void setItemAt(int row, int column, QGridLayoutItem *item);
void insertOrRemoveRows(int row, int delta, Qt::Orientation orientation = Qt::Vertical);
void fillRowData(QGridLayoutRowData *rowData, const QLayoutStyleInfo &styleInfo,
- Qt::Orientation orientation = Qt::Vertical) const;
+ qreal *colPositions, qreal *colSizes,
+ Qt::Orientation orientation = Qt::Vertical) const;
void ensureEffectiveFirstAndLastRows() const;
- void ensureColumnAndRowData(const QLayoutStyleInfo &styleInfo) const;
+ void ensureColumnAndRowData(QGridLayoutRowData *rowData, QGridLayoutBox *totalBox,
+ const QLayoutStyleInfo &styleInfo,
+ qreal *colPositions, qreal *colSizes,
+ Qt::Orientation orientation) const;
+
void ensureGeometries(const QLayoutStyleInfo &styleInfo, const QSizeF &size) const;
// User input
diff --git a/src/gui/gui.pro b/src/gui/gui.pro
index 90b5de5..11a25e2 100644
--- a/src/gui/gui.pro
+++ b/src/gui/gui.pro
@@ -5,7 +5,7 @@ DEFINES += QT_BUILD_GUI_LIB QT_NO_USING_NAMESPACE
win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x65000000
irix-cc*:QMAKE_CXXFLAGS += -no_prelink -ptused
-!win32:!embedded:!mac:!symbian:CONFIG += x11
+!win32:!embedded:!qpa:!mac:!symbian:CONFIG += x11
unix:QMAKE_PKGCONFIG_REQUIRES = QtCore
@@ -64,13 +64,12 @@ symbian {
neon:*-g++* {
DEFINES += QT_HAVE_NEON
- QMAKE_CXXFLAGS *= -mfpu=neon
HEADERS += $$NEON_HEADERS
SOURCES += $$NEON_SOURCES
DRAWHELPER_NEON_ASM_FILES = $$NEON_ASM
- neon_compiler.commands = $$QMAKE_CXX -c
+ neon_compiler.commands = $$QMAKE_CXX -c -mfpu=neon
neon_compiler.commands += $(CXXFLAGS) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
neon_compiler.dependency_type = TYPE_C
neon_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
diff --git a/src/gui/image/image.pri b/src/gui/image/image.pri
index f89706c..92ea397 100644
--- a/src/gui/image/image.pri
+++ b/src/gui/image/image.pri
@@ -23,6 +23,7 @@ HEADERS += \
image/qpictureformatplugin.h \
image/qpixmap.h \
image/qpixmap_raster_p.h \
+ image/qpixmap_blitter_p.h \
image/qpixmapcache.h \
image/qpixmapcache_p.h \
image/qpixmapdata_p.h \
@@ -50,6 +51,7 @@ SOURCES += \
image/qiconengineplugin.cpp \
image/qmovie.cpp \
image/qpixmap_raster.cpp \
+ image/qpixmap_blitter.cpp \
image/qnativeimage.cpp \
image/qimagepixmapcleanuphooks.cpp
@@ -59,6 +61,9 @@ win32 {
else:embedded {
SOURCES += image/qpixmap_qws.cpp
}
+else:qpa {
+ SOURCES += image/qpixmap_qpa.cpp
+}
else:x11 {
HEADERS += image/qpixmap_x11_p.h
SOURCES += image/qpixmap_x11.cpp
diff --git a/src/gui/image/qbitmap.cpp b/src/gui/image/qbitmap.cpp
index 91622f3..9d90b3f 100644
--- a/src/gui/image/qbitmap.cpp
+++ b/src/gui/image/qbitmap.cpp
@@ -227,6 +227,14 @@ QBitmap::~QBitmap()
}
/*!
+ \fn void QBitmap::swap(QBitmap &other)
+ \since 4.8
+
+ Swaps bitmap \a other with this bitmap. This operation is very
+ fast and never fails.
+*/
+
+/*!
Returns the bitmap as a QVariant.
*/
QBitmap::operator QVariant() const
diff --git a/src/gui/image/qbitmap.h b/src/gui/image/qbitmap.h
index 1bbe1cf..93be951 100644
--- a/src/gui/image/qbitmap.h
+++ b/src/gui/image/qbitmap.h
@@ -63,6 +63,7 @@ public:
~QBitmap();
QBitmap &operator=(const QPixmap &);
+ inline void swap(QBitmap &other) { QPixmap::swap(other); } // prevent QBitmap<->QPixmap swaps
operator QVariant() const;
inline void clear() { fill(Qt::color0); }
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index a2f429a..e54bb5f 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -613,6 +613,14 @@ QIcon &QIcon::operator=(const QIcon &other)
}
/*!
+ \fn void QIcon::swap(QIcon &other)
+ \since 4.8
+
+ Swaps icon \a other with this icon. This operation is very
+ fast and never fails.
+*/
+
+/*!
Returns the icon as a QVariant.
*/
QIcon::operator QVariant() const
diff --git a/src/gui/image/qicon.h b/src/gui/image/qicon.h
index fd591e6..5091d03 100644
--- a/src/gui/image/qicon.h
+++ b/src/gui/image/qicon.h
@@ -75,6 +75,8 @@ public:
inline QIcon &operator=(QIcon &&other)
{ qSwap(d, other.d); return *this; }
#endif
+ inline void swap(QIcon &other) { qSwap(d, other.d); }
+
operator QVariant() const;
QPixmap pixmap(const QSize &size, Mode mode = Normal, State state = Off) const;
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 300e04b..d86021cb9 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -1329,6 +1329,14 @@ QImage &QImage::operator=(const QImage &image)
}
/*!
+ \fn void QImage::swap(QImage &other)
+ \since 4.8
+
+ Swaps image \a other with this image. This operation is very
+ fast and never fails.
+*/
+
+/*!
\internal
*/
int QImage::devType() const
@@ -6689,6 +6697,10 @@ bool QImageData::convertInPlace(QImage::Format newFormat, Qt::ImageConversionFla
if (format == newFormat)
return true;
+ // No in-place conversion if we have to detach
+ if (ref > 1)
+ return false;
+
const InPlace_Image_Converter *const converterPtr = &inplace_converter_map[format][newFormat];
InPlace_Image_Converter converter = *converterPtr;
if (converter)
diff --git a/src/gui/image/qimage.h b/src/gui/image/qimage.h
index 4fe7da2..c6a947e 100644
--- a/src/gui/image/qimage.h
+++ b/src/gui/image/qimage.h
@@ -144,6 +144,7 @@ public:
inline QImage &operator=(QImage &&other)
{ qSwap(d, other.d); return *this; }
#endif
+ inline void swap(QImage &other) { qSwap(d, other.d); }
bool isNull() const;
@@ -334,6 +335,7 @@ private:
QImageData *d;
friend class QRasterPixmapData;
+ friend class QBlittablePixmapData;
friend class QPixmapCacheEntry;
friend Q_GUI_EXPORT qint64 qt_image_id(const QImage &image);
friend const QVector<QRgb> *qt_image_colortable(const QImage &image);
diff --git a/src/gui/image/qimage_ssse3.cpp b/src/gui/image/qimage_ssse3.cpp
index 9aed011..836d7b0 100644
--- a/src/gui/image/qimage_ssse3.cpp
+++ b/src/gui/image/qimage_ssse3.cpp
@@ -54,7 +54,7 @@ Q_GUI_EXPORT void QT_FASTCALL qt_convert_rgb888_to_rgb32_ssse3(quint32 *dst, con
{
quint32 *const end = dst + len;
- // Prologue, align dst to 16 bytes. The alignement is done on dst because it has 4 store()
+ // Prologue, align dst to 16 bytes. The alignment 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);
diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp
index 8446387..0f7872e 100644
--- a/src/gui/image/qnativeimage.cpp
+++ b/src/gui/image/qnativeimage.cpp
@@ -45,6 +45,9 @@
#include "private/qpaintengine_raster_p.h"
+#include "private/qapplication_p.h"
+#include "private/qgraphicssystem_p.h"
+
#if defined(Q_WS_X11) && !defined(QT_NO_MITSHM)
#include <qx11info_x11.h>
#include <sys/ipc.h>
@@ -241,8 +244,19 @@ QNativeImage::QNativeImage(int width, int height, QImage::Format format, bool /*
: image(width, height, format)
{
-
uint cgflags = kCGImageAlphaNoneSkipFirst;
+ switch (format) {
+ case QImage::Format_ARGB32:
+ cgflags = kCGImageAlphaFirst;
+ break;
+ case QImage::Format_ARGB32_Premultiplied:
+ case QImage::Format_ARGB8565_Premultiplied:
+ case QImage::Format_ARGB6666_Premultiplied:
+ case QImage::Format_ARGB8555_Premultiplied:
+ case QImage::Format_ARGB4444_Premultiplied:
+ cgflags = kCGImageAlphaPremultipliedFirst;
+ break;
+ }
#ifdef kCGBitmapByteOrder32Host //only needed because CGImage.h added symbols in the minor version
cgflags |= kCGBitmapByteOrder32Host;
@@ -284,7 +298,11 @@ QNativeImage::~QNativeImage()
QImage::Format QNativeImage::systemFormat()
{
+#ifdef Q_WS_QPA
+ return QApplicationPrivate::platformIntegration()->screens().at(0)->format();
+#else
return QImage::Format_RGB32;
+#endif
}
#endif // platforms
diff --git a/src/gui/image/qpicture.cpp b/src/gui/image/qpicture.cpp
index 48d2de3..fc81d23 100644
--- a/src/gui/image/qpicture.cpp
+++ b/src/gui/image/qpicture.cpp
@@ -1030,6 +1030,14 @@ QPicture& QPicture::operator=(const QPicture &p)
}
/*!
+ \fn void QPicture::swap(QPicture &other)
+ \since 4.8
+
+ Swaps picture \a other with this picture. This operation is very
+ fast and never fails.
+*/
+
+/*!
\internal
Constructs a QPicturePrivate
diff --git a/src/gui/image/qpicture.h b/src/gui/image/qpicture.h
index 49b0fd6..d24f23a 100644
--- a/src/gui/image/qpicture.h
+++ b/src/gui/image/qpicture.h
@@ -85,6 +85,7 @@ public:
inline QPicture &operator=(QPicture &&other)
{ qSwap(d_ptr, other.d_ptr); return *this; }
#endif
+ inline void swap(QPicture &other) { d_ptr.swap(other.d_ptr); }
void detach();
bool isDetached() const;
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index ad07fbd..9fd10ae 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -440,6 +440,14 @@ QPixmap &QPixmap::operator=(const QPixmap &pixmap)
}
/*!
+ \fn void QPixmap::swap(QPixmap &other)
+ \since 4.8
+
+ Swaps pixmap \a other with this pixmap. This operation is very
+ fast and never fails.
+*/
+
+/*!
Returns the pixmap as a QVariant.
*/
QPixmap::operator QVariant() const
@@ -1102,6 +1110,9 @@ QPixmap QPixmap::grabWidget(QWidget * widget, const QRect &rect)
return QPixmap();
QPixmap res(r.size());
+ if (!qt_widget_private(widget)->isOpaque)
+ res.fill(Qt::transparent);
+
widget->d_func()->render(&res, QPoint(), r, QWidget::DrawWindowBackground
| QWidget::DrawChildren | QWidget::IgnoreMask, true);
return res;
@@ -1964,6 +1975,8 @@ int QPixmap::defaultDepth()
return 32;
#elif defined(Q_OS_SYMBIAN)
return S60->screenDepth;
+#elif defined(Q_WS_QPA)
+ return 32; //LITE: use graphicssystem (we should do that in general)
#endif
}
diff --git a/src/gui/image/qpixmap.h b/src/gui/image/qpixmap.h
index e9f9365..15fe5fa 100644
--- a/src/gui/image/qpixmap.h
+++ b/src/gui/image/qpixmap.h
@@ -87,6 +87,8 @@ public:
inline QPixmap &operator=(QPixmap &&other)
{ qSwap(data, other.data); return *this; }
#endif
+ inline void swap(QPixmap &other) { qSwap(data, other.data); }
+
operator QVariant() const;
bool isNull() const; // ### Qt 5: make inline
diff --git a/src/gui/image/qpixmap_blitter.cpp b/src/gui/image/qpixmap_blitter.cpp
new file mode 100644
index 0000000..e8a7b89
--- /dev/null
+++ b/src/gui/image/qpixmap_blitter.cpp
@@ -0,0 +1,311 @@
+/****************************************************************************
+**
+** 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 "qpixmap_blitter_p.h"
+
+#include <qpainter.h>
+#include <qimage.h>
+
+#include <private/qapplication_p.h>
+#include <private/qgraphicssystem_p.h>
+#include <private/qblittable_p.h>
+
+#include <private/qdrawhelper_p.h>
+
+#ifndef QT_NO_BLITTABLE
+QT_BEGIN_NAMESPACE
+
+static int global_ser_no = 0;
+
+QBlittablePixmapData::QBlittablePixmapData()
+ : QPixmapData(QPixmapData::PixmapType,BlitterClass), m_engine(0), m_blittable(0)
+#ifdef QT_BLITTER_RASTEROVERLAY
+ ,m_rasterOverlay(0), m_unmergedCopy(0)
+#endif //QT_BLITTER_RASTEROVERLAY
+{
+ setSerialNumber(++global_ser_no);
+}
+
+QBlittablePixmapData::~QBlittablePixmapData()
+{
+ delete m_blittable;
+ delete m_engine;
+#ifdef QT_BLITTER_RASTEROVERLAY
+ delete m_rasterOverlay;
+ delete m_unmergedCopy;
+#endif //QT_BLITTER_RASTEROVERLAY
+}
+
+QBlittable *QBlittablePixmapData::blittable() const
+{
+ if (!m_blittable) {
+ QBlittablePixmapData *that = const_cast<QBlittablePixmapData *>(this);
+ that->m_blittable = this->createBlittable(QSize(w,h));
+ }
+
+ return m_blittable;
+}
+
+void QBlittablePixmapData::setBlittable(QBlittable *blittable)
+{
+ resize(blittable->size().width(),blittable->size().height());
+ m_blittable = blittable;
+}
+
+void QBlittablePixmapData::resize(int width, int height)
+{
+
+ delete m_blittable;
+ m_blittable = 0;
+ delete m_engine;
+ m_engine = 0;
+#ifdef Q_WS_QPA
+ d = QApplicationPrivate::platformIntegration()->screens().at(0)->depth();
+#endif
+ w = width;
+ h = height;
+ is_null = (w <= 0 || h <= 0);
+}
+Q_GUI_EXPORT extern int qt_defaultDpiX();
+Q_GUI_EXPORT extern int qt_defaultDpiY();
+
+int QBlittablePixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const
+{
+ switch (metric) {
+ case QPaintDevice::PdmWidth:
+ return w;
+ case QPaintDevice::PdmHeight:
+ return h;
+ case QPaintDevice::PdmWidthMM:
+ return qRound(w * 25.4 / qt_defaultDpiX());
+ case QPaintDevice::PdmHeightMM:
+ return qRound(h * 25.4 / qt_defaultDpiY());
+ case QPaintDevice::PdmDepth:
+ return 32;
+ case QPaintDevice::PdmDpiX: // fall-through
+ case QPaintDevice::PdmPhysicalDpiX:
+ return qt_defaultDpiX();
+ case QPaintDevice::PdmDpiY: // fall-through
+ case QPaintDevice::PdmPhysicalDpiY:
+ return qt_defaultDpiY();
+ default:
+ qWarning("QRasterPixmapData::metric(): Unhandled metric type %d", metric);
+ break;
+ }
+
+ return 0;
+}
+
+void QBlittablePixmapData::fill(const QColor &color)
+{
+ //jlind: todo: change when blittables can support non opaque fillRects
+ if (color.alpha() == 255 && blittable()->capabilities() & QBlittable::SolidRectCapability) {
+ blittable()->unlock();
+ blittable()->fillRect(QRectF(0,0,w,h),color);
+ }else {
+ uint pixel;
+ switch (blittable()->lock()->format()) {
+ case QImage::Format_ARGB32_Premultiplied:
+ pixel = PREMUL(color.rgba());
+ break;
+ case QImage::Format_ARGB8565_Premultiplied:
+ pixel = qargb8565(color.rgba()).rawValue();
+ break;
+ case QImage::Format_ARGB8555_Premultiplied:
+ pixel = qargb8555(color.rgba()).rawValue();
+ break;
+ case QImage::Format_ARGB6666_Premultiplied:
+ pixel = qargb6666(color.rgba()).rawValue();
+ break;
+ case QImage::Format_ARGB4444_Premultiplied:
+ pixel = qargb4444(color.rgba()).rawValue();
+ break;
+ default:
+ pixel = color.rgba();
+ break;
+ }
+ //so premultiplied formats are supported and ARGB32 and RGB32
+ blittable()->lock()->fill(pixel);
+ }
+
+}
+
+QImage *QBlittablePixmapData::buffer()
+{
+ return blittable()->lock();
+}
+
+QImage QBlittablePixmapData::toImage() const
+{
+ return blittable()->lock()->copy();
+}
+
+bool QBlittablePixmapData::hasAlphaChannel() const
+{
+ return blittable()->lock()->hasAlphaChannel();
+}
+
+void QBlittablePixmapData::fromImage(const QImage &image,
+ Qt::ImageConversionFlags flags)
+{
+ resize(image.width(),image.height());
+ markRasterOverlay(QRect(0,0,w,h));
+ QImage *thisImg = buffer();
+
+ QImage correctFormatPic = image;
+ if (correctFormatPic.format() != thisImg->format())
+ correctFormatPic = correctFormatPic.convertToFormat(thisImg->format(), flags);
+
+ uchar *mem = thisImg->bits();
+ const uchar *bits = correctFormatPic.bits();
+ int bytesCopied = 0;
+ while (bytesCopied < correctFormatPic.byteCount()) {
+ memcpy(mem,bits,correctFormatPic.bytesPerLine());
+ mem += thisImg->bytesPerLine();
+ bits += correctFormatPic.bytesPerLine();
+ bytesCopied+=correctFormatPic.bytesPerLine();
+ }
+}
+
+QPaintEngine *QBlittablePixmapData::paintEngine() const
+{
+ if (!m_engine) {
+ QBlittablePixmapData *that = const_cast<QBlittablePixmapData *>(this);
+ that->m_engine = new QBlitterPaintEngine(that);
+ }
+ return m_engine;
+}
+
+#ifdef QT_BLITTER_RASTEROVERLAY
+
+static bool showRasterOverlay = !qgetenv("QT_BLITTER_RASTEROVERLAY").isEmpty();
+
+void QBlittablePixmapData::mergeOverlay()
+{
+ if (m_unmergedCopy || !showRasterOverlay)
+ return;
+ m_unmergedCopy = new QImage(buffer()->copy());
+ QPainter p(buffer());
+ p.setCompositionMode(QPainter::CompositionMode_SourceOver);
+ p.drawImage(0,0,*overlay());
+ p.end();
+}
+
+void QBlittablePixmapData::unmergeOverlay()
+{
+ if (!m_unmergedCopy || !showRasterOverlay)
+ return;
+ QPainter p(buffer());
+ p.setCompositionMode(QPainter::CompositionMode_Source);
+ p.drawImage(0,0,*m_unmergedCopy);
+ p.end();
+
+ delete m_unmergedCopy;
+ m_unmergedCopy = 0;
+}
+
+QImage *QBlittablePixmapData::overlay()
+{
+ if (!m_rasterOverlay||
+ m_rasterOverlay->size() != QSize(w,h)){
+ m_rasterOverlay = new QImage(w,h,QImage::Format_ARGB32_Premultiplied);
+ m_rasterOverlay->fill(0x00000000);
+ uint color = (qrand() % 11)+7;
+ m_overlayColor = QColor(Qt::GlobalColor(color));
+ m_overlayColor.setAlpha(0x88);
+
+ }
+ return m_rasterOverlay;
+}
+
+void QBlittablePixmapData::markRasterOverlayImpl(const QRectF &rect)
+{
+ if (!showRasterOverlay)
+ return;
+ QRectF transformationRect = clipAndTransformRect(rect);
+ if(!transformationRect.isEmpty()) {
+ QPainter p(overlay());
+ p.setBrush(m_overlayColor);
+ p.setCompositionMode(QPainter::CompositionMode_Source);
+ p.fillRect(transformationRect,QBrush(m_overlayColor));
+ }
+}
+
+void QBlittablePixmapData::unmarkRasterOverlayImpl(const QRectF &rect)
+{
+ if (!showRasterOverlay)
+ return;
+ QRectF transformationRect = clipAndTransformRect(rect);
+ if (!transformationRect.isEmpty()) {
+ QPainter p(overlay());
+ QColor color(0x00,0x00,0x00,0x00);
+ p.setBrush(color);
+ p.setCompositionMode(QPainter::CompositionMode_Source);
+ p.fillRect(transformationRect,QBrush(color));
+ }
+}
+
+QRectF QBlittablePixmapData::clipAndTransformRect(const QRectF &rect) const
+{
+ QRectF transformationRect = rect;
+ paintEngine();
+ if (m_engine->state()) {
+ transformationRect = m_engine->state()->matrix.mapRect(rect);
+ const QClipData *clipData = m_engine->clip();
+ if (clipData) {
+ if (clipData->hasRectClip) {
+ transformationRect &= clipData->clipRect;
+ } else if (clipData->hasRegionClip) {
+ const QVector<QRect> rects = clipData->clipRegion.rects();
+ for (int i = 0; i < rects.size(); i++) {
+ transformationRect &= rects.at(i);
+ }
+ }
+ }
+ }
+ return transformationRect;
+}
+
+#endif //QT_BLITTER_RASTEROVERLAY
+
+QT_END_NAMESPACE
+
+#endif //QT_NO_BLITTABLE
diff --git a/src/gui/image/qpixmap_blitter_p.h b/src/gui/image/qpixmap_blitter_p.h
new file mode 100644
index 0000000..55b5618
--- /dev/null
+++ b/src/gui/image/qpixmap_blitter_p.h
@@ -0,0 +1,166 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#ifndef QPIXMAP_BLITTER_P_H
+#define QPIXMAP_BLITTER_P_H
+
+#include <private/qpixmapdata_p.h>
+#include <private/qpaintengine_blitter_p.h>
+
+#ifndef QT_NO_BLITTABLE
+QT_BEGIN_NAMESPACE
+
+class Q_GUI_EXPORT QBlittablePixmapData : public QPixmapData
+{
+// Q_DECLARE_PRIVATE(QBlittablePixmapData);
+public:
+ QBlittablePixmapData();
+ ~QBlittablePixmapData();
+
+ virtual QBlittable *createBlittable(const QSize &size) const = 0;
+ QBlittable *blittable() const;
+ void setBlittable(QBlittable *blittable);
+
+ void resize(int width, int height);
+ int metric(QPaintDevice::PaintDeviceMetric metric) const;
+ void fill(const QColor &color);
+ QImage *buffer();
+ QImage toImage() const;
+ bool hasAlphaChannel() const;
+ void fromImage(const QImage &image, Qt::ImageConversionFlags flags);
+
+ QPaintEngine *paintEngine() const;
+
+ void markRasterOverlay(const QRectF &);
+ void markRasterOverlay(const QPointF &, const QTextItem &);
+ void markRasterOverlay(const QVectorPath &);
+ void markRasterOverlay(const QRect *rects, int rectCount);
+ void markRasterOverlay(const QRectF *rects, int rectCount);
+ void unmarkRasterOverlay(const QRectF &);
+
+#ifdef QT_BLITTER_RASTEROVERLAY
+ void mergeOverlay();
+ void unmergeOverlay();
+ QImage *overlay();
+
+#endif //QT_BLITTER_RASTEROVERLAY
+protected:
+ QBlitterPaintEngine *m_engine;
+ QBlittable *m_blittable;
+
+#ifdef QT_BLITTER_RASTEROVERLAY
+ QImage *m_rasterOverlay;
+ QImage *m_unmergedCopy;
+ QColor m_overlayColor;
+
+ void markRasterOverlayImpl(const QRectF &);
+ void unmarkRasterOverlayImpl(const QRectF &);
+ QRectF clipAndTransformRect(const QRectF &) const;
+#endif //QT_BLITTER_RASTEROVERLAY
+
+};
+
+inline void QBlittablePixmapData::markRasterOverlay(const QRectF &rect)
+{
+#ifdef QT_BLITTER_RASTEROVERLAY
+ markRasterOverlayImpl(rect);
+#else
+ Q_UNUSED(rect)
+#endif
+}
+
+inline void QBlittablePixmapData::markRasterOverlay(const QVectorPath &path)
+{
+#ifdef QT_BLITTER_RASTEROVERLAY
+ markRasterOverlayImpl(path.convertToPainterPath().boundingRect());
+#else
+ Q_UNUSED(path)
+#endif
+}
+
+inline void QBlittablePixmapData::markRasterOverlay(const QPointF &pos, const QTextItem &ti)
+{
+#ifdef QT_BLITTER_RASTEROVERLAY
+ QFontMetricsF fm(ti.font());
+ QRectF rect = fm.tightBoundingRect(ti.text());
+ rect.moveBottomLeft(pos);
+ markRasterOverlay(rect);
+#else
+ Q_UNUSED(pos)
+ Q_UNUSED(ti)
+#endif
+}
+
+inline void QBlittablePixmapData::markRasterOverlay(const QRect *rects, int rectCount)
+{
+#ifdef QT_BLITTER_RASTEROVERLAY
+ for (int i = 0; i < rectCount; i++) {
+ markRasterOverlay(rects[i]);
+ }
+#else
+ Q_UNUSED(rects)
+ Q_UNUSED(rectCount)
+#endif
+}
+inline void QBlittablePixmapData::markRasterOverlay(const QRectF *rects, int rectCount)
+{
+#ifdef QT_BLITTER_RASTEROVERLAY
+ for (int i = 0; i < rectCount; i++) {
+ markRasterOverlay(rects[i]);
+ }
+#else
+ Q_UNUSED(rects)
+ Q_UNUSED(rectCount)
+#endif
+}
+
+inline void QBlittablePixmapData::unmarkRasterOverlay(const QRectF &rect)
+{
+#ifdef QT_BLITTER_RASTEROVERLAY
+ unmarkRasterOverlayImpl(rect);
+#else
+ Q_UNUSED(rect)
+#endif
+}
+
+QT_END_NAMESPACE
+#endif // QT_NO_BLITTABLE
+#endif // QPIXMAP_BLITTER_P_H
diff --git a/src/gui/image/qpixmap_qpa.cpp b/src/gui/image/qpixmap_qpa.cpp
new file mode 100644
index 0000000..61be216
--- /dev/null
+++ b/src/gui/image/qpixmap_qpa.cpp
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the 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 <qpixmap.h>
+#include <private/qgraphicssystem_p.h>
+#include <private/qapplication_p.h>
+
+QPixmap QPixmap::grabWindow(WId window, int x, int y, int w, int h)
+{
+ return QApplicationPrivate::platformIntegration()->grabWindow(window, x, y, w, h);
+}
diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp
index 47249d9..b7c8acb 100644
--- a/src/gui/image/qpixmap_s60.cpp
+++ b/src/gui/image/qpixmap_s60.cpp
@@ -968,11 +968,12 @@ void QS60PixmapData::fromNativeType(void* pixmap, NativeType nativeType)
if (needsCopy) {
TSize size = sourceBitmap->SizeInPixels();
+ int bytesPerLine = sourceBitmap->ScanLineLength(size.iWidth, displayMode);
QSymbianBitmapDataAccess da;
da.beginDataAccess(sourceBitmap);
uchar *bytes = (uchar*)sourceBitmap->DataAddress();
- QImage img = QImage(bytes, size.iWidth, size.iHeight, format);
+ QImage img = QImage(bytes, size.iWidth, size.iHeight, bytesPerLine, format);
img = img.copy();
da.endDataAccess(sourceBitmap);
diff --git a/src/gui/image/qpixmap_x11_p.h b/src/gui/image/qpixmap_x11_p.h
index f171281..7eab64c 100644
--- a/src/gui/image/qpixmap_x11_p.h
+++ b/src/gui/image/qpixmap_x11_p.h
@@ -115,7 +115,7 @@ private:
friend class QEglContext; // Needs gl_surface
friend class QGLContext; // Needs gl_surface
friend class QX11GLPixmapData; // Needs gl_surface
- friend class QMeeGoGraphicsSystem; // Needs gl_surface and flags
+ friend class QMeeGoLivePixmapData; // Needs gl_surface and flags
friend bool qt_createEGLSurfaceForPixmap(QPixmapData*, bool); // Needs gl_surface
void release();
diff --git a/src/gui/image/qpixmapdata_p.h b/src/gui/image/qpixmapdata_p.h
index ec62b0b..f69eb3d 100644
--- a/src/gui/image/qpixmapdata_p.h
+++ b/src/gui/image/qpixmapdata_p.h
@@ -75,7 +75,8 @@ public:
};
#endif
enum ClassId { RasterClass, X11Class, MacClass, DirectFBClass,
- OpenGLClass, OpenVGClass, RuntimeClass, CustomClass = 1024 };
+ OpenGLClass, OpenVGClass, RuntimeClass, BlitterClass,
+ CustomClass = 1024 };
QPixmapData(PixelType pixelType, int classId);
virtual ~QPixmapData();
diff --git a/src/gui/image/qpixmapdatafactory.cpp b/src/gui/image/qpixmapdatafactory.cpp
index 7498a7c..50dad38 100644
--- a/src/gui/image/qpixmapdatafactory.cpp
+++ b/src/gui/image/qpixmapdatafactory.cpp
@@ -53,6 +53,9 @@
#ifdef Q_WS_MAC
# include <private/qpixmap_mac_p.h>
#endif
+#ifdef Q_WS_QPA
+# include <private/qpixmap_raster_p.h>
+#endif
#ifdef Q_OS_SYMBIAN
# include <private/qpixmap_s60_p.h>
#endif
@@ -82,8 +85,10 @@ QPixmapData* QSimplePixmapDataFactory::create(QPixmapData::PixelType type)
return new QRasterPixmapData(type);
#elif defined(Q_WS_MAC)
return new QMacPixmapData(type);
+#elif defined(Q_WS_QPA)
+ return new QRasterPixmapData(type);
#elif defined(Q_OS_SYMBIAN)
- return new QS60PixmapData(type);
+ return new QS60PixmapData(type);
#else
#error QSimplePixmapDataFactory::create() not implemented
#endif
diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp
index 935aba0..ea62cf8 100644
--- a/src/gui/image/qpnghandler.cpp
+++ b/src/gui/image/qpnghandler.cpp
@@ -331,6 +331,7 @@ public:
float gamma;
int quality;
QString description;
+ QStringList readTexts;
png_struct *png_ptr;
png_info *info_ptr;
@@ -389,25 +390,20 @@ bool Q_INTERNAL_WIN_NO_THROW QPngHandlerPrivate::readPngHeader()
while (num_text--) {
QString key, value;
-#if defined(PNG_iTXt_SUPPORTED) && !defined(QT_NO_TEXTCODEC)
- if (text_ptr->lang) {
- QTextCodec *codec = QTextCodec::codecForName(text_ptr->lang);
- if (codec) {
- key = codec->toUnicode(text_ptr->lang_key);
- value = codec->toUnicode(QByteArray(text_ptr->text, text_ptr->itxt_length));
- } else {
- key = QString::fromLatin1(text_ptr->key);
- value = QString::fromLatin1(QByteArray(text_ptr->text, int(text_ptr->text_length)));
- }
+ key = QString::fromLatin1(text_ptr->key);
+#if defined(PNG_iTXt_SUPPORTED)
+ if (text_ptr->itxt_length) {
+ value = QString::fromUtf8(text_ptr->text, int(text_ptr->itxt_length));
} else
#endif
{
- key = QString::fromLatin1(text_ptr->key);
value = QString::fromLatin1(QByteArray(text_ptr->text, int(text_ptr->text_length)));
}
if (!description.isEmpty())
description += QLatin1String("\n\n");
description += key + QLatin1String(": ") + value.simplified();
+ readTexts.append(key);
+ readTexts.append(value);
text_ptr++;
}
#endif
@@ -485,25 +481,8 @@ bool Q_INTERNAL_WIN_NO_THROW QPngHandlerPrivate::readPngImage(QImage *outImage)
outImage->setDotsPerMeterX(png_get_x_pixels_per_meter(png_ptr,info_ptr));
outImage->setDotsPerMeterY(png_get_y_pixels_per_meter(png_ptr,info_ptr));
-#ifndef QT_NO_IMAGE_TEXT
- png_textp text_ptr;
- int num_text=0;
- png_get_text(png_ptr,info_ptr,&text_ptr,&num_text);
- while (num_text--) {
- outImage->setText(text_ptr->key,0,QString::fromAscii(text_ptr->text));
- text_ptr++;
- }
-
- foreach (const QString &pair, description.split(QLatin1String("\n\n"))) {
- int index = pair.indexOf(QLatin1Char(':'));
- if (index >= 0 && pair.indexOf(QLatin1Char(' ')) < index) {
- outImage->setText(QLatin1String("Description"), pair.simplified());
- } else {
- QString key = pair.left(index);
- outImage->setText(key, pair.mid(index + 2).simplified());
- }
- }
-#endif
+ for (int i = 0; i < readTexts.size()-1; i+=2)
+ outImage->setText(readTexts.at(i), readTexts.at(i+1));
png_read_end(png_ptr, end_info);
png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
@@ -634,29 +613,40 @@ static void set_text(const QImage &image, png_structp png_ptr, png_infop info_pt
return;
png_textp text_ptr = new png_text[text.size()];
+ qMemSet(text_ptr, 0, text.size() * sizeof(png_text));
QMap<QString, QString>::ConstIterator it = text.constBegin();
int i = 0;
while (it != text.constEnd()) {
- QString t = it.value();
- if (t.length() < 40)
- text_ptr[i].compression = PNG_TEXT_COMPRESSION_NONE;
- else
- text_ptr[i].compression = PNG_TEXT_COMPRESSION_zTXt;
text_ptr[i].key = qstrdup(it.key().left(79).toLatin1().constData());
+ bool noCompress = (it.value().length() < 40);
-#ifndef PNG_iTXt_SUPPORTED
- QByteArray value = it.value().toLatin1();
- text_ptr[i].text = qstrdup(value.constData());
- text_ptr[i].text_length = value.size();
-#else
- QByteArray value = it.value().toUtf8();
- text_ptr[i].text = qstrdup(value.constData());
- text_ptr[i].text_length = 0;
- text_ptr[i].itxt_length = value.size();
- text_ptr[i].lang = const_cast<char*>("UTF-8");
- text_ptr[i].lang_key = qstrdup(it.key().toUtf8().constData());
+#ifdef PNG_iTXt_SUPPORTED
+ bool needsItxt = false;
+ foreach(const QChar c, it.value()) {
+ uchar ch = c.cell();
+ if (c.row() || (ch < 0x20 && ch != '\n') || (ch > 0x7e && ch < 0xa0)) {
+ needsItxt = true;
+ break;
+ }
+ }
+
+ if (needsItxt) {
+ text_ptr[i].compression = noCompress ? PNG_ITXT_COMPRESSION_NONE : PNG_ITXT_COMPRESSION_zTXt;
+ QByteArray value = it.value().toUtf8();
+ text_ptr[i].text = qstrdup(value.constData());
+ text_ptr[i].itxt_length = value.size();
+ text_ptr[i].lang = const_cast<char*>("UTF-8");
+ text_ptr[i].lang_key = qstrdup(it.key().toUtf8().constData());
+ }
+ else
#endif
+ {
+ text_ptr[i].compression = noCompress ? PNG_TEXT_COMPRESSION_NONE : PNG_TEXT_COMPRESSION_zTXt;
+ QByteArray value = it.value().toLatin1();
+ text_ptr[i].text = qstrdup(value.constData());
+ text_ptr[i].text_length = value.size();
+ }
++i;
++it;
}
diff --git a/src/gui/image/qtiffhandler.cpp b/src/gui/image/qtiffhandler.cpp
index 2e8b998..dd2bd10 100644
--- a/src/gui/image/qtiffhandler.cpp
+++ b/src/gui/image/qtiffhandler.cpp
@@ -611,6 +611,7 @@ QVariant QTiffHandler::option(ImageOption option) const
TIFFGetField(tiff, TIFFTAG_IMAGEWIDTH, &width);
TIFFGetField(tiff, TIFFTAG_IMAGELENGTH, &height);
imageSize = QSize(width, height);
+ TIFFClose(tiff);
}
device()->seek(pos);
if (imageSize.isValid())
diff --git a/src/gui/image/qxbmhandler.cpp b/src/gui/image/qxbmhandler.cpp
index 0dd4e99..f9c2e0c 100644
--- a/src/gui/image/qxbmhandler.cpp
+++ b/src/gui/image/qxbmhandler.cpp
@@ -66,27 +66,36 @@ static inline int hex2byte(register char *p)
static bool read_xbm_header(QIODevice *device, int& w, int& h)
{
const int buflen = 300;
+ const int maxlen = 4096;
char buf[buflen + 1];
QRegExp r1(QLatin1String("^#define[ \t]+[a-zA-Z0-9._]+[ \t]+"));
QRegExp r2(QLatin1String("[0-9]+"));
qint64 readBytes = 0;
+ qint64 totalReadBytes = 0;
- // "#define .._width <num>"
- readBytes = device->readLine(buf, buflen);
- if (readBytes <= 0)
- return false;
- buf[readBytes - 1] = '\0';
+ buf[0] = '\0';
// skip initial comment, if any
- while (buf[0] != '#' && (readBytes = device->readLine( buf, buflen )) > 0) {}
+ while (buf[0] != '#') {
+ readBytes = device->readLine(buf, buflen);
+
+ // if readBytes >= buflen, it's very probably not a C file
+ if (readBytes <= 0 || readBytes >= buflen -1)
+ return false;
+
+ // limit xbm headers to the first 4k in the file to prevent
+ // excessive reads on non-xbm files
+ totalReadBytes += readBytes;
+ if (totalReadBytes >= maxlen)
+ return false;
+ }
- if (readBytes <= 0)
- return false;
buf[readBytes - 1] = '\0';
QString sbuf;
sbuf = QString::fromLatin1(buf);
+ // "#define .._width <num>"
if (r1.indexIn(sbuf) == 0 &&
r2.indexIn(sbuf, r1.matchedLength()) == r1.matchedLength())
w = QByteArray(&buf[r1.matchedLength()]).trimmed().toInt();
diff --git a/src/gui/image/qxpmhandler.cpp b/src/gui/image/qxpmhandler.cpp
index b97afd3..453100c 100644
--- a/src/gui/image/qxpmhandler.cpp
+++ b/src/gui/image/qxpmhandler.cpp
@@ -766,7 +766,7 @@ static bool qt_get_named_xpm_rgb(const char *name_no_space, QRgb *rgb)
{
XPMRGBData x;
x.name = name_no_space;
- // Funtion bsearch() is supposed to be
+ // Function bsearch() is supposed to be
// void *bsearch(const void *key, const void *base, ...
// So why (char*)? Are there broken bsearch() declarations out there?
XPMRGBData *r = (XPMRGBData *)bsearch((char *)&x, (char *)xpmRgbTbl, xpmRgbTblSize,
diff --git a/src/gui/inputmethod/inputmethod.pri b/src/gui/inputmethod/inputmethod.pri
index 02e3e57..d439438 100644
--- a/src/gui/inputmethod/inputmethod.pri
+++ b/src/gui/inputmethod/inputmethod.pri
@@ -19,7 +19,7 @@ embedded {
HEADERS += inputmethod/qwsinputcontext_p.h
SOURCES += inputmethod/qwsinputcontext_qws.cpp
}
-mac:!embedded {
+mac:!embedded:!qpa {
HEADERS += inputmethod/qmacinputcontext_p.h
SOURCES += inputmethod/qmacinputcontext_mac.cpp
}
diff --git a/src/gui/inputmethod/qinputcontextfactory.cpp b/src/gui/inputmethod/qinputcontextfactory.cpp
index 865c1b2..afe5095 100644
--- a/src/gui/inputmethod/qinputcontextfactory.cpp
+++ b/src/gui/inputmethod/qinputcontextfactory.cpp
@@ -205,7 +205,7 @@ QStringList QInputContextFactory::keys()
This function contains pure Symbian exception handling code for
getting S60 language list.
- Returned object ownership is transfered to caller.
+ Returned object ownership is transferred to caller.
*/
static CAknInputLanguageList* s60LangListL()
{
@@ -224,7 +224,7 @@ static CAknInputLanguageList* s60LangListL()
\internal
This function utility function return S60 language list.
- Returned object ownership is transfered to caller.
+ Returned object ownership is transferred to caller.
*/
static CAknInputLanguageList* s60LangList()
{
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp
index 0842ee8..8af6013 100644
--- a/src/gui/itemviews/qabstractitemview.cpp
+++ b/src/gui/itemviews/qabstractitemview.cpp
@@ -1169,7 +1169,7 @@ QAbstractItemView::EditTriggers QAbstractItemView::editTriggers() const
\property QAbstractItemView::verticalScrollMode
\brief how the view scrolls its contents in the vertical direction
- This property controlls how the view scroll its contents vertically.
+ This property controls how the view scroll its contents vertically.
Scrolling can be done either per pixel or per item.
*/
@@ -1195,7 +1195,7 @@ QAbstractItemView::ScrollMode QAbstractItemView::verticalScrollMode() const
\property QAbstractItemView::horizontalScrollMode
\brief how the view scrolls its contents in the horizontal direction
- This property controlls how the view scroll its contents horizontally.
+ This property controls how the view scroll its contents horizontally.
Scrolling can be done either per pixel or per item.
*/
@@ -1278,7 +1278,7 @@ bool QAbstractItemView::hasAutoScroll() const
\property QAbstractItemView::autoScrollMargin
\brief the size of the area when auto scrolling is triggered
- This property controlls the size of the area at the edge of the viewport that
+ This property controls the size of the area at the edge of the viewport that
triggers autoscrolling. The default value is 16 pixels.
*/
void QAbstractItemView::setAutoScrollMargin(int margin)
@@ -1366,7 +1366,7 @@ bool QAbstractItemView::dragEnabled() const
Note that the model used needs to provide support for drag and drop operations.
- \sa setDragDropMode() {Using drag & drop with item views}
+ \sa setDragDropMode() {Using drag and drop with item views}
*/
/*!
@@ -4101,13 +4101,13 @@ bool QAbstractItemViewPrivate::openEditor(const QModelIndex &index, QEvent *even
if (!w)
return false;
- if (event)
- QApplication::sendEvent(w->focusProxy() ? w->focusProxy() : w, event);
-
q->setState(QAbstractItemView::EditingState);
w->show();
w->setFocus();
+ if (event)
+ QApplication::sendEvent(w->focusProxy() ? w->focusProxy() : w, event);
+
return true;
}
diff --git a/src/gui/itemviews/qabstractproxymodel.cpp b/src/gui/itemviews/qabstractproxymodel.cpp
index 51dfa7a..b9574f1 100644
--- a/src/gui/itemviews/qabstractproxymodel.cpp
+++ b/src/gui/itemviews/qabstractproxymodel.cpp
@@ -121,12 +121,15 @@ QAbstractProxyModel::~QAbstractProxyModel()
void QAbstractProxyModel::setSourceModel(QAbstractItemModel *sourceModel)
{
Q_D(QAbstractProxyModel);
- if (d->model)
+ if (d->model) {
disconnect(d->model, SIGNAL(destroyed()), this, SLOT(_q_sourceModelDestroyed()));
+ disconnect(d->model, SIGNAL(modelReset()), this, SLOT(resetInternalData()));
+ }
if (sourceModel) {
d->model = sourceModel;
connect(d->model, SIGNAL(destroyed()), this, SLOT(_q_sourceModelDestroyed()));
+ connect(d->model, SIGNAL(modelReset()), this, SLOT(resetInternalData()));
} else {
d->model = QAbstractItemModelPrivate::staticEmptyModel();
}
@@ -359,7 +362,7 @@ QMimeData* QAbstractProxyModel::mimeData(const QModelIndexList &indexes) const
QModelIndexList list;
foreach(const QModelIndex &index, indexes)
list << mapToSource(index);
- return d->model->mimeData(indexes);
+ return d->model->mimeData(list);
}
/*!
@@ -380,6 +383,25 @@ Qt::DropActions QAbstractProxyModel::supportedDropActions() const
return d->model->supportedDropActions();
}
+/*
+ \since 4.8
+
+ This slot is called just after the internal data of a model is cleared
+ while it is being reset.
+
+ This slot is provided the convenience of subclasses of concrete proxy
+ models, such as subclasses of QSortFilterProxyModel which maintain extra
+ data.
+
+ \snippet doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp 10
+
+ \sa modelAboutToBeReset(), modelReset()
+*/
+void QAbstractProxyModel::resetInternalData()
+{
+
+}
+
QT_END_NAMESPACE
#include "moc_qabstractproxymodel.cpp"
diff --git a/src/gui/itemviews/qabstractproxymodel.h b/src/gui/itemviews/qabstractproxymodel.h
index a5a1168..0daa7f8 100644
--- a/src/gui/itemviews/qabstractproxymodel.h
+++ b/src/gui/itemviews/qabstractproxymodel.h
@@ -95,6 +95,9 @@ public:
QStringList mimeTypes() const;
Qt::DropActions supportedDropActions() const;
+protected Q_SLOTS:
+ void resetInternalData();
+
protected:
QAbstractProxyModel(QAbstractProxyModelPrivate &, QObject *parent);
diff --git a/src/gui/itemviews/qdirmodel.cpp b/src/gui/itemviews/qdirmodel.cpp
index 48599bc..cb6f81e 100644
--- a/src/gui/itemviews/qdirmodel.cpp
+++ b/src/gui/itemviews/qdirmodel.cpp
@@ -201,25 +201,6 @@ void QDirModelPrivate::invalidate()
QDirModel keeps a cache with file information. The cache needs to be
updated with refresh().
- A directory model that displays the contents of a default directory
- is usually constructed with a parent object:
-
- \snippet doc/src/snippets/shareddirmodel/main.cpp 2
-
- A tree view can be used to display the contents of the model
-
- \snippet doc/src/snippets/shareddirmodel/main.cpp 4
-
- and the contents of a particular directory can be displayed by
- setting the tree view's root index:
-
- \snippet doc/src/snippets/shareddirmodel/main.cpp 7
-
- The view's root index can be used to control how much of a
- hierarchical model is displayed. QDirModel provides a convenience
- function that returns a suitable model index for a path to a
- directory within the model.
-
QDirModel can be accessed using the standard interface provided by
QAbstractItemModel, but it also provides some convenience functions
that are specific to a directory model. The fileInfo() and isDir()
diff --git a/src/gui/itemviews/qitemselectionmodel.cpp b/src/gui/itemviews/qitemselectionmodel.cpp
index 7156b87..7b892c5 100644
--- a/src/gui/itemviews/qitemselectionmodel.cpp
+++ b/src/gui/itemviews/qitemselectionmodel.cpp
@@ -781,7 +781,7 @@ void QItemSelectionModelPrivate::_q_layoutAboutToBeChanged()
savedPersistentIndexes.clear();
savedPersistentCurrentIndexes.clear();
- // optimisation for when all indexes are selected
+ // optimization for when all indexes are selected
// (only if there is lots of items (1000) because this is not entirely correct)
if (ranges.isEmpty() && currentSelection.count() == 1) {
QItemSelectionRange range = currentSelection.first();
@@ -1068,6 +1068,19 @@ void QItemSelectionModel::select(const QItemSelection &selection, QItemSelection
// store old selection
QItemSelection sel = selection;
+ // If d->ranges is non-empty when the source model is reset the persistent indexes
+ // it contains will be invalid. We can't clear them in a modelReset slot because that might already
+ // be too late if another model observer is connected to the same modelReset slot and is invoked first
+ // it might call select() on this selection model before any such QItemSelectionModelPrivate::_q_modelReset() slot
+ // is invoked, so it would not be cleared yet. We clear it invalid ranges in it here.
+ QItemSelection::iterator it = d->ranges.begin();
+ while (it != d->ranges.end()) {
+ if (!it->isValid())
+ it = d->ranges.erase(it);
+ else
+ ++it;
+ }
+
QItemSelection old = d->ranges;
old.merge(d->currentSelection, d->currentCommand);
diff --git a/src/gui/itemviews/qlistview.cpp b/src/gui/itemviews/qlistview.cpp
index ce1f0e5..d1ef354 100644
--- a/src/gui/itemviews/qlistview.cpp
+++ b/src/gui/itemviews/qlistview.cpp
@@ -1490,19 +1490,20 @@ void QListView::updateGeometries()
// if the scroll bars are turned off, we resize the contents to the viewport
if (d->movement == Static && !d->isWrapping()) {
- d->layoutChildren(); // we need the viewport size to be updated
+ const QSize maxSize = maximumViewportSize();
if (d->flow == TopToBottom) {
if (horizontalScrollBarPolicy() == Qt::ScrollBarAlwaysOff) {
- d->setContentsSize(viewport()->width(), contentsSize().height());
+ d->setContentsSize(maxSize.width(), contentsSize().height());
horizontalScrollBar()->setRange(0, 0); // we see all the contents anyway
}
} else { // LeftToRight
if (verticalScrollBarPolicy() == Qt::ScrollBarAlwaysOff) {
- d->setContentsSize(contentsSize().width(), viewport()->height());
+ d->setContentsSize(contentsSize().width(), maxSize.height());
verticalScrollBar()->setRange(0, 0); // we see all the contents anyway
}
}
}
+
}
/*!
diff --git a/src/gui/itemviews/qstringlistmodel.cpp b/src/gui/itemviews/qstringlistmodel.cpp
index 8d69ee4..60ff952 100644
--- a/src/gui/itemviews/qstringlistmodel.cpp
+++ b/src/gui/itemviews/qstringlistmodel.cpp
@@ -290,8 +290,9 @@ QStringList QStringListModel::stringList() const
*/
void QStringListModel::setStringList(const QStringList &strings)
{
+ emit beginResetModel();
lst = strings;
- reset();
+ emit endResetModel();
}
/*!
diff --git a/src/gui/itemviews/qtableview.cpp b/src/gui/itemviews/qtableview.cpp
index d8fef55..d1022f1 100644
--- a/src/gui/itemviews/qtableview.cpp
+++ b/src/gui/itemviews/qtableview.cpp
@@ -114,7 +114,7 @@ void QSpanCollection::updateSpan(QSpanCollection::Span *span, int old_height)
}
} else if (old_height > span->height()) {
//remove the span from all the subspans lists that intersect the columns not covered anymore
- Index::iterator it_y = index.lowerBound(-qMax(span->bottom(), span->top())); //qMax usefull if height is 0
+ Index::iterator it_y = index.lowerBound(-qMax(span->bottom(), span->top())); //qMax useful if height is 0
Q_ASSERT(it_y != index.end()); //it_y must exist since the span is in the list
while (-it_y.key() <= span->top() + old_height -1) {
if (-it_y.key() > span->bottom()) {
@@ -1404,7 +1404,7 @@ void QTableView::paintEvent(QPaintEvent *event)
}
if (showGrid) {
- // Find the bottom right (the last rows/coloumns might be hidden)
+ // Find the bottom right (the last rows/columns might be hidden)
while (verticalHeader->isSectionHidden(verticalHeader->logicalIndex(bottom))) --bottom;
QPen old = painter.pen();
painter.setPen(gridPen);
diff --git a/src/gui/kernel/kernel.pri b/src/gui/kernel/kernel.pri
index 2629d7f..4261e93 100644
--- a/src/gui/kernel/kernel.pri
+++ b/src/gui/kernel/kernel.pri
@@ -32,8 +32,6 @@ HEADERS += \
kernel/qshortcutmap_p.h \
kernel/qsizepolicy.h \
kernel/qpalette.h \
- kernel/qsound.h \
- kernel/qsound_p.h \
kernel/qstackedlayout.h \
kernel/qtooltip.h \
kernel/qwhatsthis.h \
@@ -50,7 +48,7 @@ HEADERS += \
kernel/qgesturemanager_p.h \
kernel/qsoftkeymanager_p.h \
kernel/qsoftkeymanager_common_p.h \
- kernel/qguiplatformplugin_p.h
+ kernel/qguiplatformplugin_p.h \
SOURCES += \
kernel/qaction.cpp \
@@ -72,7 +70,6 @@ SOURCES += \
kernel/qpalette.cpp \
kernel/qshortcut.cpp \
kernel/qshortcutmap.cpp \
- kernel/qsound.cpp \
kernel/qstackedlayout.cpp \
kernel/qtooltip.cpp \
kernel/qguivariant.cpp \
@@ -200,7 +197,66 @@ embedded {
}
}
-!embedded:!x11:mac {
+!qpa {
+ HEADERS += \
+ kernel/qsound.h \
+ kernel/qsound_p.h
+
+ SOURCES += \
+ kernel/qsound.cpp
+}
+
+qpa {
+ HEADERS += \
+ kernel/qgenericpluginfactory_qpa.h \
+ kernel/qgenericplugin_qpa.h \
+ kernel/qeventdispatcher_qpa_p.h \
+ kernel/qwindowsysteminterface_qpa.h \
+ kernel/qwindowsysteminterface_qpa_p.h \
+ kernel/qplatformintegration_qpa.h \
+ kernel/qplatformscreen_qpa.h \
+ kernel/qplatformintegrationfactory_qpa_p.h \
+ kernel/qplatformintegrationplugin_qpa.h \
+ kernel/qplatformwindow_qpa.h \
+ kernel/qplatformwindowformat_qpa.h \
+ kernel/qplatformglcontext_qpa.h \
+ kernel/qdesktopwidget_qpa_p.h \
+ kernel/qplatformeventloopintegration_qpa.h \
+ kernel/qplatformcursor_qpa.h
+
+ SOURCES += \
+ kernel/qapplication_qpa.cpp \
+ kernel/qclipboard_qpa.cpp \
+ kernel/qcursor_qpa.cpp \
+ kernel/qdnd_qws.cpp \
+ kernel/qdesktopwidget_qpa.cpp \
+ kernel/qgenericpluginfactory_qpa.cpp \
+ kernel/qgenericplugin_qpa.cpp \
+ kernel/qkeymapper_qws.cpp \
+ kernel/qwidget_qpa.cpp \
+ kernel/qeventdispatcher_qpa.cpp \
+ kernel/qwindowsysteminterface_qpa.cpp \
+ kernel/qplatformintegration_qpa.cpp \
+ kernel/qplatformscreen_qpa.cpp \
+ kernel/qplatformintegrationfactory_qpa.cpp \
+ kernel/qplatformintegrationplugin_qpa.cpp \
+ kernel/qplatformwindow_qpa.cpp \
+ kernel/qplatformwindowformat_qpa.cpp \
+ kernel/qplatformeventloopintegration_qpa.cpp \
+ kernel/qplatformglcontext_qpa.cpp \
+ kernel/qplatformcursor_qpa.cpp
+
+ contains(QT_CONFIG, glib) {
+ SOURCES += \
+ kernel/qeventdispatcher_glib_qpa.cpp
+ HEADERS += \
+ kernel/qeventdispatcher_glib_qpa_p.h
+ QMAKE_CXXFLAGS += $$QT_CFLAGS_GLIB
+ LIBS_PRIVATE +=$$QT_LIBS_GLIB
+ }
+}
+
+!embedded:!qpa:!x11:mac {
SOURCES += \
kernel/qclipboard_mac.cpp \
kernel/qmime_mac.cpp \
diff --git a/src/gui/kernel/mac.pri b/src/gui/kernel/mac.pri
index 1538510..21acd06 100644
--- a/src/gui/kernel/mac.pri
+++ b/src/gui/kernel/mac.pri
@@ -1,4 +1,4 @@
-!x11:!embedded:mac {
+!x11:!embedded:!qpa:mac {
LIBS_PRIVATE += -framework Carbon -lz
*-mwerks:INCLUDEPATH += compat
}
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 1284947..833e803 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -450,6 +450,9 @@ QPalette *QApplicationPrivate::sys_pal = 0; // default system palette
QPalette *QApplicationPrivate::set_pal = 0; // default palette set by programmer
QGraphicsSystem *QApplicationPrivate::graphics_system = 0; // default graphics system
+#if defined(Q_WS_QPA)
+QPlatformIntegration *QApplicationPrivate::platform_integration = 0;
+#endif
QString QApplicationPrivate::graphics_system_name; // graphics system id - for delayed initialization
bool QApplicationPrivate::runtime_graphics_system = false;
@@ -495,7 +498,7 @@ bool QApplicationPrivate::fade_tooltip = false;
bool QApplicationPrivate::animate_toolbox = false;
bool QApplicationPrivate::widgetCount = false;
bool QApplicationPrivate::load_testability = false;
-QString QApplicationPrivate::qmljsDebugArguments;
+QString QApplicationPrivate::qmljs_debug_arguments;
#ifdef QT_KEYPAD_NAVIGATION
# ifdef Q_OS_SYMBIAN
Qt::NavigationMode QApplicationPrivate::navigationMode = Qt::NavigationModeKeypadDirectional;
@@ -512,7 +515,7 @@ inline bool QApplicationPrivate::isAlien(QWidget *widget)
{
if (!widget)
return false;
-#if defined(Q_WS_QWS)
+#if defined(Q_WS_QWS) || defined(Q_WS_QPA)
return !widget->isWindow()
# ifdef Q_BACKINGSTORE_SUBSURFACES
&& !(widget->d_func()->maybeTopData() && widget->d_func()->maybeTopData()->windowSurface)
@@ -568,7 +571,7 @@ void QApplicationPrivate::process_cmdline()
if (arg == "-qdevel" || arg == "-qdebug") {
// obsolete argument
} else if (arg.indexOf("-qmljsdebugger=", 0) != -1) {
- qmljsDebugArguments = QString::fromLocal8Bit(arg.right(arg.length() - 15));
+ qmljs_debug_arguments = QString::fromLocal8Bit(arg.right(arg.length() - 15));
} else if (arg.indexOf("-style=", 0) != -1) {
s = QString::fromLocal8Bit(arg.right(arg.length() - 7).toLower());
} else if (arg == "-style" && i < argc-1) {
@@ -804,6 +807,7 @@ void QApplicationPrivate::construct(
)
{
initResources();
+ graphics_system_name = QLatin1String(qgetenv("QT_DEFAULT_GRAPHICS_SYSTEM"));
qt_is_gui_used = (qt_appType != QApplication::Tty);
process_cmdline();
@@ -964,10 +968,11 @@ void QApplicationPrivate::initialize()
QWidgetPrivate::mapper = new QWidgetMapper;
QWidgetPrivate::allWidgets = new QWidgetSet;
-#if !defined(Q_WS_X11) && !defined(Q_WS_QWS)
+#if !defined(Q_WS_X11) && !defined(Q_WS_QWS) && !defined(Q_WS_QPA)
// initialize the graphics system - on X11 this is initialized inside
// qt_init() in qapplication_x11.cpp because of several reasons.
// On QWS, the graphics system is set by the QScreen plugin.
+ // We don't use graphics systems in Qt QPA
graphics_system = QGraphicsSystemFactory::create(graphics_system_name);
#endif
@@ -1428,10 +1433,18 @@ QStyle *QApplication::style()
// Compile-time search for default style
//
QString style;
- if (!QApplicationPrivate::styleOverride.isEmpty())
+#ifdef QT_BUILD_INTERNAL
+ QString envStyle = QString::fromLocal8Bit(qgetenv("QT_STYLE_OVERRIDE"));
+#else
+ QString envStyle;
+#endif
+ if (!QApplicationPrivate::styleOverride.isEmpty()) {
style = QApplicationPrivate::styleOverride;
- else
+ } else if (!envStyle.isEmpty()) {
+ style = envStyle;
+ } else {
style = QApplicationPrivate::desktopStyleKey();
+ }
QStyle *&app_style = QApplicationPrivate::app_style;
app_style = QStyleFactory::create(style);
@@ -1633,14 +1646,18 @@ QStyle* QApplication::setStyle(const QString& style)
void QApplication::setGraphicsSystem(const QString &system)
{
-#ifdef QT_GRAPHICSSYSTEM_RUNTIME
+#ifdef Q_WS_QPA
+ Q_UNUSED(system);
+#else
+# ifdef QT_GRAPHICSSYSTEM_RUNTIME
if (QApplicationPrivate::graphics_system_name == QLatin1String("runtime")) {
QRuntimeGraphicsSystem *r =
static_cast<QRuntimeGraphicsSystem *>(QApplicationPrivate::graphics_system);
r->setGraphicsSystem(system);
} else
-#endif
+# endif
QApplicationPrivate::graphics_system_name = system;
+#endif
}
/*!
@@ -2786,7 +2803,7 @@ void QApplicationPrivate::dispatchEnterLeave(QWidget* enter, QWidget* leave) {
// Update cursor for alien/graphics widgets.
const bool enterOnAlien = (enter && (isAlien(enter) || enter->testAttribute(Qt::WA_DontShowOnScreen)));
-#if defined(Q_WS_X11)
+#if defined(Q_WS_X11) || defined(Q_WS_QPA)
//Whenever we leave an alien widget on X11, we need to reset its nativeParentWidget()'s cursor.
// This is not required on Windows as the cursor is reset on every single mouse move.
QWidget *parentOfLeavingCursor = 0;
@@ -2810,7 +2827,15 @@ void QApplicationPrivate::dispatchEnterLeave(QWidget* enter, QWidget* leave) {
if (!parentOfLeavingCursor->window()->graphicsProxyWidget())
#endif
{
+#if defined(Q_WS_X11)
qt_x11_enforce_cursor(parentOfLeavingCursor,true);
+#elif defined(Q_WS_QPA)
+ if (enter == QApplication::desktop()) {
+ qt_qpa_set_cursor(enter, true);
+ } else {
+ qt_qpa_set_cursor(parentOfLeavingCursor, true);
+ }
+#endif
}
}
#endif
@@ -2834,6 +2859,8 @@ void QApplicationPrivate::dispatchEnterLeave(QWidget* enter, QWidget* leave) {
qt_x11_enforce_cursor(cursorWidget, true);
#elif defined(Q_OS_SYMBIAN)
qt_symbian_set_cursor(cursorWidget, true);
+#elif defined(Q_WS_QPA)
+ qt_qpa_set_cursor(cursorWidget, true);
#endif
}
}
@@ -3138,7 +3165,7 @@ bool QApplicationPrivate::sendMouseEvent(QWidget *receiver, QMouseEvent *event,
return result;
}
-#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_WS_MAC)
+#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_WS_MAC) || defined(Q_WS_QPA)
/*
This function should only be called when the widget changes visibility, i.e.
when the \a widget is shown, hidden or deleted. This function does nothing
@@ -3150,7 +3177,7 @@ extern QWidget *qt_button_down;
void QApplicationPrivate::sendSyntheticEnterLeave(QWidget *widget)
{
#ifndef QT_NO_CURSOR
-#ifdef Q_WS_QWS
+#if defined(Q_WS_QWS) || defined(Q_WS_QPA)
if (!widget || widget->isWindow())
return;
#else
@@ -6075,10 +6102,17 @@ QPixmap QApplicationPrivate::getPixmapCursor(Qt::CursorShape cshape)
default:
break;
}
+#else
+ Q_UNUSED(cshape);
#endif
return QPixmap();
}
+QString QApplicationPrivate::qmljsDebugArgumentsString()
+{
+ return qmljs_debug_arguments;
+}
+
QT_END_NAMESPACE
#include "moc_qapplication.cpp"
diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm
index c3f3e74..3aafeb4 100644
--- a/src/gui/kernel/qapplication_mac.mm
+++ b/src/gui/kernel/qapplication_mac.mm
@@ -549,7 +549,7 @@ void qt_mac_update_os_settings()
FontMap("QTipLabel", kThemeSmallSystemFont),
FontMap("QLabel", kThemeSystemFont),
FontMap("QToolButton", kThemeSmallSystemFont),
- FontMap("QMenuItem", kThemeMenuItemCmdKeyFont), // It doesn't exist, but its unique.
+ FontMap("QMenuItem", kThemeMenuItemFont), // It doesn't exist, but its unique.
FontMap("QComboLineEdit", kThemeViewsFont), // It doesn't exist, but its unique.
FontMap("QSmallFont", kThemeSmallSystemFont), // It doesn't exist, but its unique.
FontMap("QMiniFont", kThemeMiniSystemFont), // It doesn't exist, but its unique.
@@ -1246,7 +1246,7 @@ void qt_init(QApplicationPrivate *priv, int)
qt_redirectNSApplicationSendEvent();
QMacCocoaAutoReleasePool pool;
- NSObject *oldDelegate = [cocoaApp delegate];
+ id oldDelegate = [cocoaApp delegate];
QT_MANGLE_NAMESPACE(QCocoaApplicationDelegate) *newDelegate = [QT_MANGLE_NAMESPACE(QCocoaApplicationDelegate) sharedDelegate];
Q_ASSERT(newDelegate);
[newDelegate setQtPrivate:priv];
diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h
index 636829e..7b49999 100644
--- a/src/gui/kernel/qapplication_p.h
+++ b/src/gui/kernel/qapplication_p.h
@@ -65,8 +65,10 @@
#include "QtCore/qhash.h"
#include "QtCore/qpointer.h"
#include "private/qcoreapplication_p.h"
-#include "private/qshortcutmap_p.h"
+#include "QtGui/private/qshortcutmap_p.h"
#include <private/qthread_p.h>
+#include "QtCore/qpoint.h"
+#include <QTime>
#ifdef Q_WS_QWS
#include "QtGui/qscreen_qws.h"
#include <private/qgraphicssystem_qws_p.h>
@@ -74,6 +76,11 @@
#ifdef Q_OS_SYMBIAN
#include <w32std.h>
#endif
+#ifdef Q_WS_QPA
+#include <QWindowSystemInterface>
+#include "qwindowsysteminterface_qpa_p.h"
+#include "QtGui/qplatformintegration_qpa.h"
+#endif
QT_BEGIN_NAMESPACE
@@ -312,10 +319,18 @@ public:
static QString desktopStyleKey();
static QGraphicsSystem *graphicsSystem()
-#if !defined(Q_WS_QWS)
- { return graphics_system; }
-#else
+#if defined(Q_WS_QWS)
{ return QScreen::instance()->graphicsSystem(); }
+#else
+ { return graphics_system; }
+#endif
+
+#if defined(Q_WS_QPA)
+ static QPlatformIntegration *platformIntegration()
+ { return platform_integration; }
+
+ static QAbstractEventDispatcher *qt_qpa_core_dispatcher()
+ { return QCoreApplication::instance()->d_func()->threadData->eventDispatcher; }
#endif
void createEventDispatcher();
@@ -418,6 +433,9 @@ public:
static QGraphicsSystem *graphics_system;
static QString graphics_system_name;
static bool runtime_graphics_system;
+#ifdef Q_WS_QPA
+ static QPlatformIntegration *platform_integration;
+#endif
private:
static QFont *app_font; // private for a reason! Always use QApplication::font() instead!
@@ -446,7 +464,8 @@ public:
static bool animate_toolbox;
static bool widgetCount; // Coupled with -widgetcount switch
static bool load_testability; // Coupled with -testability switch
- static QString qmljsDebugArguments; // a string containing arguments for js/qml debugging.
+ static QString qmljs_debug_arguments; // a string containing arguments for js/qml debugging.
+ static QString qmljsDebugArgumentsString(); // access string from other libraries
#ifdef Q_WS_MAC
static bool native_modal_dialog_active;
@@ -476,6 +495,30 @@ public:
static bool qt_mac_apply_settings();
#endif
+#ifdef Q_WS_QPA
+ static void processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent *e);
+ static void processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent *e);
+ static void processWheelEvent(QWindowSystemInterfacePrivate::WheelEvent *e);
+ static void processTouchEvent(QWindowSystemInterfacePrivate::TouchEvent *e);
+
+ static void processCloseEvent(QWindowSystemInterfacePrivate::CloseEvent *e);
+
+ static void processGeometryChangeEvent(QWindowSystemInterfacePrivate::GeometryChangeEvent *e);
+
+ static void processEnterEvent(QWindowSystemInterfacePrivate::EnterEvent *e);
+ static void processLeaveEvent(QWindowSystemInterfacePrivate::LeaveEvent *e);
+
+ static void processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent *e);
+
+// static void reportScreenCount(int count);
+ static void reportScreenCount(QWindowSystemInterfacePrivate::ScreenCountEvent *e);
+// static void reportGeometryChange(int screenIndex);
+ static void reportGeometryChange(QWindowSystemInterfacePrivate::ScreenGeometryEvent *e);
+// static void reportAvailableGeometryChange(int screenIndex);
+ static void reportAvailableGeometryChange(QWindowSystemInterfacePrivate::ScreenAvailableGeometryEvent *e);
+
+#endif
+
#ifdef Q_WS_QWS
QPointer<QWSManager> last_manager;
QWSServerCleaner qwsServerCleaner;
@@ -521,7 +564,7 @@ public:
void _q_aboutToQuit();
#endif
-#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS) || defined(Q_WS_MAC)
+#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS) || defined(Q_WS_MAC) || defined(Q_WS_QPA)
void sendSyntheticEnterLeave(QWidget *widget);
#endif
@@ -629,6 +672,8 @@ Q_GUI_EXPORT void qt_translateRawTouchEvent(QWidget *window,
extern void qt_x11_enforce_cursor(QWidget *);
#elif defined(Q_OS_SYMBIAN)
extern void qt_symbian_set_cursor(QWidget *, bool);
+#elif defined (Q_WS_QPA)
+ extern void qt_qpa_set_cursor(QWidget *, bool);
#endif
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qapplication_qpa.cpp b/src/gui/kernel/qapplication_qpa.cpp
new file mode 100644
index 0000000..ece035c
--- /dev/null
+++ b/src/gui/kernel/qapplication_qpa.cpp
@@ -0,0 +1,928 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the 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 "qapplication_p.h"
+#include "qcolormap.h"
+#include "qpixmapcache.h"
+#if !defined(QT_NO_GLIB)
+#include "qeventdispatcher_glib_qpa_p.h"
+#endif
+#include "qeventdispatcher_qpa_p.h"
+#ifndef QT_NO_CURSOR
+#include "private/qcursor_p.h"
+#endif
+
+#include "private/qwidget_p.h"
+
+#include "qgenericpluginfactory_qpa.h"
+#include "qplatformintegrationfactory_qpa_p.h"
+#include <qdesktopwidget.h>
+
+#include <qinputcontext.h>
+#include <QPlatformCursor>
+#include <qdebug.h>
+#include <QWindowSystemInterface>
+#include "qwindowsysteminterface_qpa_p.h"
+#include <QPlatformIntegration>
+
+#include "qdesktopwidget_qpa_p.h"
+
+QT_BEGIN_NAMESPACE
+
+static QString appName;
+static QString appFont;
+
+QWidget *qt_button_down = 0; // widget got last button-down
+
+static bool app_do_modal = false;
+extern QWidgetList *qt_modal_stack; // stack of modal widgets
+
+int qt_last_x = 0;
+int qt_last_y = 0;
+QPointer<QWidget> qt_last_mouse_receiver = 0;
+
+static Qt::KeyboardModifiers modifiers = Qt::NoModifier;
+static Qt::MouseButtons buttons = Qt::NoButton;
+static ulong mousePressTime;
+static Qt::MouseButton mousePressButton = Qt::NoButton;
+static int mousePressX;
+static int mousePressY;
+static int mouse_double_click_distance = 5;
+
+void QApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent *e)
+{
+ switch(e->type) {
+ case QWindowSystemInterfacePrivate::Mouse:
+ QApplicationPrivate::processMouseEvent(static_cast<QWindowSystemInterfacePrivate::MouseEvent *>(e));
+ break;
+ case QWindowSystemInterfacePrivate::Wheel:
+ QApplicationPrivate::processWheelEvent(static_cast<QWindowSystemInterfacePrivate::WheelEvent *>(e));
+ break;
+ case QWindowSystemInterfacePrivate::Key:
+ QApplicationPrivate::processKeyEvent(static_cast<QWindowSystemInterfacePrivate::KeyEvent *>(e));
+ break;
+ case QWindowSystemInterfacePrivate::Touch:
+ QApplicationPrivate::processTouchEvent(static_cast<QWindowSystemInterfacePrivate::TouchEvent *>(e));
+ break;
+ case QWindowSystemInterfacePrivate::GeometryChange:
+ QApplicationPrivate::processGeometryChangeEvent(static_cast<QWindowSystemInterfacePrivate::GeometryChangeEvent*>(e));
+ break;
+ case QWindowSystemInterfacePrivate::Enter:
+ QApplicationPrivate::processEnterEvent(static_cast<QWindowSystemInterfacePrivate::EnterEvent *>(e));
+ break;
+ case QWindowSystemInterfacePrivate::Leave:
+ QApplicationPrivate::processLeaveEvent(static_cast<QWindowSystemInterfacePrivate::LeaveEvent *>(e));
+ break;
+ case QWindowSystemInterfacePrivate::Close:
+ QApplicationPrivate::processCloseEvent(
+ static_cast<QWindowSystemInterfacePrivate::CloseEvent *>(e));
+ break;
+ case QWindowSystemInterfacePrivate::ScreenCountChange:
+ QApplicationPrivate::reportScreenCount(
+ static_cast<QWindowSystemInterfacePrivate::ScreenCountEvent *>(e));
+ break;
+ case QWindowSystemInterfacePrivate::ScreenGeometry:
+ QApplicationPrivate::reportGeometryChange(
+ static_cast<QWindowSystemInterfacePrivate::ScreenGeometryEvent *>(e));
+ break;
+ case QWindowSystemInterfacePrivate::ScreenAvailableGeometry:
+ QApplicationPrivate::reportAvailableGeometryChange(
+ static_cast<QWindowSystemInterfacePrivate::ScreenAvailableGeometryEvent *>(e));
+ break;
+ default:
+ qWarning() << "Unknown user input event type:" << e->type;
+ break;
+ }
+}
+
+QString QApplicationPrivate::appName() const
+{
+ return QT_PREPEND_NAMESPACE(appName);
+}
+
+void QApplicationPrivate::createEventDispatcher()
+{
+ Q_Q(QApplication);
+#if !defined(QT_NO_GLIB)
+ if (qgetenv("QT_NO_GLIB").isEmpty() && QEventDispatcherGlib::versionSupported())
+ eventDispatcher = new QPAEventDispatcherGlib(q);
+ else
+#endif
+ eventDispatcher = new QEventDispatcherQPA(q);
+}
+
+static bool qt_try_modal(QWidget *widget, QEvent::Type type)
+{
+ QWidget * top = 0;
+
+ if (QApplicationPrivate::tryModalHelper(widget, &top))
+ return true;
+
+ bool block_event = false;
+ bool paint_event = false;
+
+ switch (type) {
+#if 0
+ case QEvent::Focus:
+ if (!static_cast<QWSFocusEvent*>(event)->simpleData.get_focus)
+ break;
+ // drop through
+#endif
+ case QEvent::MouseButtonPress: // disallow mouse/key events
+ case QEvent::MouseButtonRelease:
+ case QEvent::MouseMove:
+ case QEvent::KeyPress:
+ case QEvent::KeyRelease:
+ block_event = true;
+ break;
+ default:
+ break;
+ }
+
+ if ((block_event || paint_event) && top->parentWidget() == 0)
+ top->raise();
+
+ return !block_event;
+}
+
+
+
+void QApplicationPrivate::enterModal_sys(QWidget *widget)
+{
+ if (!qt_modal_stack)
+ qt_modal_stack = new QWidgetList;
+ qt_modal_stack->insert(0, widget);
+ app_do_modal = true;
+}
+
+void QApplicationPrivate::leaveModal_sys(QWidget *widget )
+{
+ if (qt_modal_stack && qt_modal_stack->removeAll(widget)) {
+ if (qt_modal_stack->isEmpty()) {
+ delete qt_modal_stack;
+ qt_modal_stack = 0;
+ }
+ }
+ app_do_modal = qt_modal_stack != 0;
+}
+
+bool QApplicationPrivate::modalState()
+{
+ return app_do_modal;
+}
+
+void QApplicationPrivate::closePopup(QWidget *popup)
+{
+ Q_Q(QApplication);
+ if (!popupWidgets)
+ return;
+ popupWidgets->removeAll(popup);
+
+//###
+// if (popup == qt_popup_down) {
+// qt_button_down = 0;
+// qt_popup_down = 0;
+// }
+
+ if (QApplicationPrivate::popupWidgets->count() == 0) { // this was the last popup
+ delete QApplicationPrivate::popupWidgets;
+ QApplicationPrivate::popupWidgets = 0;
+
+ //### replay mouse event?
+
+ //### transfer/release mouse grab
+
+ //### transfer/release keyboard grab
+
+ //give back focus
+
+ if (active_window) {
+ if (QWidget *fw = active_window->focusWidget()) {
+ if (fw != QApplication::focusWidget()) {
+ fw->setFocus(Qt::PopupFocusReason);
+ } else {
+ QFocusEvent e(QEvent::FocusIn, Qt::PopupFocusReason);
+ q->sendEvent(fw, &e);
+ }
+ }
+ }
+
+ } else {
+ // A popup was closed, so the previous popup gets the focus.
+
+ QWidget* aw = QApplicationPrivate::popupWidgets->last();
+ if (QWidget *fw = aw->focusWidget())
+ fw->setFocus(Qt::PopupFocusReason);
+
+ //### regrab the keyboard and mouse in case 'popup' lost the grab
+
+
+ }
+
+}
+
+static int openPopupCount = 0;
+void QApplicationPrivate::openPopup(QWidget *popup)
+{
+ openPopupCount++;
+ if (!popupWidgets) { // create list
+ popupWidgets = new QWidgetList;
+
+ /* only grab if you are the first/parent popup */
+ //#### ->grabMouse(popup,true);
+ //#### ->grabKeyboard(popup,true);
+ //### popupGrabOk = true;
+ }
+ popupWidgets->append(popup); // add to end of list
+
+ // popups are not focus-handled by the window system (the first
+ // popup grabbed the keyboard), so we have to do that manually: A
+ // new popup gets the focus
+ if (popup->focusWidget()) {
+ popup->focusWidget()->setFocus(Qt::PopupFocusReason);
+ } else if (popupWidgets->count() == 1) { // this was the first popup
+ if (QWidget *fw = QApplication::focusWidget()) {
+ QFocusEvent e(QEvent::FocusOut, Qt::PopupFocusReason);
+ QApplication::sendEvent(fw, &e);
+ }
+ }
+}
+
+void QApplicationPrivate::initializeMultitouch_sys()
+{
+}
+
+void QApplicationPrivate::cleanupMultitouch_sys()
+{
+}
+
+void QApplicationPrivate::initializeWidgetPaletteHash()
+{
+}
+
+void QApplication::setCursorFlashTime(int msecs)
+{
+ QApplicationPrivate::cursor_flash_time = msecs;
+}
+
+int QApplication::cursorFlashTime()
+{
+ return QApplicationPrivate::cursor_flash_time;
+}
+
+void QApplication::setDoubleClickInterval(int ms)
+{
+ QApplicationPrivate::mouse_double_click_time = ms;
+}
+
+int QApplication::doubleClickInterval()
+{
+ return QApplicationPrivate::mouse_double_click_time;
+}
+
+void QApplication::setKeyboardInputInterval(int ms)
+{
+ QApplicationPrivate::keyboard_input_time = ms;
+}
+
+int QApplication::keyboardInputInterval()
+{
+ return QApplicationPrivate::keyboard_input_time;
+}
+
+#ifndef QT_NO_WHEELEVENT
+void QApplication::setWheelScrollLines(int lines)
+{
+ QApplicationPrivate::wheel_scroll_lines = lines;
+}
+
+int QApplication::wheelScrollLines()
+{
+ return QApplicationPrivate::wheel_scroll_lines;
+}
+#endif
+
+void QApplication::setEffectEnabled(Qt::UIEffect effect, bool enable)
+{
+ switch (effect) {
+ case Qt::UI_AnimateMenu:
+ QApplicationPrivate::animate_menu = enable;
+ break;
+ case Qt::UI_FadeMenu:
+ if (enable)
+ QApplicationPrivate::animate_menu = true;
+ QApplicationPrivate::fade_menu = enable;
+ break;
+ case Qt::UI_AnimateCombo:
+ QApplicationPrivate::animate_combo = enable;
+ break;
+ case Qt::UI_AnimateTooltip:
+ QApplicationPrivate::animate_tooltip = enable;
+ break;
+ case Qt::UI_FadeTooltip:
+ if (enable)
+ QApplicationPrivate::animate_tooltip = true;
+ QApplicationPrivate::fade_tooltip = enable;
+ break;
+ case Qt::UI_AnimateToolBox:
+ QApplicationPrivate::animate_toolbox = enable;
+ break;
+ default:
+ QApplicationPrivate::animate_ui = enable;
+ break;
+ }
+}
+
+bool QApplication::isEffectEnabled(Qt::UIEffect effect)
+{
+ if (QColormap::instance().depth() < 16 || !QApplicationPrivate::animate_ui)
+ return false;
+
+ switch(effect) {
+ case Qt::UI_AnimateMenu:
+ return QApplicationPrivate::animate_menu;
+ case Qt::UI_FadeMenu:
+ return QApplicationPrivate::fade_menu;
+ case Qt::UI_AnimateCombo:
+ return QApplicationPrivate::animate_combo;
+ case Qt::UI_AnimateTooltip:
+ return QApplicationPrivate::animate_tooltip;
+ case Qt::UI_FadeTooltip:
+ return QApplicationPrivate::fade_tooltip;
+ case Qt::UI_AnimateToolBox:
+ return QApplicationPrivate::animate_toolbox;
+ default:
+ return QApplicationPrivate::animate_ui;
+ }
+}
+
+#ifndef QT_NO_CURSOR
+void QApplication::setOverrideCursor(const QCursor &cursor)
+{
+ qApp->d_func()->cursor_list.prepend(cursor);
+ qt_qpa_set_cursor(0, false);
+}
+
+void QApplication::restoreOverrideCursor()
+{
+ if (qApp->d_func()->cursor_list.isEmpty())
+ return;
+ qApp->d_func()->cursor_list.removeFirst();
+ qt_qpa_set_cursor(0, false);
+}
+
+#endif// QT_NO_CURSOR
+
+QWidget *QApplication::topLevelAt(const QPoint &pos)
+{
+ QPlatformIntegration *pi = QApplicationPrivate::platformIntegration();
+
+ QList<QPlatformScreen *> screens = pi->screens();
+ QList<QPlatformScreen *>::const_iterator screen = screens.constBegin();
+ QList<QPlatformScreen *>::const_iterator end = screens.constEnd();
+
+ // The first screen in a virtual environment should know about all top levels
+ if (pi->isVirtualDesktop()) {
+ QWidget *w = (*screen)->topLevelAt(pos);
+ return w;
+ }
+
+ while (screen != end) {
+ if ((*screen)->geometry().contains(pos))
+ return (*screen)->topLevelAt(pos);
+ ++screen;
+ }
+ return 0;
+}
+
+void QApplication::beep()
+{
+}
+
+void QApplication::alert(QWidget *, int)
+{
+}
+
+static void init_platform(const QString &name)
+{
+ QApplicationPrivate::platform_integration = QPlatformIntegrationFactory::create(name);
+ if (!QApplicationPrivate::platform_integration) {
+ QStringList keys = QPlatformIntegrationFactory::keys();
+ QString fatalMessage =
+ QString::fromLatin1("Failed to load platform plugin \"%1\". Available platforms are: \n").arg(name);
+ foreach(QString key, keys) {
+ fatalMessage.append(key + QString::fromLatin1("\n"));
+ }
+ qFatal("%s", fatalMessage.toLocal8Bit().constData());
+
+ }
+
+}
+
+
+static void cleanup_platform()
+{
+ delete QApplicationPrivate::platform_integration;
+ QApplicationPrivate::platform_integration = 0;
+}
+
+static void init_plugins(const QList<QByteArray> pluginList)
+{
+ for (int i = 0; i < pluginList.count(); ++i) {
+ QByteArray pluginSpec = pluginList.at(i);
+ qDebug() << "init_plugins" << i << pluginSpec;
+ int colonPos = pluginSpec.indexOf(':');
+ QObject *plugin;
+ if (colonPos < 0)
+ plugin = QGenericPluginFactory::create(QLatin1String(pluginSpec), QString());
+ else
+ plugin = QGenericPluginFactory::create(QLatin1String(pluginSpec.mid(0, colonPos)),
+ QLatin1String(pluginSpec.mid(colonPos+1)));
+ qDebug() << " created" << plugin;
+ }
+}
+
+#ifndef QT_NO_QWS_INPUTMETHODS
+class QDummyInputContext : public QInputContext
+{
+public:
+ explicit QDummyInputContext(QObject* parent = 0) : QInputContext(parent) {}
+ ~QDummyInputContext() {}
+ QString identifierName() { return QString(); }
+ QString language() { return QString(); }
+
+ void reset() {}
+ bool isComposing() const { return false; }
+
+};
+#endif // QT_NO_QWS_INPUTMETHODS
+
+void qt_init(QApplicationPrivate *priv, int type)
+{
+ Q_UNUSED(type);
+
+ qApp->setAttribute(Qt::AA_DontCreateNativeWidgetSiblings);
+ char *p;
+ char **argv = priv->argv;
+ int argc = priv->argc;
+
+ if (argv && *argv) { //apparently, we allow people to pass 0 on the other platforms
+ p = strrchr(argv[0], '/');
+ appName = QString::fromLocal8Bit(p ? p + 1 : argv[0]);
+ }
+
+ QList<QByteArray> pluginList;
+ QString platformName = QLatin1String(qgetenv("QT_QPA_PLATFORM"));
+
+ // Get command line params
+
+ int j = argc ? 1 : 0;
+ for (int i=1; i<argc; i++) {
+ if (argv[i] && *argv[i] != '-') {
+ argv[j++] = argv[i];
+ continue;
+ }
+ QByteArray arg = argv[i];
+ if (arg == "-fn" || arg == "-font") {
+ if (++i < argc)
+ appFont = QString::fromLocal8Bit(argv[i]);
+ } else if (arg == "-platform") {
+ if (++i < argc)
+ platformName = QLatin1String(argv[i]);
+ } else if (arg == "-plugin") {
+ if (++i < argc)
+ pluginList << argv[i];
+ } else {
+ argv[j++] = argv[i];
+ }
+ }
+
+ if (j < priv->argc) {
+ priv->argv[j] = 0;
+ priv->argc = j;
+ }
+
+#if 0
+ QByteArray pluginEnv = qgetenv("QT_QPA_PLUGINS");
+ if (!pluginEnv.isEmpty()) {
+ pluginList.append(pluginEnv.split(';'));
+ }
+#endif
+
+ init_platform(platformName);
+ init_plugins(pluginList);
+
+ QColormap::initialize();
+ QFont::initialize();
+#ifndef QT_NO_CURSOR
+// QCursorData::initialize();
+#endif
+
+ qApp->setObjectName(appName);
+
+#ifndef QT_NO_QWS_INPUTMETHODS
+ qApp->setInputContext(new QDummyInputContext(qApp));
+#endif
+}
+
+void qt_cleanup()
+{
+ cleanup_platform();
+
+ QPixmapCache::clear();
+#ifndef QT_NO_CURSOR
+ QCursorData::cleanup();
+#endif
+ QFont::cleanup();
+ QColormap::cleanup();
+ delete QApplicationPrivate::inputContext;
+ QApplicationPrivate::inputContext = 0;
+
+ QApplicationPrivate::active_window = 0; //### this should not be necessary
+}
+
+
+#ifdef QT3_SUPPORT
+void QApplication::setMainWidget(QWidget *mainWidget)
+{
+ QApplicationPrivate::main_widget = mainWidget;
+ if (QApplicationPrivate::main_widget && windowIcon().isNull()
+ && QApplicationPrivate::main_widget->testAttribute(Qt::WA_SetWindowIcon))
+ setWindowIcon(QApplicationPrivate::main_widget->windowIcon());
+}
+#endif
+
+void QApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent *e)
+{
+ // qDebug() << "handleMouseEvent" << tlw << ev.pos() << ev.globalPos() << hex << ev.buttons();
+ static QWeakPointer<QWidget> implicit_mouse_grabber;
+
+ QEvent::Type type;
+ // move first
+ Qt::MouseButtons stateChange = e->buttons ^ buttons;
+ if (e->globalPos != QPoint(qt_last_x, qt_last_y) && (stateChange != Qt::NoButton)) {
+ QWindowSystemInterfacePrivate::MouseEvent * newMouseEvent =
+ new QWindowSystemInterfacePrivate::MouseEvent(e->widget.data(), e->timestamp, e->localPos, e->globalPos, e->buttons);
+ QWindowSystemInterfacePrivate::windowSystemEventQueue.prepend(newMouseEvent); // just in case the move triggers a new event loop
+ stateChange = Qt::NoButton;
+ }
+
+ QWidget * tlw = e->widget.data();
+
+ QPoint localPoint = e->localPos;
+ QPoint globalPoint = e->globalPos;
+ QWidget *mouseWindow = tlw;
+
+ Qt::MouseButton button = Qt::NoButton;
+
+
+ if (qt_last_x != globalPoint.x() || qt_last_y != globalPoint.y()) {
+ type = QEvent::MouseMove;
+ qt_last_x = globalPoint.x();
+ qt_last_y = globalPoint.y();
+ if (qAbs(globalPoint.x() - mousePressX) > mouse_double_click_distance||
+ qAbs(globalPoint.y() - mousePressY) > mouse_double_click_distance)
+ mousePressButton = Qt::NoButton;
+ }
+ else { // check to see if a new button has been pressed/released
+ for (int check = Qt::LeftButton;
+ check <= Qt::XButton2;
+ check = check << 1) {
+ if (check & stateChange) {
+ button = Qt::MouseButton(check);
+ break;
+ }
+ }
+ if (button == Qt::NoButton) {
+ // Ignore mouse events that don't change the current state
+ return;
+ }
+ buttons = e->buttons;
+ if (button & e->buttons) {
+ if ((e->timestamp - mousePressTime) < static_cast<ulong>(QApplication::doubleClickInterval()) && button == mousePressButton) {
+ type = QEvent::MouseButtonDblClick;
+ mousePressButton = Qt::NoButton;
+ }
+ else {
+ type = QEvent::MouseButtonPress;
+ mousePressTime = e->timestamp;
+ mousePressButton = button;
+ mousePressX = qt_last_x;
+ mousePressY = qt_last_y;
+ }
+ }
+ else
+ type = QEvent::MouseButtonRelease;
+ }
+
+ if (self->inPopupMode()) {
+ //popup mouse handling is magical...
+ mouseWindow = qApp->activePopupWidget();
+
+ implicit_mouse_grabber.clear();
+ //### how should popup mode and implicit mouse grab interact?
+
+ } else if (tlw && app_do_modal && !qt_try_modal(tlw, QEvent::MouseButtonRelease) ) {
+ //even if we're blocked by modality, we should deliver the mouse release event..
+ //### this code is not completely correct: multiple buttons can be pressed simultaneously
+ if (!(implicit_mouse_grabber && buttons == Qt::NoButton)) {
+ //qDebug() << "modal blocked mouse event to" << tlw;
+ return;
+ }
+ }
+
+ // find the tlw if we didn't get it from the plugin
+ if (!mouseWindow) {
+ mouseWindow = QApplication::topLevelAt(globalPoint);
+ }
+
+ if (!mouseWindow && !implicit_mouse_grabber)
+ mouseWindow = QApplication::desktop();
+
+ if (mouseWindow && mouseWindow != tlw) {
+ //we did not get a sensible localPoint from the window system, so let's calculate it
+ localPoint = mouseWindow->mapFromGlobal(globalPoint);
+ }
+
+ // which child should have it?
+ QWidget *mouseWidget = mouseWindow;
+ if (mouseWindow) {
+ QWidget *w = mouseWindow->childAt(localPoint);
+ if (w) {
+ mouseWidget = w;
+ }
+ }
+
+ //handle implicit mouse grab
+ if (type == QEvent::MouseButtonPress && !implicit_mouse_grabber) {
+ implicit_mouse_grabber = mouseWidget;
+
+ Q_ASSERT(mouseWindow);
+ mouseWindow->activateWindow(); //focus
+ } else if (implicit_mouse_grabber) {
+ mouseWidget = implicit_mouse_grabber.data();
+ mouseWindow = mouseWidget->window();
+ if (mouseWindow != tlw)
+ localPoint = mouseWindow->mapFromGlobal(globalPoint);
+ }
+
+ Q_ASSERT(mouseWidget);
+
+ //localPoint is local to mouseWindow, but it needs to be local to mouseWidget
+ localPoint = mouseWidget->mapFrom(mouseWindow, localPoint);
+
+ if (buttons == Qt::NoButton) {
+ //qDebug() << "resetting mouse grabber";
+ implicit_mouse_grabber.clear();
+ }
+
+ if (mouseWidget != qt_last_mouse_receiver) {
+ dispatchEnterLeave(mouseWidget, qt_last_mouse_receiver);
+ qt_last_mouse_receiver = mouseWidget;
+ }
+
+ // Remember, we might enter a modal event loop when sending the event,
+ // so think carefully before adding code below this point.
+
+ // qDebug() << "sending mouse ev." << ev.type() << localPoint << globalPoint << ev.button() << ev.buttons() << mouseWidget << "mouse grabber" << implicit_mouse_grabber;
+
+ QMouseEvent ev(type, localPoint, globalPoint, button, buttons, modifiers);
+
+ QList<QWeakPointer<QPlatformCursor> > cursors = QPlatformCursorPrivate::getInstances();
+ foreach (QWeakPointer<QPlatformCursor> cursor, cursors) {
+ if (cursor)
+ cursor.data()->pointerEvent(ev);
+ }
+
+ QApplication::sendSpontaneousEvent(mouseWidget, &ev);
+}
+
+
+//### there's a lot of duplicated logic here -- refactoring required!
+
+void QApplicationPrivate::processWheelEvent(QWindowSystemInterfacePrivate::WheelEvent *e)
+{
+// QPoint localPoint = ev.pos();
+ QPoint globalPoint = e->globalPos;
+// bool trustLocalPoint = !!tlw; //is there something the local point can be local to?
+ QWidget *mouseWidget;
+
+ qt_last_x = globalPoint.x();
+ qt_last_y = globalPoint.y();
+
+ QWidget *mouseWindow = e->widget.data();
+
+ // find the tlw if we didn't get it from the plugin
+ if (!mouseWindow) {
+ mouseWindow = QApplication::topLevelAt(globalPoint);
+ }
+
+ if (!mouseWindow)
+ return;
+
+ mouseWidget = mouseWindow;
+
+ if (app_do_modal && !qt_try_modal(mouseWindow, QEvent::Wheel) ) {
+ qDebug() << "modal blocked wheel event" << mouseWindow;
+ return;
+ }
+ QPoint p = mouseWindow->mapFromGlobal(globalPoint);
+ QWidget *w = mouseWindow->childAt(p);
+ if (w) {
+ mouseWidget = w;
+ p = mouseWidget->mapFromGlobal(globalPoint);
+ }
+
+ QWheelEvent ev(p, globalPoint, e->delta, buttons, modifiers,
+ e->orient);
+ QApplication::sendSpontaneousEvent(mouseWidget, &ev);
+}
+
+
+
+// Remember, Qt convention is: keyboard state is state *before*
+
+void QApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent *e)
+{
+ QWidget *focusW = 0;
+ if (self->inPopupMode()) {
+ QWidget *popupW = qApp->activePopupWidget();
+ focusW = popupW->focusWidget() ? popupW->focusWidget() : popupW;
+ }
+ if (!focusW)
+ focusW = QApplication::focusWidget();
+ if (!focusW) {
+ focusW = e->widget.data();
+ }
+ if (!focusW)
+ focusW = QApplication::activeWindow();
+
+ //qDebug() << "handleKeyEvent" << hex << e->key() << e->modifiers() << e->text() << "widget" << focusW;
+
+ if (!focusW)
+ return;
+ if (app_do_modal && !qt_try_modal(focusW, e->keyType))
+ return;
+
+ modifiers = e->modifiers;
+ QKeyEvent ev(e->keyType, e->key, e->modifiers, e->unicode, e->repeat, e->repeatCount);
+ QApplication::sendSpontaneousEvent(focusW, &ev);
+}
+
+void QApplicationPrivate::processEnterEvent(QWindowSystemInterfacePrivate::EnterEvent *e)
+{
+ QApplicationPrivate::dispatchEnterLeave(e->enter.data(),0);
+ qt_last_mouse_receiver = e->enter.data();
+}
+
+void QApplicationPrivate::processLeaveEvent(QWindowSystemInterfacePrivate::LeaveEvent *e)
+{
+ QApplicationPrivate::dispatchEnterLeave(0,qt_last_mouse_receiver);
+
+ if (e->leave.data() && !e->leave.data()->isAncestorOf(qt_last_mouse_receiver)) //(???) this should not happen
+ QApplicationPrivate::dispatchEnterLeave(0, e->leave.data());
+ qt_last_mouse_receiver = 0;
+
+}
+
+
+void QApplicationPrivate::processGeometryChangeEvent(QWindowSystemInterfacePrivate::GeometryChangeEvent *e)
+{
+ if (e->tlw.isNull())
+ return;
+ QWidget *tlw = e->tlw.data();
+ if (!tlw->isWindow())
+ return; //geo of native child widgets is controlled by lighthouse
+ //so we already have sent the events; besides this new rect
+ //is not mapped to parent
+
+ QRect newRect = e->newGeometry;
+ QRect cr(tlw->geometry());
+ bool isResize = cr.size() != newRect.size();
+ bool isMove = cr.topLeft() != newRect.topLeft();
+ tlw->data->crect = newRect;
+ if (isResize) {
+ QResizeEvent e(tlw->data->crect.size(), cr.size());
+ QApplication::sendSpontaneousEvent(tlw, &e);
+ tlw->update();
+ }
+
+ if (isMove) {
+ //### frame geometry
+ QMoveEvent e(tlw->data->crect.topLeft(), cr.topLeft());
+ QApplication::sendSpontaneousEvent(tlw, &e);
+ }
+}
+
+void QApplicationPrivate::processCloseEvent(QWindowSystemInterfacePrivate::CloseEvent *e)
+{
+ if (e->topLevel.isNull()) {
+ //qDebug() << "QApplicationPrivate::processCloseEvent NULL";
+ return;
+ }
+ e->topLevel.data()->d_func()->close_helper(QWidgetPrivate::CloseWithSpontaneousEvent);
+}
+
+void QApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::TouchEvent *e)
+{
+ translateRawTouchEvent(e->widget.data(), e->devType, e->points);
+}
+
+void QApplicationPrivate::reportScreenCount(QWindowSystemInterfacePrivate::ScreenCountEvent *e)
+{
+ // This operation only makes sense after the QApplication constructor runs
+ if (QCoreApplication::startingUp())
+ return;
+
+ QApplication::desktop()->d_func()->updateScreenList();
+ // signal anything listening for creation or deletion of screens
+ QDesktopWidget *desktop = QApplication::desktop();
+ emit desktop->screenCountChanged(e->count);
+}
+
+void QApplicationPrivate::reportGeometryChange(QWindowSystemInterfacePrivate::ScreenGeometryEvent *e)
+{
+ // This operation only makes sense after the QApplication constructor runs
+ if (QCoreApplication::startingUp())
+ return;
+
+ QApplication::desktop()->d_func()->updateScreenList();
+
+ // signal anything listening for screen geometry changes
+ QDesktopWidget *desktop = QApplication::desktop();
+ emit desktop->resized(e->index);
+
+ // make sure maximized and fullscreen windows are updated
+ QWidgetList list = QApplication::topLevelWidgets();
+ for (int i = list.size() - 1; i >= 0; --i) {
+ QWidget *w = list.at(i);
+ if (w->isFullScreen())
+ w->d_func()->setFullScreenSize_helper();
+ else if (w->isMaximized())
+ w->d_func()->setMaxWindowState_helper();
+ }
+}
+
+void QApplicationPrivate::reportAvailableGeometryChange(
+ QWindowSystemInterfacePrivate::ScreenAvailableGeometryEvent *e)
+{
+ // This operation only makes sense after the QApplication constructor runs
+ if (QCoreApplication::startingUp())
+ return;
+
+ QApplication::desktop()->d_func()->updateScreenList();
+
+ // signal anything listening for screen geometry changes
+ QDesktopWidget *desktop = QApplication::desktop();
+ emit desktop->workAreaResized(e->index);
+
+ // make sure maximized and fullscreen windows are updated
+ QWidgetList list = QApplication::topLevelWidgets();
+ for (int i = list.size() - 1; i >= 0; --i) {
+ QWidget *w = list.at(i);
+ if (w->isFullScreen())
+ w->d_func()->setFullScreenSize_helper();
+ else if (w->isMaximized())
+ w->d_func()->setMaxWindowState_helper();
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 57702c6..5f01bcb 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -1237,10 +1237,11 @@ 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.
- const bool visible = !(qwidget->windowState() & (Qt::WindowFullScreen | Qt::WindowMinimized));
+ QWidget *const window = qwidget->window();
+ const bool visible = !(window->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 isFullscreen = window->windowState() & Qt::WindowFullScreen;
+ const bool cbaVisibilityHint = window->windowFlags() & Qt::WindowSoftkeysVisibleHint;
const bool buttonGroupVisibility = (visible || (isFullscreen && cbaVisibilityHint));
S60->setStatusPaneAndButtonGroupVisibility(statusPaneVisibility, buttonGroupVisibility);
#endif
@@ -1424,7 +1425,7 @@ void qt_init(QApplicationPrivate * /* priv */, int)
TInt err = CApaCommandLine::GetCommandLineFromProcessEnvironment(commandLine);
// After this construction, CEikonEnv will be available from CEikonEnv::Static().
// (much like our qApp).
- CEikonEnv* coe = new CEikonEnv;
+ QtEikonEnv* coe = new QtEikonEnv;
//not using QT_TRAP_THROWING, because coe owns the cleanupstack so it can't be pushed there.
if(err == KErrNone)
TRAP(err, coe->ConstructAppFromCommandLineL(factory,*commandLine));
@@ -2057,6 +2058,17 @@ int QApplicationPrivate::symbianProcessWsEvent(const QSymbianEvent *symbianEvent
}
#endif
break;
+#ifdef Q_SYMBIAN_SUPPORTS_SURFACES
+ case EEventUser:
+ {
+ // GOOM is looking for candidates to kill so indicate that we are
+ // capable of cleaning up by handling this event
+ TInt32 *data = reinterpret_cast<TInt32 *>(event->EventData());
+ if (data[0] == EApaSystemEventShutdown && data[1] == KGoomMemoryLowEvent)
+ return 1;
+ }
+ break;
+#endif
default:
break;
}
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index a32a957..1dab738 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -115,12 +115,25 @@ extern void qt_wince_hide_taskbar(HWND hwnd); //defined in qguifunctions_wince.c
# if defined(Q_WS_WINCE)
# include <bldver.h>
# endif
-# include <winable.h>
+# if !defined(Q_WS_WINCE)
+# include <winable.h>
+# endif
+#endif
+
+#ifndef QT_NO_GESTURES
+# ifndef GID_ZOOM
+# define GID_ZOOM 3
+# define GID_TWOFINGERTAP 6
+# define GID_PRESSANDTAP 7
+# define GID_ROLLOVER GID_PRESSANDTAP
+# endif
#endif
#ifndef WM_TOUCH
# define WM_TOUCH 0x0240
+#endif
+#ifndef TOUCHEVENTF_MOVE
# define TOUCHEVENTF_MOVE 0x0001
# define TOUCHEVENTF_DOWN 0x0002
# define TOUCHEVENTF_UP 0x0004
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp
index d905639..ff98229 100644
--- a/src/gui/kernel/qapplication_x11.cpp
+++ b/src/gui/kernel/qapplication_x11.cpp
@@ -2335,6 +2335,30 @@ void qt_init(QApplicationPrivate *priv, int,
X11->desktopEnvironment = DE_4DWM;
break;
}
+
+ if (XGetWindowProperty(X11->display, QX11Info::appRootWindow(),
+ ATOM(_NET_SUPPORTING_WM_CHECK),
+ 0, 1024, False, XA_WINDOW, &type,
+ &format, &length, &after, &data) == Success) {
+ if (type == XA_WINDOW && format == 32) {
+ Window windowManagerWindow = *((Window*) data);
+ XFree(data);
+ data = 0;
+
+ if (windowManagerWindow != XNone) {
+ Atom utf8atom = ATOM(UTF8_STRING);
+ if (XGetWindowProperty(QX11Info::display(), windowManagerWindow, ATOM(_NET_WM_NAME),
+ 0, 1024, False, utf8atom, &type,
+ &format, &length, &after, &data) == Success) {
+ if (type == utf8atom && format == 8) {
+ if (qstrcmp((const char *)data, "MCompositor") == 0)
+ X11->desktopEnvironment = DE_MEEGO_COMPOSITOR;
+ }
+ }
+ }
+ }
+ }
+
} while(0);
if (data)
@@ -3741,7 +3765,7 @@ int QApplication::x11ProcessEvent(XEvent* event)
// toplevel reparented...
QWidget *newparent = QWidget::find(event->xreparent.parent);
if (! newparent || (newparent->windowType() == Qt::Desktop)) {
- // we dont' know about the new parent (or we've been
+ // we don't know about the new parent (or we've been
// reparented to root), perhaps a window manager
// has been (re)started? reset the focus model to unknown
X11->focus_model = QX11Data::FM_Unknown;
diff --git a/src/gui/kernel/qclipboard_qpa.cpp b/src/gui/kernel/qclipboard_qpa.cpp
new file mode 100644
index 0000000..92b9e83
--- /dev/null
+++ b/src/gui/kernel/qclipboard_qpa.cpp
@@ -0,0 +1,163 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the 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 "qclipboard.h"
+
+#ifndef QT_NO_CLIPBOARD
+
+#include "qmimedata.h"
+#include "qapplication.h"
+
+QT_BEGIN_NAMESPACE
+
+QT_USE_NAMESPACE
+
+
+class QClipboardData
+{
+public:
+ QClipboardData();
+ ~QClipboardData();
+
+ void setSource(QMimeData* s)
+ {
+ if (s == src)
+ return;
+ delete src;
+ src = s;
+ }
+ QMimeData* source()
+ { return src; }
+
+ void clear();
+
+private:
+ QMimeData* src;
+};
+
+QClipboardData::QClipboardData()
+{
+ src = 0;
+}
+
+QClipboardData::~QClipboardData()
+{
+ delete src;
+}
+
+void QClipboardData::clear()
+{
+ delete src;
+ src = 0;
+}
+
+
+static QClipboardData *internalCbData = 0;
+
+static void cleanupClipboardData()
+{
+ delete internalCbData;
+ internalCbData = 0;
+}
+
+static QClipboardData *clipboardData()
+{
+ if (internalCbData == 0) {
+ internalCbData = new QClipboardData;
+ qAddPostRoutine(cleanupClipboardData);
+ }
+ return internalCbData;
+}
+
+
+void QClipboard::clear(Mode mode)
+{
+ setText(QString(), mode);
+}
+
+
+bool QClipboard::event(QEvent *e)
+{
+ return QObject::event(e);
+}
+
+const QMimeData* QClipboard::mimeData(Mode mode) const
+{
+ if (mode != Clipboard) return 0;
+
+ QClipboardData *d = clipboardData();
+ return d->source();
+}
+
+void QClipboard::setMimeData(QMimeData* src, Mode mode)
+{
+ if (mode != Clipboard) return;
+
+ QClipboardData *d = clipboardData();
+
+ d->setSource(src);
+
+ emitChanged(QClipboard::Clipboard);
+}
+
+bool QClipboard::supportsMode(Mode mode) const
+{
+ return (mode == Clipboard);
+}
+
+bool QClipboard::ownsMode(Mode mode) const
+{
+ if (mode == Clipboard)
+ qWarning("QClipboard::ownsClipboard: UNIMPLEMENTED!");
+ return false;
+}
+
+void QClipboard::connectNotify( const char * )
+{
+}
+
+void QClipboard::ownerDestroyed()
+{
+}
+
+#endif // QT_NO_CLIPBOARD
+
+QT_END_NAMESPACE
diff --git a/src/gui/kernel/qclipboard_s60.cpp b/src/gui/kernel/qclipboard_s60.cpp
index f07e066..73280b2 100644
--- a/src/gui/kernel/qclipboard_s60.cpp
+++ b/src/gui/kernel/qclipboard_s60.cpp
@@ -50,16 +50,18 @@
#include "qwidget.h"
#include "qevent.h"
#include "private/qcore_symbian_p.h"
+#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
+#include "txtclipboard.h"
+#endif
+#include "txtetext.h"
#include <QtDebug>
// Symbian's clipboard
#include <baclipb.h>
QT_BEGIN_NAMESPACE
-//### Mime Type mapping to UIDs
-
const TUid KQtCbDataStream = {0x2001B2DD};
-
+const TInt KPlainTextBegin = 0;
class QClipboardData
{
@@ -141,7 +143,6 @@ void writeToStreamLX(const QMimeData* aData, RWriteStream& aStream)
{
HBufC* stringData = TPtrC(reinterpret_cast<const TUint16*>((*iter).utf16())).AllocLC();
QByteArray ba = aData->data((*iter));
- qDebug() << "copy to clipboard mime: " << *iter << " data: " << ba;
// mime type
aStream << TCardinality(stringData->Size());
aStream << *(stringData);
@@ -152,6 +153,43 @@ void writeToStreamLX(const QMimeData* aData, RWriteStream& aStream)
}
}
+void writeToSymbianStoreLX(const QMimeData* aData, CClipboard* clipboard)
+{
+ // This function both leaves and throws exceptions. There must be no destructor
+ // dependencies between cleanup styles, and no cleanup stack dependencies on stacked objects.
+ if (aData->hasText()) {
+ CPlainText* text = CPlainText::NewL();
+ CleanupStack::PushL(text);
+
+ TPtrC textPtr(qt_QString2TPtrC(aData->text()));
+ text->InsertL(KPlainTextBegin, textPtr);
+ text->CopyToStoreL(clipboard->Store(), clipboard->StreamDictionary(),
+ KPlainTextBegin, textPtr.Length());
+ CleanupStack::PopAndDestroy(text);
+ }
+}
+
+void readSymbianStoreLX(QMimeData* aData, CClipboard* clipboard)
+{
+ // This function both leaves and throws exceptions. There must be no destructor
+ // dependencies between cleanup styles, and no cleanup stack dependencies on stacked objects.
+ CPlainText* text = CPlainText::NewL();
+ CleanupStack::PushL(text);
+ TInt dataLength = text->PasteFromStoreL(clipboard->Store(), clipboard->StreamDictionary(),
+ KPlainTextBegin);
+ if (dataLength == 0) {
+ User::Leave(KErrNotFound);
+ }
+ HBufC* hBuf = HBufC::NewL(dataLength);
+ TPtr buf = hBuf->Des();
+ text->Extract(buf, KPlainTextBegin, dataLength);
+
+ QString string = qt_TDesC2QString(buf);
+ CleanupStack::PopAndDestroy(text);
+
+ aData->setText(string);
+}
+
void readFromStreamLX(QMimeData* aData,RReadStream& aStream)
{
// This function both leaves and throws exceptions. There must be no destructor
@@ -174,7 +212,6 @@ void readFromStreamLX(QMimeData* aData,RReadStream& aStream)
ba.reserve(dataSize);
aStream.ReadL(reinterpret_cast<uchar*>(ba.data_ptr()->data),dataSize);
ba.data_ptr()->size = dataSize;
- qDebug() << "paste from clipboard mime: " << mimeType << " data: " << ba;
aData->setData(mimeType,ba);
}
}
@@ -192,23 +229,42 @@ const QMimeData* QClipboard::mimeData(Mode mode) const
{
if (mode != Clipboard) return 0;
QClipboardData *d = clipboardData();
+ bool dataExists(false);
if (d)
{
TRAPD(err,{
RFs fs = qt_s60GetRFs();
CClipboard* cb = CClipboard::NewForReadingLC(fs);
Q_ASSERT(cb);
+ //stream for qt
RStoreReadStream stream;
TStreamId stid = (cb->StreamDictionary()).At(KQtCbDataStream);
- stream.OpenLC(cb->Store(),stid);
- QT_TRYCATCH_LEAVING(readFromStreamLX(d->source(),stream));
- CleanupStack::PopAndDestroy(2,cb);
- return d->source();
+ if (stid != 0) {
+ stream.OpenLC(cb->Store(),stid);
+ QT_TRYCATCH_LEAVING(readFromStreamLX(d->source(),stream));
+ CleanupStack::PopAndDestroy(&stream);
+ dataExists = true;
+ }
+ else {
+ //symbian clipboard
+ RStoreReadStream symbianStream;
+ TStreamId symbianStId = (cb->StreamDictionary()).At(KClipboardUidTypePlainText);
+ if (symbianStId != 0) {
+ symbianStream.OpenLC(cb->Store(), symbianStId);
+ QT_TRYCATCH_LEAVING(readSymbianStoreLX(d->source(), cb));
+ CleanupStack::PopAndDestroy(&symbianStream);
+ dataExists = true;
+ }
+ }
+ CleanupStack::PopAndDestroy(cb);
});
if (err != KErrNone){
qDebug()<< "clipboard is empty/err: " << err;
}
+ if (dataExists) {
+ return d->source();
+ }
}
return 0;
}
@@ -223,6 +279,7 @@ void QClipboard::setMimeData(QMimeData* src, Mode mode)
TRAPD(err,{
RFs fs = qt_s60GetRFs();
CClipboard* cb = CClipboard::NewForWritingLC(fs);
+ //stream for qt
RStoreWriteStream stream;
TStreamId stid = stream.CreateLC(cb->Store());
QT_TRYCATCH_LEAVING(writeToStreamLX(src,stream));
@@ -230,7 +287,14 @@ void QClipboard::setMimeData(QMimeData* src, Mode mode)
stream.CommitL();
(cb->StreamDictionary()).AssignL(KQtCbDataStream,stid);
cb->CommitL();
- CleanupStack::PopAndDestroy(2,cb);
+
+ //stream for symbian
+ RStoreWriteStream symbianStream;
+ TStreamId symbianStId = symbianStream.CreateLC(cb->Store());
+ QT_TRYCATCH_LEAVING(writeToSymbianStoreLX(src, cb));
+ (cb->StreamDictionary()).AssignL(KClipboardUidTypePlainText, symbianStId);
+ cb->CommitL();
+ CleanupStack::PopAndDestroy(3,cb);
});
if (err != KErrNone){
qDebug()<< "clipboard write err :" << err;
diff --git a/src/gui/kernel/qclipboard_win.cpp b/src/gui/kernel/qclipboard_win.cpp
index 63ca9e5..c2e29fd 100644
--- a/src/gui/kernel/qclipboard_win.cpp
+++ b/src/gui/kernel/qclipboard_win.cpp
@@ -141,7 +141,7 @@ public:
clipBoardViewer = new QWidget();
clipBoardViewer->createWinId();
clipBoardViewer->setObjectName(QLatin1String("internal clipboard owner"));
- // We dont need this internal widget to appear in QApplication::topLevelWidgets()
+ // We don't need this internal widget to appear in QApplication::topLevelWidgets()
if (QWidgetPrivate::allWidgets)
QWidgetPrivate::allWidgets->remove(clipBoardViewer);
}
diff --git a/src/gui/kernel/qclipboard_x11.cpp b/src/gui/kernel/qclipboard_x11.cpp
index 55548ef..62c861d 100644
--- a/src/gui/kernel/qclipboard_x11.cpp
+++ b/src/gui/kernel/qclipboard_x11.cpp
@@ -132,7 +132,7 @@ void setupOwner()
requestor = new QWidget(0);
requestor->createWinId();
requestor->setObjectName(QLatin1String("internal clipboard requestor"));
- // We dont need this internal widgets to appear in QApplication::topLevelWidgets()
+ // We don't need this internal widgets to appear in QApplication::topLevelWidgets()
if (QWidgetPrivate::allWidgets) {
QWidgetPrivate::allWidgets->remove(owner);
QWidgetPrivate::allWidgets->remove(requestor);
@@ -769,7 +769,7 @@ QByteArray QX11Data::clipboardReadIncrementalProperty(Window win, Atom property,
delete requestor;
requestor = new QWidget(0);
requestor->setObjectName(QLatin1String("internal clipboard requestor"));
- // We dont need this internal widget to appear in QApplication::topLevelWidgets()
+ // We don't need this internal widget to appear in QApplication::topLevelWidgets()
if (QWidgetPrivate::allWidgets)
QWidgetPrivate::allWidgets->remove(requestor);
diff --git a/src/gui/kernel/qcocoamenuloader_mac.mm b/src/gui/kernel/qcocoamenuloader_mac.mm
index 8d38f45..b963b3c 100644
--- a/src/gui/kernel/qcocoamenuloader_mac.mm
+++ b/src/gui/kernel/qcocoamenuloader_mac.mm
@@ -70,13 +70,13 @@ QT_USE_NAMESPACE
showAllItem = [[appMenu itemWithTitle:@"Show All"] retain];
// Get the names in the nib to match the app name set by Qt.
- NSString *appName = reinterpret_cast<const NSString*>(QCFString::toCFStringRef(qAppName()));
+ const NSString *appName = reinterpret_cast<const NSString*>(QCFString::toCFStringRef(qAppName()));
[quitItem setTitle:[[quitItem title] stringByReplacingOccurrencesOfString:@"NewApplication"
- withString:appName]];
+ withString:const_cast<NSString *>(appName)]];
[hideItem setTitle:[[hideItem title] stringByReplacingOccurrencesOfString:@"NewApplication"
- withString:appName]];
+ withString:const_cast<NSString *>(appName)]];
[aboutItem setTitle:[[aboutItem title] stringByReplacingOccurrencesOfString:@"NewApplication"
- withString:appName]];
+ withString:const_cast<NSString *>(appName)]];
[appName release];
// Disable the items that don't do anything. If someone associates a QAction with them
// They should get synced back in.
@@ -89,7 +89,7 @@ QT_USE_NAMESPACE
- (void)ensureAppMenuInMenu:(NSMenu *)menu
{
// The application menu is the menu in the menu bar that contains the
- // 'Quit' item. When changing menu bar (e.g when swithing between
+ // 'Quit' item. When changing menu bar (e.g when switching between
// windows with different menu bars), we never recreate this menu, but
// instead pull it out the current menu bar and place into the new one:
NSMenu *mainMenu = [NSApp mainMenu];
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index 8576f52..dfcc2e6 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -534,7 +534,7 @@ static int qCocoaViewCount = 0;
return;
// We use a different graphics system.
- if (QApplicationPrivate::graphicsSystem() != 0) {
+ if (QApplicationPrivate::graphicsSystem() != 0 && !qwidgetprivate->isInUnifiedToolbar) {
// Qt handles the painting occuring inside the window.
// Cocoa also keeps track of all widgets as NSView and therefore might
@@ -558,6 +558,15 @@ static int qCocoaViewCount = 0;
CGContextRef cg = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
qwidgetprivate->hd = cg;
+
+ // We steal the CGContext for flushing in the unified toolbar with the raster engine.
+ if (QApplicationPrivate::graphicsSystem() != 0 && qwidgetprivate->isInUnifiedToolbar) {
+ qwidgetprivate->cgContext = cg;
+ qwidgetprivate->hasOwnContext = true;
+ qwidgetprivate->unifiedSurface->flush(qwidget, qwidgetprivate->ut_rg, qwidgetprivate->ut_pt);
+ return;
+ }
+
CGContextSaveGState(cg);
if (qwidget->isVisible() && qwidget->updatesEnabled()) { //process the actual paint event.
@@ -955,10 +964,6 @@ static int qCocoaViewCount = 0;
}
}
#endif //QT_NO_WHEELEVENT
-
- if (!wheelOK) {
- return [super scrollWheel:theEvent];
- }
}
- (void)tabletProximity:(NSEvent *)tabletEvent
@@ -1408,7 +1413,7 @@ static int qCocoaViewCount = 0;
if (!selectedText.isEmpty()) {
QCFString string(selectedText.mid(theRange.location, theRange.length));
const NSString *tmpString = reinterpret_cast<const NSString *>((CFStringRef)string);
- return [[[NSAttributedString alloc] initWithString:tmpString] autorelease];
+ return [[[NSAttributedString alloc] initWithString:const_cast<NSString *>(tmpString)] autorelease];
} else {
return nil;
}
diff --git a/src/gui/kernel/qcursor.h b/src/gui/kernel/qcursor.h
index ed6b254..62d2f41 100644
--- a/src/gui/kernel/qcursor.h
+++ b/src/gui/kernel/qcursor.h
@@ -130,7 +130,7 @@ public:
static int x11Screen();
#elif defined(Q_WS_MAC)
Qt::HANDLE handle() const;
-#elif defined(Q_WS_QWS)
+#elif defined(Q_WS_QWS) || defined(Q_WS_QPA)
int handle() const;
#elif defined(Q_OS_SYMBIAN)
Qt::HANDLE handle() const;
diff --git a/src/gui/kernel/qcursor_p.h b/src/gui/kernel/qcursor_p.h
index 23798b4..bfd6eac 100644
--- a/src/gui/kernel/qcursor_p.h
+++ b/src/gui/kernel/qcursor_p.h
@@ -91,7 +91,7 @@ public:
short hx, hy;
#if defined (Q_WS_MAC)
int mId;
-#elif defined(Q_WS_QWS)
+#elif defined(Q_WS_QWS) || defined(Q_WS_QPA)
int id;
#endif
#if defined (Q_WS_WIN)
diff --git a/src/gui/kernel/qcursor_qpa.cpp b/src/gui/kernel/qcursor_qpa.cpp
new file mode 100644
index 0000000..a6ae7d3
--- /dev/null
+++ b/src/gui/kernel/qcursor_qpa.cpp
@@ -0,0 +1,127 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the 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 <qcursor.h>
+#include <private/qcursor_p.h>
+#include <qbitmap.h>
+
+QT_BEGIN_NAMESPACE
+
+QT_USE_NAMESPACE
+
+#ifndef QT_NO_CURSOR
+
+static int nextCursorId = Qt::BitmapCursor;
+
+/*****************************************************************************
+ Internal QCursorData class
+ *****************************************************************************/
+
+QCursorData::QCursorData(Qt::CursorShape s)
+ : cshape(s), bm(0), bmm(0), hx(0), hy(0), id(s)
+{
+ ref = 1;
+}
+
+QCursorData::~QCursorData()
+{
+ delete bm;
+ delete bmm;
+}
+
+
+/*****************************************************************************
+ Global cursors
+ *****************************************************************************/
+
+extern QCursorData *qt_cursorTable[Qt::LastCursor + 1]; // qcursor.cpp
+
+int QCursor::handle() const
+{
+ return d->id;
+}
+
+
+QCursorData *QCursorData::setBitmap(const QBitmap &bitmap, const QBitmap &mask, int hotX, int hotY)
+{
+ if (!QCursorData::initialized)
+ QCursorData::initialize();
+ if (bitmap.depth() != 1 || mask.depth() != 1 || bitmap.size() != mask.size()) {
+ qWarning("QCursor: Cannot create bitmap cursor; invalid bitmap(s)");
+ QCursorData *c = qt_cursorTable[0];
+ c->ref.ref();
+ return c;
+ }
+ QCursorData *d = new QCursorData;
+ d->bm = new QBitmap(bitmap);
+ d->bmm = new QBitmap(mask);
+ d->cshape = Qt::BitmapCursor;
+ d->id = ++nextCursorId;
+ d->hx = hotX >= 0 ? hotX : bitmap.width() / 2;
+ d->hy = hotY >= 0 ? hotY : bitmap.height() / 2;
+
+ return d;
+}
+
+void QCursorData::update()
+{
+}
+
+#endif //QT_NO_CURSOR
+
+extern int qt_last_x,qt_last_y;
+
+QPoint QCursor::pos()
+{
+ return QPoint(qt_last_x, qt_last_y);
+}
+
+void QCursor::setPos(int x, int y)
+{
+ // Need to check, since some X servers generate null mouse move
+ // events, causing looping in applications which call setPos() on
+ // every mouse move event.
+ //
+ if (pos() == QPoint(x, y))
+ return;
+}
+
+QT_END_NAMESPACE
diff --git a/src/gui/kernel/qdesktopwidget.qdoc b/src/gui/kernel/qdesktopwidget.qdoc
index 2d72bf9..c550082 100644
--- a/src/gui/kernel/qdesktopwidget.qdoc
+++ b/src/gui/kernel/qdesktopwidget.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/src/gui/kernel/qdesktopwidget_qpa.cpp b/src/gui/kernel/qdesktopwidget_qpa.cpp
new file mode 100644
index 0000000..cff05f5
--- /dev/null
+++ b/src/gui/kernel/qdesktopwidget_qpa.cpp
@@ -0,0 +1,180 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the 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 "qdesktopwidget.h"
+#include "private/qapplication_p.h"
+#include "private/qgraphicssystem_p.h"
+#include <QWidget>
+#include "private/qwidget_p.h"
+#include "private/qdesktopwidget_qpa_p.h"
+QT_BEGIN_NAMESPACE
+
+QT_USE_NAMESPACE
+
+void QDesktopWidgetPrivate::updateScreenList()
+{
+ QList<QPlatformScreen *> screenList = QApplicationPrivate::platformIntegration()->screens();
+ int targetLength = screenList.length();
+ int currentLength = screens.length();
+
+ // Add or remove screen widgets as necessary
+ if(currentLength > targetLength) {
+ QDesktopScreenWidget *screen;
+ while (currentLength-- > targetLength) {
+ screen = screens.takeLast();
+ delete screen;
+ }
+ }
+ else if (currentLength < targetLength) {
+ QDesktopScreenWidget *screen;
+ while (currentLength < targetLength) {
+ screen = new QDesktopScreenWidget(currentLength++);
+ screens.append(screen);
+ }
+ }
+
+ QRegion virtualGeometry;
+ bool doVirtualGeometry = QApplicationPrivate::platformIntegration()->isVirtualDesktop();
+
+ // update the geometry of each screen widget
+ for (int i = 0; i < screens.length(); i++) {
+ QRect screenGeometry = screenList.at(i)->geometry();
+ screens.at(i)->setGeometry(screenGeometry);
+ if (doVirtualGeometry)
+ virtualGeometry += screenGeometry;
+ }
+
+ virtualScreen.setGeometry(virtualGeometry.boundingRect());
+ Q_Q(QDesktopWidget);
+ q->setGeometry(virtualScreen.geometry());
+}
+
+QDesktopWidget::QDesktopWidget()
+ : QWidget(*new QDesktopWidgetPrivate, 0, Qt::Desktop)
+{
+ Q_D(QDesktopWidget);
+ setObjectName(QLatin1String("desktop"));
+ d->updateScreenList();
+}
+
+QDesktopWidget::~QDesktopWidget()
+{
+}
+
+bool QDesktopWidget::isVirtualDesktop() const
+{
+ return QApplicationPrivate::platformIntegration()->isVirtualDesktop();
+}
+
+int QDesktopWidget::primaryScreen() const
+{
+ return 0;
+}
+
+int QDesktopWidget::numScreens() const
+{
+ QPlatformIntegration *pi = QApplicationPrivate::platformIntegration();
+ return qMax(pi->screens().size(), 1);
+}
+
+QWidget *QDesktopWidget::screen(int screen)
+{
+ Q_D(QDesktopWidget);
+ if (QApplicationPrivate::platformIntegration()->isVirtualDesktop())
+ return &d->virtualScreen;
+ if (screen < 0 || screen >= d->screens.length())
+ return d->screens.at(0);
+ return d->screens.at(screen);
+}
+
+const QRect QDesktopWidget::availableGeometry(int screenNo) const
+{
+ QPlatformIntegration *pi = QApplicationPrivate::platformIntegration();
+ QList<QPlatformScreen *> screens = pi->screens();
+ if (screenNo == -1)
+ screenNo = 0;
+ if (screenNo < 0 || screenNo >= screens.size())
+ return QRect();
+ else
+ return screens[screenNo]->availableGeometry();
+}
+
+const QRect QDesktopWidget::screenGeometry(int screenNo) const
+{
+ QPlatformIntegration *pi = QApplicationPrivate::platformIntegration();
+ QList<QPlatformScreen *> screens = pi->screens();
+ if (screenNo == -1)
+ screenNo = 0;
+ if (screenNo < 0 || screenNo >= screens.size())
+ return QRect();
+ else
+ return screens[screenNo]->geometry();
+}
+
+int QDesktopWidget::screenNumber(const QWidget *w) const
+{
+ if (!w)
+ return 0;
+
+ QRect frame = w->frameGeometry();
+ if (!w->isWindow())
+ frame.moveTopLeft(w->mapToGlobal(QPoint(0, 0)));
+ const QPoint midpoint = (frame.topLeft() + frame.bottomRight()) / 2;
+ return screenNumber(midpoint);
+}
+
+int QDesktopWidget::screenNumber(const QPoint &p) const
+{
+ QPlatformIntegration *pi = QApplicationPrivate::platformIntegration();
+ QList<QPlatformScreen *> screens = pi->screens();
+
+ for (int i = 0; i < screens.size(); ++i)
+ if (screens[i]->geometry().contains(p))
+ return i;
+
+ return primaryScreen(); //even better would be closest screen
+}
+
+void QDesktopWidget::resizeEvent(QResizeEvent *)
+{
+}
+
+QT_END_NAMESPACE
diff --git a/src/gui/kernel/qdesktopwidget_qpa_p.h b/src/gui/kernel/qdesktopwidget_qpa_p.h
new file mode 100644
index 0000000..8bed09d
--- /dev/null
+++ b/src/gui/kernel/qdesktopwidget_qpa_p.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 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$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#ifndef QDESKTOPWIDGET_QPA_P_H
+#define QDESKTOPWIDGET_QPA_P_H
+
+#include "QDesktopWidget"
+#include "private/qwidget_p.h"
+
+class QDesktopScreenWidget : public QWidget {
+ Q_OBJECT
+public:
+ QDesktopScreenWidget(int screenNumber = -1) { setWindowFlags(Qt::Desktop); setVisible(false); d_func()->screenNumber = screenNumber; }
+};
+
+class QDesktopWidgetPrivate : public QWidgetPrivate {
+ Q_DECLARE_PUBLIC(QDesktopWidget)
+
+public:
+ ~QDesktopWidgetPrivate() {foreach(QDesktopScreenWidget *s, screens) delete s; }
+ void updateScreenList();
+
+ QList<QDesktopScreenWidget *> screens;
+ QDesktopScreenWidget virtualScreen;
+};
+
+#endif // QDESKTOPWIDGET_QPA_P_H
diff --git a/src/gui/kernel/qdnd_p.h b/src/gui/kernel/qdnd_p.h
index 033e6a6..598a9de 100644
--- a/src/gui/kernel/qdnd_p.h
+++ b/src/gui/kernel/qdnd_p.h
@@ -261,11 +261,11 @@ public:
#endif
private:
-#ifdef Q_WS_QWS
+#if defined(Q_WS_QWS) || defined(Q_WS_QPA)
Qt::DropAction currentActionForOverrideCursor;
#endif
#ifdef Q_OS_SYMBIAN
-#ifndef QT_NO_CURSOR
+#ifndef QT_NO_CURSOR
QCursor overrideCursor;
#endif
#endif
diff --git a/src/gui/kernel/qeventdispatcher_glib_qpa.cpp b/src/gui/kernel/qeventdispatcher_glib_qpa.cpp
new file mode 100644
index 0000000..01d40ca
--- /dev/null
+++ b/src/gui/kernel/qeventdispatcher_glib_qpa.cpp
@@ -0,0 +1,147 @@
+/****************************************************************************
+**
+** 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 QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qeventdispatcher_glib_qpa_p.h"
+
+#include "qapplication.h"
+
+#include "qplatformdefs.h"
+#include "qapplication.h"
+
+#include <glib.h>
+#include "qapplication_p.h"
+
+#include <qdebug.h>
+
+QT_BEGIN_NAMESPACE
+
+struct GUserEventSource
+{
+ GSource source;
+ QPAEventDispatcherGlib *q;
+};
+
+static gboolean userEventSourcePrepare(GSource *s, gint *timeout)
+{
+ Q_UNUSED(s)
+ Q_UNUSED(timeout)
+
+ return QWindowSystemInterfacePrivate::windowSystemEventsQueued() > 0;
+}
+
+static gboolean userEventSourceCheck(GSource *source)
+{
+ return userEventSourcePrepare(source, 0);
+}
+
+static gboolean userEventSourceDispatch(GSource *s, GSourceFunc, gpointer)
+{
+ GUserEventSource * source = reinterpret_cast<GUserEventSource *>(s);
+
+ QWindowSystemInterfacePrivate::WindowSystemEvent * event;
+ while (QWindowSystemInterfacePrivate::windowSystemEventsQueued()) {
+ event = QWindowSystemInterfacePrivate::getWindowSystemEvent();
+ if (!event)
+ break;
+
+ // send through event filter
+ if (source->q->filterEvent(event)) {
+ delete event;
+ continue;
+ }
+ QApplicationPrivate::processWindowSystemEvent(event);
+ delete event;
+ }
+
+ return true;
+}
+
+
+static GSourceFuncs userEventSourceFuncs = {
+ userEventSourcePrepare,
+ userEventSourceCheck,
+ userEventSourceDispatch,
+ NULL,
+ NULL,
+ NULL
+};
+
+QPAEventDispatcherGlibPrivate::QPAEventDispatcherGlibPrivate(GMainContext *context)
+ : QEventDispatcherGlibPrivate(context)
+{
+ userEventSource = reinterpret_cast<GUserEventSource *>(g_source_new(&userEventSourceFuncs,
+ sizeof(GUserEventSource)));
+ userEventSource->q = 0;
+ g_source_set_can_recurse(&userEventSource->source, true);
+ g_source_attach(&userEventSource->source, mainContext);
+}
+
+
+QPAEventDispatcherGlib::QPAEventDispatcherGlib(QObject *parent)
+ : QEventDispatcherGlib(*new QPAEventDispatcherGlibPrivate, parent)
+{
+ Q_D(QPAEventDispatcherGlib);
+ d->userEventSource->q = this;
+}
+
+QPAEventDispatcherGlib::~QPAEventDispatcherGlib()
+{
+ Q_D(QPAEventDispatcherGlib);
+
+ g_source_destroy(&d->userEventSource->source);
+ g_source_unref(&d->userEventSource->source);
+ d->userEventSource = 0;
+}
+
+bool QPAEventDispatcherGlib::processEvents(QEventLoop::ProcessEventsFlags flags)
+{
+ static bool init = false;
+ if (!init) {
+ if (QApplicationPrivate::platformIntegration()->createEventLoopIntegration()) {
+ qWarning("Eventloop integration is not supported by the glib event dispatcher");
+ qWarning("Use the UNIX event dispatcher by defining environment variable QT_NO_GLIB=1");
+ }
+ init = true;
+ }
+ return QEventDispatcherGlib::processEvents(flags);
+}
+
+QT_END_NAMESPACE
diff --git a/src/gui/kernel/qeventdispatcher_glib_qpa_p.h b/src/gui/kernel/qeventdispatcher_glib_qpa_p.h
new file mode 100644
index 0000000..1c32ab2
--- /dev/null
+++ b/src/gui/kernel/qeventdispatcher_glib_qpa_p.h
@@ -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 QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QEVENTDISPATCHER_GLIB_QPA_P_H
+#define QEVENTDISPATCHER_GLIB_QPA_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 <QtCore/private/qeventdispatcher_glib_p.h>
+
+typedef struct _GMainContext GMainContext;
+
+QT_BEGIN_NAMESPACE
+class QPAEventDispatcherGlibPrivate;
+
+class QPAEventDispatcherGlib : public QEventDispatcherGlib
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QPAEventDispatcherGlib)
+
+public:
+ explicit QPAEventDispatcherGlib(QObject *parent = 0);
+ ~QPAEventDispatcherGlib();
+
+ bool processEvents(QEventLoop::ProcessEventsFlags flags);
+};
+
+struct GUserEventSource;
+
+class QPAEventDispatcherGlibPrivate : public QEventDispatcherGlibPrivate
+{
+ Q_DECLARE_PUBLIC(QPAEventDispatcherGlib)
+public:
+ QPAEventDispatcherGlibPrivate(GMainContext *context = 0);
+ GUserEventSource *userEventSource;
+};
+
+
+QT_END_NAMESPACE
+
+#endif // QEVENTDISPATCHER_GLIB_QPA_P_H
diff --git a/src/gui/kernel/qeventdispatcher_qpa.cpp b/src/gui/kernel/qeventdispatcher_qpa.cpp
new file mode 100644
index 0000000..cb70141
--- /dev/null
+++ b/src/gui/kernel/qeventdispatcher_qpa.cpp
@@ -0,0 +1,302 @@
+/****************************************************************************
+**
+** 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 "qplatformdefs.h"
+#include "qapplication.h"
+#include "qeventdispatcher_qpa_p.h"
+#include "private/qeventdispatcher_unix_p.h"
+#include "qapplication_p.h"
+#include "qplatformeventloopintegration_qpa.h"
+
+#include <QWindowSystemInterface>
+#include <QtCore/QElapsedTimer>
+#include <QtCore/QAtomicInt>
+#include <QtCore/QSemaphore>
+
+#include <errno.h>
+
+QT_BEGIN_NAMESPACE
+
+QT_USE_NAMESPACE
+
+class Rendezvous
+{
+public:
+ void checkpoint()
+ {
+ if (state.testAndSetOrdered(0,1)) {
+ semaphore.acquire();
+ } else if (state.testAndSetAcquire(1,0)) {
+ semaphore.release();
+ } else {
+ qWarning("Barrier internal error");
+ }
+ }
+private:
+ QSemaphore semaphore;
+ QAtomicInt state;
+};
+
+class SelectWorker : public QThread
+{
+public:
+ SelectWorker(QEventDispatcherQPAPrivate *eventDispatcherPrivate)
+ : QThread(),
+ m_edPrivate(eventDispatcherPrivate),
+ m_retVal(0)
+ {
+ }
+
+ void setSelectValues(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds)
+ {
+ m_nfds = nfds;
+ m_readfds = readfds;
+ m_writefds = writefds;
+ m_exceptfds = exceptfds;
+
+
+ }
+
+ int retVal() const {
+ return m_retVal;
+ }
+
+protected:
+ void run();
+
+private:
+ QEventDispatcherQPAPrivate *m_edPrivate;
+ int m_retVal;
+
+ int m_nfds;
+ fd_set *m_readfds, *m_writefds, *m_exceptfds;
+};
+
+class QEventDispatcherQPAPrivate : public QEventDispatcherUNIXPrivate
+{
+ Q_DECLARE_PUBLIC(QEventDispatcherQPA)
+public:
+ QEventDispatcherQPAPrivate()
+ : eventLoopIntegration(0),
+ barrierBeforeBlocking(0),
+ barrierReturnValue(0),
+ selectReturnMutex(0),
+ selectWorkerNeedsSync(true),
+ selectWorkerHasResult(false),
+ m_integrationInitialised(false),
+ m_hasIntegration(false)
+ {
+
+ }
+
+ ~QEventDispatcherQPAPrivate()
+ {
+ delete selectWorker;
+ delete eventLoopIntegration;
+ delete barrierBeforeBlocking;
+ delete barrierReturnValue;
+ delete selectReturnMutex;
+ }
+
+ bool hasIntegration() const
+ {
+ if (!m_integrationInitialised) {
+ QEventDispatcherQPAPrivate *that = const_cast<QEventDispatcherQPAPrivate *>(this);
+ if (qApp && (qApp->thread() == QThread::currentThread())) { // guiThread
+ if (QApplicationPrivate::platformIntegration()) {
+ that->eventLoopIntegration = QApplicationPrivate::platformIntegration()->createEventLoopIntegration();
+ if (that->eventLoopIntegration) {
+ that->selectWorker = new SelectWorker(that);
+ that->barrierBeforeBlocking = new Rendezvous;
+ that->barrierReturnValue = new Rendezvous;
+ that->selectReturnMutex = new QMutex;
+ that->selectWorker->start();
+ that->m_hasIntegration = true;
+ if (!QElapsedTimer::isMonotonic())
+ qWarning("Having eventloop integration without monotonic timers can lead to undefined behaviour");
+ }
+ }
+ }
+ that->m_integrationInitialised = true;
+ }
+ return m_hasIntegration;
+ }
+
+ QPlatformEventLoopIntegration *eventLoopIntegration;
+ Rendezvous *barrierBeforeBlocking;
+ Rendezvous *barrierReturnValue;
+
+ QMutex *selectReturnMutex;
+ bool selectWorkerNeedsSync;
+ bool selectWorkerHasResult;
+
+ SelectWorker *selectWorker;
+private:
+ bool m_integrationInitialised;
+ bool m_hasIntegration;
+};
+
+QEventDispatcherQPA::QEventDispatcherQPA(QObject *parent)
+ : QEventDispatcherUNIX(*new QEventDispatcherQPAPrivate, parent)
+{ }
+
+QEventDispatcherQPA::~QEventDispatcherQPA()
+{ }
+
+bool QEventDispatcherQPA::processEvents(QEventLoop::ProcessEventsFlags flags)
+{
+ Q_D(QEventDispatcherQPA);
+ int nevents = 0;
+
+ // handle gui and posted events
+ d->interrupt = false;
+ QApplication::sendPostedEvents();
+
+ while (!d->interrupt) { // also flushes output buffer ###can be optimized
+ QWindowSystemInterfacePrivate::WindowSystemEvent *event;
+ if (!(flags & QEventLoop::ExcludeUserInputEvents)
+ && QWindowSystemInterfacePrivate::windowSystemEventsQueued() > 0) {
+ // process a pending user input event
+ event = QWindowSystemInterfacePrivate::getWindowSystemEvent();
+ if (!event)
+ break;
+ } else {
+ break;
+ }
+
+ if (filterEvent(event)) {
+ delete event;
+ continue;
+ }
+ nevents++;
+
+ QApplicationPrivate::processWindowSystemEvent(event);
+ delete event;
+ }
+
+ if (!d->interrupt) {
+ if (QEventDispatcherUNIX::processEvents(flags))
+ return true;
+ }
+ return (nevents > 0);
+}
+
+bool QEventDispatcherQPA::hasPendingEvents()
+{
+ extern uint qGlobalPostedEventsCount(); // from qapplication.cpp
+ return qGlobalPostedEventsCount() || QWindowSystemInterfacePrivate::windowSystemEventsQueued();
+}
+
+void QEventDispatcherQPA::registerSocketNotifier(QSocketNotifier *notifier)
+{
+ Q_D(QEventDispatcherQPA);
+ QEventDispatcherUNIX::registerSocketNotifier(notifier);
+ if (d->hasIntegration())
+ wakeUp();
+
+}
+
+void QEventDispatcherQPA::unregisterSocketNotifier(QSocketNotifier *notifier)
+{
+ Q_D(QEventDispatcherQPA);
+ QEventDispatcherUNIX::unregisterSocketNotifier(notifier);
+ if (d->hasIntegration())
+ wakeUp();
+}
+
+void QEventDispatcherQPA::flush()
+{
+ if(qApp)
+ qApp->sendPostedEvents();
+}
+
+
+int QEventDispatcherQPA::select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
+ timeval *timeout)
+{
+ Q_D(QEventDispatcherQPA);
+ int retVal = 0;
+ if (d->hasIntegration()) {
+ qint64 timeoutmsec = 0;
+ if (timeout)
+ timeoutmsec = timeout->tv_sec * 1000 + (timeout->tv_usec/1000);
+ d->selectReturnMutex->lock();
+ if (d->selectWorkerNeedsSync) {
+ if (d->selectWorkerHasResult) {
+ retVal = d->selectWorker->retVal();
+ d->selectWorkerHasResult = false;
+
+ d->selectReturnMutex->unlock();
+ d->barrierReturnValue->checkpoint();
+ return retVal;
+ } else {
+ d->selectWorkerNeedsSync = false;
+ d->selectWorker->setSelectValues(nfds,readfds, writefds, exceptfds);
+ d->barrierBeforeBlocking->checkpoint();
+ }
+ }
+ d->selectReturnMutex->unlock();
+ d->eventLoopIntegration->processEvents(timeoutmsec);
+ retVal = 0; //is 0 if select has not returned
+ } else {
+ retVal = QEventDispatcherUNIX::select(nfds, readfds, writefds, exceptfds, timeout);
+ }
+ return retVal;
+}
+
+void SelectWorker::run()
+{
+ while(true) {
+ m_retVal = 0;
+ m_edPrivate->barrierBeforeBlocking->checkpoint(); // wait for mainthread
+ int tmpRet = qt_safe_select(m_nfds,m_readfds,m_writefds,m_exceptfds,0);
+ m_edPrivate->selectReturnMutex->lock();
+ m_edPrivate->eventLoopIntegration->wakeup();
+
+ m_edPrivate->selectWorkerNeedsSync = true;
+ m_edPrivate->selectWorkerHasResult = true;
+ m_retVal = tmpRet;
+
+ m_edPrivate->selectReturnMutex->unlock();
+ m_edPrivate->barrierReturnValue->checkpoint();
+ }
+}
+QT_END_NAMESPACE
diff --git a/src/gui/kernel/qeventdispatcher_qpa_p.h b/src/gui/kernel/qeventdispatcher_qpa_p.h
new file mode 100644
index 0000000..8065c3e
--- /dev/null
+++ b/src/gui/kernel/qeventdispatcher_qpa_p.h
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#ifndef QEVENTDISPATCHER_QPA_P_H
+#define QEVENTDISPATCHER_QPA_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "private/qeventdispatcher_unix_p.h"
+
+QT_BEGIN_NAMESPACE
+
+class QEventDispatcherQPAPrivate;
+
+class QEventDispatcherQPA : public QEventDispatcherUNIX
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QEventDispatcherQPA)
+
+public:
+ explicit QEventDispatcherQPA(QObject *parent = 0);
+ ~QEventDispatcherQPA();
+
+ bool processEvents(QEventLoop::ProcessEventsFlags flags);
+ bool hasPendingEvents();
+
+ void registerSocketNotifier(QSocketNotifier *notifier);
+ void unregisterSocketNotifier(QSocketNotifier *notifier);
+
+ void flush();
+
+protected:
+ int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
+ timeval *timeout);
+};
+
+QT_END_NAMESPACE
+
+#endif // QEVENTDISPATCHER_QPA_P_H
diff --git a/src/gui/kernel/qeventdispatcher_s60.cpp b/src/gui/kernel/qeventdispatcher_s60.cpp
index bc787b8..77ebd0d 100644
--- a/src/gui/kernel/qeventdispatcher_s60.cpp
+++ b/src/gui/kernel/qeventdispatcher_s60.cpp
@@ -45,6 +45,62 @@
QT_BEGIN_NAMESPACE
+QtEikonEnv::QtEikonEnv()
+ : m_lastIterationCount(0)
+ , m_savedStatusCode(KRequestPending)
+ , m_hasAlreadyRun(false)
+{
+}
+
+QtEikonEnv::~QtEikonEnv()
+{
+}
+
+void QtEikonEnv::RunL()
+{
+ QEventDispatcherS60 *dispatcher = qobject_cast<QEventDispatcherS60 *>(QAbstractEventDispatcher::instance());
+ if (!dispatcher) {
+ CEikonEnv::RunL();
+ return;
+ }
+
+ if (m_lastIterationCount != dispatcher->iterationCount()) {
+ m_hasAlreadyRun = false;
+ m_lastIterationCount = dispatcher->iterationCount();
+ }
+
+ if (m_hasAlreadyRun) {
+ // Fool the active scheduler into believing we are still waiting for events.
+ // The window server thinks we are not, however.
+ m_savedStatusCode = iStatus.Int();
+ iStatus = KRequestPending;
+ SetActive();
+ dispatcher->queueDeferredActiveObjectsCompletion();
+ } else {
+ m_hasAlreadyRun = true;
+ CEikonEnv::RunL();
+ }
+}
+
+void QtEikonEnv::DoCancel()
+{
+ complete();
+
+ CEikonEnv::DoCancel();
+}
+
+void QtEikonEnv::complete()
+{
+ if (m_hasAlreadyRun) {
+ if (m_savedStatusCode != KRequestPending) {
+ TRequestStatus *status = &iStatus;
+ QEventDispatcherSymbian::RequestComplete(status, m_savedStatusCode);
+ m_savedStatusCode = KRequestPending;
+ }
+ m_hasAlreadyRun = false;
+ }
+}
+
QEventDispatcherS60::QEventDispatcherS60(QObject *parent)
: QEventDispatcherSymbian(parent),
m_noInputEvents(false)
@@ -127,4 +183,14 @@ void QEventDispatcherS60::removeInputEventsForWidget(QObject *object)
}
}
+// reimpl
+void QEventDispatcherS60::reactivateDeferredActiveObjects()
+{
+ if (S60->qtOwnsS60Environment) {
+ static_cast<QtEikonEnv *>(CCoeEnv::Static())->complete();
+ }
+
+ QEventDispatcherSymbian::reactivateDeferredActiveObjects();
+}
+
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qeventdispatcher_s60_p.h b/src/gui/kernel/qeventdispatcher_s60_p.h
index d2f327c..c14fef0 100644
--- a/src/gui/kernel/qeventdispatcher_s60_p.h
+++ b/src/gui/kernel/qeventdispatcher_s60_p.h
@@ -56,8 +56,30 @@
#include <private/qeventdispatcher_symbian_p.h>
#include "qt_s60_p.h"
+#include <eikenv.h>
+
QT_BEGIN_NAMESPACE
+class QEventDispatcherS60;
+
+class QtEikonEnv : public CEikonEnv
+{
+public:
+ QtEikonEnv();
+ ~QtEikonEnv();
+
+ // from CActive.
+ void RunL();
+ void DoCancel();
+
+ void complete();
+
+private:
+ int m_lastIterationCount;
+ TInt m_savedStatusCode;
+ bool m_hasAlreadyRun;
+};
+
class Q_GUI_EXPORT QEventDispatcherS60 : public QEventDispatcherSymbian
{
Q_OBJECT
@@ -73,6 +95,8 @@ public:
void saveInputEvent(QSymbianControl *control, QWidget *widget, QInputEvent *event);
+ void reactivateDeferredActiveObjects();
+
private:
bool sendDeferredInputEvents();
diff --git a/src/gui/kernel/qgenericplugin_qpa.cpp b/src/gui/kernel/qgenericplugin_qpa.cpp
new file mode 100644
index 0000000..43d6525
--- /dev/null
+++ b/src/gui/kernel/qgenericplugin_qpa.cpp
@@ -0,0 +1,112 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the 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 "qgenericplugin_qpa.h"
+
+#ifndef QT_NO_LIBRARY
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QGenericPlugin
+ \ingroup plugins
+ \ingroup qpa
+
+ \brief The QGenericPlugin class is an abstract base class for
+ window-system related plugins in Qt QPA.
+
+ Note that this class is only available in \l{Qt QPA}.
+
+ A mouse plugin can be created by subclassing
+ QGenericPlugin and reimplementing the pure virtual keys() and
+ create() functions. By exporting the derived class using the
+ Q_EXPORT_PLUGIN2() macro, The default implementation of the
+ QGenericPluginFactory class will automatically detect the plugin and
+ load the driver into the server application at run-time. See \l
+ {How to Create Qt Plugins} for details.
+
+ \sa QGenericPluginFactory
+*/
+
+/*!
+ \fn QStringList QGenericPlugin::keys() const
+
+ Implement this function to return the list of valid keys, i.e. the
+ drivers supported by this plugin.
+
+ \sa create()
+*/
+
+/*!
+ Constructs a plugin with the given \a parent.
+
+ Note that this constructor is invoked automatically by the
+ Q_EXPORT_PLUGIN2() macro, so there is no need for calling it
+ explicitly.
+*/
+QGenericPlugin::QGenericPlugin(QObject *parent)
+ : QObject(parent)
+{
+}
+
+/*!
+ Destroys the plugin.
+
+ Note that Qt destroys a plugin automatically when it is no longer
+ used, so there is no need for calling the destructor explicitly.
+*/
+QGenericPlugin::~QGenericPlugin()
+{
+}
+
+/*!
+ \fn QObject* QGenericPlugin::create(const QString &key, const QString& specification)
+
+ Implement this function to create a driver matching the type
+ specified by the given \a key and \a specification parameters. Note that
+ keys are case-insensitive.
+
+ \sa keys()
+*/
+
+QT_END_NAMESPACE
+
+#endif // QT_NO_LIBRARY
diff --git a/src/gui/kernel/qgenericplugin_qpa.h b/src/gui/kernel/qgenericplugin_qpa.h
new file mode 100644
index 0000000..e1792cd
--- /dev/null
+++ b/src/gui/kernel/qgenericplugin_qpa.h
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the 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$
+**
+****************************************************************************/
+
+#ifndef QGENERICPLUGIN_QPA_H
+#define QGENERICPLUGIN_QPA_H
+
+#include <QtCore/qplugin.h>
+#include <QtCore/qfactoryinterface.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Gui)
+
+#ifndef QT_NO_LIBRARY
+
+//class QGenericObject; ?????
+
+ struct Q_GUI_EXPORT QGenericPluginFactoryInterface : public QFactoryInterface
+{
+ virtual QObject* create(const QString &name, const QString &spec) = 0;
+};
+
+#define QGenericPluginFactoryInterface_iid "com.trolltech.Qt.QGenericPluginFactoryInterface"
+Q_DECLARE_INTERFACE(QGenericPluginFactoryInterface, QGenericPluginFactoryInterface_iid)
+
+class Q_GUI_EXPORT QGenericPlugin : public QObject, public QGenericPluginFactoryInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QGenericPluginFactoryInterface:QFactoryInterface)
+public:
+ explicit QGenericPlugin(QObject *parent = 0);
+ ~QGenericPlugin();
+
+ virtual QStringList keys() const = 0;
+ virtual QObject* create(const QString& name, const QString &spec) = 0;
+};
+
+#endif // QT_NO_LIBRARY
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QGENERICPLUGIN_QPA_H
diff --git a/src/gui/kernel/qgenericpluginfactory_qpa.cpp b/src/gui/kernel/qgenericpluginfactory_qpa.cpp
new file mode 100644
index 0000000..abc575a
--- /dev/null
+++ b/src/gui/kernel/qgenericpluginfactory_qpa.cpp
@@ -0,0 +1,115 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the 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 "qgenericpluginfactory_qpa.h"
+
+#include "qapplication.h"
+#include "private/qfactoryloader_p.h"
+#include "qgenericplugin_qpa.h"
+#include "qdebug.h"
+
+QT_BEGIN_NAMESPACE
+
+#if !defined(Q_OS_WIN32) || defined(QT_MAKEDLL)
+#ifndef QT_NO_LIBRARY
+
+Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
+ (QGenericPluginFactoryInterface_iid,
+ QLatin1String("/generic"), Qt::CaseInsensitive))
+
+#endif //QT_NO_LIBRARY
+#endif //QT_MAKEDLL
+
+/*!
+ \class QGenericPluginFactory
+ \ingroup qpa
+
+ \brief The QGenericPluginFactory class creates window-system
+ related plugin drivers in Qt QPA.
+
+ Note that this class is only available in \l{Qt QPA}.
+
+
+ \sa QGenericPlugin
+*/
+
+/*!
+ Creates the driver specified by \a key, using the given \a specification.
+
+ Note that the keys are case-insensitive.
+
+ \sa keys()
+*/
+QObject *QGenericPluginFactory::create(const QString& key, const QString &specification)
+{
+ QString driver = key.toLower();
+
+#if !defined(Q_OS_WIN32) || defined(QT_MAKEDLL)
+#ifndef QT_NO_LIBRARY
+ if (QGenericPluginFactoryInterface *factory = qobject_cast<QGenericPluginFactoryInterface*>(loader()->instance(driver)))
+ return factory->create(driver, specification);
+#endif
+#endif
+ return 0;
+}
+
+/*!
+ Returns the list of valid keys, i.e. the available mouse drivers.
+
+ \sa create()
+*/
+QStringList QGenericPluginFactory::keys()
+{
+ QStringList list;
+
+#if !defined(Q_OS_WIN32) || defined(QT_MAKEDLL)
+#ifndef QT_NO_LIBRARY
+ QStringList plugins = loader()->keys();
+ for (int i = 0; i < plugins.size(); ++i) {
+ if (!list.contains(plugins.at(i)))
+ list += plugins.at(i);
+ }
+#endif //QT_NO_LIBRARY
+#endif //QT_MAKEDLL
+ return list;
+}
+
+QT_END_NAMESPACE
diff --git a/src/gui/kernel/qgenericpluginfactory_qpa.h b/src/gui/kernel/qgenericpluginfactory_qpa.h
new file mode 100644
index 0000000..59eac38
--- /dev/null
+++ b/src/gui/kernel/qgenericpluginfactory_qpa.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the 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$
+**
+****************************************************************************/
+
+#ifndef QGENERICPLUGINFACTORY_QPA_H
+#define QGENERICPLUGINFACTORY_QPA_H
+
+#include <QtCore/qstringlist.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Gui)
+
+class QString;
+class QObject;
+
+class Q_GUI_EXPORT QGenericPluginFactory
+{
+public:
+ static QStringList keys();
+ static QObject *create(const QString&, const QString &);
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QGENERICPLUGINFACTORY_QPA_H
diff --git a/src/gui/kernel/qgesture.cpp b/src/gui/kernel/qgesture.cpp
index 5725a22..e3339c4 100644
--- a/src/gui/kernel/qgesture.cpp
+++ b/src/gui/kernel/qgesture.cpp
@@ -260,6 +260,27 @@ QGesture::GestureCancelPolicy QGesture::gestureCancelPolicy() const
/*!
\property QPanGesture::acceleration
+ \brief the acceleration in the motion of the touch point for this gesture
+*/
+
+/*!
+ \property QPanGesture::horizontalVelocity
+ \brief the horizontal component of the motion of the touch point for this
+ gesture
+ \since 4.7.1
+ \internal
+
+ \sa verticalVelocity, acceleration
+*/
+
+/*!
+ \property QPanGesture::verticalVelocity
+ \brief the vertical component of the motion of the touch point for this
+ gesture
+ \since 4.7.1
+ \internal
+
+ \sa horizontalVelocity, acceleration
*/
/*!
@@ -633,6 +654,12 @@ void QPinchGesture::setRotationAngle(qreal value)
*/
/*!
+ \property QSwipeGesture::velocity
+ \since 4.7.1
+ \internal
+*/
+
+/*!
\internal
*/
QSwipeGesture::QSwipeGesture(QObject *parent)
diff --git a/src/gui/kernel/qgesturemanager.cpp b/src/gui/kernel/qgesturemanager.cpp
index 8dd2db7..930ca10 100644
--- a/src/gui/kernel/qgesturemanager.cpp
+++ b/src/gui/kernel/qgesturemanager.cpp
@@ -171,9 +171,13 @@ void QGestureManager::cleanupCachedGestures(QObject *target, Qt::GestureType typ
foreach (QGesture *g, gestures) {
m_deletedRecognizers.remove(g);
m_gestureToRecognizer.remove(g);
+ m_maybeGestures.remove(g);
+ m_activeGestures.remove(g);
+ m_gestureOwners.remove(g);
+ m_gestureTargets.remove(g);
+ m_gesturesToDelete.insert(g);
}
- qDeleteAll(gestures);
iter = m_objectGestures.erase(iter);
} else {
++iter;
@@ -382,6 +386,11 @@ bool QGestureManager::filterEventThroughContexts(const QMultiMap<QObject *,
recycle(gesture);
m_gestureTargets.remove(gesture);
}
+
+ //Clean up the Gestures
+ qDeleteAll(m_gesturesToDelete);
+ m_gesturesToDelete.clear();
+
return consumeEventHint;
}
@@ -444,7 +453,8 @@ void QGestureManager::cancelGesturesForChildren(QGesture *original)
void QGestureManager::cleanupGesturesForRemovedRecognizer(QGesture *gesture)
{
QGestureRecognizer *recognizer = m_deletedRecognizers.value(gesture);
- Q_ASSERT(recognizer);
+ if(!recognizer) //The Gesture is removed while in the even loop, so the recognizers for this gestures was removed
+ return;
m_deletedRecognizers.remove(gesture);
if (m_deletedRecognizers.keys(recognizer).isEmpty()) {
// no more active gestures, cleanup!
diff --git a/src/gui/kernel/qgesturemanager_p.h b/src/gui/kernel/qgesturemanager_p.h
index 0d84b67..a5a3482 100644
--- a/src/gui/kernel/qgesturemanager_p.h
+++ b/src/gui/kernel/qgesturemanager_p.h
@@ -130,6 +130,7 @@ private:
QHash<QGestureRecognizer *, QSet<QGesture *> > m_obsoleteGestures;
QHash<QGesture *, QGestureRecognizer *> m_deletedRecognizers;
+ QSet<QGesture *> m_gesturesToDelete;
void cleanupGesturesForRemovedRecognizer(QGesture *gesture);
QGesture *getState(QObject *widget, QGestureRecognizer *recognizer,
diff --git a/src/gui/kernel/qguifunctions_wince.cpp b/src/gui/kernel/qguifunctions_wince.cpp
index 6e2ed76..572698e 100644
--- a/src/gui/kernel/qguifunctions_wince.cpp
+++ b/src/gui/kernel/qguifunctions_wince.cpp
@@ -112,6 +112,9 @@ struct AygSIPINFO
#ifndef SPI_GETSIPINFO
#define SPI_GETSIPINFO 225
#endif
+#ifndef SPI_GETPLATFORMTYPE
+#define SPI_GETPLATFORMTYPE 257
+#endif
typedef BOOL (*AygInitDialog)(AygSHINITDLGINFO*);
typedef BOOL (*AygFullScreen)(HWND, DWORD);
diff --git a/src/gui/kernel/qguiplatformplugin.cpp b/src/gui/kernel/qguiplatformplugin.cpp
index 2dd251b..98b9c4a 100644
--- a/src/gui/kernel/qguiplatformplugin.cpp
+++ b/src/gui/kernel/qguiplatformplugin.cpp
@@ -152,7 +152,7 @@ QString QGuiPlatformPlugin::styleName()
return QLatin1String("Windows"); // default style for Symbian without S60
#elif defined(Q_WS_X11) && defined(Q_OS_IRIX)
return QLatin1String("SGI"); // default style for X11 on IRIX
-#elif defined(Q_WS_QWS)
+#elif defined(Q_WS_QWS) || defined(Q_WS_QPA)
return QLatin1String("Plastique"); // default style for X11 and small devices
#elif defined(Q_WS_MAC)
return QLatin1String("Macintosh"); // default style for all Mac's
diff --git a/src/gui/kernel/qkeymapper_mac.cpp b/src/gui/kernel/qkeymapper_mac.cpp
index 3dc6afc..300e5ca 100644
--- a/src/gui/kernel/qkeymapper_mac.cpp
+++ b/src/gui/kernel/qkeymapper_mac.cpp
@@ -749,7 +749,7 @@ bool QKeyMapperPrivate::translateKeyEvent(QWidget *widget, EventHandlerCallRef e
}
return false;
}
- // Once we process the key down , we dont need to send the saved event again from
+ // Once we process the key down , we don't need to send the saved event again from
// kEventTextInputUnicodeForKeyEvent, so clear it.
if (currentContext && ekind == kEventRawKeyDown) {
QMacInputContext *context = qobject_cast<QMacInputContext*>(currentContext);
diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp
index e14a9198..b4a360a 100644
--- a/src/gui/kernel/qkeysequence.cpp
+++ b/src/gui/kernel/qkeysequence.cpp
@@ -1521,6 +1521,14 @@ QKeySequence &QKeySequence::operator=(const QKeySequence &other)
}
/*!
+ \fn void QKeySequence::swap(QKeySequence &other)
+ \since 4.8
+
+ Swaps key sequence \a other with this key sequence. This operation is very
+ fast and never fails.
+*/
+
+/*!
\fn bool QKeySequence::operator!=(const QKeySequence &other) const
Returns true if this key sequence is not equal to the \a other
diff --git a/src/gui/kernel/qkeysequence.h b/src/gui/kernel/qkeysequence.h
index b47873d..a2352eb 100644
--- a/src/gui/kernel/qkeysequence.h
+++ b/src/gui/kernel/qkeysequence.h
@@ -183,6 +183,7 @@ public:
inline QKeySequence &operator=(QKeySequence &&other)
{ qSwap(d, other.d); return *this; }
#endif
+ inline void swap(QKeySequence &other) { qSwap(d, other.d); }
bool operator==(const QKeySequence &other) const;
inline bool operator!= (const QKeySequence &other) const
{ return !(*this == other); }
diff --git a/src/gui/kernel/qmotifdnd_x11.cpp b/src/gui/kernel/qmotifdnd_x11.cpp
index 3334455..3b79129 100644
--- a/src/gui/kernel/qmotifdnd_x11.cpp
+++ b/src/gui/kernel/qmotifdnd_x11.cpp
@@ -385,7 +385,10 @@ static void DndReadSourceProperty(Display * dpy,
static void DndWriteReceiverProperty(Display * dpy, Window window,
unsigned char protocol_style)
{
- DndReceiverProp receiver_prop ;
+ DndReceiverProp receiver_prop;
+
+ // squelch potential valgrind errors about uninitialized reads
+ memset(&receiver_prop, 0, sizeof(receiver_prop));
receiver_prop.byte_order = DndByteOrder() ;
receiver_prop.protocol_version = DND_PROTOCOL_VERSION;
diff --git a/src/gui/kernel/qplatformcursor_qpa.cpp b/src/gui/kernel/qplatformcursor_qpa.cpp
new file mode 100644
index 0000000..ac557b9
--- /dev/null
+++ b/src/gui/kernel/qplatformcursor_qpa.cpp
@@ -0,0 +1,660 @@
+/****************************************************************************
+**
+** 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 QtOpenVG 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 "qplatformcursor_qpa.h"
+
+#include <QWidget>
+#include <QPainter>
+#include <QBitmap>
+#include <QApplication>
+
+#include <QDebug>
+
+QT_BEGIN_NAMESPACE
+
+QList <QWeakPointer<QPlatformCursor> > QPlatformCursorPrivate::instances;
+
+/*!
+ \class QGraphicsSystemCursor
+
+ \brief The QGraphicsSystemCursor class provides information about
+ pointer device events (movement, buttons), and requests to change
+ the currently displayed cursor.
+
+ Note that QGraphicsSystemCursor does not include any graphics for
+ display. An application that sets a QCursor may provide its own
+ graphics.
+
+ \sa QGraphicsSystemCursorImage
+*/
+
+/*!
+ \fn virtual void QGraphicsSystemCursor::pointerEvent(const QMouseEvent & event)
+
+ This method is called by Qt whenever a QMouseEvent is generated by the
+ underlying pointer input. \a event is a reference to the QMouseEvent in
+ question. A default do-nothing implementation is provided.
+
+ \sa QApplicationPrivate::handleMouseEvent()
+*/
+
+/*!
+ \fn virtual void QGraphicsSystemCursor::changeCursor(QCursor * widgetCursor, QWidget * widget)
+
+ \brief This method is called by Qt whenever the cursor graphic should be changed.
+
+ Implementation of this method is mandatory for a subclass of QGraphicsSystemCursor.
+
+ \a widgetCursor is a pointer to the QCursor that should be displayed.
+
+ \a widget is a pointer to the widget currently displayed at QCursor::pos(). Note
+ that this may be 0 if the current position is not occupied by a displayed widget.
+
+ \sa QApplicationPrivate::handleMouseEvent(), QCursor::pos()
+*/
+
+/*!
+ \fn QGraphicsSystemCursor::QGraphicsSystemCursor()
+
+ \brief Constructs a QGraphicsSystemCursor
+*/
+QPlatformCursor::QPlatformCursor(QPlatformScreen *scr )
+ : screen(scr)
+{
+ QPlatformCursorPrivate::instances.append(this);
+}
+
+// End of display and pointer event handling code
+// Beginning of built-in cursor graphics
+// from src/gui/embedded/QGraphicsSystemCursorImage_qws.cpp
+
+/*!
+ \class QGraphicsSystemCursorImage
+
+ \brief The QGraphicsSystemCursorImage class provides a set of graphics
+ intended to be used as cursors.
+
+ \sa QGraphicsSystemCursor
+*/
+
+static QPlatformCursorImage *systemCursorTable[Qt::LastCursor+1];
+static bool systemCursorTableInit = false;
+
+// 16 x 16
+static const uchar cur_arrow_bits[] = {
+ 0x07, 0x00, 0x39, 0x00, 0xc1, 0x01, 0x02, 0x0e, 0x02, 0x10, 0x02, 0x08,
+ 0x04, 0x04, 0x04, 0x02, 0x04, 0x04, 0x88, 0x08, 0x48, 0x11, 0x28, 0x22,
+ 0x10, 0x44, 0x00, 0x28, 0x00, 0x10, 0x00, 0x00 };
+static const uchar mcur_arrow_bits[] = {
+ 0x07, 0x00, 0x3f, 0x00, 0xff, 0x01, 0xfe, 0x0f, 0xfe, 0x1f, 0xfe, 0x0f,
+ 0xfc, 0x07, 0xfc, 0x03, 0xfc, 0x07, 0xf8, 0x0f, 0x78, 0x1f, 0x38, 0x3e,
+ 0x10, 0x7c, 0x00, 0x38, 0x00, 0x10, 0x00, 0x00 };
+
+static const unsigned char cur_up_arrow_bits[] = {
+ 0x80, 0x00, 0x40, 0x01, 0x40, 0x01, 0x20, 0x02, 0x20, 0x02, 0x10, 0x04,
+ 0x10, 0x04, 0x08, 0x08, 0x78, 0x0f, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01,
+ 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0xc0, 0x01};
+static const unsigned char mcur_up_arrow_bits[] = {
+ 0x80, 0x00, 0xc0, 0x01, 0xc0, 0x01, 0xe0, 0x03, 0xe0, 0x03, 0xf0, 0x07,
+ 0xf0, 0x07, 0xf8, 0x0f, 0xf8, 0x0f, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01,
+ 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01};
+
+static const unsigned char cur_cross_bits[] = {
+ 0xc0, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01,
+ 0x7f, 0x7f, 0x01, 0x40, 0x7f, 0x7f, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01,
+ 0x40, 0x01, 0x40, 0x01, 0xc0, 0x01, 0x00, 0x00};
+static const unsigned char mcur_cross_bits[] = {
+ 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01,
+ 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01,
+ 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0x00, 0x00};
+
+static const uchar cur_ibeam_bits[] = {
+ 0x00, 0x00, 0xe0, 0x03, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00,
+ 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00,
+ 0x80, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00 };
+static const uchar mcur_ibeam_bits[] = {
+ 0xf0, 0x07, 0xf0, 0x07, 0xf0, 0x07, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01,
+ 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01,
+ 0xf0, 0x07, 0xf0, 0x07, 0xf0, 0x07, 0x00, 0x00 };
+
+static const uchar cur_ver_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0xc0, 0x03, 0xe0, 0x07, 0xf0, 0x0f,
+ 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0xf0, 0x0f,
+ 0xe0, 0x07, 0xc0, 0x03, 0x80, 0x01, 0x00, 0x00 };
+static const uchar mcur_ver_bits[] = {
+ 0x00, 0x00, 0x80, 0x03, 0xc0, 0x07, 0xe0, 0x0f, 0xf0, 0x1f, 0xf8, 0x3f,
+ 0xfc, 0x7f, 0xc0, 0x07, 0xc0, 0x07, 0xc0, 0x07, 0xfc, 0x7f, 0xf8, 0x3f,
+ 0xf0, 0x1f, 0xe0, 0x0f, 0xc0, 0x07, 0x80, 0x03 };
+
+static const uchar cur_hor_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x08, 0x30, 0x18,
+ 0x38, 0x38, 0xfc, 0x7f, 0xfc, 0x7f, 0x38, 0x38, 0x30, 0x18, 0x20, 0x08,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+static const uchar mcur_hor_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x40, 0x04, 0x60, 0x0c, 0x70, 0x1c, 0x78, 0x3c,
+ 0xfc, 0x7f, 0xfe, 0xff, 0xfe, 0xff, 0xfe, 0xff, 0xfc, 0x7f, 0x78, 0x3c,
+ 0x70, 0x1c, 0x60, 0x0c, 0x40, 0x04, 0x00, 0x00 };
+static const uchar cur_bdiag_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3e, 0x00, 0x3c, 0x00, 0x3e,
+ 0x00, 0x37, 0x88, 0x23, 0xd8, 0x01, 0xf8, 0x00, 0x78, 0x00, 0xf8, 0x00,
+ 0xf8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+static const uchar mcur_bdiag_bits[] = {
+ 0x00, 0x00, 0xc0, 0x7f, 0x80, 0x7f, 0x00, 0x7f, 0x00, 0x7e, 0x04, 0x7f,
+ 0x8c, 0x7f, 0xdc, 0x77, 0xfc, 0x63, 0xfc, 0x41, 0xfc, 0x00, 0xfc, 0x01,
+ 0xfc, 0x03, 0xfc, 0x07, 0x00, 0x00, 0x00, 0x00 };
+static const uchar cur_fdiag_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x01, 0xf8, 0x00, 0x78, 0x00,
+ 0xf8, 0x00, 0xd8, 0x01, 0x88, 0x23, 0x00, 0x37, 0x00, 0x3e, 0x00, 0x3c,
+ 0x00, 0x3e, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00 };
+static const uchar mcur_fdiag_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0xfc, 0x03, 0xfc, 0x01, 0xfc, 0x00,
+ 0xfc, 0x41, 0xfc, 0x63, 0xdc, 0x77, 0x8c, 0x7f, 0x04, 0x7f, 0x00, 0x7e,
+ 0x00, 0x7f, 0x80, 0x7f, 0xc0, 0x7f, 0x00, 0x00 };
+
+// 20 x 20
+static const uchar forbidden_bits[] = {
+ 0x00,0x00,0x00,0x80,0x1f,0x00,0xe0,0x7f,0x00,0xf0,0xf0,0x00,0x38,0xc0,0x01,
+ 0x7c,0x80,0x03,0xec,0x00,0x03,0xce,0x01,0x07,0x86,0x03,0x06,0x06,0x07,0x06,
+ 0x06,0x0e,0x06,0x06,0x1c,0x06,0x0e,0x38,0x07,0x0c,0x70,0x03,0x1c,0xe0,0x03,
+ 0x38,0xc0,0x01,0xf0,0xe0,0x00,0xe0,0x7f,0x00,0x80,0x1f,0x00,0x00,0x00,0x00 };
+
+static const uchar forbiddenm_bits[] = {
+ 0x80,0x1f,0x00,0xe0,0x7f,0x00,0xf0,0xff,0x00,0xf8,0xff,0x01,0xfc,0xf0,0x03,
+ 0xfe,0xc0,0x07,0xfe,0x81,0x07,0xff,0x83,0x0f,0xcf,0x07,0x0f,0x8f,0x0f,0x0f,
+ 0x0f,0x1f,0x0f,0x0f,0x3e,0x0f,0x1f,0xfc,0x0f,0x1e,0xf8,0x07,0x3e,0xf0,0x07,
+ 0xfc,0xe0,0x03,0xf8,0xff,0x01,0xf0,0xff,0x00,0xe0,0x7f,0x00,0x80,0x1f,0x00};
+
+// 32 x 32
+static const uchar wait_data_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x7f, 0x00,
+ 0x00, 0x04, 0x40, 0x00, 0x00, 0xfc, 0x7f, 0x00, 0x00, 0x08, 0x20, 0x00,
+ 0x00, 0x08, 0x20, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0x08, 0x20, 0x00,
+ 0x00, 0x50, 0x15, 0x00, 0x00, 0xa0, 0x0a, 0x00, 0x00, 0x40, 0x05, 0x00,
+ 0x00, 0x80, 0x02, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x20, 0x08, 0x00,
+ 0x00, 0x10, 0x10, 0x00, 0x00, 0x08, 0x21, 0x00, 0x00, 0x88, 0x22, 0x00,
+ 0x00, 0x48, 0x25, 0x00, 0x00, 0xa8, 0x2a, 0x00, 0x00, 0xfc, 0x7f, 0x00,
+ 0x00, 0x04, 0x40, 0x00, 0x00, 0xfc, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+static const uchar wait_mask_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x7f, 0x00,
+ 0x00, 0xfc, 0x7f, 0x00, 0x00, 0xfc, 0x7f, 0x00, 0x00, 0xf8, 0x3f, 0x00,
+ 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00,
+ 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0xc0, 0x07, 0x00,
+ 0x00, 0x80, 0x03, 0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0xe0, 0x0f, 0x00,
+ 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00,
+ 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xfc, 0x7f, 0x00,
+ 0x00, 0xfc, 0x7f, 0x00, 0x00, 0xfc, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+
+static const uchar hsplit_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x40, 0x02, 0x00,
+ 0x00, 0x40, 0x02, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x40, 0x02, 0x00,
+ 0x00, 0x41, 0x82, 0x00, 0x80, 0x41, 0x82, 0x01, 0xc0, 0x7f, 0xfe, 0x03,
+ 0x80, 0x41, 0x82, 0x01, 0x00, 0x41, 0x82, 0x00, 0x00, 0x40, 0x02, 0x00,
+ 0x00, 0x40, 0x02, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x40, 0x02, 0x00,
+ 0x00, 0x40, 0x02, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+static const uchar hsplitm_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xe0, 0x07, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0xe0, 0x07, 0x00,
+ 0x00, 0xe0, 0x07, 0x00, 0x00, 0xe2, 0x47, 0x00, 0x00, 0xe3, 0xc7, 0x00,
+ 0x80, 0xe3, 0xc7, 0x01, 0xc0, 0xff, 0xff, 0x03, 0xe0, 0xff, 0xff, 0x07,
+ 0xc0, 0xff, 0xff, 0x03, 0x80, 0xe3, 0xc7, 0x01, 0x00, 0xe3, 0xc7, 0x00,
+ 0x00, 0xe2, 0x47, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0xe0, 0x07, 0x00,
+ 0x00, 0xe0, 0x07, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+static const uchar vsplit_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x80, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xe0, 0x03, 0x00,
+ 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
+ 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00,
+ 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
+ 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00,
+ 0x00, 0xc0, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+static const uchar vsplitm_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
+ 0x00, 0xc0, 0x01, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0xf0, 0x07, 0x00,
+ 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00,
+ 0x00, 0xc0, 0x01, 0x00, 0x80, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00,
+ 0x80, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00,
+ 0x80, 0xff, 0xff, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00,
+ 0x00, 0xc0, 0x01, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xf0, 0x07, 0x00,
+ 0x00, 0xe0, 0x03, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+static const uchar phand_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00,
+ 0x7e, 0x04, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00,
+ 0x08, 0x08, 0x00, 0x00, 0x70, 0x14, 0x00, 0x00, 0x08, 0x22, 0x00, 0x00,
+ 0x30, 0x41, 0x00, 0x00, 0xc0, 0x20, 0x00, 0x00, 0x40, 0x12, 0x00, 0x00,
+ 0x80, 0x08, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+static const uchar phandm_bits[] = {
+ 0xfe, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00,
+ 0xff, 0x0f, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00,
+ 0xfc, 0x1f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xfc, 0x7f, 0x00, 0x00,
+ 0xf8, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00,
+ 0xc0, 0x1f, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00,
+ 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+
+static const uchar size_all_data_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x80, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xe0, 0x03, 0x00,
+ 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
+ 0x00, 0x80, 0x00, 0x00, 0x00, 0x81, 0x40, 0x00, 0x80, 0x81, 0xc0, 0x00,
+ 0xc0, 0xff, 0xff, 0x01, 0x80, 0x81, 0xc0, 0x00, 0x00, 0x81, 0x40, 0x00,
+ 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
+ 0x00, 0x80, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0xc0, 0x01, 0x00,
+ 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+static const uchar size_all_mask_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
+ 0x00, 0xc0, 0x01, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0xf0, 0x07, 0x00,
+ 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc2, 0x21, 0x00,
+ 0x00, 0xc3, 0x61, 0x00, 0x80, 0xc3, 0xe1, 0x00, 0xc0, 0xff, 0xff, 0x01,
+ 0xe0, 0xff, 0xff, 0x03, 0xc0, 0xff, 0xff, 0x01, 0x80, 0xc3, 0xe1, 0x00,
+ 0x00, 0xc3, 0x61, 0x00, 0x00, 0xc2, 0x21, 0x00, 0x00, 0xc0, 0x01, 0x00,
+ 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xf0, 0x07, 0x00, 0x00, 0xe0, 0x03, 0x00,
+ 0x00, 0xc0, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+
+static const uchar whatsthis_bits[] = {
+ 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0xf0, 0x07, 0x00,
+ 0x09, 0x18, 0x0e, 0x00, 0x11, 0x1c, 0x0e, 0x00, 0x21, 0x1c, 0x0e, 0x00,
+ 0x41, 0x1c, 0x0e, 0x00, 0x81, 0x1c, 0x0e, 0x00, 0x01, 0x01, 0x07, 0x00,
+ 0x01, 0x82, 0x03, 0x00, 0xc1, 0xc7, 0x01, 0x00, 0x49, 0xc0, 0x01, 0x00,
+ 0x95, 0xc0, 0x01, 0x00, 0x93, 0xc0, 0x01, 0x00, 0x21, 0x01, 0x00, 0x00,
+ 0x20, 0xc1, 0x01, 0x00, 0x40, 0xc2, 0x01, 0x00, 0x40, 0x02, 0x00, 0x00,
+ 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+static const uchar whatsthism_bits[] = {
+ 0x01, 0x00, 0x00, 0x00, 0x03, 0xf0, 0x07, 0x00, 0x07, 0xf8, 0x0f, 0x00,
+ 0x0f, 0xfc, 0x1f, 0x00, 0x1f, 0x3e, 0x1f, 0x00, 0x3f, 0x3e, 0x1f, 0x00,
+ 0x7f, 0x3e, 0x1f, 0x00, 0xff, 0x3e, 0x1f, 0x00, 0xff, 0x9d, 0x0f, 0x00,
+ 0xff, 0xc3, 0x07, 0x00, 0xff, 0xe7, 0x03, 0x00, 0x7f, 0xe0, 0x03, 0x00,
+ 0xf7, 0xe0, 0x03, 0x00, 0xf3, 0xe0, 0x03, 0x00, 0xe1, 0xe1, 0x03, 0x00,
+ 0xe0, 0xe1, 0x03, 0x00, 0xc0, 0xe3, 0x03, 0x00, 0xc0, 0xe3, 0x03, 0x00,
+ 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
+
+static const uchar busy_bits[] = {
+ 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x09, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00,
+ 0x41, 0xe0, 0xff, 0x00, 0x81, 0x20, 0x80, 0x00, 0x01, 0xe1, 0xff, 0x00,
+ 0x01, 0x42, 0x40, 0x00, 0xc1, 0x47, 0x40, 0x00, 0x49, 0x40, 0x55, 0x00,
+ 0x95, 0x80, 0x2a, 0x00, 0x93, 0x00, 0x15, 0x00, 0x21, 0x01, 0x0a, 0x00,
+ 0x20, 0x01, 0x11, 0x00, 0x40, 0x82, 0x20, 0x00, 0x40, 0x42, 0x44, 0x00,
+ 0x80, 0x41, 0x4a, 0x00, 0x00, 0x40, 0x55, 0x00, 0x00, 0xe0, 0xff, 0x00,
+ 0x00, 0x20, 0x80, 0x00, 0x00, 0xe0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+static const uchar busym_bits[] = {
+ 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
+ 0x0f, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00,
+ 0x7f, 0xe0, 0xff, 0x00, 0xff, 0xe0, 0xff, 0x00, 0xff, 0xe1, 0xff, 0x00,
+ 0xff, 0xc3, 0x7f, 0x00, 0xff, 0xc7, 0x7f, 0x00, 0x7f, 0xc0, 0x7f, 0x00,
+ 0xf7, 0x80, 0x3f, 0x00, 0xf3, 0x00, 0x1f, 0x00, 0xe1, 0x01, 0x0e, 0x00,
+ 0xe0, 0x01, 0x1f, 0x00, 0xc0, 0x83, 0x3f, 0x00, 0xc0, 0xc3, 0x7f, 0x00,
+ 0x80, 0xc1, 0x7f, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0xe0, 0xff, 0x00,
+ 0x00, 0xe0, 0xff, 0x00, 0x00, 0xe0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+
+// 16 x 16
+static const uchar openhand_bits[] = {
+ 0x80,0x01,0x58,0x0e,0x64,0x12,0x64,0x52,0x48,0xb2,0x48,0x92,
+ 0x16,0x90,0x19,0x80,0x11,0x40,0x02,0x40,0x04,0x40,0x04,0x20,
+ 0x08,0x20,0x10,0x10,0x20,0x10,0x00,0x00};
+static const uchar openhandm_bits[] = {
+ 0x80,0x01,0xd8,0x0f,0xfc,0x1f,0xfc,0x5f,0xf8,0xff,0xf8,0xff,
+ 0xfe,0xff,0xff,0xff,0xff,0x7f,0xfe,0x7f,0xfc,0x7f,0xfc,0x3f,
+ 0xf8,0x3f,0xf0,0x1f,0xe0,0x1f,0x00,0x00};
+static const uchar closedhand_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0xb0,0x0d,0x48,0x32,0x08,0x50,
+ 0x10,0x40,0x18,0x40,0x04,0x40,0x04,0x20,0x08,0x20,0x10,0x10,
+ 0x20,0x10,0x20,0x10,0x00,0x00,0x00,0x00};
+static const uchar closedhandm_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0xb0,0x0d,0xf8,0x3f,0xf8,0x7f,
+ 0xf0,0x7f,0xf8,0x7f,0xfc,0x7f,0xfc,0x3f,0xf8,0x3f,0xf0,0x1f,
+ 0xe0,0x1f,0xe0,0x1f,0x00,0x00,0x00,0x00};
+
+void QPlatformCursorImage::createSystemCursor(int id)
+{
+ if (!systemCursorTableInit) {
+ for (int i = 0; i <= Qt::LastCursor; i++)
+ systemCursorTable[i] = 0;
+ systemCursorTableInit = true;
+ }
+ switch (id) {
+ // 16x16 cursors
+ case Qt::ArrowCursor:
+ systemCursorTable[Qt::ArrowCursor] =
+ new QPlatformCursorImage(cur_arrow_bits, mcur_arrow_bits, 16, 16, 0, 0);
+ break;
+
+ case Qt::UpArrowCursor:
+ systemCursorTable[Qt::UpArrowCursor] =
+ new QPlatformCursorImage(cur_up_arrow_bits, mcur_up_arrow_bits, 16, 16, 7, 0);
+ break;
+
+ case Qt::CrossCursor:
+ systemCursorTable[Qt::CrossCursor] =
+ new QPlatformCursorImage(cur_cross_bits, mcur_cross_bits, 16, 16, 7, 7);
+ break;
+
+ case Qt::IBeamCursor:
+ systemCursorTable[Qt::IBeamCursor] =
+ new QPlatformCursorImage(cur_ibeam_bits, mcur_ibeam_bits, 16, 16, 7, 7);
+ break;
+
+ case Qt::SizeVerCursor:
+ systemCursorTable[Qt::SizeVerCursor] =
+ new QPlatformCursorImage(cur_ver_bits, mcur_ver_bits, 16, 16, 7, 7);
+ break;
+
+ case Qt::SizeHorCursor:
+ systemCursorTable[Qt::SizeHorCursor] =
+ new QPlatformCursorImage(cur_hor_bits, mcur_hor_bits, 16, 16, 7, 7);
+ break;
+
+ case Qt::SizeBDiagCursor:
+ systemCursorTable[Qt::SizeBDiagCursor] =
+ new QPlatformCursorImage(cur_bdiag_bits, mcur_bdiag_bits, 16, 16, 7, 7);
+ break;
+
+ case Qt::SizeFDiagCursor:
+ systemCursorTable[Qt::SizeFDiagCursor] =
+ new QPlatformCursorImage(cur_fdiag_bits, mcur_fdiag_bits, 16, 16, 7, 7);
+ break;
+
+ case Qt::BlankCursor:
+ systemCursorTable[Qt::BlankCursor] =
+ new QPlatformCursorImage(0, 0, 0, 0, 0, 0);
+ break;
+
+ // 20x20 cursors
+ case Qt::ForbiddenCursor:
+ systemCursorTable[Qt::ForbiddenCursor] =
+ new QPlatformCursorImage(forbidden_bits, forbiddenm_bits, 20, 20, 10, 10);
+ break;
+
+ // 32x32 cursors
+ case Qt::WaitCursor:
+ systemCursorTable[Qt::WaitCursor] =
+ new QPlatformCursorImage(wait_data_bits, wait_mask_bits, 32, 32, 15, 15);
+ break;
+
+ case Qt::SplitVCursor:
+ systemCursorTable[Qt::SplitVCursor] =
+ new QPlatformCursorImage(vsplit_bits, vsplitm_bits, 32, 32, 15, 15);
+ break;
+
+ case Qt::SplitHCursor:
+ systemCursorTable[Qt::SplitHCursor] =
+ new QPlatformCursorImage(hsplit_bits, hsplitm_bits, 32, 32, 15, 15);
+ break;
+
+ case Qt::SizeAllCursor:
+ systemCursorTable[Qt::SizeAllCursor] =
+ new QPlatformCursorImage(size_all_data_bits, size_all_mask_bits, 32, 32, 15, 15);
+ break;
+
+ case Qt::PointingHandCursor:
+ systemCursorTable[Qt::PointingHandCursor] =
+ new QPlatformCursorImage(phand_bits, phandm_bits, 32, 32, 0, 0);
+ break;
+
+ case Qt::WhatsThisCursor:
+ systemCursorTable[Qt::WhatsThisCursor] =
+ new QPlatformCursorImage(whatsthis_bits, whatsthism_bits, 32, 32, 0, 0);
+ break;
+ case Qt::BusyCursor:
+ systemCursorTable[Qt::BusyCursor] =
+ new QPlatformCursorImage(busy_bits, busym_bits, 32, 32, 0, 0);
+ break;
+
+ case Qt::OpenHandCursor:
+ systemCursorTable[Qt::OpenHandCursor] =
+ new QPlatformCursorImage(openhand_bits, openhandm_bits, 16, 16, 8, 8);
+ break;
+ case Qt::ClosedHandCursor:
+ systemCursorTable[Qt::ClosedHandCursor] =
+ new QPlatformCursorImage(closedhand_bits, closedhandm_bits, 16, 16, 8, 8);
+ break;
+ default:
+ qWarning("Unknown system cursor %d", id);
+ }
+}
+
+/*!
+ \fn void QGraphicsSystemCursorImage::set(Qt::CursorShape id)
+
+ \brief Calling this method sets the cursor image to the specified shape
+
+ \a id is one of the defined Qt::CursorShape values.
+
+ If id is invalid, Qt::BitmapCursor, or unknown by the implementation,
+ Qt::ArrowCursor is used instead.
+*/
+
+void QPlatformCursorImage::set(Qt::CursorShape id)
+{
+ QPlatformCursorImage *cursor = 0;
+ if (id >= 0 && id <= Qt::LastCursor) {
+ if (!systemCursorTable[id])
+ createSystemCursor(id);
+ cursor = systemCursorTable[id];
+ }
+
+ if (cursor == 0) {
+ if (!systemCursorTable[Qt::ArrowCursor])
+ createSystemCursor(Qt::ArrowCursor);
+ cursor = systemCursorTable[Qt::ArrowCursor];
+ }
+ cursorImage = cursor->cursorImage;
+ hot = cursor->hot;
+}
+
+/*!
+ \fn void QGraphicsSystemCursorImage::set(const QImage * image, int hx, int hy)
+
+ \brief Set the cursor image to the specified QImage, with the hotsport at (hx, hy)
+
+ \a image A pointer to a QImage
+
+ \a hx The x coordinate of the cursor's hotspot
+
+ \a hy the y coordinate of the cursor's hotspot
+*/
+
+void QPlatformCursorImage::set(const QImage &image, int hx, int hy)
+{
+ hot.setX(hx);
+ hot.setY(hy);
+ cursorImage = image;
+}
+
+/*!
+ \fn void QGraphicsSystemCursorImage::set(const uchar *data, const uchar *mask, int width, int height, int hx, int hy)
+
+ \brief set the cursor image to the graphic represented by the combination of data, mask,
+ width, and height
+
+ \a data The pixel data of the graphic
+
+ \a mask Mask data for the graphic. pixels in data with a corresponding mask bit of 0 are not drawn
+
+ \a width The width of the graphic in pixels
+
+ \a height The height of the graphic in pixels
+
+ \a hx The X hotspot of the cursor graphic
+
+ \a hy The Y hotspot of the cursor graphic
+*/
+void QPlatformCursorImage::set(const uchar *data, const uchar *mask,
+ int width, int height, int hx, int hy)
+{
+ hot.setX(hx);
+ hot.setY(hy);
+
+ cursorImage = QImage(width,height, QImage::Format_Indexed8);
+
+ if (!width || !height || !data || !mask || cursorImage.isNull())
+ return;
+
+ cursorImage.setNumColors(3);
+ cursorImage.setColor(0, 0xff000000);
+ cursorImage.setColor(1, 0xffffffff);
+ cursorImage.setColor(2, 0x00000000);
+
+ int bytesPerLine = (width + 7) / 8;
+ int p = 0;
+ int d, m;
+
+ int x = -1, w = 0;
+
+ uchar *cursor_data = cursorImage.bits();
+ int bpl = cursorImage.bytesPerLine();
+ for (int i = 0; i < height; i++)
+ {
+ for (int j = 0; j < bytesPerLine; j++, data++, mask++)
+ {
+ for (int b = 0; b < 8 && j*8+b < width; b++)
+ {
+ d = *data & (1 << b);
+ m = *mask & (1 << b);
+ if (d && m) p = 0;
+ else if (!d && m) p = 1;
+ else p = 2;
+ cursor_data[j*8+b] = p;
+
+ // calc region
+ if (x < 0 && m)
+ x = j*8+b;
+ else if (x >= 0 && !m) {
+ x = -1;
+ w = 0;
+ }
+ if (m)
+ w++;
+ }
+ }
+ if (x >= 0) {
+ x = -1;
+ w = 0;
+ }
+ cursor_data += bpl;
+ }
+
+}
+
+/*!
+ \fn QGraphicsSystemCursorImage::QGraphicsSystemCursorImage(const uchar *data, const uchar *mask, int width, int height, int hotX, int hotY)
+
+ \brief set the cursor image to the graphic represented by the combination of data, mask,
+ width, and height
+
+ \a data The pixel data of the graphic
+
+ \a mask Mask data for the graphic. pixels in data with a corresponding mask bit of 0 are not drawn
+
+ \a width The width of the graphic in pixels
+
+ \a height The height of the graphic in pixels
+
+ \a hotX The X hotspot of the cursor graphic
+
+ \a hotY The Y hotspot of the cursor graphic
+
+ \sa set
+*/
+
+/*!
+ \fn QImage *QGraphicsSystemCursorImage::image()
+
+ \brief Return the cursor graphic as a pointer to a QImage
+*/
+
+/*!
+ \fn QPoint QGraphicsSystemCursorImage::hotspot()
+
+ \brief Return the cursor's hotspot
+*/
+
+QT_END_NAMESPACE
diff --git a/src/gui/kernel/qplatformcursor_qpa.h b/src/gui/kernel/qplatformcursor_qpa.h
new file mode 100644
index 0000000..71d0e87
--- /dev/null
+++ b/src/gui/kernel/qplatformcursor_qpa.h
@@ -0,0 +1,103 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtOpenVG module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef QGRAPHICSSYSTEMCURSOR_H
+#define QGRAPHICSSYSTEMCURSOR_H
+
+#include <QtCore/QList>
+#include <QtGui/QImage>
+#include <QtGui/QMouseEvent>
+#include <QtCore/QWeakPointer>
+#include <QtCore/QObject>
+#include <QtGui/QPlatformScreen>
+#include <QtGui/QCursor>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Gui)
+
+// Cursor graphics management
+class Q_GUI_EXPORT QPlatformCursorImage {
+public:
+ QPlatformCursorImage(const uchar *data, const uchar *mask, int width, int height, int hotX, int hotY)
+ { set(data, mask, width, height, hotX, hotY); }
+ QImage * image() { return &cursorImage; }
+ QPoint hotspot() { return hot; }
+ void set(const uchar *data, const uchar *mask, int width, int height, int hotX, int hotY);
+ void set(const QImage &image, int hx, int hy);
+ void set(Qt::CursorShape);
+private:
+ static void createSystemCursor(int id);
+ QImage cursorImage;
+ QPoint hot;
+};
+
+class QPlatformCursor;
+
+class QPlatformCursorPrivate {
+public:
+ static QList<QWeakPointer<QPlatformCursor> > getInstances() { return instances; }
+ static QList<QWeakPointer<QPlatformCursor> > instances;
+};
+
+class Q_GUI_EXPORT QPlatformCursor : public QObject {
+public:
+ QPlatformCursor(QPlatformScreen *);
+
+ // input methods
+ virtual void pointerEvent(const QMouseEvent & event) { Q_UNUSED(event); }
+ virtual void changeCursor(QCursor * widgetCursor, QWidget * widget) = 0;
+
+protected:
+ QPlatformScreen* screen; // Where to request an update
+
+private:
+ Q_DECLARE_PRIVATE(QPlatformCursor);
+ friend void qt_qpa_set_cursor(QWidget * w, bool force);
+ friend class QApplicationPrivate;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QGRAPHICSSYSTEMCURSOR_H
diff --git a/src/gui/kernel/qplatformeventloopintegration_qpa.cpp b/src/gui/kernel/qplatformeventloopintegration_qpa.cpp
new file mode 100644
index 0000000..8bdba5e
--- /dev/null
+++ b/src/gui/kernel/qplatformeventloopintegration_qpa.cpp
@@ -0,0 +1,41 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
diff --git a/src/gui/kernel/qplatformeventloopintegration_qpa.h b/src/gui/kernel/qplatformeventloopintegration_qpa.h
new file mode 100644
index 0000000..a06fecf
--- /dev/null
+++ b/src/gui/kernel/qplatformeventloopintegration_qpa.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 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$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMEVENTLOOPINTEGRATION_QPA_H
+#define QPLATFORMEVENTLOOPINTEGRATION_QPA_H
+
+#include <QtCore/qglobal.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Gui)
+
+class QPlatformEventLoopIntegration
+{
+public:
+ virtual void processEvents( qint64 msec ) = 0;
+ virtual void wakeup() = 0;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QPLATFORMEVENTLOOPINTEGRATION_QPA_H
diff --git a/src/gui/kernel/qplatformglcontext_qpa.cpp b/src/gui/kernel/qplatformglcontext_qpa.cpp
new file mode 100644
index 0000000..36db2b0
--- /dev/null
+++ b/src/gui/kernel/qplatformglcontext_qpa.cpp
@@ -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 QtOpenGL 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 "qplatformglcontext_qpa.h"
+
+QPlatformGLContext::~QPlatformGLContext()
+{ }
+
+static QPlatformGLContext *staticSharedContext = 0;
+
+void QPlatformGLContext::setDefaultSharedContext(QPlatformGLContext *sharedContext)
+{
+ staticSharedContext = sharedContext;
+}
+
+QPlatformGLContext *QPlatformGLContext::defaultSharedContext()
+{
+ return staticSharedContext;
+}
diff --git a/src/gui/kernel/qplatformglcontext_qpa.h b/src/gui/kernel/qplatformglcontext_qpa.h
new file mode 100644
index 0000000..ed41723
--- /dev/null
+++ b/src/gui/kernel/qplatformglcontext_qpa.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** 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 QtOpenGL module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORM_GL_CONTEXT_H
+#define QPLATFORM_GL_CONTEXT_H
+
+#include <QtCore/qnamespace.h>
+#include <QtGui/QPlatformWindowFormat>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Gui)
+
+class Q_OPENGL_EXPORT QPlatformGLContext
+{
+public:
+ virtual ~QPlatformGLContext();
+
+ virtual void makeCurrent() = 0;
+ virtual void doneCurrent() = 0;
+ virtual void swapBuffers() = 0;
+ virtual void* getProcAddress(const QString& procName) = 0;
+
+ virtual QPlatformWindowFormat platformWindowFormat() const = 0;
+
+ static QPlatformGLContext *defaultSharedContext();
+
+protected:
+
+ static void setDefaultSharedContext(QPlatformGLContext *sharedContext);
+
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+
+#endif // QPLATFORM_GL_INTEGRATION_P_H
diff --git a/src/gui/kernel/qplatformintegration_qpa.cpp b/src/gui/kernel/qplatformintegration_qpa.cpp
new file mode 100644
index 0000000..e2a493d
--- /dev/null
+++ b/src/gui/kernel/qplatformintegration_qpa.cpp
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** 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 "qplatformintegration_qpa.h"
+
+#include <QtGui/QPlatformFontDatabase>
+
+QT_BEGIN_NAMESPACE
+
+QPixmap QPlatformIntegration::grabWindow(WId window, int x, int y, int width, int height) const
+{
+ Q_UNUSED(window);
+ Q_UNUSED(x);
+ Q_UNUSED(y);
+ Q_UNUSED(width);
+ Q_UNUSED(height);
+ return QPixmap();
+}
+
+QPlatformEventLoopIntegration *QPlatformIntegration::createEventLoopIntegration() const
+{
+ return 0;
+}
+
+bool QPlatformIntegration::hasOpenGL() const
+{
+ return false;
+}
+
+QPlatformFontDatabase *QPlatformIntegration::fontDatabase() const
+{
+ static QPlatformFontDatabase *db = 0;
+ if (!db) {
+ db = new QPlatformFontDatabase;
+ }
+ return db;
+}
+
+QT_END_NAMESPACE
diff --git a/src/gui/kernel/qplatformintegration_qpa.h b/src/gui/kernel/qplatformintegration_qpa.h
new file mode 100644
index 0000000..b1f4e5f
--- /dev/null
+++ b/src/gui/kernel/qplatformintegration_qpa.h
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the 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$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMINTEGRATION_H
+#define QPLATFORMINTEGRATION_H
+
+#include <QtGui/qwindowdefs.h>
+#include <QtGui/private/qwindowsurface_p.h>
+#include <QtGui/private/qpixmapdata_p.h>
+#include <QtGui/qplatformscreen_qpa.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Gui)
+
+class QPlatformWindow;
+class QWindowSurface;
+class QBlittable;
+class QWidget;
+class QPlatformEventLoopIntegration;
+class QPlatformFontDatabase;
+
+class Q_GUI_EXPORT QPlatformIntegration
+{
+public:
+ virtual ~QPlatformIntegration() { }
+
+// GraphicsSystem functions
+ virtual QPixmapData *createPixmapData(QPixmapData::PixelType type) const = 0;
+ virtual QPlatformWindow *createPlatformWindow(QWidget *widget, WId winId = 0) const = 0;
+ virtual QWindowSurface *createWindowSurface(QWidget *widget, WId winId) const = 0;
+ virtual void moveToScreen(QWidget *window, int screen) {Q_UNUSED(window); Q_UNUSED(screen);}
+
+// Window System functions
+ virtual QList<QPlatformScreen *> screens() const = 0;
+ virtual bool isVirtualDesktop() { return false; }
+ virtual QPixmap grabWindow(WId window, int x, int y, int width, int height) const;
+
+//Fontdatabase integration.
+ virtual QPlatformFontDatabase *fontDatabase() const;
+
+// Experimental in mainthread eventloop integration
+// This should only be used if it is only possible to do window system event processing in
+// the gui thread. All of the functions in QWindowSystemInterface are thread safe.
+ virtual QPlatformEventLoopIntegration *createEventLoopIntegration() const;
+
+//jl:XXX should it be hasGLContext and do we need it at all?
+ virtual bool hasOpenGL() const;
+
+
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QPLATFORMINTEGRATION_H
diff --git a/src/gui/kernel/qplatformintegrationfactory_qpa.cpp b/src/gui/kernel/qplatformintegrationfactory_qpa.cpp
new file mode 100644
index 0000000..9122e1a
--- /dev/null
+++ b/src/gui/kernel/qplatformintegrationfactory_qpa.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 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 "qplatformintegrationfactory_qpa_p.h"
+#include <QPlatformIntegrationPlugin>
+#include "private/qfactoryloader_p.h"
+#include "qmutex.h"
+
+#include "qapplication.h"
+#include "qdebug.h"
+
+QT_BEGIN_NAMESPACE
+
+#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
+ (QPlatformIntegrationFactoryInterface_iid, QLatin1String("/platforms"), Qt::CaseInsensitive))
+#endif
+
+QPlatformIntegration *QPlatformIntegrationFactory::create(const QString& key)
+{
+ QPlatformIntegration *ret = 0;
+ QStringList paramList = key.split(QLatin1Char(':'));
+ QString platform = paramList.takeFirst().toLower();
+
+#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+ if (QPlatformIntegrationFactoryInterface *factory = qobject_cast<QPlatformIntegrationFactoryInterface*>(loader()->instance(platform)))
+ ret = factory->create(platform, paramList);
+#endif
+
+ return ret;
+}
+
+/*!
+ Returns the list of valid keys, i.e. the keys this factory can
+ create styles for.
+
+ \sa create()
+*/
+QStringList QPlatformIntegrationFactory::keys()
+{
+#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+ QStringList list = loader()->keys();
+#else
+ QStringList list;
+#endif
+ return list;
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/gui/kernel/qplatformintegrationfactory_qpa_p.h b/src/gui/kernel/qplatformintegrationfactory_qpa_p.h
new file mode 100644
index 0000000..ba02d2c
--- /dev/null
+++ b/src/gui/kernel/qplatformintegrationfactory_qpa_p.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMINTEGRATIONFACTORY_H
+#define QPLATFORMINTEGRATIONFACTORY_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/qstringlist.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Gui)
+
+class QPlatformIntegration;
+
+class QPlatformIntegrationFactory
+{
+public:
+ static QStringList keys();
+ static QPlatformIntegration *create(const QString&);
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QPLATFORMINTEGRATIONFACTORY_H
+
diff --git a/src/gui/kernel/qplatformintegrationplugin_qpa.cpp b/src/gui/kernel/qplatformintegrationplugin_qpa.cpp
new file mode 100644
index 0000000..3bf2474
--- /dev/null
+++ b/src/gui/kernel/qplatformintegrationplugin_qpa.cpp
@@ -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 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 "qplatformintegrationplugin_qpa.h"
+
+QT_BEGIN_NAMESPACE
+
+QPlatformIntegrationPlugin::QPlatformIntegrationPlugin(QObject *parent)
+ : QObject(parent)
+{
+}
+
+QPlatformIntegrationPlugin::~QPlatformIntegrationPlugin()
+{
+}
+
+QT_END_NAMESPACE
diff --git a/src/gui/kernel/qplatformintegrationplugin_qpa.h b/src/gui/kernel/qplatformintegrationplugin_qpa.h
new file mode 100644
index 0000000..9c37cf7
--- /dev/null
+++ b/src/gui/kernel/qplatformintegrationplugin_qpa.h
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMINTEGRATIONPLUGIN_H
+#define QPLATFORMINTEGRATIONPLUGIN_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/qplugin.h>
+#include <QtCore/qfactoryinterface.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Gui)
+
+class QPlatformIntegration;
+
+struct QPlatformIntegrationFactoryInterface : public QFactoryInterface
+{
+ virtual QPlatformIntegration *create(const QString &key, const QStringList &paramList) = 0;
+};
+
+#define QPlatformIntegrationFactoryInterface_iid "com.nokia.Qt.QPlatformIntegrationFactoryInterface"
+
+Q_DECLARE_INTERFACE(QPlatformIntegrationFactoryInterface, QPlatformIntegrationFactoryInterface_iid)
+
+class Q_GUI_EXPORT QPlatformIntegrationPlugin : public QObject, public QPlatformIntegrationFactoryInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QPlatformIntegrationFactoryInterface:QFactoryInterface)
+public:
+ explicit QPlatformIntegrationPlugin(QObject *parent = 0);
+ ~QPlatformIntegrationPlugin();
+
+ virtual QStringList keys() const = 0;
+ virtual QPlatformIntegration *create(const QString &key, const QStringList &paramList) = 0;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QPLATFORMINTEGRATIONPLUGIN_H
diff --git a/src/gui/kernel/qplatformscreen_qpa.cpp b/src/gui/kernel/qplatformscreen_qpa.cpp
new file mode 100644
index 0000000..478d2d6
--- /dev/null
+++ b/src/gui/kernel/qplatformscreen_qpa.cpp
@@ -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 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 "qplatformscreen_qpa.h"
+#include <QtGui/qapplication.h>
+#include <QtGui/qdesktopwidget.h>
+
+QWidget *QPlatformScreen::topLevelAt(const QPoint & pos) const
+{
+ QWidgetList list = QApplication::topLevelWidgets();
+ for (int i = list.size()-1; i >= 0; --i) {
+ QWidget *w = list[i];
+ //### mask is ignored
+ if (w != QApplication::desktop() && w->isVisible() && w->geometry().contains(pos))
+ return w;
+ }
+
+ return 0;
+}
+
+QSize QPlatformScreen::physicalSize() const
+{
+ static const int dpi = 100;
+ int width = geometry().width() / dpi * qreal(25.4) ;
+ int height = geometry().height() / dpi * qreal(25.4) ;
+ return QSize(width,height);
+}
+
diff --git a/src/gui/kernel/qplatformscreen_qpa.h b/src/gui/kernel/qplatformscreen_qpa.h
new file mode 100644
index 0000000..1704f0f
--- /dev/null
+++ b/src/gui/kernel/qplatformscreen_qpa.h
@@ -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 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$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMSCREEN_H
+#define QPLATFORMSCREEN_H
+
+#include <QtCore/qmetatype.h>
+#include <QtCore/qnamespace.h>
+#include <QtCore/qcoreevent.h>
+#include <QtCore/qvariant.h>
+#include <QtCore/qrect.h>
+#include <QtCore/qobject.h>
+
+#include <QtGui/qcursor.h>
+#include <QtGui/qimage.h>
+#include <QtGui/qwidget.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Gui)
+
+class Q_GUI_EXPORT QPlatformScreen : public QObject
+{
+ Q_OBJECT
+public:
+ virtual ~QPlatformScreen() { }
+
+ virtual QRect geometry() const = 0;
+ virtual QRect availableGeometry() const {return geometry();}
+ virtual int depth() const = 0;
+ virtual QImage::Format format() const = 0;
+ virtual QSize physicalSize() const;
+ virtual void setDirty(const QRect &) {}
+ virtual QWidget *topLevelAt(const QPoint &point) const;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QPLATFORMSCREEN_H
diff --git a/src/gui/kernel/qplatformwindow_qpa.cpp b/src/gui/kernel/qplatformwindow_qpa.cpp
new file mode 100644
index 0000000..9d722d8
--- /dev/null
+++ b/src/gui/kernel/qplatformwindow_qpa.cpp
@@ -0,0 +1,129 @@
+/****************************************************************************
+**
+** 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 "qplatformwindow_qpa.h"
+
+#include <QtGui/qwidget.h>
+
+class QPlatformWindowPrivate
+{
+ QWidget *tlw;
+ QRect rect;
+ Qt::WindowFlags flags;
+ friend class QPlatformWindow;
+};
+
+QPlatformWindow::QPlatformWindow(QWidget *tlw)
+ : d_ptr(new QPlatformWindowPrivate)
+{
+ Q_D(QPlatformWindow);
+ d->tlw = tlw;
+ tlw->setPlatformWindow(this);
+}
+
+QPlatformWindow::~QPlatformWindow()
+{
+}
+
+QWidget *QPlatformWindow::widget() const
+{
+ Q_D(const QPlatformWindow);
+ return d->tlw;
+}
+
+void QPlatformWindow::setGeometry(const QRect &rect)
+{
+ Q_D(QPlatformWindow);
+ d->rect = rect;
+}
+
+QRect QPlatformWindow::geometry() const
+{
+ Q_D(const QPlatformWindow);
+ return d->rect;
+}
+
+/*!
+Reimplemented in subclasses to show the surface if \a visible is \c true, and hide it if \a visible is \c false.
+*/
+void QPlatformWindow::setVisible(bool visible)
+{
+ Q_UNUSED(visible);
+}
+/*!
+Requests setting the window flags of this surface to \a type. Returns the actual flags set.
+*/
+Qt::WindowFlags QPlatformWindow::setWindowFlags(Qt::WindowFlags flags)
+{
+ Q_D(QPlatformWindow);
+ d->flags = flags;
+ return flags;
+}
+
+/*!
+ Returns the effective window flags for this surface.
+*/
+Qt::WindowFlags QPlatformWindow::windowFlags() const
+{
+ Q_D(const QPlatformWindow);
+ return d->flags;
+}
+
+WId QPlatformWindow::winId() const { return WId(0); }
+
+void QPlatformWindow::setParent(const QPlatformWindow *) { qWarning("This plugin does not support setParent!"); }
+
+void QPlatformWindow::setWindowTitle(const QString &) {}
+
+void QPlatformWindow::raise() { qWarning("This plugin does not support raise()"); }
+
+void QPlatformWindow::lower() { qWarning("This plugin does not support lower()"); }
+
+void QPlatformWindow::setOpacity(qreal level)
+{
+ Q_UNUSED(level);
+ qWarning("This plugin does not support setting window opacity");
+}
+
+QPlatformGLContext *QPlatformWindow::glContext() const
+{
+ return 0;
+}
diff --git a/src/gui/kernel/qplatformwindow_qpa.h b/src/gui/kernel/qplatformwindow_qpa.h
new file mode 100644
index 0000000..6dfba05
--- /dev/null
+++ b/src/gui/kernel/qplatformwindow_qpa.h
@@ -0,0 +1,94 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+#ifndef QPLATFORMWINDOW_H
+#define QPLATFORMWINDOW_H
+
+
+#include <QtCore/qscopedpointer.h>
+#include <QtCore/qrect.h>
+#include <QtCore/qstring.h>
+#include <QtGui/qwindowdefs.h>
+
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Gui)
+
+class QPlatformWindowPrivate;
+class QWidget;
+class QPlatformGLContext;
+
+class Q_GUI_EXPORT QPlatformWindow
+{
+ Q_DECLARE_PRIVATE(QPlatformWindow);
+public:
+ QPlatformWindow(QWidget *tlw);
+ virtual ~QPlatformWindow();
+
+ QWidget *widget() const;
+ virtual void setGeometry(const QRect &rect);
+ virtual QRect geometry() const;
+
+ virtual void setVisible(bool visible);
+ virtual Qt::WindowFlags setWindowFlags(Qt::WindowFlags flags);
+ virtual Qt::WindowFlags windowFlags() const;
+ virtual WId winId() const;
+ virtual void setParent(const QPlatformWindow *window);
+
+ virtual void setWindowTitle(const QString &);
+ virtual void raise();
+ virtual void lower();
+
+ virtual void setOpacity(qreal level);
+
+ virtual QPlatformGLContext *glContext() const;
+protected:
+ QScopedPointer<QPlatformWindowPrivate> d_ptr;
+private:
+ Q_DISABLE_COPY(QPlatformWindow);
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+#endif //QPLATFORMWINDOW_H
diff --git a/src/gui/kernel/qplatformwindowformat_qpa.cpp b/src/gui/kernel/qplatformwindowformat_qpa.cpp
new file mode 100644
index 0000000..d497e85
--- /dev/null
+++ b/src/gui/kernel/qplatformwindowformat_qpa.cpp
@@ -0,0 +1,1012 @@
+/****************************************************************************
+**
+** 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 "qplatformwindowformat_qpa.h"
+
+#include <QtCore/QDebug>
+
+Q_GLOBAL_STATIC(QPlatformWindowFormat, q_platformwindow_default_format);
+
+class QPlatformWindowFormatPrivate
+{
+public:
+ QPlatformWindowFormatPrivate()
+ : ref(1)
+ , opts(QPlatformWindowFormat::DoubleBuffer | QPlatformWindowFormat::DepthBuffer
+ | QPlatformWindowFormat::Rgba | QPlatformWindowFormat::DirectRendering
+ | QPlatformWindowFormat::StencilBuffer | QPlatformWindowFormat::DeprecatedFunctions
+ | QPlatformWindowFormat::UseDefaultSharedContext)
+ , depthSize(-1)
+ , accumSize(-1)
+ , stencilSize(-1)
+ , redSize(-1)
+ , greenSize(-1)
+ , blueSize(-1)
+ , alphaSize(-1)
+ , numSamples(-1)
+ , swapInterval(-1)
+ , windowApi(QPlatformWindowFormat::Raster)
+ , sharedContext(0)
+ {
+ }
+
+ QPlatformWindowFormatPrivate(const QPlatformWindowFormatPrivate *other)
+ : ref(1),
+ opts(other->opts),
+ depthSize(other->depthSize),
+ accumSize(other->accumSize),
+ stencilSize(other->stencilSize),
+ redSize(other->redSize),
+ greenSize(other->greenSize),
+ blueSize(other->blueSize),
+ alphaSize(other->alphaSize),
+ numSamples(other->numSamples),
+ swapInterval(other->swapInterval),
+ windowApi(other->windowApi),
+ sharedContext(other->sharedContext)
+ {
+ }
+ QAtomicInt ref;
+ QPlatformWindowFormat::FormatOptions opts;
+ int depthSize;
+ int accumSize;
+ int stencilSize;
+ int redSize;
+ int greenSize;
+ int blueSize;
+ int alphaSize;
+ int numSamples;
+ int swapInterval;
+ QPlatformWindowFormat::WindowApi windowApi;
+ QPlatformGLContext *sharedContext;
+};
+
+/*!
+ \class QPlatformWindowFormat
+ \brief The QPlatformWindowFormat class specifies the display format of an OpenGL
+ rendering context.
+
+ \ingroup painting-3D
+
+ A display format has several characteristics:
+ \list
+ \i \link setDoubleBuffer() Double or single buffering.\endlink
+ \i \link setDepth() Depth buffer.\endlink
+ \i \link setRgba() RGBA or color index mode.\endlink
+ \i \link setAlpha() Alpha channel.\endlink
+ \i \link setAccum() Accumulation buffer.\endlink
+ \i \link setStencil() Stencil buffer.\endlink
+ \i \link setStereo() Stereo buffers.\endlink
+ \i \link setDirectRendering() Direct rendering.\endlink
+ \i \link setOverlay() Presence of an overlay.\endlink
+ \i \link setPlane() Plane of an overlay.\endlink
+ \i \link setSampleBuffers() Multisample buffers.\endlink
+ \endlist
+
+ You can also specify preferred bit depths for the color buffer,
+ depth buffer, alpha buffer, accumulation buffer and the stencil
+ buffer with the functions: setRedBufferSize(), setGreenBufferSize(),
+ setBlueBufferSize(), setDepthBufferSize(), setAlphaBufferSize(),
+ setAccumBufferSize() and setStencilBufferSize().
+
+ Note that even if you specify that you prefer a 32 bit depth
+ buffer (e.g. with setDepthBufferSize(32)), the format that is
+ chosen may not have a 32 bit depth buffer, even if there is a
+ format available with a 32 bit depth buffer. The main reason for
+ this is how the system dependant picking algorithms work on the
+ different platforms, and some format options may have higher
+ precedence than others.
+
+ You create and tell a QPlatformWindowFormat object what rendering options you
+ want from an OpenGL rendering context.
+
+ OpenGL drivers or accelerated hardware may or may not support
+ advanced features such as alpha channel or stereographic viewing.
+ If you request some features that the driver/hardware does not
+ provide when you create a QGLWidget, you will get a rendering
+ context with the nearest subset of features.
+
+ There are different ways to define the display characteristics of
+ a rendering context. One is to create a QPlatformWindowFormat and make it the
+ default for the entire application:
+ \snippet doc/src/snippets/code/src_opengl_qgl.cpp 0
+
+ Or you can specify the desired format when creating an object of
+ your QGLWidget subclass:
+ \snippet doc/src/snippets/code/src_opengl_qgl.cpp 1
+
+ After the widget has been created, you can find out which of the
+ requested features the system was able to provide:
+ \snippet doc/src/snippets/code/src_opengl_qgl.cpp 2
+
+ \legalese
+ OpenGL is a trademark of Silicon Graphics, Inc. in the
+ United States and other countries.
+ \endlegalese
+
+ \sa QGLContext, QGLWidget
+*/
+
+/*!
+ Constructs a QPlatformWindowFormat object with the following default settings:
+ \list
+ \i \link setDoubleBuffer() Double buffer:\endlink Enabled.
+ \i \link setDepth() Depth buffer:\endlink Enabled.
+ \i \link setRgba() RGBA:\endlink Enabled (i.e., color index disabled).
+ \i \link setAlpha() Alpha channel:\endlink Disabled.
+ \i \link setAccum() Accumulator buffer:\endlink Disabled.
+ \i \link setStencil() Stencil buffer:\endlink Enabled.
+ \i \link setStereo() Stereo:\endlink Disabled.
+ \i \link setDirectRendering() Direct rendering:\endlink Enabled.
+ \i \link setOverlay() Overlay:\endlink Disabled.
+ \i \link setPlane() Plane:\endlink 0 (i.e., normal plane).
+ \i \link setSampleBuffers() Multisample buffers:\endlink Disabled.
+ \endlist
+*/
+
+QPlatformWindowFormat::QPlatformWindowFormat()
+{
+ d = new QPlatformWindowFormatPrivate;
+}
+
+
+/*!
+ Creates a QPlatformWindowFormat object that is a copy of the current
+ defaultFormat().
+
+ If \a options is not 0, the default format is modified by the
+ specified format options. The \a options parameter should be
+ QGL::FormatOption values OR'ed together.
+
+ This constructor makes it easy to specify a certain desired format
+ in classes derived from QGLWidget, for example:
+ \snippet doc/src/snippets/code/src_opengl_qgl.cpp 3
+
+ Note that there are QGL::FormatOption values to turn format settings
+ both on and off, e.g. QGL::DepthBuffer and QGL::NoDepthBuffer,
+ QGL::DirectRendering and QGL::IndirectRendering, etc.
+
+ The \a plane parameter defaults to 0 and is the plane which this
+ format should be associated with. Not all OpenGL implementations
+ supports overlay/underlay rendering planes.
+
+ \sa defaultFormat(), setOption(), setPlane()
+*/
+
+QPlatformWindowFormat::QPlatformWindowFormat(QPlatformWindowFormat::FormatOptions options)
+{
+ d = new QPlatformWindowFormatPrivate;
+ QPlatformWindowFormat::FormatOptions newOpts = options;
+ d->opts = defaultFormat().d->opts;
+ d->opts |= (newOpts & 0xffff);
+ d->opts &= ~(newOpts >> 16);
+}
+
+/*!
+ \internal
+*/
+void QPlatformWindowFormat::detach()
+{
+ if (d->ref != 1) {
+ QPlatformWindowFormatPrivate *newd = new QPlatformWindowFormatPrivate(d);
+ if (!d->ref.deref())
+ delete d;
+ d = newd;
+ }
+}
+
+/*!
+ Constructs a copy of \a other.
+*/
+
+QPlatformWindowFormat::QPlatformWindowFormat(const QPlatformWindowFormat &other)
+{
+ d = other.d;
+ d->ref.ref();
+}
+
+/*!
+ Assigns \a other to this object.
+*/
+
+QPlatformWindowFormat &QPlatformWindowFormat::operator=(const QPlatformWindowFormat &other)
+{
+ if (d != other.d) {
+ other.d->ref.ref();
+ if (!d->ref.deref())
+ delete d;
+ d = other.d;
+ }
+ return *this;
+}
+
+/*!
+ Destroys the QPlatformWindowFormat.
+*/
+QPlatformWindowFormat::~QPlatformWindowFormat()
+{
+ if (!d->ref.deref())
+ delete d;
+}
+
+/*!
+ \fn bool QPlatformWindowFormat::doubleBuffer() const
+
+ Returns true if double buffering is enabled; otherwise returns
+ false. Double buffering is enabled by default.
+
+ \sa setDoubleBuffer()
+*/
+
+/*!
+ If \a enable is true sets double buffering; otherwise sets single
+ buffering.
+
+ Double buffering is enabled by default.
+
+ Double buffering is a technique where graphics are rendered on an
+ off-screen buffer and not directly to the screen. When the drawing
+ has been completed, the program calls a swapBuffers() function to
+ exchange the screen contents with the buffer. The result is
+ flicker-free drawing and often better performance.
+
+ \sa doubleBuffer(), QGLContext::swapBuffers(),
+ QGLWidget::swapBuffers()
+*/
+
+void QPlatformWindowFormat::setDoubleBuffer(bool enable)
+{
+ setOption(enable ? QPlatformWindowFormat::DoubleBuffer : QPlatformWindowFormat::SingleBuffer);
+}
+
+
+/*!
+ \fn bool QPlatformWindowFormat::depth() const
+
+ Returns true if the depth buffer is enabled; otherwise returns
+ false. The depth buffer is enabled by default.
+
+ \sa setDepth(), setDepthBufferSize()
+*/
+
+/*!
+ If \a enable is true enables the depth buffer; otherwise disables
+ the depth buffer.
+
+ The depth buffer is enabled by default.
+
+ The purpose of a depth buffer (or Z-buffering) is to remove hidden
+ surfaces. Pixels are assigned Z values based on the distance to
+ the viewer. A pixel with a high Z value is closer to the viewer
+ than a pixel with a low Z value. This information is used to
+ decide whether to draw a pixel or not.
+
+ \sa depth(), setDepthBufferSize()
+*/
+
+void QPlatformWindowFormat::setDepth(bool enable)
+{
+ setOption(enable ? QPlatformWindowFormat::DepthBuffer : QPlatformWindowFormat::NoDepthBuffer);
+}
+
+
+/*!
+ \fn bool QPlatformWindowFormat::rgba() const
+
+ Returns true if RGBA color mode is set. Returns false if color
+ index mode is set. The default color mode is RGBA.
+
+ \sa setRgba()
+*/
+
+/*!
+ If \a enable is true sets RGBA mode. If \a enable is false sets
+ color index mode.
+
+ The default color mode is RGBA.
+
+ RGBA is the preferred mode for most OpenGL applications. In RGBA
+ color mode you specify colors as red + green + blue + alpha
+ quadruplets.
+
+ In color index mode you specify an index into a color lookup
+ table.
+
+ \sa rgba()
+*/
+
+void QPlatformWindowFormat::setRgba(bool enable)
+{
+ setOption(enable ? QPlatformWindowFormat::Rgba : QPlatformWindowFormat::ColorIndex);
+}
+
+
+/*!
+ \fn bool QPlatformWindowFormat::alpha() const
+
+ Returns true if the alpha buffer in the framebuffer is enabled;
+ otherwise returns false. The alpha buffer is disabled by default.
+
+ \sa setAlpha(), setAlphaBufferSize()
+*/
+
+/*!
+ If \a enable is true enables the alpha buffer; otherwise disables
+ the alpha buffer.
+
+ The alpha buffer is disabled by default.
+
+ The alpha buffer is typically used for implementing transparency
+ or translucency. The A in RGBA specifies the transparency of a
+ pixel.
+
+ \sa alpha(), setAlphaBufferSize()
+*/
+
+void QPlatformWindowFormat::setAlpha(bool enable)
+{
+ setOption(enable ? QPlatformWindowFormat::AlphaChannel : QPlatformWindowFormat::NoAlphaChannel);
+}
+
+
+/*!
+ \fn bool QPlatformWindowFormat::accum() const
+
+ Returns true if the accumulation buffer is enabled; otherwise
+ returns false. The accumulation buffer is disabled by default.
+
+ \sa setAccum(), setAccumBufferSize()
+*/
+
+/*!
+ If \a enable is true enables the accumulation buffer; otherwise
+ disables the accumulation buffer.
+
+ The accumulation buffer is disabled by default.
+
+ The accumulation buffer is used to create blur effects and
+ multiple exposures.
+
+ \sa accum(), setAccumBufferSize()
+*/
+
+void QPlatformWindowFormat::setAccum(bool enable)
+{
+ setOption(enable ? QPlatformWindowFormat::AccumBuffer : QPlatformWindowFormat::NoAccumBuffer);
+}
+
+
+/*!
+ \fn bool QPlatformWindowFormat::stencil() const
+
+ Returns true if the stencil buffer is enabled; otherwise returns
+ false. The stencil buffer is enabled by default.
+
+ \sa setStencil(), setStencilBufferSize()
+*/
+
+/*!
+ If \a enable is true enables the stencil buffer; otherwise
+ disables the stencil buffer.
+
+ The stencil buffer is enabled by default.
+
+ The stencil buffer masks certain parts of the drawing area so that
+ masked parts are not drawn on.
+
+ \sa stencil(), setStencilBufferSize()
+*/
+
+void QPlatformWindowFormat::setStencil(bool enable)
+{
+ setOption(enable ? QPlatformWindowFormat::StencilBuffer: QPlatformWindowFormat::NoStencilBuffer);
+}
+
+
+/*!
+ \fn bool QPlatformWindowFormat::stereo() const
+
+ Returns true if stereo buffering is enabled; otherwise returns
+ false. Stereo buffering is disabled by default.
+
+ \sa setStereo()
+*/
+
+/*!
+ If \a enable is true enables stereo buffering; otherwise disables
+ stereo buffering.
+
+ Stereo buffering is disabled by default.
+
+ Stereo buffering provides extra color buffers to generate left-eye
+ and right-eye images.
+
+ \sa stereo()
+*/
+
+void QPlatformWindowFormat::setStereo(bool enable)
+{
+ setOption(enable ? QPlatformWindowFormat::StereoBuffers : QPlatformWindowFormat::NoStereoBuffers);
+}
+
+
+/*!
+ \fn bool QPlatformWindowFormat::directRendering() const
+
+ Returns true if direct rendering is enabled; otherwise returns
+ false.
+
+ Direct rendering is enabled by default.
+
+ \sa setDirectRendering()
+*/
+
+/*!
+ If \a enable is true enables direct rendering; otherwise disables
+ direct rendering.
+
+ Direct rendering is enabled by default.
+
+ Enabling this option will make OpenGL bypass the underlying window
+ system and render directly from hardware to the screen, if this is
+ supported by the system.
+
+ \sa directRendering()
+*/
+
+void QPlatformWindowFormat::setDirectRendering(bool enable)
+{
+ setOption(enable ? QPlatformWindowFormat::DirectRendering : QPlatformWindowFormat::IndirectRendering);
+}
+
+/*!
+ \fn bool QPlatformWindowFormat::sampleBuffers() const
+
+ Returns true if multisample buffer support is enabled; otherwise
+ returns false.
+
+ The multisample buffer is disabled by default.
+
+ \sa setSampleBuffers()
+*/
+
+/*!
+ If \a enable is true, a GL context with multisample buffer support
+ is picked; otherwise ignored.
+
+ \sa sampleBuffers(), setSamples(), samples()
+*/
+void QPlatformWindowFormat::setSampleBuffers(bool enable)
+{
+ setOption(enable ? QPlatformWindowFormat::SampleBuffers : QPlatformWindowFormat::NoSampleBuffers);
+}
+
+void QPlatformWindowFormat::setUseDefaultSharedContext(bool enable)
+{
+ if (enable) {
+ setOption(QPlatformWindowFormat::UseDefaultSharedContext);
+ d->sharedContext = 0;
+ } else {
+ setOption(QPlatformWindowFormat::NoDefaultSharedContext);
+ }
+}
+
+/*!
+ Returns the number of samples per pixel when multisampling is
+ enabled. By default, the highest number of samples that is
+ available is used.
+
+ \sa setSampleBuffers(), sampleBuffers(), setSamples()
+*/
+int QPlatformWindowFormat::samples() const
+{
+ return d->numSamples;
+}
+
+/*!
+ Set the preferred number of samples per pixel when multisampling
+ is enabled to \a numSamples. By default, the highest number of
+ samples available is used.
+
+ \sa setSampleBuffers(), sampleBuffers(), samples()
+*/
+void QPlatformWindowFormat::setSamples(int numSamples)
+{
+ detach();
+ if (numSamples < 0) {
+ qWarning("QPlatformWindowFormat::setSamples: Cannot have negative number of samples per pixel %d", numSamples);
+ return;
+ }
+ d->numSamples = numSamples;
+ setSampleBuffers(numSamples > 0);
+}
+
+/*!
+ \since 4.2
+
+ Set the preferred swap interval. This can be used to sync the GL
+ drawing into a system window to the vertical refresh of the screen.
+ Setting an \a interval value of 0 will turn the vertical refresh syncing
+ off, any value higher than 0 will turn the vertical syncing on.
+
+ Under Windows and under X11, where the \c{WGL_EXT_swap_control}
+ and \c{GLX_SGI_video_sync} extensions are used, the \a interval
+ parameter can be used to set the minimum number of video frames
+ that are displayed before a buffer swap will occur. In effect,
+ setting the \a interval to 10, means there will be 10 vertical
+ retraces between every buffer swap.
+
+ Under Windows the \c{WGL_EXT_swap_control} extension has to be present,
+ and under X11 the \c{GLX_SGI_video_sync} extension has to be present.
+*/
+void QPlatformWindowFormat::setSwapInterval(int interval)
+{
+ detach();
+ d->swapInterval = interval;
+}
+
+/*!
+ \since 4.2
+
+ Returns the currently set swap interval. -1 is returned if setting
+ the swap interval isn't supported in the system GL implementation.
+*/
+int QPlatformWindowFormat::swapInterval() const
+{
+ return d->swapInterval;
+}
+
+void QPlatformWindowFormat::setWindowApi(QPlatformWindowFormat::WindowApi api)
+{
+ detach();
+ d->windowApi = api;
+}
+
+QPlatformWindowFormat::WindowApi QPlatformWindowFormat::windowApi() const
+{
+ return d->windowApi;
+}
+
+void QPlatformWindowFormat::setSharedContext(QPlatformGLContext *context)
+{
+ setUseDefaultSharedContext(false);
+ d->sharedContext = context;
+}
+
+QPlatformGLContext *QPlatformWindowFormat::sharedGLContext() const
+{
+ return d->sharedContext;
+}
+
+///*!
+// \fn bool QPlatformWindowFormat::hasOverlay() const
+
+// Returns true if overlay plane is enabled; otherwise returns false.
+
+// Overlay is disabled by default.
+
+// \sa setOverlay()
+//*/
+
+///*!
+// If \a enable is true enables an overlay plane; otherwise disables
+// the overlay plane.
+
+// Enabling the overlay plane will cause QGLWidget to create an
+// additional context in an overlay plane. See the QGLWidget
+// documentation for further information.
+
+// \sa hasOverlay()
+//*/
+
+//void QPlatformWindowFormat::setOverlay(bool enable)
+//{
+// setOption(enable ? QPlatformWindowFormat::HasOverlay : QPlatformWindowFormat::NoOverlay);
+//}
+
+/*!
+ Sets the format option to \a opt.
+
+ \sa testOption()
+*/
+
+void QPlatformWindowFormat::setOption(QPlatformWindowFormat::FormatOptions opt)
+{
+ detach();
+ if (opt & 0xffff)
+ d->opts |= opt;
+ else
+ d->opts &= ~(opt >> 16);
+}
+
+
+
+/*!
+ Returns true if format option \a opt is set; otherwise returns false.
+
+ \sa setOption()
+*/
+
+bool QPlatformWindowFormat::testOption(QPlatformWindowFormat::FormatOptions opt) const
+{
+ if (opt & 0xffff)
+ return (d->opts & opt) != 0;
+ else
+ return (d->opts & (opt >> 16)) == 0;
+}
+
+/*!
+ Set the minimum depth buffer size to \a size.
+
+ \sa depthBufferSize(), setDepth(), depth()
+*/
+void QPlatformWindowFormat::setDepthBufferSize(int size)
+{
+ detach();
+ if (size < 0) {
+ qWarning("QPlatformWindowFormat::setDepthBufferSize: Cannot set negative depth buffer size %d", size);
+ return;
+ }
+ d->depthSize = size;
+ setDepth(size > 0);
+}
+
+/*!
+ Returns the depth buffer size.
+
+ \sa depth(), setDepth(), setDepthBufferSize()
+*/
+int QPlatformWindowFormat::depthBufferSize() const
+{
+ return d->depthSize;
+}
+
+/*!
+ \since 4.2
+
+ Set the preferred red buffer size to \a size.
+
+ \sa setGreenBufferSize(), setBlueBufferSize(), setAlphaBufferSize()
+*/
+void QPlatformWindowFormat::setRedBufferSize(int size)
+{
+ detach();
+ if (size < 0) {
+ qWarning("QPlatformWindowFormat::setRedBufferSize: Cannot set negative red buffer size %d", size);
+ return;
+ }
+ d->redSize = size;
+}
+
+/*!
+ \since 4.2
+
+ Returns the red buffer size.
+
+ \sa setRedBufferSize()
+*/
+int QPlatformWindowFormat::redBufferSize() const
+{
+ return d->redSize;
+}
+
+/*!
+ \since 4.2
+
+ Set the preferred green buffer size to \a size.
+
+ \sa setRedBufferSize(), setBlueBufferSize(), setAlphaBufferSize()
+*/
+void QPlatformWindowFormat::setGreenBufferSize(int size)
+{
+ detach();
+ if (size < 0) {
+ qWarning("QPlatformWindowFormat::setGreenBufferSize: Cannot set negative green buffer size %d", size);
+ return;
+ }
+ d->greenSize = size;
+}
+
+/*!
+ \since 4.2
+
+ Returns the green buffer size.
+
+ \sa setGreenBufferSize()
+*/
+int QPlatformWindowFormat::greenBufferSize() const
+{
+ return d->greenSize;
+}
+
+/*!
+ \since 4.2
+
+ Set the preferred blue buffer size to \a size.
+
+ \sa setRedBufferSize(), setGreenBufferSize(), setAlphaBufferSize()
+*/
+void QPlatformWindowFormat::setBlueBufferSize(int size)
+{
+ detach();
+ if (size < 0) {
+ qWarning("QPlatformWindowFormat::setBlueBufferSize: Cannot set negative blue buffer size %d", size);
+ return;
+ }
+ d->blueSize = size;
+}
+
+/*!
+ \since 4.2
+
+ Returns the blue buffer size.
+
+ \sa setBlueBufferSize()
+*/
+int QPlatformWindowFormat::blueBufferSize() const
+{
+ return d->blueSize;
+}
+
+/*!
+ Set the preferred alpha buffer size to \a size.
+ This function implicitly enables the alpha channel.
+
+ \sa setRedBufferSize(), setGreenBufferSize(), alphaBufferSize()
+*/
+void QPlatformWindowFormat::setAlphaBufferSize(int size)
+{
+ detach();
+ if (size < 0) {
+ qWarning("QPlatformWindowFormat::setAlphaBufferSize: Cannot set negative alpha buffer size %d", size);
+ return;
+ }
+ d->alphaSize = size;
+ setAlpha(size > 0);
+}
+
+/*!
+ Returns the alpha buffer size.
+
+ \sa alpha(), setAlpha(), setAlphaBufferSize()
+*/
+int QPlatformWindowFormat::alphaBufferSize() const
+{
+ return d->alphaSize;
+}
+
+/*!
+ Set the preferred accumulation buffer size, where \a size is the
+ bit depth for each RGBA component.
+
+ \sa accum(), setAccum(), accumBufferSize()
+*/
+void QPlatformWindowFormat::setAccumBufferSize(int size)
+{
+ detach();
+ if (size < 0) {
+ qWarning("QPlatformWindowFormat::setAccumBufferSize: Cannot set negative accumulate buffer size %d", size);
+ return;
+ }
+ d->accumSize = size;
+ setAccum(size > 0);
+}
+
+/*!
+ Returns the accumulation buffer size.
+
+ \sa setAccumBufferSize(), accum(), setAccum()
+*/
+int QPlatformWindowFormat::accumBufferSize() const
+{
+ return d->accumSize;
+}
+
+/*!
+ Set the preferred stencil buffer size to \a size.
+
+ \sa stencilBufferSize(), setStencil(), stencil()
+*/
+void QPlatformWindowFormat::setStencilBufferSize(int size)
+{
+ detach();
+ if (size < 0) {
+ qWarning("QPlatformWindowFormat::setStencilBufferSize: Cannot set negative stencil buffer size %d", size);
+ return;
+ }
+ d->stencilSize = size;
+ setStencil(size > 0);
+}
+
+/*!
+ Returns the stencil buffer size.
+
+ \sa stencil(), setStencil(), setStencilBufferSize()
+*/
+int QPlatformWindowFormat::stencilBufferSize() const
+{
+ return d->stencilSize;
+}
+
+/*!
+ Returns the default QPlatformWindowFormat for the application. All QGLWidget
+ objects that are created use this format unless another format is
+ specified, e.g. when they are constructed.
+
+ If no special default format has been set using
+ setDefaultFormat(), the default format is the same as that created
+ with QPlatformWindowFormat().
+
+ \sa setDefaultFormat()
+*/
+
+QPlatformWindowFormat QPlatformWindowFormat::defaultFormat()
+{
+ return *q_platformwindow_default_format();
+}
+
+/*!
+ Sets a new default QPlatformWindowFormat for the application to \a f. For
+ example, to set single buffering as the default instead of double
+ buffering, your main() might contain code like this:
+ \snippet doc/src/snippets/code/src_opengl_qgl.cpp 4
+
+ \sa defaultFormat()
+*/
+
+void QPlatformWindowFormat::setDefaultFormat(const QPlatformWindowFormat &f)
+{
+ *q_platformwindow_default_format() = f;
+}
+
+
+/*!
+ Returns the default QPlatformWindowFormat for overlay contexts.
+
+ The default overlay format is:
+ \list
+ \i \link setDoubleBuffer() Double buffer:\endlink Disabled.
+ \i \link setDepth() Depth buffer:\endlink Disabled.
+ \i \link setRgba() RGBA:\endlink Disabled (i.e., color index enabled).
+ \i \link setAlpha() Alpha channel:\endlink Disabled.
+ \i \link setAccum() Accumulator buffer:\endlink Disabled.
+ \i \link setStencil() Stencil buffer:\endlink Disabled.
+ \i \link setStereo() Stereo:\endlink Disabled.
+ \i \link setDirectRendering() Direct rendering:\endlink Enabled.
+ \i \link setOverlay() Overlay:\endlink Disabled.
+ \i \link setSampleBuffers() Multisample buffers:\endlink Disabled.
+ \i \link setPlane() Plane:\endlink 1 (i.e., first overlay plane).
+ \endlist
+
+ \sa setDefaultFormat()
+*/
+
+//QPlatformWindowFormat QPlatformWindowFormat::defaultOverlayFormat()
+//{
+// return *defaultOverlayFormatInstance();
+//}
+
+///*!
+// Sets a new default QPlatformWindowFormat for overlay contexts to \a f. This
+// format is used whenever a QGLWidget is created with a format that
+// hasOverlay() enabled.
+
+// For example, to get a double buffered overlay context (if
+// available), use code like this:
+
+// \snippet doc/src/snippets/code/src_opengl_qgl.cpp 5
+
+// As usual, you can find out after widget creation whether the
+// underlying OpenGL system was able to provide the requested
+// specification:
+
+// \snippet doc/src/snippets/code/src_opengl_qgl.cpp 6
+
+// \sa defaultOverlayFormat()
+//*/
+
+//void QPlatformWindowFormat::setDefaultOverlayFormat(const QPlatformWindowFormat &f)
+//{
+// QPlatformWindowFormat *defaultFormat = defaultOverlayFormatInstance();
+// *defaultFormat = f;
+// // Make sure the user doesn't request that the overlays themselves
+// // have overlays, since it is unlikely that the system supports
+// // infinitely many planes...
+// defaultFormat->setOverlay(false);
+//}
+
+
+/*!
+ Returns true if all the options of the two QPlatformWindowFormat objects
+ \a a and \a b are equal; otherwise returns false.
+
+ \relates QPlatformWindowFormat
+*/
+
+bool operator==(const QPlatformWindowFormat& a, const QPlatformWindowFormat& b)
+{
+ return (a.d == b.d) || ((int) a.d->opts == (int) b.d->opts
+ && a.d->alphaSize == b.d->alphaSize
+ && a.d->accumSize == b.d->accumSize
+ && a.d->stencilSize == b.d->stencilSize
+ && a.d->depthSize == b.d->depthSize
+ && a.d->redSize == b.d->redSize
+ && a.d->greenSize == b.d->greenSize
+ && a.d->blueSize == b.d->blueSize
+ && a.d->numSamples == b.d->numSamples
+ && a.d->swapInterval == b.d->swapInterval
+ && a.d->windowApi == b.d->windowApi);
+}
+
+
+/*!
+ Returns false if all the options of the two QPlatformWindowFormat objects
+ \a a and \a b are equal; otherwise returns true.
+
+ \relates QPlatformWindowFormat
+*/
+
+bool operator!=(const QPlatformWindowFormat& a, const QPlatformWindowFormat& b)
+{
+ return !(a == b);
+}
+
+#ifndef QT_NO_DEBUG_STREAM
+QDebug operator<<(QDebug dbg, const QPlatformWindowFormat &f)
+{
+ const QPlatformWindowFormatPrivate * const d = f.d;
+
+ dbg.nospace() << "QGLFormat("
+ << "options " << d->opts
+ << ", depthBufferSize " << d->depthSize
+ << ", accumBufferSize " << d->accumSize
+ << ", stencilBufferSize " << d->stencilSize
+ << ", redBufferSize " << d->redSize
+ << ", greenBufferSize " << d->greenSize
+ << ", blueBufferSize " << d->blueSize
+ << ", alphaBufferSize " << d->alphaSize
+ << ", samples " << d->numSamples
+ << ", swapInterval " << d->swapInterval
+ << ')';
+
+ return dbg.space();
+}
+#endif
diff --git a/src/gui/kernel/qplatformwindowformat_qpa.h b/src/gui/kernel/qplatformwindowformat_qpa.h
new file mode 100644
index 0000000..63df76a
--- /dev/null
+++ b/src/gui/kernel/qplatformwindowformat_qpa.h
@@ -0,0 +1,241 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+#ifndef QPLATFORMWINDOWFORMAT_QPA_H
+#define QPLATFORMWINDOWFORMAT_QPA_H
+
+#include <QtGui/QPlatformWindow>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Gui)
+
+class QPlatformWindowFormatPrivate;
+
+class Q_GUI_EXPORT QPlatformWindowFormat
+{
+public:
+ enum FormatOption {
+ DoubleBuffer = 0x0001,
+ DepthBuffer = 0x0002,
+ Rgba = 0x0004,
+ AlphaChannel = 0x0008,
+ AccumBuffer = 0x0010,
+ StencilBuffer = 0x0020,
+ StereoBuffers = 0x0040,
+ DirectRendering = 0x0080,
+ HasOverlay = 0x0100,
+ SampleBuffers = 0x0200,
+ DeprecatedFunctions = 0x0400,
+ UseDefaultSharedContext = 0x0800,
+ SingleBuffer = DoubleBuffer << 16,
+ NoDepthBuffer = DepthBuffer << 16,
+ ColorIndex = Rgba << 16,
+ NoAlphaChannel = AlphaChannel << 16,
+ NoAccumBuffer = AccumBuffer << 16,
+ NoStencilBuffer = StencilBuffer << 16,
+ NoStereoBuffers = StereoBuffers << 16,
+ IndirectRendering = DirectRendering << 16,
+ NoOverlay = HasOverlay << 16,
+ NoSampleBuffers = SampleBuffers << 16,
+ NoDeprecatedFunctions = DeprecatedFunctions << 16,
+ NoDefaultSharedContext = UseDefaultSharedContext << 16
+
+ };
+ Q_DECLARE_FLAGS(FormatOptions, FormatOption)
+
+ enum WindowApi {
+ Raster,
+ OpenGL,
+ OpenVG
+ };
+
+ QPlatformWindowFormat();
+ QPlatformWindowFormat(FormatOptions options);
+ QPlatformWindowFormat(const QPlatformWindowFormat &other);
+ QPlatformWindowFormat &operator=(const QPlatformWindowFormat &other);
+ ~QPlatformWindowFormat();
+
+ void setDepthBufferSize(int size);
+ int depthBufferSize() const;
+
+ void setAccumBufferSize(int size);
+ int accumBufferSize() const;
+
+ void setRedBufferSize(int size);
+ int redBufferSize() const;
+
+ void setGreenBufferSize(int size);
+ int greenBufferSize() const;
+
+ void setBlueBufferSize(int size);
+ int blueBufferSize() const;
+
+ void setAlphaBufferSize(int size);
+ int alphaBufferSize() const;
+
+ void setStencilBufferSize(int size);
+ int stencilBufferSize() const;
+
+ void setSampleBuffers(bool enable);
+ bool sampleBuffers() const;
+
+ void setSamples(int numSamples);
+ int samples() const;
+
+ void setSwapInterval(int interval);
+ int swapInterval() const;
+
+ void setWindowApi(QPlatformWindowFormat::WindowApi api);
+ WindowApi windowApi() const;
+
+ void setSharedContext(QPlatformGLContext *context);
+ QPlatformGLContext *sharedGLContext() const;
+
+ bool doubleBuffer() const;
+ void setDoubleBuffer(bool enable);
+ bool depth() const;
+ void setDepth(bool enable);
+ bool rgba() const;
+ void setRgba(bool enable);
+ bool alpha() const;
+ void setAlpha(bool enable);
+ bool accum() const;
+ void setAccum(bool enable);
+ bool stencil() const;
+ void setStencil(bool enable);
+ bool stereo() const;
+ void setStereo(bool enable);
+ bool directRendering() const;
+ void setDirectRendering(bool enable);
+ bool useDefaultSharedContext() const;
+ void setUseDefaultSharedContext(bool enable);
+// bool hasOverlay() const;
+// void setOverlay(bool enable);
+
+ void setOption(QPlatformWindowFormat::FormatOptions opt);
+ bool testOption(QPlatformWindowFormat::FormatOptions opt) const;
+
+ static QPlatformWindowFormat defaultFormat();
+ static void setDefaultFormat(const QPlatformWindowFormat& f);
+
+private:
+ QPlatformWindowFormatPrivate *d;
+
+ void detach();
+
+ friend Q_GUI_EXPORT bool operator==(const QPlatformWindowFormat&, const QPlatformWindowFormat&);
+ friend Q_GUI_EXPORT bool operator!=(const QPlatformWindowFormat&, const QPlatformWindowFormat&);
+#ifndef QT_NO_DEBUG_STREAM
+ friend Q_GUI_EXPORT QDebug operator<<(QDebug, const QPlatformWindowFormat &);
+#endif
+};
+
+Q_GUI_EXPORT bool operator==(const QPlatformWindowFormat&, const QPlatformWindowFormat&);
+Q_GUI_EXPORT bool operator!=(const QPlatformWindowFormat&, const QPlatformWindowFormat&);
+
+#ifndef QT_NO_DEBUG_STREAM
+Q_OPENGL_EXPORT QDebug operator<<(QDebug, const QPlatformWindowFormat &);
+#endif
+
+Q_DECLARE_OPERATORS_FOR_FLAGS(QPlatformWindowFormat::FormatOptions)
+
+inline bool QPlatformWindowFormat::doubleBuffer() const
+{
+ return testOption(QPlatformWindowFormat::DoubleBuffer);
+}
+
+inline bool QPlatformWindowFormat::depth() const
+{
+ return testOption(QPlatformWindowFormat::DepthBuffer);
+}
+
+inline bool QPlatformWindowFormat::rgba() const
+{
+ return testOption(QPlatformWindowFormat::Rgba);
+}
+
+inline bool QPlatformWindowFormat::alpha() const
+{
+ return testOption(QPlatformWindowFormat::AlphaChannel);
+}
+
+inline bool QPlatformWindowFormat::accum() const
+{
+ return testOption(QPlatformWindowFormat::AccumBuffer);
+}
+
+inline bool QPlatformWindowFormat::stencil() const
+{
+ return testOption(QPlatformWindowFormat::StencilBuffer);
+}
+
+inline bool QPlatformWindowFormat::stereo() const
+{
+ return testOption(QPlatformWindowFormat::StereoBuffers);
+}
+
+inline bool QPlatformWindowFormat::directRendering() const
+{
+ return testOption(QPlatformWindowFormat::DirectRendering);
+}
+
+//inline bool QPlatformWindowFormat::hasOverlay() const
+//{
+// return testOption(QPlatformWindowFormat::HasOverlay);
+//}
+
+inline bool QPlatformWindowFormat::sampleBuffers() const
+{
+ return testOption(QPlatformWindowFormat::SampleBuffers);
+}
+
+inline bool QPlatformWindowFormat::useDefaultSharedContext() const
+{
+ return testOption(QPlatformWindowFormat::UseDefaultSharedContext);
+}
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif //QPLATFORMWINDOWFORMAT_QPA_H
diff --git a/src/gui/kernel/qsizepolicy.qdoc b/src/gui/kernel/qsizepolicy.qdoc
index f6a350c..504821e 100644
--- a/src/gui/kernel/qsizepolicy.qdoc
+++ b/src/gui/kernel/qsizepolicy.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/src/gui/kernel/qsoftkeymanager_s60.cpp b/src/gui/kernel/qsoftkeymanager_s60.cpp
index fee1580..c81d75f 100644
--- a/src/gui/kernel/qsoftkeymanager_s60.cpp
+++ b/src/gui/kernel/qsoftkeymanager_s60.cpp
@@ -265,7 +265,7 @@ bool QSoftKeyManagerPrivateS60::setSoftkeyImage(CEikButtonGroupContainer *cba,
CFbsBitmap* nMask = softkeyAlpha.toSymbianCFbsBitmap();
CEikImage* myimage = new (ELeave) CEikImage;
- myimage->SetPicture( nBitmap, nMask ); // nBitmap and nMask ownership transfered
+ myimage->SetPicture( nBitmap, nMask ); // nBitmap and nMask ownership transferred
EikSoftkeyImage::SetImage(cba, *myimage, left); // Takes myimage ownership
cbaHasImage[position] = true;
diff --git a/src/gui/kernel/qstandardgestures.cpp b/src/gui/kernel/qstandardgestures.cpp
index 893ba2b..48b7ac1 100644
--- a/src/gui/kernel/qstandardgestures.cpp
+++ b/src/gui/kernel/qstandardgestures.cpp
@@ -194,29 +194,28 @@ QGestureRecognizer::Result QPinchGestureRecognizer::recognize(QGesture *state,
d->hotSpot = p1.screenPos();
d->isHotSpotSet = true;
+ QPointF centerPoint = (p1.screenPos() + p2.screenPos()) / 2.0;
if (d->isNewSequence) {
d->startPosition[0] = p1.screenPos();
d->startPosition[1] = p2.screenPos();
+ d->lastCenterPoint = centerPoint;
+ } else {
+ d->lastCenterPoint = d->centerPoint;
}
- QLineF line(p1.screenPos(), p2.screenPos());
- QLineF lastLine(p1.lastScreenPos(), p2.lastScreenPos());
- QLineF tmp(line);
- tmp.setLength(line.length() / 2.);
- QPointF centerPoint = tmp.p2();
-
- d->lastCenterPoint = d->centerPoint;
d->centerPoint = centerPoint;
- d->changeFlags |= QPinchGesture::CenterPointChanged;
- const qreal scaleFactor = line.length() / lastLine.length();
+ d->changeFlags |= QPinchGesture::CenterPointChanged;
if (d->isNewSequence) {
- d->lastScaleFactor = scaleFactor;
+ d->scaleFactor = 1.0;
+ d->lastScaleFactor = 1.0;
} else {
d->lastScaleFactor = d->scaleFactor;
+ QLineF line(p1.screenPos(), p2.screenPos());
+ QLineF lastLine(p1.lastScreenPos(), p2.lastScreenPos());
+ d->scaleFactor = line.length() / lastLine.length();
}
- d->scaleFactor = scaleFactor;
- d->totalScaleFactor = d->totalScaleFactor * scaleFactor;
+ d->totalScaleFactor = d->totalScaleFactor * d->scaleFactor;
d->changeFlags |= QPinchGesture::ScaleFactorChanged;
qreal angle = QLineF(p1.screenPos(), p2.screenPos()).angle();
@@ -227,7 +226,7 @@ QGestureRecognizer::Result QPinchGestureRecognizer::recognize(QGesture *state,
startAngle -= 360;
const qreal rotationAngle = startAngle - angle;
if (d->isNewSequence)
- d->lastRotationAngle = rotationAngle;
+ d->lastRotationAngle = 0.0;
else
d->lastRotationAngle = d->rotationAngle;
d->rotationAngle = rotationAngle;
diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm
index 2dd3791..48d21e9 100644
--- a/src/gui/kernel/qt_cocoa_helpers_mac.mm
+++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm
@@ -79,6 +79,7 @@
#include <qdesktopwidget.h>
#include <qevent.h>
#include <qpixmapcache.h>
+#include <qvarlengtharray.h>
#include <private/qevent_p.h>
#include <private/qt_cocoa_helpers_mac_p.h>
#include <private/qt_mac_p.h>
@@ -616,6 +617,27 @@ Qt::KeyboardModifiers qt_cocoaModifiers2QtModifiers(ulong modifierFlags)
return qtMods;
}
+NSString *qt_mac_removePrivateUnicode(NSString* string)
+{
+ int len = [string length];
+ if (len) {
+ QVarLengthArray <unichar, 10> characters(len);
+ bool changed = false;
+ for (int i = 0; i<len; i++) {
+ characters[i] = [string characterAtIndex:i];
+ // check if they belong to key codes in private unicode range
+ // currently we need to handle only the NSDeleteFunctionKey
+ if (characters[i] == NSDeleteFunctionKey) {
+ characters[i] = NSDeleteCharacter;
+ changed = true;
+ }
+ }
+ if (changed)
+ return [NSString stringWithCharacters:characters.data() length:len];
+ }
+ return string;
+}
+
Qt::KeyboardModifiers qt_cocoaDragOperation2QtModifiers(uint dragOperations)
{
Qt::KeyboardModifiers qtMods =Qt::NoModifier;
@@ -1365,11 +1387,11 @@ QString qt_mac_get_pasteboardString(OSPasteboardRef paste)
QMacCocoaAutoReleasePool pool;
NSPasteboard *pb = nil;
CFStringRef pbname;
- if (PasteboardCopyName (paste, &pbname)) {
- pb = [NSPasteboard generalPasteboard];
+ if (PasteboardCopyName(paste, &pbname) == noErr) {
+ pb = [NSPasteboard pasteboardWithName:const_cast<NSString *>(reinterpret_cast<const NSString *>(pbname))];
+ CFRelease(pbname);
} else {
- pb = [NSPasteboard pasteboardWithName:reinterpret_cast<const NSString *>(pbname)];
- CFRelease (pbname);
+ pb = [NSPasteboard generalPasteboard];
}
if (pb) {
NSString *text = [pb stringForType:NSStringPboardType];
@@ -1561,6 +1583,13 @@ void qt_cocoaStackChildWindowOnTopOfOtherChildren(QWidget *childWidget)
}
}
+void qt_mac_display(QWidget *widget)
+{
+ NSView *theNSView = qt_mac_nativeview_for(widget);
+ [theNSView display];
+ return;
+}
+
#endif // QT_MAC_USE_COCOA
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qt_cocoa_helpers_mac_p.h b/src/gui/kernel/qt_cocoa_helpers_mac_p.h
index 5c23392..04c2d06 100644
--- a/src/gui/kernel/qt_cocoa_helpers_mac_p.h
+++ b/src/gui/kernel/qt_cocoa_helpers_mac_p.h
@@ -227,6 +227,8 @@ void qt_cocoaPostMessage(id target, SEL selector, int argCount=0, id arg1=0, id
void qt_mac_post_retranslateAppMenu();
+void qt_mac_display(QWidget *widget);
+
QT_END_NAMESPACE
#endif // QT_COCOA_HELPERS_MAC_P_H
diff --git a/src/gui/kernel/qt_x11_p.h b/src/gui/kernel/qt_x11_p.h
index d62d9c3..56c8094 100644
--- a/src/gui/kernel/qt_x11_p.h
+++ b/src/gui/kernel/qt_x11_p.h
@@ -338,6 +338,7 @@ enum DesktopEnvironment {
DE_KDE,
DE_GNOME,
DE_CDE,
+ DE_MEEGO_COMPOSITOR,
DE_4DWM
};
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index cffad1d..cd1c9f0 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -68,6 +68,7 @@
# include "qt_cocoa_helpers_mac_p.h"
# include "qmainwindow.h"
# include "qtoolbar.h"
+# include <private/qmainwindowlayout_p.h>
#endif
#if defined(Q_WS_QWS)
# include "qwsdisplay_qws.h"
@@ -75,6 +76,9 @@
# include "qpaintengine.h" // for PorterDuff
# include "private/qwindowsurface_qws_p.h"
#endif
+#if defined(Q_WS_QPA)
+#include "qplatformwindow_qpa.h"
+#endif
#include "qpainter.h"
#include "qtooltip.h"
#include "qwhatsthis.h"
@@ -235,6 +239,17 @@ void QWidgetBackingStoreTracker::unregisterWidget(QWidget *w)
}
}
+/*!
+ \internal
+ Recursively remove widget and all of its descendents.
+ */
+void QWidgetBackingStoreTracker::unregisterWidgetSubtree(QWidget *widget)
+{
+ unregisterWidget(widget);
+ foreach (QObject *child, widget->children())
+ if (QWidget *childWidget = qobject_cast<QWidget *>(child))
+ unregisterWidgetSubtree(childWidget);
+}
QWidgetPrivate::QWidgetPrivate(int version)
: QObjectPrivate(version)
@@ -273,6 +288,9 @@ QWidgetPrivate::QWidgetPrivate(int version)
, isMoved(0)
, isGLWidget(0)
, usesDoubleBufferedGLContext(0)
+#ifndef QT_NO_IM
+ , inheritsInputMethodHints(0)
+#endif
#if defined(Q_WS_X11)
, picture(0)
#elif defined(Q_WS_WIN)
@@ -285,6 +303,8 @@ QWidgetPrivate::QWidgetPrivate(int version)
, hasAlienChildren(0)
, window_event(0)
, qd_hd(0)
+#elif defined (Q_WS_QPA)
+ , screenNumber(0)
#endif
{
if (!qApp) {
@@ -301,6 +321,9 @@ QWidgetPrivate::QWidgetPrivate(int version)
drawRectOriginalAdded = false;
originalDrawMethod = true;
changeMethods = false;
+ hasOwnContext = false;
+ isInUnifiedToolbar = false;
+ unifiedSurface = 0;
#endif // QT_MAC_USE_COCOA
#ifdef QWIDGET_EXTRA_DEBUG
static int count = 0;
@@ -322,15 +345,27 @@ QWidgetPrivate::~QWidgetPrivate()
#endif //QT_NO_GRAPHICSEFFECT
}
+class QDummyWindowSurface : public QWindowSurface
+{
+public:
+ QDummyWindowSurface(QWidget *window) : QWindowSurface(window) {}
+ QPaintDevice *paintDevice() { return window(); }
+ void flush(QWidget *, const QRegion &, const QPoint &) {}
+};
+
QWindowSurface *QWidgetPrivate::createDefaultWindowSurface()
{
Q_Q(QWidget);
QWindowSurface *surface;
- if (QApplicationPrivate::graphicsSystem())
- surface = QApplicationPrivate::graphicsSystem()->createWindowSurface(q);
- else
- surface = createDefaultWindowSurface_sys();
+ if (q->property("_q_DummyWindowSurface").toBool()) {
+ surface = new QDummyWindowSurface(q);
+ } else {
+ if (QApplicationPrivate::graphicsSystem())
+ surface = QApplicationPrivate::graphicsSystem()->createWindowSurface(q);
+ else
+ surface = createDefaultWindowSurface_sys();
+ }
return surface;
}
@@ -728,9 +763,9 @@ void QWidget::setAutoFillBackground(bool enabled)
\list
\i mouseMoveEvent() is called whenever the mouse moves while a mouse
button is held down. This can be useful during drag and drop
- operations. If you call setMouseTracking(true), you get mouse move
- events even when no buttons are held down. (See also the \l{Drag
- and Drop} guide.)
+ operations. If you call \l{setMouseTracking()}{setMouseTracking}(true),
+ you get mouse move events even when no buttons are held down.
+ (See also the \l{Drag and Drop} guide.)
\i keyReleaseEvent() is called whenever a key is released and while it
is held down (if the key is auto-repeating). In that case, the
widget will receive a pair of key release and key press event for
@@ -1240,6 +1275,12 @@ void QWidgetPrivate::init(QWidget *parentWidget, Qt::WindowFlags f)
// programmer specified desktop widget
xinfo = desktopWidget->d_func()->xinfo;
}
+#elif defined(Q_WS_QPA)
+ if (desktopWidget) {
+ int screen = desktopWidget->d_func()->screenNumber;
+ QPlatformIntegration *platform = QApplicationPrivate::platformIntegration();
+ platform->moveToScreen(q, screen);
+ }
#else
Q_UNUSED(desktopWidget);
#endif
@@ -1371,6 +1412,7 @@ void QWidget::create(WId window, bool initializeWindow, bool destroyOldWindow)
flags |= Qt::Window;
}
+#ifndef Q_WS_QPA
if (QWidget *parent = parentWidget()) {
#ifdef Q_WS_MAC
if (testAttribute(Qt::WA_NativeWindow) == false)
@@ -1391,6 +1433,7 @@ void QWidget::create(WId window, bool initializeWindow, bool destroyOldWindow)
return;
}
}
+#endif //Q_WS_QPA
#ifdef QT3_SUPPORT
if (flags & Qt::WStaticContents)
@@ -1549,13 +1592,13 @@ QWidget::~QWidget()
}
}
-#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS) || defined(Q_WS_MAC)
+#if defined(Q_WS_WIN) || defined(Q_WS_X11)|| defined(Q_WS_MAC)
else if (!internalWinId() && isVisible()) {
qApp->d_func()->sendSyntheticEnterLeave(this);
-#ifdef Q_WS_QWS
- } else if (isVisible()) {
+ }
+#elif defined(Q_WS_QWS) || defined(Q_WS_QPA)
+ else if (isVisible()) {
qApp->d_func()->sendSyntheticEnterLeave(this);
-#endif
}
#endif
@@ -1688,6 +1731,10 @@ void QWidgetPrivate::createTLExtra()
static int count = 0;
qDebug() << "tlextra" << ++count;
#endif
+#if defined(Q_WS_QPA)
+ x->platformWindow = 0;
+ x->platformWindowFormat = QPlatformWindowFormat::defaultFormat();
+#endif
}
}
@@ -2422,7 +2469,9 @@ WId QWidget::winId() const
qDebug() << "QWidget::winId: creating native window for" << this;
#endif
QWidget *that = const_cast<QWidget*>(this);
+#ifndef Q_WS_QPA
that->setAttribute(Qt::WA_NativeWindow);
+#endif
that->d_func()->createWinId();
return that->data->winid;
}
@@ -2439,6 +2488,7 @@ void QWidgetPrivate::createWinId(WId winid)
#endif
const bool forceNativeWindow = q->testAttribute(Qt::WA_NativeWindow);
if (!q->testAttribute(Qt::WA_WState_Created) || (forceNativeWindow && !q->internalWinId())) {
+#ifndef Q_WS_QPA
if (!q->isWindow()) {
QWidget *parent = q->parentWidget();
QWidgetPrivate *pd = parent->d_func();
@@ -2466,6 +2516,11 @@ void QWidgetPrivate::createWinId(WId winid)
} else {
q->create();
}
+#else
+ Q_UNUSED(winid);
+ q->create();
+#endif //Q_WS_QPA
+
}
}
@@ -2988,6 +3043,15 @@ bool QWidget::isFullScreen() const
*/
void QWidget::showFullScreen()
{
+#ifdef Q_WS_MAC
+ // If the unified toolbar is enabled, we have to disable it before going fullscreen.
+ QMainWindow *mainWindow = qobject_cast<QMainWindow*>(this);
+ if (mainWindow && mainWindow->unifiedTitleAndToolBarOnMac()) {
+ mainWindow->setUnifiedTitleAndToolBarOnMac(false);
+ QMainWindowLayout *mainLayout = qobject_cast<QMainWindowLayout*>(mainWindow->layout());
+ mainLayout->activateUnifiedToolbarAfterFullScreen = true;
+ }
+#endif // Q_WS_MAC
ensurePolished();
#ifdef QT3_SUPPORT
if (parent())
@@ -3020,6 +3084,18 @@ void QWidget::showMaximized()
setWindowState((windowState() & ~(Qt::WindowMinimized | Qt::WindowFullScreen))
| Qt::WindowMaximized);
+#ifdef Q_WS_MAC
+ // If the unified toolbar was enabled before going fullscreen, we have to enable it back.
+ QMainWindow *mainWindow = qobject_cast<QMainWindow*>(this);
+ if (mainWindow)
+ {
+ QMainWindowLayout *mainLayout = qobject_cast<QMainWindowLayout*>(mainWindow->layout());
+ if (mainLayout->activateUnifiedToolbarAfterFullScreen) {
+ mainWindow->setUnifiedTitleAndToolBarOnMac(true);
+ mainLayout->activateUnifiedToolbarAfterFullScreen = false;
+ }
+ }
+#endif // Q_WS_MAC
show();
}
@@ -3041,6 +3117,18 @@ void QWidget::showNormal()
setWindowState(windowState() & ~(Qt::WindowMinimized
| Qt::WindowMaximized
| Qt::WindowFullScreen));
+#ifdef Q_WS_MAC
+ // If the unified toolbar was enabled before going fullscreen, we have to enable it back.
+ QMainWindow *mainWindow = qobject_cast<QMainWindow*>(this);
+ if (mainWindow)
+ {
+ QMainWindowLayout *mainLayout = qobject_cast<QMainWindowLayout*>(mainWindow->layout());
+ if (mainLayout->activateUnifiedToolbarAfterFullScreen) {
+ mainWindow->setUnifiedTitleAndToolBarOnMac(true);
+ mainLayout->activateUnifiedToolbarAfterFullScreen = false;
+ }
+ }
+#endif // Q_WS_MAC
show();
}
@@ -5316,6 +5404,14 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
if (rgn.isEmpty())
return;
+#if defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA)
+ // We disable the rendering of QToolBar in the backingStore if
+ // it's supposed to be in the unified toolbar on Mac OS X.
+ if (backingStore && isInUnifiedToolbar)
+ return;
+#endif // Q_WS_MAC && QT_MAC_USE_COCOA
+
+
Q_Q(QWidget);
#ifndef QT_NO_GRAPHICSEFFECT
if (graphicsEffect && graphicsEffect->isEnabled()) {
@@ -5378,6 +5474,7 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
QPaintEngine *paintEngine = pdev->paintEngine();
if (paintEngine) {
setRedirected(pdev, -offset);
+
#ifdef Q_WS_MAC
// (Alien support) Special case for Mac when redirecting: If the paint device
// is of the Widget type we need to set WA_WState_InPaintEvent since painting
@@ -5420,7 +5517,7 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
//actually send the paint event
QPaintEvent e(toBePainted);
QCoreApplication::sendSpontaneousEvent(q, &e);
-#if !defined(Q_WS_MAC) && !defined(Q_WS_QWS)
+#if !defined(Q_WS_QWS) && !defined(Q_WS_QPA)
if (backingStore && !onScreen && !asRoot && (q->internalWinId() || !q->nativeParentWidget()->isWindow()))
backingStore->markDirtyOnScreen(toBePainted, q, offset);
#endif
@@ -6956,7 +7053,11 @@ bool QWidget::restoreGeometry(const QByteArray &geometry)
if (maximized || fullScreen) {
// set geomerty before setting the window state to make
// sure the window is maximized to the right screen.
+ // Skip on windows: the window is restored into a broken
+ // half-maximized state.
+#ifndef Q_WS_WIN
setGeometry(restoredNormalGeometry);
+#endif
Qt::WindowStates ws = windowState();
if (maximized)
ws |= Qt::WindowMaximized;
@@ -7458,7 +7559,7 @@ void QWidgetPrivate::hide_helper()
// next bit tries to move the focus if the focus widget is now
// hidden.
if (wasVisible) {
-#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS) || defined(Q_WS_MAC)
+#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS) || defined(Q_WS_MAC) || defined(Q_WS_QPA)
qApp->d_func()->sendSyntheticEnterLeave(q);
#endif
@@ -7590,7 +7691,7 @@ void QWidget::setVisible(bool visible)
d->show_helper();
-#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS) || defined(Q_WS_MAC)
+#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS) || defined(Q_WS_MAC) || defined(Q_WS_QPA)
qApp->d_func()->sendSyntheticEnterLeave(this);
#endif
}
@@ -7722,7 +7823,7 @@ void QWidgetPrivate::hideChildren(bool spontaneous)
widget->d_func()->hide_sys();
}
}
-#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS) || defined(Q_WS_MAC)
+#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS) || defined(Q_WS_MAC) || defined(Q_WS_QPA)
qApp->d_func()->sendSyntheticEnterLeave(widget);
#endif
#ifndef QT_NO_ACCESSIBILITY
@@ -8653,8 +8754,8 @@ bool QWidget::event(QEvent *event)
/*!
This event handler can be reimplemented to handle state changes.
- The state being changed in this event can be retrieved through event \a
- event.
+ The state being changed in this event can be retrieved through the \a event
+ supplied.
Change events include: QEvent::ToolBarChange,
QEvent::ActivationChange, QEvent::EnabledChange, QEvent::FontChange,
@@ -9217,9 +9318,13 @@ QVariant QWidget::inputMethodQuery(Qt::InputMethodQuery query) const
*/
Qt::InputMethodHints QWidget::inputMethodHints() const
{
- Q_D(const QWidget);
#ifndef QT_NO_IM
- return d->imHints;
+ const QWidgetPrivate *priv = d_func();
+ while (priv->inheritsInputMethodHints) {
+ priv = priv->q_func()->parentWidget()->d_func();
+ Q_ASSERT(priv);
+ }
+ return priv->imHints;
#else //QT_NO_IM
return 0;
#endif //QT_NO_IM
@@ -9996,7 +10101,16 @@ void QWidget::setParent(QWidget *parent, Qt::WindowFlags f)
if (newParent && isAncestorOf(focusWidget()))
focusWidget()->clearFocus();
+ QTLWExtra *oldTopExtra = window()->d_func()->maybeTopData();
+ QWidgetBackingStoreTracker *oldBsTracker = oldTopExtra ? &oldTopExtra->backingStore : 0;
+
d->setParent_sys(parent, f);
+
+ QTLWExtra *topExtra = window()->d_func()->maybeTopData();
+ QWidgetBackingStoreTracker *bsTracker = topExtra ? &topExtra->backingStore : 0;
+ if (oldBsTracker && oldBsTracker != bsTracker)
+ oldBsTracker->unregisterWidgetSubtree(this);
+
if (desktopWidget)
parent = 0;
@@ -10487,7 +10601,6 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
Q_ASSERT_X(sizeof(d->high_attributes)*8 >= (Qt::WA_AttributeCount - sizeof(uint)*8),
"QWidget::setAttribute(WidgetAttribute, bool)",
"QWidgetPrivate::high_attributes[] too small to contain all attributes in WidgetAttribute");
-
#ifdef Q_WS_WIN
// ### Don't use PaintOnScreen+paintEngine() to do native painting in 5.0
if (attribute == Qt::WA_PaintOnScreen && on && !inherits("QGLWidget")) {
diff --git a/src/gui/kernel/qwidget.h b/src/gui/kernel/qwidget.h
index 980f40f..eea7cca 100644
--- a/src/gui/kernel/qwidget.h
+++ b/src/gui/kernel/qwidget.h
@@ -56,6 +56,10 @@
#include <QtGui/qcursor.h>
#include <QtGui/qkeysequence.h>
+#ifdef Q_WS_QPA //should this go somewhere else?
+#include <QtGui/qplatformwindowformat_qpa.h>
+#endif
+
#ifdef QT_INCLUDE_COMPAT
#include <QtGui/qevent.h>
#endif
@@ -94,9 +98,12 @@ class QHideEvent;
class QInputContext;
class QIcon;
class QWindowSurface;
+class QPlatformWindow;
class QLocale;
class QGraphicsProxyWidget;
class QGraphicsEffect;
+class QRasterWindowSurface;
+class QUnifiedToolbarSurface;
#if defined(Q_WS_X11)
class QX11Info;
#endif
@@ -627,6 +634,16 @@ public:
void setWindowSurface(QWindowSurface *surface);
QWindowSurface *windowSurface() const;
+#if defined(Q_WS_QPA)
+ void setPlatformWindow(QPlatformWindow *window);
+ QPlatformWindow *platformWindow() const;
+
+ void setPlatformWindowFormat(const QPlatformWindowFormat &format);
+ QPlatformWindowFormat platformWindowFormat() const;
+
+ friend class QDesktopScreenWidget;
+#endif
+
Q_SIGNALS:
void customContextMenuRequested(const QPoint &pos);
@@ -758,6 +775,8 @@ private:
friend OSViewRef qt_mac_nativeview_for(const QWidget *w);
friend void qt_event_request_window_change(QWidget *widget);
friend bool qt_mac_sendMacEventToWidget(QWidget *widget, EventRef ref);
+ friend class QRasterWindowSurface;
+ friend class QUnifiedToolbarSurface;
#endif
#ifdef Q_WS_QWS
friend class QWSBackingStore;
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index 5e41efa..fc94616 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -2794,19 +2794,38 @@ void QWidgetPrivate::transferChildren()
#ifdef QT_MAC_USE_COCOA
void QWidgetPrivate::setSubWindowStacking(bool set)
{
+ // This will set/remove a visual relationship between parent and child on screen.
+ // The reason for doing this is to ensure that a child always stacks infront of
+ // its parent. Unfortunatly is turns out that [NSWindow addChildWindow] has
+ // several unwanted side-effects, one of them being the moving of a child when
+ // moving the parent, which we choose to accept. A way tougher side-effect is
+ // that Cocoa will hide the parent if you hide the child. And in the case of
+ // a tool window, since it will normally hide when you deactivate the
+ // application, Cocoa will hide the parent upon deactivate as well. The result often
+ // being no more visible windows on screen. So, to make a long story short, we only
+ // allow parent-child relationships between windows that both are either a plain window
+ // or a dialog.
+
Q_Q(QWidget);
- if (!q->isWindow() || !q->testAttribute(Qt::WA_WState_Created))
+ if (!q->isWindow())
+ return;
+ NSWindow *qwin = [qt_mac_nativeview_for(q) window];
+ if (!qwin)
+ return;
+ Qt::WindowType qtype = q->windowType();
+ if (set && !(qtype == Qt::Window || qtype == Qt::Dialog))
+ return;
+ if (set && ![qwin isVisible])
return;
if (QWidget *parent = q->parentWidget()) {
- if (parent->testAttribute(Qt::WA_WState_Created)) {
+ if (NSWindow *pwin = [qt_mac_nativeview_for(parent) window]) {
if (set) {
- if (parent->isVisible()) {
- NSWindow *childwin = qt_mac_window_for(q);
- [qt_mac_window_for(parent) addChildWindow:childwin ordered:NSWindowAbove];
- }
+ Qt::WindowType ptype = parent->window()->windowType();
+ if ([pwin isVisible] && (ptype == Qt::Window || ptype == Qt::Dialog) && ![qwin parentWindow])
+ [pwin addChildWindow:qwin ordered:NSWindowAbove];
} else {
- [qt_mac_window_for(parent) removeChildWindow:qt_mac_window_for(q)];
+ [pwin removeChildWindow:qwin];
}
}
}
@@ -2814,12 +2833,15 @@ void QWidgetPrivate::setSubWindowStacking(bool set)
QList<QWidget *> widgets = q->findChildren<QWidget *>();
for (int i=0; i<widgets.size(); ++i) {
QWidget *child = widgets.at(i);
- if (child->isWindow() && child->testAttribute(Qt::WA_WState_Created) && child->isVisibleTo(q)) {
- if (set) {
- NSWindow *childwin = qt_mac_window_for(child);
- [qt_mac_window_for(q) addChildWindow:childwin ordered:NSWindowAbove];
- } else {
- [qt_mac_window_for(q) removeChildWindow:qt_mac_window_for(child)];
+ if (child && child->isWindow()) {
+ if (NSWindow *cwin = [qt_mac_nativeview_for(child) window]) {
+ if (set) {
+ Qt::WindowType ctype = child->window()->windowType();
+ if ([cwin isVisible] && (ctype == Qt::Window || ctype == Qt::Dialog) && ![cwin parentWindow])
+ [qwin addChildWindow:cwin ordered:NSWindowAbove];
+ } else {
+ [qwin removeChildWindow:qt_mac_window_for(child)];
+ }
}
}
}
@@ -3176,7 +3198,7 @@ void QWidgetPrivate::setWindowIcon_sys(bool forceReset)
if (iconButton == nil) {
QCFString string(q->windowTitle());
const NSString *tmpString = reinterpret_cast<const NSString *>((CFStringRef)string);
- [qt_mac_window_for(q) setRepresentedURL:[NSURL fileURLWithPath:tmpString]];
+ [qt_mac_window_for(q) setRepresentedURL:[NSURL fileURLWithPath:const_cast<NSString *>(tmpString)]];
iconButton = [qt_mac_window_for(q) standardWindowButton:NSWindowDocumentIconButton];
}
if (icon.isNull()) {
@@ -3442,7 +3464,6 @@ void QWidgetPrivate::show_sys()
#else
// sync the opacity value back (in case of a fade).
[window setAlphaValue:q->windowOpacity()];
- setSubWindowStacking(true);
QWidget *top = 0;
if (QApplicationPrivate::tryModalHelper(q, &top)) {
@@ -3461,6 +3482,7 @@ void QWidgetPrivate::show_sys()
[modalWin orderFront:window];
}
}
+ setSubWindowStacking(true);
#endif
if (q->windowType() == Qt::Popup) {
if (q->focusWidget())
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
index c943bd8..4b35238 100644
--- a/src/gui/kernel/qwidget_p.h
+++ b/src/gui/kernel/qwidget_p.h
@@ -102,6 +102,9 @@ class QWSManager;
#if defined(Q_WS_MAC)
class QCoreGraphicsPaintEnginePrivate;
#endif
+#if defined(Q_WS_QPA)
+class QPlatformWindow;
+#endif
class QPaintEngine;
class QPixmap;
class QWidgetBackingStore;
@@ -122,6 +125,7 @@ public:
void registerWidget(QWidget *w);
void unregisterWidget(QWidget *w);
+ void unregisterWidgetSubtree(QWidget *w);
inline QWidgetBackingStore* data()
{
@@ -225,6 +229,9 @@ struct QTLWExtra {
#endif
#elif defined(Q_OS_SYMBIAN)
uint inExpose : 1; // Prevents drawing recursion
+#elif defined(Q_WS_QPA)
+ QPlatformWindow *platformWindow;
+ QPlatformWindowFormat platformWindowFormat;
#endif
};
@@ -749,6 +756,9 @@ public:
uint isMoved : 1;
uint isGLWidget : 1;
uint usesDoubleBufferedGLContext : 1;
+#ifndef QT_NO_IM
+ uint inheritsInputMethodHints : 1;
+#endif
// *************************** Platform specific ************************************
#if defined(Q_WS_X11) // <----------------------------------------------------------- X11
@@ -840,6 +850,13 @@ public:
bool originalDrawMethod;
// Do we need to change the methods?
bool changeMethods;
+ bool hasOwnContext;
+ CGContextRef cgContext;
+ QRegion ut_rg;
+ QPoint ut_pt;
+ bool isInUnifiedToolbar;
+ QWindowSurface *unifiedSurface;
+ QPoint toolbar_offset;
#endif
void determineWindowClass();
void transferChildren();
@@ -867,6 +884,14 @@ public:
void updateCursor() const;
#endif
QScreen* getScreen() const;
+#elif defined(Q_WS_QPA)
+ void setMaxWindowState_helper();
+ void setFullScreenSize_helper();
+
+ int screenNumber; // screen the widget should be displayed on
+#ifndef QT_NO_CURSOR
+ void updateCursor() const;
+#endif
#elif defined(Q_OS_SYMBIAN) // <--------------------------------------------------------- SYMBIAN
static QWidget *mouseGrabber;
static QWidget *keyboardGrabber;
diff --git a/src/gui/kernel/qwidget_qpa.cpp b/src/gui/kernel/qwidget_qpa.cpp
new file mode 100644
index 0000000..ac8b37d
--- /dev/null
+++ b/src/gui/kernel/qwidget_qpa.cpp
@@ -0,0 +1,895 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the 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 "QtGui/qwidget.h"
+#include "QtGui/qevent.h"
+#include "QtGui/qapplication.h"
+#include "QtGui/private/qbackingstore_p.h"
+#include "QtGui/private/qwidget_p.h"
+#include "QtGui/private/qgraphicssystem_p.h"
+#include "QtGui/private/qapplication_p.h"
+#include "QtGui/qdesktopwidget.h"
+#include "QtGui/qplatformwindow_qpa.h"
+
+#include <QtGui/QPlatformCursor>
+
+QT_BEGIN_NAMESPACE
+static QPlatformScreen *qt_screenForWidget(const QWidget *w);
+
+void q_createNativeChildrenAndSetParent(QPlatformWindow *parentWindow, const QWidget *parentWidget)
+{
+ QObjectList children = parentWidget->children();
+ for (int i = 0; i < children.size(); i++) {
+ if (children.at(i)->isWidgetType()) {
+ const QWidget *childWidget = qobject_cast<const QWidget *>(children.at(i));
+ if (childWidget) { // should not be necessary
+ if (childWidget->testAttribute(Qt::WA_NativeWindow)) {
+ if (!childWidget->platformWindow())
+ childWidget->winId();
+ }
+ if (childWidget->platformWindow()) {
+ childWidget->platformWindow()->setParent(parentWindow);
+ } else {
+ q_createNativeChildrenAndSetParent(parentWindow,childWidget);
+ }
+ }
+ }
+ }
+
+}
+
+void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyOldWindow)
+{
+ Q_Q(QWidget);
+
+ Q_UNUSED(window);
+ Q_UNUSED(initializeWindow);
+ Q_UNUSED(destroyOldWindow);
+
+ Qt::WindowFlags flags = data.window_flags;
+
+ if ((!q->testAttribute(Qt::WA_NativeWindow) && !q->isWindow()) || q->windowType() == Qt::Desktop )
+ return; // we only care about real toplevels
+
+ QWindowSurface *surface = q->windowSurface();
+ QPlatformWindow *platformWindow = q->platformWindow();
+
+ if (!platformWindow) {
+ platformWindow = QApplicationPrivate::platformIntegration()->createPlatformWindow(q);
+ }
+ Q_ASSERT(platformWindow);
+
+ if (!surface) {
+ surface = QApplicationPrivate::platformIntegration()->createWindowSurface(q,platformWindow->winId());
+ }
+
+ data.window_flags = q->platformWindow()->setWindowFlags(data.window_flags);
+
+ setWinId(q->platformWindow()->winId());
+
+ //first check children. and create them if necessary
+ q_createNativeChildrenAndSetParent(q->platformWindow(),q);
+
+ //if we we have a parent, then set correct parent;
+ if (!q->isWindow()) {
+ if (QWidget *nativeParent = q->nativeParentWidget()) {
+ if (nativeParent->platformWindow()) {
+ platformWindow->setParent(nativeParent->platformWindow());
+ }
+ }
+ }
+
+ QApplicationPrivate::platformIntegration()->moveToScreen(q, screenNumber);
+// qDebug() << "create_sys" << q << q->internalWinId();
+}
+
+void QWidget::destroy(bool destroyWindow, bool destroySubWindows)
+{
+ Q_D(QWidget);
+
+ if ((windowType() == Qt::Popup))
+ qApp->d_func()->closePopup(this);
+
+ //### we don't have proper focus event handling yet
+ if (this == QApplicationPrivate::active_window)
+ QApplication::setActiveWindow(0);
+
+ if (windowType() != Qt::Desktop) {
+ if (destroySubWindows) {
+ QObjectList childList(children());
+ for (int i = 0; i < childList.size(); i++) {
+ QWidget *widget = qobject_cast<QWidget *>(childList.at(i));
+ if (widget && widget->testAttribute(Qt::WA_NativeWindow)) {
+ if (widget->platformWindow()) {
+ widget->destroy();
+ }
+ }
+ }
+ }
+ if (destroyWindow) {
+ d->deleteTLSysExtra();
+ } else {
+ if (parentWidget() && parentWidget()->testAttribute(Qt::WA_WState_Created)) {
+ d->hide_sys();
+ }
+ }
+ }
+}
+
+void QWidgetPrivate::setParent_sys(QWidget *newparent, Qt::WindowFlags f)
+{
+ Q_Q(QWidget);
+
+ // QWidget *oldParent = q->parentWidget();
+ Qt::WindowFlags oldFlags = data.window_flags;
+
+ int targetScreen = -1;
+ // Handle a request to move the widget to a particular screen
+ if (newparent && newparent->windowType() == Qt::Desktop) {
+ // make sure the widget is created on the same screen as the
+ // programmer specified desktop widget
+
+ // get the desktop's screen number
+ targetScreen = newparent->d_func()->screenNumber;
+ newparent = 0;
+ }
+
+ if (parent != newparent) {
+ QObjectPrivate::setParent_helper(newparent); //### why does this have to be done in the _sys function???
+ if (q->platformWindow() && newparent) {
+ QWidget * parentWithWindow = newparent->platformWindow()? newparent : newparent->nativeParentWidget();
+ if (parentWithWindow && parentWithWindow->platformWindow()) {
+ q->platformWindow()->setParent(parentWithWindow->platformWindow());
+ }
+ }
+
+ }
+
+ if (!newparent) {
+ f |= Qt::Window;
+ if (targetScreen == -1) {
+ if (parent)
+ targetScreen = qobject_cast<QWidget *>(parent)->d_func()->screenNumber;
+ }
+ }
+
+ bool explicitlyHidden = q->testAttribute(Qt::WA_WState_Hidden) && q->testAttribute(Qt::WA_WState_ExplicitShowHide);
+
+ // Reparenting toplevel to child
+ if (!(f&Qt::Window) && (oldFlags&Qt::Window) && !q->testAttribute(Qt::WA_NativeWindow)) {
+ //qDebug() << "setParent_sys() change from toplevel";
+ q->destroy();
+ }
+
+ data.window_flags = f;
+ q->setAttribute(Qt::WA_WState_Created, false);
+ q->setAttribute(Qt::WA_WState_Visible, false);
+ q->setAttribute(Qt::WA_WState_Hidden, false);
+
+ if (f & Qt::Window) {
+ //qDebug() << "setParent_sys" << q << newparent << hex << f;
+ if (QPlatformWindow *window = q->platformWindow())
+ data.window_flags = window->setWindowFlags(data.window_flags);
+ }
+
+ // Reparenting child to toplevel
+ if ((f&Qt::Window) && !(oldFlags&Qt::Window)) {
+ //qDebug() << "setParent_sys() change to toplevel";
+ q->create(); //### too early: this ought to happen at show() time
+ }
+
+
+ if (q->isWindow() || (!newparent || newparent->isVisible()) || explicitlyHidden)
+ q->setAttribute(Qt::WA_WState_Hidden);
+ q->setAttribute(Qt::WA_WState_ExplicitShowHide, explicitlyHidden);
+
+ // move the window to the selected screen
+ if (!newparent && targetScreen != -1) {
+ screenNumber = targetScreen;
+ // only if it is already created
+ if (q->testAttribute(Qt::WA_WState_Created)) {
+ QPlatformIntegration *platform = QApplicationPrivate::platformIntegration();
+ platform->moveToScreen(q, targetScreen);
+ }
+ }
+}
+
+QPoint QWidget::mapToGlobal(const QPoint &pos) const
+{
+ int x=pos.x(), y=pos.y();
+ const QWidget* w = this;
+ while (w) {
+ x += w->data->crect.x();
+ y += w->data->crect.y();
+ w = w->isWindow() ? 0 : w->parentWidget();
+ }
+ return QPoint(x, y);
+}
+
+QPoint QWidget::mapFromGlobal(const QPoint &pos) const
+{
+ int x=pos.x(), y=pos.y();
+ const QWidget* w = this;
+ while (w) {
+ x -= w->data->crect.x();
+ y -= w->data->crect.y();
+ w = w->isWindow() ? 0 : w->parentWidget();
+ }
+ return QPoint(x, y);
+}
+
+void QWidgetPrivate::updateSystemBackground() {}
+
+#ifndef QT_NO_CURSOR
+void QWidgetPrivate::setCursor_sys(const QCursor &cursor)
+{
+ Q_UNUSED(cursor);
+ Q_Q(QWidget);
+ if (q->isVisible())
+ qt_qpa_set_cursor(q, false);
+}
+
+void QWidgetPrivate::unsetCursor_sys()
+{
+ Q_Q(QWidget);
+ if (q->isVisible())
+ qt_qpa_set_cursor(q, false);
+}
+
+void QWidgetPrivate::updateCursor() const
+{
+ // XXX
+}
+
+#endif //QT_NO_CURSOR
+
+void QWidgetPrivate::setWindowTitle_sys(const QString &caption)
+{
+ Q_Q(QWidget);
+ if (!q->isWindow())
+ return;
+
+ if (QPlatformWindow *window = q->platformWindow())
+ window->setWindowTitle(caption);
+
+}
+
+void QWidgetPrivate::setWindowIcon_sys(bool /*forceReset*/)
+{
+}
+
+void QWidgetPrivate::setWindowIconText_sys(const QString &iconText)
+{
+ Q_UNUSED(iconText);
+}
+
+QWidget *qt_pressGrab = 0;
+QWidget *qt_mouseGrb = 0;
+static QWidget *keyboardGrb = 0;
+
+void QWidget::grabMouse()
+{
+ if (qt_mouseGrb)
+ qt_mouseGrb->releaseMouse();
+
+ // XXX
+ //qwsDisplay()->grabMouse(this,true);
+
+ qt_mouseGrb = this;
+ qt_pressGrab = 0;
+}
+
+#ifndef QT_NO_CURSOR
+void QWidget::grabMouse(const QCursor &cursor)
+{
+ Q_UNUSED(cursor);
+
+ if (qt_mouseGrb)
+ qt_mouseGrb->releaseMouse();
+
+ // XXX
+ //qwsDisplay()->grabMouse(this,true);
+ //qwsDisplay()->selectCursor(this, cursor.handle());
+ qt_mouseGrb = this;
+ qt_pressGrab = 0;
+}
+#endif
+
+void QWidget::releaseMouse()
+{
+ if (qt_mouseGrb == this) {
+ // XXX
+ //qwsDisplay()->grabMouse(this,false);
+ qt_mouseGrb = 0;
+ }
+}
+
+void QWidget::grabKeyboard()
+{
+ if (keyboardGrb)
+ keyboardGrb->releaseKeyboard();
+ // XXX
+ //qwsDisplay()->grabKeyboard(this, true);
+ keyboardGrb = this;
+}
+
+void QWidget::releaseKeyboard()
+{
+ if (keyboardGrb == this) {
+ // XXX
+ //qwsDisplay()->grabKeyboard(this, false);
+ keyboardGrb = 0;
+ }
+}
+
+QWidget *QWidget::mouseGrabber()
+{
+ if (qt_mouseGrb)
+ return qt_mouseGrb;
+ return qt_pressGrab;
+}
+
+QWidget *QWidget::keyboardGrabber()
+{
+ return keyboardGrb;
+}
+
+void QWidget::activateWindow()
+{
+ // XXX
+// qDebug() << "QWidget::activateWindow" << this;
+ QApplication::setActiveWindow(this); //#####
+}
+
+void QWidgetPrivate::show_sys()
+{
+ Q_Q(QWidget);
+ q->setAttribute(Qt::WA_Mapped);
+ if (q->testAttribute(Qt::WA_DontShowOnScreen)) {
+ invalidateBuffer(q->rect());
+ return;
+ }
+
+ QApplication::postEvent(q, new QUpdateLaterEvent(q->rect()));
+
+ QPlatformWindow *window = q->platformWindow();
+ if (window) {
+ const QRect geomRect = q->geometry();
+ const QRect windowRect = window->geometry();
+ if (windowRect != geomRect) {
+ window->setGeometry(geomRect);
+ }
+ if (q->isWindow()) {
+ if (QWindowSurface *surface = q->windowSurface()) {
+ if (windowRect.size() != geomRect.size()) {
+ surface->resize(geomRect.size());
+ }
+ }
+
+ if (window)
+ window->setVisible(true);
+
+ if (q->windowType() != Qt::Popup && q->windowType() != Qt::ToolTip && !(q->windowFlags() & Qt::X11BypassWindowManagerHint))
+ q->activateWindow(); //###
+ }
+ }
+}
+
+
+void QWidgetPrivate::hide_sys()
+{
+ Q_Q(QWidget);
+ q->setAttribute(Qt::WA_Mapped, false);
+ if (!q->isWindow()) {
+ QWidget *p = q->parentWidget();
+ if (p &&p->isVisible()) {
+ invalidateBuffer(q->rect());
+ }
+ return;
+ }
+ if (QPlatformWindow *window = q->platformWindow()) {
+ window->setVisible(false);
+ }
+
+ //### we don't yet have proper focus event handling
+ if (q == QApplicationPrivate::active_window)
+ QApplication::setActiveWindow(0);
+
+}
+
+void QWidgetPrivate::setMaxWindowState_helper()
+{
+ setFullScreenSize_helper(); //### decoration size
+}
+
+void QWidgetPrivate::setFullScreenSize_helper()
+{
+ Q_Q(QWidget);
+
+ const uint old_state = data.in_set_window_state;
+ data.in_set_window_state = 1;
+
+ const QRect screen = qApp->desktop()->screenGeometry(qApp->desktop()->screenNumber(q));
+ q->move(screen.topLeft());
+ q->resize(screen.size());
+
+ data.in_set_window_state = old_state;
+}
+
+static Qt::WindowStates effectiveState(Qt::WindowStates state)
+ {
+ if (state & Qt::WindowMinimized)
+ return Qt::WindowMinimized;
+ else if (state & Qt::WindowFullScreen)
+ return Qt::WindowFullScreen;
+ else if (state & Qt::WindowMaximized)
+ return Qt::WindowMaximized;
+ return Qt::WindowNoState;
+ }
+
+void QWidget::setWindowState(Qt::WindowStates newstate)
+{
+ Q_D(QWidget);
+ Qt::WindowStates oldstate = windowState();
+ if (oldstate == newstate)
+ return;
+ if (isWindow() && !testAttribute(Qt::WA_WState_Created))
+ create();
+
+ data->window_state = newstate;
+ data->in_set_window_state = 1;
+ bool needShow = false;
+ Qt::WindowStates newEffectiveState = effectiveState(newstate);
+ Qt::WindowStates oldEffectiveState = effectiveState(oldstate);
+ if (isWindow() && newEffectiveState != oldEffectiveState) {
+ d->createTLExtra();
+ if (oldEffectiveState == Qt::WindowNoState) { //normal
+ d->topData()->normalGeometry = geometry();
+ } else if (oldEffectiveState == Qt::WindowFullScreen) {
+ setParent(0, d->topData()->savedFlags);
+ needShow = true;
+ } else if (oldEffectiveState == Qt::WindowMinimized) {
+ needShow = true;
+ }
+
+ if (newEffectiveState == Qt::WindowMinimized) {
+ //### not ideal...
+ hide();
+ needShow = false;
+ } else if (newEffectiveState == Qt::WindowFullScreen) {
+ d->topData()->savedFlags = windowFlags();
+ setParent(0, Qt::FramelessWindowHint | (windowFlags() & Qt::WindowStaysOnTopHint));
+ d->setFullScreenSize_helper();
+ raise();
+ needShow = true;
+ } else if (newEffectiveState == Qt::WindowMaximized) {
+ createWinId();
+ d->setMaxWindowState_helper();
+ } else { //normal
+ QRect r = d->topData()->normalGeometry;
+ if (r.width() >= 0) {
+ d->topData()->normalGeometry = QRect(0,0,-1,-1);
+ setGeometry(r);
+ }
+ }
+ }
+ data->in_set_window_state = 0;
+
+ if (needShow)
+ show();
+
+ if (newstate & Qt::WindowActive)
+ activateWindow();
+
+ QWindowStateChangeEvent e(oldstate);
+ QApplication::sendEvent(this, &e);
+}
+
+void QWidgetPrivate::setFocus_sys()
+{
+
+}
+
+void QWidgetPrivate::raise_sys()
+{
+ Q_Q(QWidget);
+ if (q->isWindow()) {
+ q->platformWindow()->raise();
+ }
+}
+
+void QWidgetPrivate::lower_sys()
+{
+ Q_Q(QWidget);
+ if (q->isWindow()) {
+ Q_ASSERT(q->testAttribute(Qt::WA_WState_Created));
+ q->platformWindow()->lower();
+ } else if (QWidget *p = q->parentWidget()) {
+ setDirtyOpaqueRegion();
+ p->d_func()->invalidateBuffer(effectiveRectFor(q->geometry()));
+ }
+}
+
+void QWidgetPrivate::stackUnder_sys(QWidget*)
+{
+ Q_Q(QWidget);
+ if (QWidget *p = q->parentWidget()) {
+ setDirtyOpaqueRegion();
+ p->d_func()->invalidateBuffer(effectiveRectFor(q->geometry()));
+ }
+}
+
+void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
+{
+ Q_Q(QWidget);
+ if (extra) { // any size restrictions?
+ w = qMin(w,extra->maxw);
+ h = qMin(h,extra->maxh);
+ w = qMax(w,extra->minw);
+ h = qMax(h,extra->minh);
+ }
+
+ QPoint oldp = q->geometry().topLeft();
+ QSize olds = q->size();
+ QRect r(x, y, w, h);
+
+ bool isResize = olds != r.size();
+ isMove = oldp != r.topLeft(); //### why do we have isMove as a parameter?
+
+
+ // We only care about stuff that changes the geometry, or may
+ // cause the window manager to change its state
+ if (r.size() == olds && oldp == r.topLeft())
+ return;
+
+ if (!data.in_set_window_state) {
+ q->data->window_state &= ~Qt::WindowMaximized;
+ q->data->window_state &= ~Qt::WindowFullScreen;
+ if (q->isWindow())
+ topData()->normalGeometry = QRect(0, 0, -1, -1);
+ }
+
+ QPoint oldPos = q->pos();
+ data.crect = r;
+
+ if (q->isVisible()) {
+ if (q->platformWindow()) {
+ if (q->isWindow()) {
+ q->platformWindow()->setGeometry(q->frameGeometry());
+ } else {
+ QPoint posInNativeParent = q->mapTo(q->nativeParentWidget(),QPoint());
+ q->platformWindow()->setGeometry(QRect(posInNativeParent,r.size()));
+ }
+ const QWidgetBackingStore *bs = maybeBackingStore();
+ if (bs->windowSurface) {
+ if (isResize)
+ bs->windowSurface->resize(r.size());
+ }
+ } else {
+ if (isMove && !isResize)
+ moveRect(QRect(oldPos, olds), x - oldPos.x(), y - oldPos.y());
+ else
+ invalidateBuffer_resizeHelper(oldPos, olds);
+ }
+
+ if (isMove) {
+ QMoveEvent e(q->pos(), oldPos);
+ QApplication::sendEvent(q, &e);
+ }
+ if (isResize) {
+ QResizeEvent e(r.size(), olds);
+ QApplication::sendEvent(q, &e);
+ if (q->platformWindow())
+ q->update();
+ }
+ } else { // not visible
+ if (isMove && q->pos() != oldPos)
+ q->setAttribute(Qt::WA_PendingMoveEvent, true);
+ if (isResize)
+ q->setAttribute(Qt::WA_PendingResizeEvent, true);
+ }
+
+}
+
+void QWidgetPrivate::setConstraints_sys()
+{
+}
+
+void QWidgetPrivate::scroll_sys(int dx, int dy)
+{
+ Q_Q(QWidget);
+ scrollChildren(dx, dy);
+ scrollRect(q->rect(), dx, dy);
+}
+
+void QWidgetPrivate::scroll_sys(int dx, int dy, const QRect &r)
+{
+ scrollRect(r, dx, dy);
+}
+
+static QPlatformScreen *qt_screenForWidget(const QWidget *w)
+{
+ if (!w)
+ return 0;
+ QRect frame = w->frameGeometry();
+ if (!w->isWindow())
+ frame.moveTopLeft(w->mapToGlobal(QPoint(0, 0)));
+ const QPoint p = (frame.topLeft() + frame.bottomRight()) / 2;
+
+ QPlatformIntegration *pi = QApplicationPrivate::platformIntegration();
+ QList<QPlatformScreen *> screens = pi->screens();
+
+ for (int i = 0; i < screens.size(); ++i) {
+ if (screens[i]->geometry().contains(p))
+ return screens[i];
+ }
+
+ // Assume screen zero if we have it.
+ if (!screens.isEmpty())
+ return screens[0];
+ else
+ qWarning("qt_screenForWidget: no screens");
+
+ return 0;
+}
+
+int QWidget::metric(PaintDeviceMetric m) const
+{
+ Q_D(const QWidget);
+
+ QPlatformScreen *screen = qt_screenForWidget(this);
+ if (!screen) {
+ if (m == PdmDpiX || m == PdmDpiY)
+ return 72;
+ return QPaintDevice::metric(m);
+ }
+ int val;
+ if (m == PdmWidth) {
+ val = data->crect.width();
+ } else if (m == PdmWidthMM) {
+ val = data->crect.width() * screen->physicalSize().width() / screen->geometry().width();
+ } else if (m == PdmHeight) {
+ val = data->crect.height();
+ } else if (m == PdmHeightMM) {
+ val = data->crect.height() * screen->physicalSize().height() / screen->geometry().height();
+ } else if (m == PdmDepth) {
+ return screen->depth();
+ } else if (m == PdmDpiX || m == PdmPhysicalDpiX) {
+ if (d->extra && d->extra->customDpiX)
+ return d->extra->customDpiX;
+ else if (d->parent)
+ return static_cast<QWidget *>(d->parent)->metric(m);
+ return qRound(screen->geometry().width() / double(screen->physicalSize().width() / 25.4));
+ } else if (m == PdmDpiY || m == PdmPhysicalDpiY) {
+ if (d->extra && d->extra->customDpiY)
+ return d->extra->customDpiY;
+ else if (d->parent)
+ return static_cast<QWidget *>(d->parent)->metric(m);
+ return qRound(screen->geometry().height() / double(screen->physicalSize().height() / 25.4));
+ } else {
+ val = QPaintDevice::metric(m);// XXX
+ }
+ return val;
+}
+
+/*!
+ \preliminary
+
+ Sets the window to be the \a window specified.
+ The QWidget takes ownership of the \a surface.
+*/
+void QWidget::setPlatformWindow(QPlatformWindow *window)
+{
+ Q_D(QWidget);
+
+ QTLWExtra *topData = d->topData();
+ if (topData->platformWindow == window)
+ return;
+
+ delete topData->platformWindow;
+ topData->platformWindow = window;
+}
+
+/*!
+ \preliminary
+
+ Returns the QPlatformWindow this widget will be drawn into.
+*/
+QPlatformWindow *QWidget::platformWindow() const
+{
+ Q_D(const QWidget);
+ QTLWExtra *extra = d->maybeTopData();
+ if (extra && extra->platformWindow)
+ return extra->platformWindow;
+
+ return 0;
+}
+
+void QWidget::setPlatformWindowFormat(const QPlatformWindowFormat &format)
+{
+ if (isWindow() || testAttribute(Qt::WA_NativeWindow)) {
+ Q_D(QWidget);
+ QTLWExtra *topData = d->topData();
+ topData->platformWindowFormat = format;
+ if (testAttribute(Qt::WA_WState_Created)) {
+ bool wasVisible = testAttribute(Qt::WA_WState_Visible);
+ destroy();
+ d->create_sys(0,true,true);
+ if (wasVisible)
+ topData->platformWindow->setVisible(true);
+ }
+ }
+}
+
+QPlatformWindowFormat QWidget::platformWindowFormat() const
+{
+ Q_D(const QWidget);
+
+ QTLWExtra *extra = d->maybeTopData();
+ if (extra){
+ return extra->platformWindowFormat;
+ } else {
+ return QPlatformWindowFormat::defaultFormat();
+ }
+}
+
+void QWidgetPrivate::createSysExtra()
+{
+}
+
+void QWidgetPrivate::deleteSysExtra()
+{
+
+}
+
+void QWidgetPrivate::createTLSysExtra()
+{
+}
+
+void QWidgetPrivate::deleteTLSysExtra()
+{
+ if (extra && extra->topextra) {
+ delete extra->topextra->platformWindow;
+ extra->topextra->platformWindow = 0;
+ extra->topextra->backingStore.destroy();
+ }
+}
+
+void QWidgetPrivate::registerDropSite(bool on)
+{
+ Q_UNUSED(on);
+}
+
+void QWidgetPrivate::setMask_sys(const QRegion &region)
+{
+ Q_UNUSED(region);
+ // XXX
+}
+
+void QWidgetPrivate::updateFrameStrut()
+{
+ // XXX
+}
+
+void QWidgetPrivate::setWindowOpacity_sys(qreal level)
+{
+ Q_Q(QWidget);
+ q->platformWindow()->setOpacity(level);
+}
+
+void QWidgetPrivate::setWSGeometry(bool dontShow, const QRect &oldRect)
+{
+ Q_UNUSED(dontShow);
+ Q_UNUSED(oldRect);
+ // XXX
+}
+
+QPaintEngine *QWidget::paintEngine() const
+{
+ qWarning("QWidget::paintEngine: Should no longer be called");
+ return 0; //##### @@@
+}
+
+QWindowSurface *QWidgetPrivate::createDefaultWindowSurface_sys()
+{
+ Q_Q(QWidget);
+ return QApplicationPrivate::platformIntegration()->createWindowSurface(q,0);
+}
+
+void QWidgetPrivate::setModal_sys()
+{
+}
+
+#ifndef QT_NO_CURSOR
+void qt_qpa_set_cursor(QWidget * w, bool force)
+{
+ static QCursor arrowCursor(Qt::ArrowCursor);
+ static QPointer<QWidget> lastUnderMouse = 0;
+
+ QCursor * override = QApplication::overrideCursor();
+
+ if (override && w != 0)
+ return;
+
+ QWidget *cursorWidget;
+ QCursor cursorCursor;
+
+ do {
+ if (w == 0) {
+ if (override) {
+ cursorCursor = *override;
+ cursorWidget = QApplication::topLevelAt(QCursor::pos());
+ break;
+ }
+ w = QApplication::widgetAt(QCursor::pos());
+ if (w == 0) // clear the override cursor while over empty space
+ w = QApplication::desktop();
+ } else if (force) {
+ lastUnderMouse = w;
+ } else if (w->testAttribute(Qt::WA_WState_Created) && lastUnderMouse
+ && lastUnderMouse->effectiveWinId() == w->effectiveWinId()) {
+ w = lastUnderMouse;
+ }
+ if (w == QApplication::desktop() && !override) {
+ cursorCursor = arrowCursor;
+ cursorWidget = w;
+ break;
+ }
+
+ QWidget * curWin = QApplication::activeWindow();
+ if (!curWin && w && w->internalWinId())
+ return;
+ QWidget* cW = w && !w->internalWinId() ? w : curWin;
+
+ if (!cW || cW->window() != w->window() ||
+ !cW->isVisible() || !cW->underMouse() || override)
+ return;
+
+ cursorCursor = w->cursor();
+ cursorWidget = w;
+ } while (0);
+ foreach (QWeakPointer<QPlatformCursor> cursor, QPlatformCursorPrivate::getInstances())
+ if (cursor)
+ cursor.data()->changeCursor(&cursorCursor, cursorWidget);
+}
+#endif //QT_NO_CURSOR
+
+QT_END_NAMESPACE
diff --git a/src/gui/kernel/qwidget_qws.cpp b/src/gui/kernel/qwidget_qws.cpp
index 3145136..c6cbbd0 100644
--- a/src/gui/kernel/qwidget_qws.cpp
+++ b/src/gui/kernel/qwidget_qws.cpp
@@ -1017,6 +1017,30 @@ int QWidget::metric(PaintDeviceMetric m) const
return static_cast<QWidget *>(d->parent)->metric(m);
const QScreen *screen = d->getScreen();
return qRound(screen->height() / double(screen->physicalHeight() / 25.4));
+ } else if (m == PdmNumColors) {
+ QScreen *screen = d->getScreen();
+ int ret = screen->colorCount();
+ if (!ret) {
+ const int depth = qwsDisplay()->depth();
+ switch (depth) {
+ case 1:
+ ret = 2;
+ break;
+ case 8:
+ ret = 256;
+ break;
+ case 16:
+ ret = 65536;
+ break;
+ case 24:
+ ret = 16777216;
+ break;
+ case 32:
+ ret = 2147483647;
+ break;
+ }
+ }
+ return ret;
} else {
val = QPaintDevice::metric(m);// XXX
}
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index 41ce11e..636b306 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -548,7 +548,7 @@ void QWidgetPrivate::show_sys()
id->MakeVisible(true);
- if(q->isWindow())
+ if(q->isWindow()&&!q->testAttribute(Qt::WA_ShowWithoutActivating))
id->setFocusSafely(true);
}
@@ -581,7 +581,7 @@ void QWidgetPrivate::hide_sys()
QSymbianControl *id = static_cast<QSymbianControl *>(q->internalWinId());
if (id) {
- //Incorrect optimisation - for popup windows, Qt's focus is moved before
+ //Incorrect optimization - for popup windows, Qt's focus is moved before
//hide_sys is called, resulting in the popup window keeping its elevated
//position in the CONE control stack.
//This can result in keyboard focus being in an invisible widget in some
@@ -713,7 +713,8 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f)
// old_winid may not have received a 'not visible' visibility
// changed event before being destroyed; make sure that it is
// removed from the backing store's list of visible windows.
- S60->controlVisibilityChanged(old_winid, false);
+ if (old_winid)
+ S60->controlVisibilityChanged(old_winid, false);
setWinId(0);
diff --git a/src/gui/kernel/qwidget_win.cpp b/src/gui/kernel/qwidget_win.cpp
index 39ed750..c358b9b 100644
--- a/src/gui/kernel/qwidget_win.cpp
+++ b/src/gui/kernel/qwidget_win.cpp
@@ -329,18 +329,11 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
if (topLevel) {
if ((type == Qt::Window || dialog || tool)) {
if (!(flags & Qt::FramelessWindowHint)) {
- if (!(flags & Qt::MSWindowsFixedSizeDialogHint)) {
+ style |= WS_POPUP;
+ if (!(flags & Qt::MSWindowsFixedSizeDialogHint))
style |= WS_THICKFRAME;
- if(!(flags &
- ( Qt::WindowSystemMenuHint
- | Qt::WindowTitleHint
- | Qt::WindowMinMaxButtonsHint
- | Qt::WindowCloseButtonHint
- | Qt::WindowContextHelpButtonHint)))
- style |= WS_POPUP;
- } else {
- style |= WS_POPUP | WS_DLGFRAME;
- }
+ else
+ style |= WS_DLGFRAME;
}
if (flags & Qt::WindowTitleHint)
style |= WS_CAPTION;
@@ -424,6 +417,14 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
if (!q->testAttribute(Qt::WA_Resized)) {
w = sw/2;
h = 4*sh/10;
+ if (extra) {
+ int dx = rect.right - rect.left;
+ int dy = rect.bottom - rect.top;
+ w = qMin(w, extra->maxw + dx);
+ h = qMin(h, extra->maxh + dy);
+ w = qMax(w, extra->minw + dx);
+ h = qMax(h, extra->minh + dy);
+ }
}
if (!wasMoved) {
x = sw/2 - w/2;
diff --git a/src/gui/kernel/qwindowdefs.h b/src/gui/kernel/qwindowdefs.h
index a721c7d..1dc7203 100644
--- a/src/gui/kernel/qwindowdefs.h
+++ b/src/gui/kernel/qwindowdefs.h
@@ -131,6 +131,12 @@ QT_END_HEADER
#endif // Q_WS_QWS
+#if defined(Q_WS_QPA)
+
+typedef unsigned long WId;
+
+#endif // Q_WS_QPA
+
#if defined(Q_OS_SYMBIAN)
class CCoeControl;
typedef CCoeControl * WId;
diff --git a/src/gui/kernel/qwindowsysteminterface_qpa.cpp b/src/gui/kernel/qwindowsysteminterface_qpa.cpp
new file mode 100644
index 0000000..bb29cbf
--- /dev/null
+++ b/src/gui/kernel/qwindowsysteminterface_qpa.cpp
@@ -0,0 +1,255 @@
+/****************************************************************************
+**
+** 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 "qwindowsysteminterface_qpa.h"
+#include "qwindowsysteminterface_qpa_p.h"
+#include "qapplication_p.h"
+#include <QAbstractEventDispatcher>
+
+QT_BEGIN_NAMESPACE
+
+
+QTime QWindowSystemInterfacePrivate::eventTime;
+
+//------------------------------------------------------------
+//
+// Callback functions for plugins:
+//
+
+QList<QWindowSystemInterfacePrivate::WindowSystemEvent *> QWindowSystemInterfacePrivate::windowSystemEventQueue;
+QMutex QWindowSystemInterfacePrivate::queueMutex;
+
+extern QPointer<QWidget> qt_last_mouse_receiver;
+
+
+void QWindowSystemInterface::handleEnterEvent(QWidget *tlw)
+{
+ if (tlw) {
+ QWidgetData *data = qt_qwidget_data(tlw);
+ if (data->in_destructor)
+ return;
+
+ QWindowSystemInterfacePrivate::EnterEvent *e = new QWindowSystemInterfacePrivate::EnterEvent(tlw);
+ QWindowSystemInterfacePrivate::queueWindowSystemEvent(e);
+ }
+}
+
+void QWindowSystemInterface::handleLeaveEvent(QWidget *tlw)
+{
+ if (tlw) {
+ QWidgetData *data = qt_qwidget_data(tlw);
+ if (data->in_destructor)
+ return;
+ }
+ QWindowSystemInterfacePrivate::LeaveEvent *e = new QWindowSystemInterfacePrivate::LeaveEvent(tlw);
+ QWindowSystemInterfacePrivate::queueWindowSystemEvent(e);
+}
+
+void QWindowSystemInterface::handleGeometryChange(QWidget *tlw, const QRect &newRect)
+{
+ if (tlw) {
+ QWidgetData *data = qt_qwidget_data(tlw);
+ if (data->in_destructor)
+ return;
+ }
+ QWindowSystemInterfacePrivate::GeometryChangeEvent *e = new QWindowSystemInterfacePrivate::GeometryChangeEvent(tlw,newRect);
+ QWindowSystemInterfacePrivate::queueWindowSystemEvent(e);
+}
+
+
+void QWindowSystemInterface::handleCloseEvent(QWidget *tlw)
+{
+ if (tlw) {
+ QWindowSystemInterfacePrivate::CloseEvent *e =
+ new QWindowSystemInterfacePrivate::CloseEvent(tlw);
+ QWindowSystemInterfacePrivate::queueWindowSystemEvent(e);
+ }
+}
+
+/*!
+
+\a tlw == 0 means that \a ev is in global coords only
+
+
+*/
+void QWindowSystemInterface::handleMouseEvent(QWidget *w, const QPoint & local, const QPoint & global, Qt::MouseButtons b) {
+ unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();
+ handleMouseEvent(w, time, local, global, b);
+}
+
+void QWindowSystemInterface::handleMouseEvent(QWidget *tlw, ulong timestamp, const QPoint & local, const QPoint & global, Qt::MouseButtons b)
+{
+ if (tlw) {
+ QWidgetData *data = qt_qwidget_data(tlw);
+ if (data->in_destructor)
+ tlw = 0;
+ }
+ QWindowSystemInterfacePrivate::MouseEvent * e =
+ new QWindowSystemInterfacePrivate::MouseEvent(tlw, timestamp, local, global, b);
+ QWindowSystemInterfacePrivate::queueWindowSystemEvent(e);
+}
+
+void QWindowSystemInterface::handleKeyEvent(QWidget *w, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString & text, bool autorep, ushort count) {
+ unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();
+ handleKeyEvent(w, time, t, k, mods, text, autorep, count);
+}
+
+void QWindowSystemInterface::handleKeyEvent(QWidget *tlw, ulong timestamp, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString & text, bool autorep, ushort count)
+{
+ if (tlw) {
+ QWidgetData *data = qt_qwidget_data(tlw);
+ if (data->in_destructor)
+ tlw = 0;
+ }
+
+ QWindowSystemInterfacePrivate::KeyEvent * e =
+ new QWindowSystemInterfacePrivate::KeyEvent(tlw, timestamp, t, k, mods, text, autorep, count);
+ QWindowSystemInterfacePrivate::queueWindowSystemEvent(e);
+}
+
+void QWindowSystemInterface::handleWheelEvent(QWidget *w, const QPoint & local, const QPoint & global, int d, Qt::Orientation o) {
+ unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();
+ handleWheelEvent(w, time, local, global, d, o);
+}
+
+void QWindowSystemInterface::handleWheelEvent(QWidget *tlw, ulong timestamp, const QPoint & local, const QPoint & global, int d, Qt::Orientation o)
+{
+ if (tlw) {
+ QWidgetData *data = qt_qwidget_data(tlw);
+ if (data->in_destructor)
+ tlw = 0;
+ }
+
+ QWindowSystemInterfacePrivate::WheelEvent *e =
+ new QWindowSystemInterfacePrivate::WheelEvent(tlw, timestamp, local, global, d, o);
+ QWindowSystemInterfacePrivate::queueWindowSystemEvent(e);
+}
+
+int QWindowSystemInterfacePrivate::windowSystemEventsQueued()
+{
+ queueMutex.lock();
+ int ret = windowSystemEventQueue.count();
+ queueMutex.unlock();
+ return ret;
+}
+
+QWindowSystemInterfacePrivate::WindowSystemEvent * QWindowSystemInterfacePrivate::getWindowSystemEvent()
+{
+ queueMutex.lock();
+ QWindowSystemInterfacePrivate::WindowSystemEvent *ret;
+ if (windowSystemEventQueue.isEmpty())
+ ret = 0;
+ else
+ ret = windowSystemEventQueue.takeFirst();
+ queueMutex.unlock();
+ return ret;
+}
+
+void QWindowSystemInterfacePrivate::queueWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent *ev)
+{
+ queueMutex.lock();
+ windowSystemEventQueue.append(ev);
+ queueMutex.unlock();
+
+ QAbstractEventDispatcher *dispatcher = QApplicationPrivate::qt_qpa_core_dispatcher();
+ if (dispatcher)
+ dispatcher->wakeUp();
+}
+
+void QWindowSystemInterface::handleTouchEvent(QWidget *w, QEvent::Type type, QTouchEvent::DeviceType devType, const QList<struct TouchPoint> &points) {
+ unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();
+ handleTouchEvent(w, time, type, devType, points);
+}
+
+void QWindowSystemInterface::handleTouchEvent(QWidget *tlw, ulong timestamp, QEvent::Type type, QTouchEvent::DeviceType devType, const QList<struct TouchPoint> &points)
+{
+ if (!points.size()) // Touch events must have at least one point
+ return;
+
+ QList<QTouchEvent::TouchPoint> touchPoints;
+ Qt::TouchPointStates states;
+ QTouchEvent::TouchPoint p;
+
+ QList<struct TouchPoint>::const_iterator point = points.constBegin();
+ QList<struct TouchPoint>::const_iterator end = points.constEnd();
+ while (point != end) {
+ p.setId(point->id);
+ p.setPressure(point->pressure);
+ states |= point->state;
+ Qt::TouchPointStates state = point->state;
+ if (point->isPrimary) {
+ state |= Qt::TouchPointPrimary;
+ }
+ p.setState(state);
+ p.setRect(point->area);
+ p.setScreenPos(point->area.center());
+ p.setNormalizedPos(point->normalPosition);
+
+ touchPoints.append(p);
+ ++point;
+ }
+
+ QWindowSystemInterfacePrivate::TouchEvent *e =
+ new QWindowSystemInterfacePrivate::TouchEvent(tlw, timestamp, type, devType, touchPoints);
+ QWindowSystemInterfacePrivate::queueWindowSystemEvent(e);
+}
+
+void QWindowSystemInterface::handleScreenGeometryChange(int screenIndex)
+{
+ QWindowSystemInterfacePrivate::ScreenGeometryEvent *e =
+ new QWindowSystemInterfacePrivate::ScreenGeometryEvent(screenIndex);
+ QWindowSystemInterfacePrivate::queueWindowSystemEvent(e);
+}
+
+void QWindowSystemInterface::handleScreenAvailableGeometryChange(int screenIndex)
+{
+ QWindowSystemInterfacePrivate::ScreenAvailableGeometryEvent *e =
+ new QWindowSystemInterfacePrivate::ScreenAvailableGeometryEvent(screenIndex);
+ QWindowSystemInterfacePrivate::queueWindowSystemEvent(e);
+}
+
+void QWindowSystemInterface::handleScreenCountChange(int count)
+{
+ QWindowSystemInterfacePrivate::ScreenCountEvent *e =
+ new QWindowSystemInterfacePrivate::ScreenCountEvent(count);
+ QWindowSystemInterfacePrivate::queueWindowSystemEvent(e);
+}
+
+QT_END_NAMESPACE
diff --git a/src/gui/kernel/qwindowsysteminterface_qpa.h b/src/gui/kernel/qwindowsysteminterface_qpa.h
new file mode 100644
index 0000000..1c79f2a
--- /dev/null
+++ b/src/gui/kernel/qwindowsysteminterface_qpa.h
@@ -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 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$
+**
+****************************************************************************/
+#ifndef QWINDOWSYSTEMINTERFACE_H
+#define QWINDOWSYSTEMINTERFACE_H
+
+#include <QtCore/QTime>
+#include <QtGui/qwindowdefs.h>
+#include <QtCore/QEvent>
+#include <QtGui/QWidget>
+#include <QtCore/QWeakPointer>
+#include <QtCore/QMutex>
+#include <QtGui/QTouchEvent>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Gui)
+
+class Q_GUI_EXPORT QWindowSystemInterface
+{
+public:
+ static void handleMouseEvent(QWidget *w, const QPoint & local, const QPoint & global, Qt::MouseButtons b);
+ static void handleMouseEvent(QWidget *w, ulong timestamp, const QPoint & local, const QPoint & global, Qt::MouseButtons b);
+
+ static void handleKeyEvent(QWidget *w, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString & text = QString(), bool autorep = false, ushort count = 1);
+ static void handleKeyEvent(QWidget *w, ulong timestamp, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString & text = QString(), bool autorep = false, ushort count = 1);
+
+ static void handleWheelEvent(QWidget *w, const QPoint & local, const QPoint & global, int d, Qt::Orientation o);
+ static void handleWheelEvent(QWidget *w, ulong timestamp, const QPoint & local, const QPoint & global, int d, Qt::Orientation o);
+
+ struct TouchPoint {
+ int id; // for application use
+ bool isPrimary; // for application use
+ QPointF normalPosition; // touch device coordinates, (0 to 1, 0 to 1)
+ QRectF area; // the touched area, centered at position in screen coordinates
+ qreal pressure; // 0 to 1
+ Qt::TouchPointState state; //Qt::TouchPoint{Pressed|Moved|Stationary|Released}
+ };
+
+ static void handleTouchEvent(QWidget *w, QEvent::Type type, QTouchEvent::DeviceType devType, const QList<struct TouchPoint> &points);
+ static void handleTouchEvent(QWidget *w, ulong timestamp, QEvent::Type type, QTouchEvent::DeviceType devType, const QList<struct TouchPoint> &points);
+
+ static void handleGeometryChange(QWidget *w, const QRect &newRect);
+ static void handleCloseEvent(QWidget *w);
+ static void handleEnterEvent(QWidget *w);
+ static void handleLeaveEvent(QWidget *w);
+
+ // Changes to the screen
+ static void handleScreenGeometryChange(int screenIndex);
+ static void handleScreenAvailableGeometryChange(int screenIndex);
+ static void handleScreenCountChange(int count);
+};
+
+QT_END_NAMESPACE
+QT_END_HEADER
+#endif // QWINDOWSYSTEMINTERFACE_H
diff --git a/src/gui/kernel/qwindowsysteminterface_qpa_p.h b/src/gui/kernel/qwindowsysteminterface_qpa_p.h
new file mode 100644
index 0000000..78e1f33
--- /dev/null
+++ b/src/gui/kernel/qwindowsysteminterface_qpa_p.h
@@ -0,0 +1,189 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the 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$
+**
+****************************************************************************/
+#ifndef QWINDOWSYSTEMINTERFACE_QPA_P_H
+#define QWINDOWSYSTEMINTERFACE_QPA_P_H
+
+#include "qwindowsysteminterface_qpa.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QWindowSystemInterfacePrivate {
+public:
+ enum EventType {
+ Close,
+ GeometryChange,
+ Enter,
+ Leave,
+ Mouse,
+ Wheel,
+ Key,
+ Touch,
+ ScreenGeometry,
+ ScreenAvailableGeometry,
+ ScreenCountChange
+ };
+
+ class WindowSystemEvent {
+ public:
+ WindowSystemEvent(EventType t)
+ : type(t) { }
+ EventType type;
+ };
+
+ class CloseEvent : public WindowSystemEvent {
+ public:
+ CloseEvent(QWidget *tlw)
+ : WindowSystemEvent(Close), topLevel(tlw) { }
+ QWeakPointer<QWidget> topLevel;
+ };
+
+ class GeometryChangeEvent : public WindowSystemEvent {
+ public:
+ GeometryChangeEvent(QWidget *tlw, const QRect &newGeometry)
+ : WindowSystemEvent(GeometryChange), tlw(tlw), newGeometry(newGeometry)
+ { }
+ QWeakPointer<QWidget> tlw;
+ QRect newGeometry;
+ };
+
+ class EnterEvent : public WindowSystemEvent {
+ public:
+ EnterEvent(QWidget *enter)
+ : WindowSystemEvent(Enter), enter(enter)
+ { }
+ QWeakPointer<QWidget> enter;
+ };
+
+ class LeaveEvent : public WindowSystemEvent {
+ public:
+ LeaveEvent(QWidget *leave)
+ : WindowSystemEvent(Leave), leave(leave)
+ { }
+ QWeakPointer<QWidget> leave;
+ };
+
+ class UserEvent : public WindowSystemEvent {
+ public:
+ UserEvent(QWidget * w, ulong time, EventType t)
+ : WindowSystemEvent(t), widget(w), timestamp(time) { }
+ QWeakPointer<QWidget> widget;
+ unsigned long timestamp;
+ };
+
+ class MouseEvent : public UserEvent {
+ public:
+ MouseEvent(QWidget * w, ulong time, const QPoint & local, const QPoint & global, Qt::MouseButtons b)
+ : UserEvent(w, time, Mouse), localPos(local), globalPos(global), buttons(b) { }
+ QPoint localPos;
+ QPoint globalPos;
+ Qt::MouseButtons buttons;
+ };
+
+ class WheelEvent : public UserEvent {
+ public:
+ WheelEvent(QWidget *w, ulong time, const QPoint & local, const QPoint & global, int d, Qt::Orientation o)
+ : UserEvent(w, time, Wheel), delta(d), localPos(local), globalPos(global), orient(o) { }
+ int delta;
+ QPoint localPos;
+ QPoint globalPos;
+ Qt::Orientation orient;
+ };
+
+ class KeyEvent : public UserEvent {
+ public:
+ KeyEvent(QWidget *w, ulong time, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString & text = QString(), bool autorep = false, ushort count = 1)
+ :UserEvent(w, time, Key), key(k), unicode(text), repeat(autorep),
+ repeatCount(count), modifiers(mods), keyType(t) { }
+ int key;
+ QString unicode;
+ bool repeat;
+ ushort repeatCount;
+ Qt::KeyboardModifiers modifiers;
+ QEvent::Type keyType;
+ };
+
+ class TouchEvent : public UserEvent {
+ public:
+ TouchEvent(QWidget *w, ulong time, QEvent::Type t, QTouchEvent::DeviceType d, const QList<QTouchEvent::TouchPoint> &p)
+ :UserEvent(w, time, Touch), devType(d), points(p), touchType(t) { }
+ QTouchEvent::DeviceType devType;
+ QList<QTouchEvent::TouchPoint> points;
+ QEvent::Type touchType;
+
+ };
+
+ class ScreenCountEvent : public WindowSystemEvent {
+ public:
+ ScreenCountEvent (int count)
+ : WindowSystemEvent(ScreenCountChange) , count(count) { }
+ int count;
+ };
+
+ class ScreenGeometryEvent : public WindowSystemEvent {
+ public:
+ ScreenGeometryEvent(int index)
+ : WindowSystemEvent(ScreenGeometry), index(index) { }
+ int index;
+ };
+
+ class ScreenAvailableGeometryEvent : public WindowSystemEvent {
+ public:
+ ScreenAvailableGeometryEvent(int index)
+ : WindowSystemEvent(ScreenAvailableGeometry), index(index) { }
+ int index;
+ };
+
+ static QList<WindowSystemEvent *> windowSystemEventQueue;
+ static QMutex queueMutex;
+
+ static int windowSystemEventsQueued();
+ static WindowSystemEvent * getWindowSystemEvent();
+ static void queueWindowSystemEvent(WindowSystemEvent *ev);
+
+ static QTime eventTime;
+};
+
+QT_END_HEADER
+QT_END_NAMESPACE
+
+#endif // QWINDOWSYSTEMINTERFACE_QPA_P_H
diff --git a/src/gui/painting/painting.pri b/src/gui/painting/painting.pri
index 793d380..099619c 100644
--- a/src/gui/painting/painting.pri
+++ b/src/gui/painting/painting.pri
@@ -87,14 +87,18 @@ SOURCES += \
painting/qpaintengine_raster.cpp \
painting/qdrawhelper.cpp \
painting/qimagescale.cpp \
- painting/qgrayraster.c
+ painting/qgrayraster.c \
+ painting/qpaintengine_blitter.cpp \
+ painting/qblittable.cpp \
HEADERS += \
painting/qpaintengine_raster_p.h \
painting/qdrawhelper_p.h \
painting/qblendfunctions_p.h \
painting/qrasterdefs_p.h \
- painting/qgrayraster_p.h
+ painting/qgrayraster_p.h \
+ painting/qpaintengine_blitter_p.h \
+ painting/qblittable_p.h \
win32 {
HEADERS += painting/qprintengine_win_p.h
@@ -115,20 +119,20 @@ embedded {
SOURCES += \
painting/qgraphicssystem_qws.cpp \
-} else {
+} else: if(!qpa) {
HEADERS += \
painting/qgraphicssystem_raster_p.h \
painting/qgraphicssystem_runtime_p.h \
painting/qgraphicssystemfactory_p.h \
painting/qgraphicssystemplugin_p.h \
- painting/qwindowsurface_raster_p.h \
+ painting/qwindowsurface_raster_p.h
SOURCES += \
painting/qgraphicssystem_raster.cpp \
painting/qgraphicssystem_runtime.cpp \
painting/qgraphicssystemfactory.cpp \
painting/qgraphicssystemplugin.cpp \
- painting/qwindowsurface_raster.cpp \
+ painting/qwindowsurface_raster.cpp
}
unix:x11 {
@@ -141,7 +145,7 @@ unix:x11 {
painting/qpaintengine_x11.cpp
}
-!embedded:!x11:mac {
+!embedded:!qpa:!x11:mac {
HEADERS += \
painting/qpaintengine_mac_p.h \
painting/qgraphicssystem_mac_p.h \
@@ -157,14 +161,14 @@ unix:x11 {
painting/qprintengine_mac.mm \
}
-unix:!mac:!symbian {
+unix:!mac:!symbian|qpa {
HEADERS += \
painting/qprinterinfo_unix_p.h
SOURCES += \
painting/qprinterinfo_unix.cpp
}
-win32|x11|mac|embedded|symbian {
+win32|x11|mac|embedded|qpa|symbian {
SOURCES += painting/qbackingstore.cpp
HEADERS += painting/qbackingstore_p.h
}
@@ -181,6 +185,12 @@ embedded {
painting/qpaintdevice_qws.cpp
}
+qpa {
+ SOURCES += \
+ painting/qcolormap_qpa.cpp \
+ painting/qpaintdevice_qpa.cpp
+}
+
symbian {
SOURCES += \
painting/qpaintengine_s60.cpp \
@@ -191,7 +201,7 @@ symbian {
painting/qpaintengine_s60_p.h
}
-x11|embedded {
+x11|embedded|qpa {
contains(QT_CONFIG,qtopia) {
DEFINES += QT_NO_CUPS QT_NO_LPR
} else {
@@ -221,7 +231,7 @@ x11 {
SOURCES += painting/qwindowsurface_x11.cpp
}
-mac {
+!embedded:!qpa:mac {
HEADERS += painting/qwindowsurface_mac_p.h
SOURCES += painting/qwindowsurface_mac.cpp
}
@@ -234,19 +244,26 @@ embedded {
symbian {
- HEADERS += painting/qwindowsurface_s60_p.h
+ HEADERS += painting/qwindowsurface_s60_p.h \
+ painting/qdrawhelper_arm_simd_p.h
SOURCES += painting/qwindowsurface_s60.cpp
armccIfdefBlock = \
"$${LITERAL_HASH}if defined(ARMV6)" \
+ "MACRO QT_HAVE_ARM_SIMD" \
"SOURCEPATH painting" \
- "SOURCE qblendfunctions_armv6_rvct.s" \
- "SOURCE qdrawhelper_armv6_rvct.s" \
+ "SOURCE qdrawhelper_arm_simd.cpp" \
"$${LITERAL_HASH}endif"
MMP_RULES += armccIfdefBlock
QMAKE_CXXFLAGS.ARMCC *= -O3
}
+mac {
+ HEADERS += painting/qunifiedtoolbarsurface_mac_p.h
+ SOURCES += painting/qunifiedtoolbarsurface_mac.cpp
+}
+
+
NEON_SOURCES += painting/qdrawhelper_neon.cpp
NEON_HEADERS += painting/qdrawhelper_neon_p.h
NEON_ASM += ../3rdparty/pixman/pixman-arm-neon-asm.S painting/qdrawhelper_neon_asm.S
diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp
index ac9b994..df1210f 100644
--- a/src/gui/painting/qbackingstore.cpp
+++ b/src/gui/painting/qbackingstore.cpp
@@ -98,6 +98,21 @@ static inline void qt_flush(QWidget *widget, const QRegion &region, QWindowSurfa
QWidgetBackingStore::showYellowThing(widget, region, flushUpdate * 10, false);
#endif
+ //The performance hit by doing this should be negligible. However, be aware that
+ //using this FPS when you have > 1 windowsurface can give you inaccurate FPS
+ static bool fpsDebug = qgetenv("QT_DEBUG_FPS").toInt();
+ if (fpsDebug) {
+ static QTime time = QTime::currentTime();
+ static int frames = 0;
+
+ frames++;
+
+ if(time.elapsed() > 5000) {
+ double fps = double(frames * 1000) /time.restart();
+ fprintf(stderr,"FPS: %.1f\n",fps);
+ frames = 0;
+ }
+ }
if (widget != tlw)
windowSurface->flush(widget, region, tlwOffset + widget->mapTo(tlw, QPoint()));
else
@@ -271,7 +286,11 @@ bool QWidgetBackingStore::bltRect(const QRect &rect, int dx, int dy, QWidget *wi
void QWidgetBackingStore::releaseBuffer()
{
if (windowSurface)
+#if defined(Q_WS_QPA)
+ windowSurface->resize(QSize());
+#else
windowSurface->setGeometry(QRect());
+#endif
#ifdef Q_BACKINGSTORE_SUBSURFACES
for (int i = 0; i < subSurfaces.size(); ++i)
subSurfaces.at(i)->setGeometry(QRect());
@@ -401,7 +420,11 @@ QRegion QWidgetBackingStore::dirtyRegion(QWidget *widget) const
{
const bool widgetDirty = widget && widget != tlw;
const QRect tlwRect(topLevelRect());
+#if defined(Q_WS_QPA)
+ const QRect surfaceGeometry(tlwRect.topLeft(), windowSurface->size());
+#else
const QRect surfaceGeometry(windowSurface->geometry());
+#endif
if (fullUpdatePending || (surfaceGeometry != tlwRect && surfaceGeometry.size() != tlwRect.size())) {
if (widgetDirty) {
const QRect dirtyTlwRect = QRect(QPoint(), tlwRect.size());
@@ -446,13 +469,17 @@ QRegion QWidgetBackingStore::dirtyRegion(QWidget *widget) const
/*!
Returns the static content inside the \a parent if non-zero; otherwise the static content
- for the entire backing store is returned. The content will be clipped to \a withingClipRect
+ for the entire backing store is returned. The content will be clipped to \a withinClipRect
if non-empty.
*/
QRegion QWidgetBackingStore::staticContents(QWidget *parent, const QRect &withinClipRect) const
{
if (!parent && tlw->testAttribute(Qt::WA_StaticContents)) {
+#if defined(Q_WS_QPA)
+ const QSize surfaceGeometry(windowSurface->size());
+#else
const QRect surfaceGeometry(windowSurface->geometry());
+#endif
QRect surfaceRect(0, 0, surfaceGeometry.width(), surfaceGeometry.height());
if (!withinClipRect.isEmpty())
surfaceRect &= withinClipRect;
@@ -720,9 +747,8 @@ void QWidgetBackingStore::markDirtyOnScreen(const QRegion &region, QWidget *widg
}
// Alien widgets.
- if (!widget->internalWinId()) {
- QWidget *nativeParent = widget->nativeParentWidget();
- // Alien widgets with the top-level as the native parent (common case).
+ if (!widget->internalWinId() && !widget->isWindow()) {
+ QWidget *nativeParent = widget->nativeParentWidget(); // Alien widgets with the top-level as the native parent (common case).
if (nativeParent == tlw) {
if (!widget->testAttribute(Qt::WA_WState_InPaintEvent))
dirtyOnScreen += region.translated(topLevelOffset);
@@ -1152,12 +1178,16 @@ void QWidgetBackingStore::sync()
return;
}
- const bool inTopLevelResize = tlwExtra->inTopLevelResize;
const bool updatesDisabled = !tlw->updatesEnabled();
- const QRect tlwRect(topLevelRect());
- const QRect surfaceGeometry(windowSurface->geometry());
bool repaintAllWidgets = false;
+ const bool inTopLevelResize = tlwExtra->inTopLevelResize;
+ const QRect tlwRect(topLevelRect());
+#ifdef Q_WS_QPA
+ const QRect surfaceGeometry(tlwRect.topLeft(), windowSurface->size());
+#else
+ const QRect surfaceGeometry(windowSurface->geometry());
+#endif
if ((fullUpdatePending || inTopLevelResize || surfaceGeometry.size() != tlwRect.size()) && !updatesDisabled) {
if (hasStaticContents()) {
// Repaint existing dirty area and newly visible area.
@@ -1177,8 +1207,13 @@ void QWidgetBackingStore::sync()
}
}
+#ifdef Q_WS_QPA
+ if (inTopLevelResize || surfaceGeometry.size() != tlwRect.size())
+ windowSurface->resize(tlwRect.size());
+#else
if (inTopLevelResize || surfaceGeometry != tlwRect)
windowSurface->setGeometry(tlwRect);
+#endif
if (updatesDisabled)
return;
diff --git a/src/gui/painting/qblendfunctions_armv6_rvct.s b/src/gui/painting/qblendfunctions_armv6_rvct.s
deleted file mode 100644
index 1e3faa9..0000000
--- a/src/gui/painting/qblendfunctions_armv6_rvct.s
+++ /dev/null
@@ -1,222 +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 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$
-;**
-;****************************************************************************
-
-;
-; 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.
-;
-
-
- ARM
- PRESERVE8
-
- INCLUDE qdrawhelper_armv6_rvct.inc
-
-
-;-----------------------------------------------------------------------------
-; qt_blend_rgb32_on_rgb32_arm
-;
-; @brief
-;
-; @param dest Destination pixels (r0)
-; @param dbpl Destination bytes per line (r1)
-; @param src Source pixels (r2)
-; @param sbpl Source bytes per line (r3)
-; @param w Width (s0 -> r4)
-; @param h Height (s1 -> r5)
-; @param const_alpha Constant alpha (s2 -> r6)
-;
-;---------------------------------------------------------------------------
-qt_blend_rgb32_on_rgb32_armv6 Function
- stmfd sp!, {r4-r12, r14}
-
- ; read arguments off the stack
- add r8, sp, #10 * 4
- ldmia r8, {r9-r11}
-
- ; Reorganize registers
-
- mov r4, r10
- mov r5, r1
- mov r6, r3
-
- mov r1, r2
- mov r2, r9
- mov r3, r11
-
- ; Now we have registers
- ; @param dest Destination pixels (r0)
- ; @param src Source pixels (r1)
- ; @param w Width (r2)
- ; @param const_alpha Constant alpha (r3)
- ; @param h Height (r4)
- ; @param dbpl Destination bytes per line (r5)
- ; @param sbpl Source bytes per line (r6)
-
- cmp r3, #256 ; test if we have fully opaque constant alpha value
- bne rgb32_blend_const_alpha ; branch if not
-
-rgb32_blend_loop
-
- subs r4, r4, #1
- bmi rgb32_blend_exit ; while(h--)
-
-rgb321 PixCpySafe r0, r1, r2
-
- add r0, r0, r5 ; dest = dest + dbpl
- add r1, r1, r6 ; src = src + sbpl
-
- b rgb32_blend_loop
-
-
-rgb32_blend_const_alpha
-
- ;ldr r14, =ComponentHalf ; load 0x800080 to r14
- mov r14, #0x800000
- add r14, r14, #0x80
-
- sub r3, r3, #1 ; const_alpha -= 1;
-
-rgb32_blend_loop_const_alpha
-
- subs r4, r4, #1
- bmi rgb32_blend_exit ; while(h--)
-
-rgb322 BlendRowSafe PixelSourceOverConstAlpha
-
- add r0, r0, r5 ; dest = dest + dbpl
- add r1, r1, r6 ; src = src + sbpl
-
- b rgb32_blend_loop_const_alpha
-
-rgb32_blend_exit
-
- ldmfd sp!, {r4-r12, pc} ; pop and return
-
-
-
-;-----------------------------------------------------------------------------
-; qt_blend_argb32_on_argb32_arm
-;
-; @brief
-;
-; @param dest Destination pixels (r0)
-; @param dbpl Destination bytes per line (r1)
-; @param src Source pixels (r2)
-; @param sbpl Source bytes per line (r3)
-; @param w Width (s0 -> r4)
-; @param h Height (s1 -> r5)
-; @param const_alpha Constant alpha (s2 -> r6)
-;
-;---------------------------------------------------------------------------
-qt_blend_argb32_on_argb32_armv6 Function
- stmfd sp!, {r4-r12, r14}
-
- ; read arguments off the stack
- add r8, sp, #10 * 4
- ldmia r8, {r9-r11}
-
- ; Reorganize registers
-
- mov r4, r10
- mov r5, r1
- mov r6, r3
-
- mov r1, r2
- mov r2, r9
- mov r3, r11
-
- ; Now we have registers
- ; @param dest Destination pixels (r0)
- ; @param src Source pixels (r1)
- ; @param w Width (r2)
- ; @param const_alpha Constant alpha (r3)
- ; @param h Height (r4)
- ; @param dbpl Destination bytes per line (r5)
- ; @param sbpl Source bytes per line (r6)
-
- ;ldr r14, =ComponentHalf ; load 0x800080 to r14
- mov r14, #0x800000
- add r14, r14, #0x80
-
- cmp r3, #256 ; test if we have fully opaque constant alpha value
- bne argb32_blend_const_alpha ; branch if not
-
-argb32_blend_loop
-
- subs r4, r4, #1
- bmi argb32_blend_exit ; while(h--)
-
-argb321 BlendRowSafe PixelSourceOver
-
- add r0, r0, r5 ; dest = dest + dbpl
- add r1, r1, r6 ; src = src + sbpl
-
- b argb32_blend_loop
-
-argb32_blend_const_alpha
-
- sub r3, r3, #1 ; const_alpha -= 1;
-
-argb32_blend_loop_const_alpha
-
- subs r4, r4, #1
- bmi argb32_blend_exit ; while(h--)
-
-argb322 BlendRowSafe PixelSourceOverConstAlpha
-
- add r0, r0, r5 ; dest = dest + dbpl
- add r1, r1, r6 ; src = src + sbpl
-
- b argb32_blend_loop_const_alpha
-
-argb32_blend_exit
-
- ldmfd sp!, {r4-r12, pc} ; pop and return
-
-
- END ; File end
diff --git a/src/gui/painting/qblittable.cpp b/src/gui/painting/qblittable.cpp
new file mode 100644
index 0000000..f4b84a9
--- /dev/null
+++ b/src/gui/painting/qblittable.cpp
@@ -0,0 +1,105 @@
+/****************************************************************************
+**
+** 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 "qblittable_p.h"
+
+#ifndef QT_NO_BLITTABLE
+QT_BEGIN_NAMESPACE
+
+class QBlittablePrivate
+{
+public:
+ QBlittablePrivate(const QSize &size, QBlittable::Capabilities caps)
+ : caps(caps), m_size(size), locked(false), cachedImg(0)
+ {}
+ QBlittable::Capabilities caps;
+ QSize m_size;
+ bool locked;
+ QImage *cachedImg;
+};
+
+
+QBlittable::QBlittable(const QSize &size, Capabilities caps)
+ : d_ptr(new QBlittablePrivate(size,caps))
+{
+}
+
+QBlittable::~QBlittable()
+{
+ delete d_ptr;
+}
+
+
+QBlittable::Capabilities QBlittable::capabilities() const
+{
+ Q_D(const QBlittable);
+ return d->caps;
+}
+
+QSize QBlittable::size() const
+{
+ Q_D(const QBlittable);
+ return d->m_size;
+}
+
+QImage *QBlittable::lock()
+{
+ Q_D(QBlittable);
+ if (!d->locked) {
+ d->cachedImg = doLock();
+ d->locked = true;
+ }
+
+ return d->cachedImg;
+}
+
+void QBlittable::unlock()
+{
+ Q_D(QBlittable);
+ if (d->locked) {
+ doUnlock();
+ d->locked = false;
+ }
+}
+
+QT_END_NAMESPACE
+#endif //QT_NO_BLITTABLE
+
diff --git a/src/gui/painting/qblittable_p.h b/src/gui/painting/qblittable_p.h
new file mode 100644
index 0000000..cb56cb2
--- /dev/null
+++ b/src/gui/painting/qblittable_p.h
@@ -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 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$
+**
+****************************************************************************/
+
+#ifndef QBLITTABLE_P_H
+#define QBLITTABLE_P_H
+
+#include <QtCore/qsize.h>
+#include <QtGui/private/qpixmap_blitter_p.h>
+
+
+#ifndef QT_NO_BLITTABLE
+QT_BEGIN_NAMESPACE
+
+class QImage;
+class QBlittablePrivate;
+
+class Q_GUI_EXPORT QBlittable
+{
+ Q_DECLARE_PRIVATE(QBlittable);
+public:
+ enum Capability {
+
+ SolidRectCapability = 0x0001,
+ SourcePixmapCapability = 0x0002,
+ SourceOverPixmapCapability = 0x0004,
+ SourceOverScaledPixmapCapability = 0x0008,
+
+ // Internal ones
+ OutlineCapability = 0x0001000,
+ };
+ Q_DECLARE_FLAGS (Capabilities, Capability);
+
+ QBlittable(const QSize &size, Capabilities caps);
+ virtual ~QBlittable();
+
+ Capabilities capabilities() const;
+ QSize size() const;
+
+ virtual void fillRect(const QRectF &rect, const QColor &color) = 0;
+ virtual void drawPixmap(const QRectF &rect, const QPixmap &pixmap, const QRectF &subrect) = 0;
+
+ QImage *lock();
+ void unlock();
+
+protected:
+ virtual QImage *doLock() = 0;
+ virtual void doUnlock() = 0;
+ QBlittablePrivate *d_ptr;
+};
+
+QT_END_NAMESPACE
+#endif //QT_NO_BLITTABLE
+#endif //QBLITTABLE_P_H
diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp
index d0788c7..5b35fc5 100644
--- a/src/gui/painting/qbrush.cpp
+++ b/src/gui/painting/qbrush.cpp
@@ -635,6 +635,15 @@ QBrush &QBrush::operator=(const QBrush &b)
return *this;
}
+
+/*!
+ \fn void QBrush::swap(QBrush &other)
+ \since 4.8
+
+ Swaps brush \a other with this brush. This operation is very
+ fast and never fails.
+*/
+
/*!
Returns the brush as a QVariant
*/
diff --git a/src/gui/painting/qbrush.h b/src/gui/painting/qbrush.h
index efc720b..f9acded 100644
--- a/src/gui/painting/qbrush.h
+++ b/src/gui/painting/qbrush.h
@@ -96,6 +96,8 @@ public:
inline QBrush &operator=(QBrush &&other)
{ qSwap(d, other.d); return *this; }
#endif
+ inline void swap(QBrush &other) { qSwap(d, other.d); }
+
operator QVariant() const;
inline Qt::BrushStyle style() const;
diff --git a/src/gui/painting/qcolormap.qdoc b/src/gui/painting/qcolormap.qdoc
index ec3d2ba..96fd6a0 100644
--- a/src/gui/painting/qcolormap.qdoc
+++ b/src/gui/painting/qcolormap.qdoc
@@ -7,11 +7,11 @@
** 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.
+** 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 Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
diff --git a/src/gui/painting/qcolormap_qpa.cpp b/src/gui/painting/qcolormap_qpa.cpp
new file mode 100644
index 0000000..1f4fea8
--- /dev/null
+++ b/src/gui/painting/qcolormap_qpa.cpp
@@ -0,0 +1,231 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the 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 "qcolormap.h"
+#include "qcolor.h"
+#include "qpaintdevice.h"
+#include "private/qapplication_p.h"
+#include "private/qgraphicssystem_p.h"
+
+QT_BEGIN_NAMESPACE
+
+class QColormapPrivate
+{
+public:
+ inline QColormapPrivate()
+ : ref(1), mode(QColormap::Direct), depth(0), numcolors(0)
+ { }
+
+ QAtomicInt ref;
+
+ QColormap::Mode mode;
+ int depth;
+ int numcolors;
+};
+
+static QColormapPrivate *screenMap = 0;
+
+void QColormap::initialize()
+{
+ screenMap = new QColormapPrivate;
+
+ QPlatformIntegration *pi = QApplicationPrivate::platformIntegration();
+ QList<QPlatformScreen*> screens = pi->screens();
+
+ screenMap->depth = screens[0]->depth();
+ if (screenMap->depth < 8) {
+ screenMap->mode = QColormap::Indexed;
+ screenMap->numcolors = 256;
+ } else {
+ screenMap->mode = QColormap::Direct;
+ screenMap->numcolors = -1;
+ }
+}
+
+void QColormap::cleanup()
+{
+ delete screenMap;
+ screenMap = 0;
+}
+
+QColormap QColormap::instance(int /*screen*/)
+{
+ return QColormap();
+}
+
+QColormap::QColormap()
+ : d(screenMap)
+{ d->ref.ref(); }
+
+QColormap::QColormap(const QColormap &colormap)
+ :d (colormap.d)
+{ d->ref.ref(); }
+
+QColormap::~QColormap()
+{
+ if (!d->ref.deref())
+ delete d;
+}
+
+QColormap::Mode QColormap::mode() const
+{ return d->mode; }
+
+
+int QColormap::depth() const
+{ return d->depth; }
+
+
+int QColormap::size() const
+{
+ return d->numcolors;
+}
+
+#ifndef QT_QWS_DEPTH16_RGB
+#define QT_QWS_DEPTH16_RGB 565
+#endif
+static const int qt_rbits = (QT_QWS_DEPTH16_RGB/100);
+static const int qt_gbits = (QT_QWS_DEPTH16_RGB/10%10);
+static const int qt_bbits = (QT_QWS_DEPTH16_RGB%10);
+static const int qt_red_shift = qt_bbits+qt_gbits-(8-qt_rbits);
+static const int qt_green_shift = qt_bbits-(8-qt_gbits);
+static const int qt_neg_blue_shift = 8-qt_bbits;
+static const int qt_blue_mask = (1<<qt_bbits)-1;
+static const int qt_green_mask = (1<<(qt_gbits+qt_bbits))-(1<<qt_bbits);
+static const int qt_red_mask = (1<<(qt_rbits+qt_gbits+qt_bbits))-(1<<(qt_gbits+qt_bbits));
+
+static const int qt_red_rounding_shift = qt_red_shift + qt_rbits;
+static const int qt_green_rounding_shift = qt_green_shift + qt_gbits;
+static const int qt_blue_rounding_shift = qt_bbits - qt_neg_blue_shift;
+
+inline ushort qt_convRgbTo16(QRgb c)
+{
+ const int tr = qRed(c) << qt_red_shift;
+ const int tg = qGreen(c) << qt_green_shift;
+ const int tb = qBlue(c) >> qt_neg_blue_shift;
+
+ return (tb & qt_blue_mask) | (tg & qt_green_mask) | (tr & qt_red_mask);
+}
+
+inline QRgb qt_conv16ToRgb(ushort c)
+{
+ const int r=(c & qt_red_mask);
+ const int g=(c & qt_green_mask);
+ const int b=(c & qt_blue_mask);
+ const int tr = r >> qt_red_shift | r >> qt_red_rounding_shift;
+ const int tg = g >> qt_green_shift | g >> qt_green_rounding_shift;
+ const int tb = b << qt_neg_blue_shift | b >> qt_blue_rounding_shift;
+
+ return qRgb(tr,tg,tb);
+}
+
+uint QColormap::pixel(const QColor &color) const
+{
+ QRgb rgb = color.rgba();
+ if (d->mode == QColormap::Direct) {
+ switch(d->depth) {
+ case 16:
+ return qt_convRgbTo16(rgb);
+ case 24:
+ case 32:
+ {
+ const int r = qRed(rgb);
+ const int g = qGreen(rgb);
+ const int b = qBlue(rgb);
+ const int red_shift = 16;
+ const int green_shift = 8;
+ const int red_mask = 0xff0000;
+ const int green_mask = 0x00ff00;
+ const int blue_mask = 0x0000ff;
+ const int tg = g << green_shift;
+#ifdef QT_QWS_DEPTH_32_BGR
+ if (qt_screen->pixelType() == QScreen::BGRPixel) {
+ const int tb = b << red_shift;
+ return 0xff000000 | (r & blue_mask) | (tg & green_mask) | (tb & red_mask);
+ }
+#endif
+ const int tr = r << red_shift;
+ return 0xff000000 | (b & blue_mask) | (tg & green_mask) | (tr & red_mask);
+ }
+ }
+ }
+ //XXX
+ //return qt_screen->alloc(qRed(rgb), qGreen(rgb), qBlue(rgb));
+ return 0;
+}
+
+const QColor QColormap::colorAt(uint pixel) const
+{
+ if (d->mode == Direct) {
+ if (d->depth == 16) {
+ pixel = qt_conv16ToRgb(pixel);
+ }
+ const int red_shift = 16;
+ const int green_shift = 8;
+ const int red_mask = 0xff0000;
+ const int green_mask = 0x00ff00;
+ const int blue_mask = 0x0000ff;
+#ifdef QT_QWS_DEPTH_32_BGR
+ if (qt_screen->pixelType() == QScreen::BGRPixel) {
+ return QColor((pixel & blue_mask),
+ (pixel & green_mask) >> green_shift,
+ (pixel & red_mask) >> red_shift);
+ }
+#endif
+ return QColor((pixel & red_mask) >> red_shift,
+ (pixel & green_mask) >> green_shift,
+ (pixel & blue_mask));
+ }
+#if 0 // XXX
+ Q_ASSERT_X(int(pixel) < qt_screen->numCols(), "QColormap::colorAt", "pixel out of bounds of palette");
+ return QColor(qt_screen->clut()[pixel]);
+#endif
+ return QColor();
+}
+
+const QVector<QColor> QColormap::colormap() const
+{
+ return QVector<QColor>();
+}
+
+QColormap &QColormap::operator=(const QColormap &colormap)
+{ qAtomicAssign(d, colormap.d); return *this; }
+
+QT_END_NAMESPACE
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index 5f190ba..a4ab278 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -43,7 +43,7 @@
#include <private/qpaintengine_raster_p.h>
#include <private/qpainter_p.h>
#include <private/qdrawhelper_x86_p.h>
-#include <private/qdrawhelper_armv6_p.h>
+#include <private/qdrawhelper_arm_simd_p.h>
#include <private/qdrawhelper_neon_p.h>
#include <private/qmath_p.h>
#include <qmath.h>
@@ -7678,96 +7678,6 @@ static void qt_memfill16_setup(quint16 *dest, quint16 value, int count);
qt_memfill32_func qt_memfill32 = qt_memfill32_setup;
qt_memfill16_func qt_memfill16 = qt_memfill16_setup;
-#if defined(Q_CC_RVCT) && defined(QT_HAVE_ARMV6)
-// Move these to qdrawhelper_arm.c when all
-// functions are implemented using arm assembly.
-static CompositionFunctionSolid qt_functionForModeSolid_ARMv6[numCompositionFunctions] = {
- comp_func_solid_SourceOver,
- comp_func_solid_DestinationOver,
- comp_func_solid_Clear,
- comp_func_solid_Source,
- comp_func_solid_Destination,
- comp_func_solid_SourceIn,
- comp_func_solid_DestinationIn,
- comp_func_solid_SourceOut,
- comp_func_solid_DestinationOut,
- comp_func_solid_SourceAtop,
- comp_func_solid_DestinationAtop,
- comp_func_solid_XOR,
- comp_func_solid_Plus,
- comp_func_solid_Multiply,
- comp_func_solid_Screen,
- comp_func_solid_Overlay,
- comp_func_solid_Darken,
- comp_func_solid_Lighten,
- comp_func_solid_ColorDodge,
- comp_func_solid_ColorBurn,
- comp_func_solid_HardLight,
- comp_func_solid_SoftLight,
- comp_func_solid_Difference,
- comp_func_solid_Exclusion,
- rasterop_solid_SourceOrDestination,
- rasterop_solid_SourceAndDestination,
- rasterop_solid_SourceXorDestination,
- rasterop_solid_NotSourceAndNotDestination,
- rasterop_solid_NotSourceOrNotDestination,
- rasterop_solid_NotSourceXorDestination,
- rasterop_solid_NotSource,
- rasterop_solid_NotSourceAndDestination,
- rasterop_solid_SourceAndNotDestination
-};
-
-static CompositionFunction qt_functionForMode_ARMv6[numCompositionFunctions] = {
- comp_func_SourceOver_armv6,
- comp_func_DestinationOver,
- comp_func_Clear,
- comp_func_Source_armv6,
- comp_func_Destination,
- comp_func_SourceIn,
- comp_func_DestinationIn,
- comp_func_SourceOut,
- comp_func_DestinationOut,
- comp_func_SourceAtop,
- comp_func_DestinationAtop,
- comp_func_XOR,
- 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
-};
-
-static void qt_blend_color_argb_armv6(int count, const QSpan *spans, void *userData)
-{
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- CompositionFunctionSolid func = qt_functionForModeSolid_ARMv6[data->rasterBuffer->compositionMode];
- while (count--) {
- uint *target = ((uint *)data->rasterBuffer->scanLine(spans->y)) + spans->x;
- func(target, spans->len, data->solid.color, spans->coverage);
- ++spans;
- }
-}
-
-#endif // Q_CC_RVCT && QT_HAVE_ARMV6
-
-
void qInitDrawhelperAsm()
{
@@ -7938,46 +7848,39 @@ void qInitDrawhelperAsm()
}
#endif // IWMMXT
-#if defined(Q_CC_RVCT) && defined(QT_HAVE_ARMV6)
- functionForModeAsm = qt_functionForMode_ARMv6;
- functionForModeSolidAsm = qt_functionForModeSolid_ARMv6;
+#if defined(QT_HAVE_ARM_SIMD)
+ qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_arm_simd;
+ qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_arm_simd;
+ qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_arm_simd;
+ qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_arm_simd;
+#elif defined(QT_HAVE_NEON)
+ if (features & NEON) {
+ qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_neon;
+ qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_neon;
+ qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_neon;
+ qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_neon;
+ qBlendFunctions[QImage::Format_RGB16][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_rgb16_neon;
+ qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB16] = qt_blend_rgb16_on_argb32_neon;
+ qBlendFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_blend_rgb16_on_rgb16_neon;
+
+ qScaleFunctions[QImage::Format_RGB16][QImage::Format_ARGB32_Premultiplied] = qt_scale_image_argb32_on_rgb16_neon;
+ qScaleFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_scale_image_rgb16_on_rgb16_neon;
- qt_memfill32 = qt_memfill32_armv6;
+ qTransformFunctions[QImage::Format_RGB16][QImage::Format_ARGB32_Premultiplied] = qt_transform_image_argb32_on_rgb16_neon;
+ qTransformFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_transform_image_rgb16_on_rgb16_neon;
- qDrawHelper[QImage::Format_ARGB32_Premultiplied].blendColor = qt_blend_color_argb_armv6;
+ qDrawHelper[QImage::Format_RGB16].alphamapBlit = qt_alphamapblit_quint16_neon;
- qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_armv6;
- qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_armv6;
- qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_armv6;
- qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_armv6;
-#elif defined(QT_HAVE_NEON)
- if (features & NEON) {
- qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_neon;
- qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_neon;
- qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_neon;
- qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_neon;
- qBlendFunctions[QImage::Format_RGB16][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_rgb16_neon;
- qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB16] = qt_blend_rgb16_on_argb32_neon;
- qBlendFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_blend_rgb16_on_rgb16_neon;
-
- qScaleFunctions[QImage::Format_RGB16][QImage::Format_ARGB32_Premultiplied] = qt_scale_image_argb32_on_rgb16_neon;
- qScaleFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_scale_image_rgb16_on_rgb16_neon;
-
- qTransformFunctions[QImage::Format_RGB16][QImage::Format_ARGB32_Premultiplied] = qt_transform_image_argb32_on_rgb16_neon;
- qTransformFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_transform_image_rgb16_on_rgb16_neon;
-
- qDrawHelper[QImage::Format_RGB16].alphamapBlit = qt_alphamapblit_quint16_neon;
-
- functionForMode_C[QPainter::CompositionMode_SourceOver] = qt_blend_argb32_on_argb32_scanline_neon;
- functionForModeSolid_C[QPainter::CompositionMode_SourceOver] = comp_func_solid_SourceOver_neon;
- functionForMode_C[QPainter::CompositionMode_Plus] = comp_func_Plus_neon;
- destFetchProc[QImage::Format_RGB16] = qt_destFetchRGB16_neon;
- destStoreProc[QImage::Format_RGB16] = qt_destStoreRGB16_neon;
-
- qMemRotateFunctions[QImage::Format_RGB16][0] = qt_memrotate90_16_neon;
- qMemRotateFunctions[QImage::Format_RGB16][2] = qt_memrotate270_16_neon;
- qt_memfill32 = qt_memfill32_neon;
- }
+ functionForMode_C[QPainter::CompositionMode_SourceOver] = qt_blend_argb32_on_argb32_scanline_neon;
+ functionForModeSolid_C[QPainter::CompositionMode_SourceOver] = comp_func_solid_SourceOver_neon;
+ functionForMode_C[QPainter::CompositionMode_Plus] = comp_func_Plus_neon;
+ destFetchProc[QImage::Format_RGB16] = qt_destFetchRGB16_neon;
+ destStoreProc[QImage::Format_RGB16] = qt_destStoreRGB16_neon;
+
+ qMemRotateFunctions[QImage::Format_RGB16][0] = qt_memrotate90_16_neon;
+ qMemRotateFunctions[QImage::Format_RGB16][2] = qt_memrotate270_16_neon;
+ qt_memfill32 = qt_memfill32_neon;
+ }
#endif
if (functionForModeSolidAsm) {
diff --git a/src/gui/painting/qdrawhelper_arm_simd.cpp b/src/gui/painting/qdrawhelper_arm_simd.cpp
new file mode 100644