summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-01-03 14:20:01 +0100
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-01-04 11:12:05 +0100
commitca2f44680cb97e7a7c46ee0ab26654822fe65e2d (patch)
treeb9d85ad8ec1b18a6aa56b7657812cf3791bdf72e
parent28a21d98ef8d880a6dd86ee19dd803424bb5eae1 (diff)
parent83188c6499ccdc87c0a2c468bb497e287f5db369 (diff)
Merge branch 'stable' into dev
Conflicts: examples/widgets/painting/shared/shared.pri src/corelib/tools/qharfbuzz_p.h src/corelib/tools/qunicodetools.cpp src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp src/plugins/platforms/windows/qwindowsfontdatabase.cpp Change-Id: Ibc9860abf570e5ce8b052fb88feb73ec35e64bd3
-rw-r--r--.gitignore3
-rw-r--r--.qmake.conf1
-rwxr-xr-xbin/syncqt58
-rwxr-xr-xconfigure86
-rw-r--r--dist/README9
-rw-r--r--dist/changes-5.0.0204
-rw-r--r--dist/changes-5.0.1115
-rw-r--r--doc/README109
-rw-r--r--doc/global/externalsites/external-resources.qdoc2
-rw-r--r--doc/global/qt-html-templates-offline.qdocconf20
-rw-r--r--doc/global/qt-html-templates-online.qdocconf32
-rw-r--r--doc/global/qt-module-defaults.qdocconf3
-rw-r--r--[-rwxr-xr-x]doc/global/template/images/btn_next.pngbin689 -> 695 bytes
-rw-r--r--doc/global/template/images/btn_next_green.pngbin695 -> 0 bytes
-rw-r--r--[-rwxr-xr-x]doc/global/template/images/btn_prev.pngbin676 -> 687 bytes
-rw-r--r--doc/global/template/images/btn_prev_green.pngbin687 -> 0 bytes
-rwxr-xr-xdoc/global/template/images/ico_out.pngbin362 -> 388 bytes
-rw-r--r--doc/global/template/style/offline.css85
-rw-r--r--doc/global/template/style/online.css7
-rw-r--r--doc/src/examples/arrowpad.qdoc223
-rw-r--r--doc/src/examples/hellotr.qdoc174
-rw-r--r--doc/src/examples/multipleinheritance.qdoc94
-rw-r--r--doc/src/examples/trollprint.qdoc261
-rw-r--r--doc/src/images/linguist-arrowpad_en.pngbin1429 -> 0 bytes
-rw-r--r--doc/src/images/linguist-arrowpad_fr.pngbin1671 -> 0 bytes
-rw-r--r--doc/src/images/linguist-arrowpad_nl.pngbin1706 -> 0 bytes
-rw-r--r--doc/src/images/linguist-hellotr_en.pngbin3367 -> 0 bytes
-rw-r--r--doc/src/images/linguist-hellotr_la.pngbin753 -> 0 bytes
-rw-r--r--doc/src/images/linguist-trollprint_10_en.pngbin1951 -> 0 bytes
-rw-r--r--doc/src/images/linguist-trollprint_10_pt_bad.pngbin2073 -> 0 bytes
-rw-r--r--doc/src/images/linguist-trollprint_10_pt_good.pngbin2120 -> 0 bytes
-rw-r--r--doc/src/images/linguist-trollprint_11_en.pngbin2019 -> 0 bytes
-rw-r--r--doc/src/images/linguist-trollprint_11_pt.pngbin2152 -> 0 bytes
-rw-r--r--doc/src/snippets/code/doc_src_examples_arrowpad.cpp43
-rw-r--r--doc/src/snippets/code/doc_src_examples_arrowpad.qdoc54
-rw-r--r--doc/src/snippets/code/doc_src_examples_hellotr.qdoc71
-rw-r--r--doc/src/snippets/code/doc_src_examples_textfinder.pro6
-rw-r--r--doc/src/snippets/code/doc_src_examples_trollprint.cpp77
-rw-r--r--examples/aggregate/examples.pro6
-rw-r--r--examples/dbus/complexpingpong/complexpingpong.pro1
-rw-r--r--examples/dbus/dbus.pro4
-rw-r--r--examples/dbus/doc/src/chat.qdoc31
-rw-r--r--examples/dbus/doc/src/complexpingpong.qdoc31
-rw-r--r--examples/dbus/doc/src/listnames.qdoc31
-rw-r--r--examples/dbus/doc/src/pingpong.qdoc31
-rw-r--r--examples/dbus/doc/src/remotecontrolledcar.qdoc31
-rw-r--r--examples/dbus/pingpong/pingpong.pro1
-rw-r--r--examples/dbus/remotecontrolledcar/doc/images/remotecontrolledcar-car-example.pngbin0 -> 8833 bytes
-rw-r--r--examples/dbus/remotecontrolledcar/doc/src/dbus-remotecontrolledcar.qdoc36
-rw-r--r--examples/dbus/remotecontrolledcar/remotecontrolledcar.pro2
-rw-r--r--examples/embedded/embedded.pro2
-rw-r--r--examples/embedded/flickable/flickable.pro3
-rw-r--r--examples/embedded/raycasting/raycasting.pro2
-rw-r--r--examples/examples.pro19
-rw-r--r--examples/gestures/gestures.pro2
-rw-r--r--examples/gestures/imagegestures/imagegestures.pro4
-rw-r--r--examples/gui/analogclock/analogclock.pro6
-rw-r--r--examples/gui/doc/images/openglwindow-example.png (renamed from doc/src/images/openglwindow-example.png)bin19920 -> 19920 bytes
-rw-r--r--examples/gui/doc/src/analogclockwindow.qdoc (renamed from examples/gui/doc/analogclockwindow.qdoc)2
-rw-r--r--examples/gui/doc/src/openglwindow.qdoc (renamed from examples/gui/doc/openglwindow.qdoc)6
-rw-r--r--examples/gui/doc/src/rasterwindow.qdoc (renamed from examples/gui/doc/rasterwindow.qdoc)2
-rw-r--r--examples/gui/openglwindow/openglwindow.pro3
-rw-r--r--examples/gui/rasterwindow/rasterwindow.pro3
-rw-r--r--examples/ipc/ipc.pro2
-rw-r--r--examples/ipc/sharedmemory/sharedmemory.pro4
-rw-r--r--examples/ja_JP/linguist/hellotr/hellotr.pro11
-rw-r--r--examples/ja_JP/linguist/hellotr/main.cpp70
-rw-r--r--examples/linguist/README6
-rw-r--r--examples/linguist/arrowpad/arrowpad.cpp64
-rw-r--r--examples/linguist/arrowpad/arrowpad.h68
-rw-r--r--examples/linguist/arrowpad/arrowpad.pro18
-rw-r--r--examples/linguist/arrowpad/main.cpp63
-rw-r--r--examples/linguist/arrowpad/mainwindow.cpp61
-rw-r--r--examples/linguist/arrowpad/mainwindow.h68
-rw-r--r--examples/linguist/hellotr/hellotr.pro13
-rw-r--r--examples/linguist/linguist.pro6
-rw-r--r--examples/linguist/trollprint/main.cpp60
-rw-r--r--examples/linguist/trollprint/mainwindow.cpp95
-rw-r--r--examples/linguist/trollprint/mainwindow.h74
-rw-r--r--examples/linguist/trollprint/printpanel.cpp85
-rw-r--r--examples/linguist/trollprint/printpanel.h69
-rw-r--r--examples/linguist/trollprint/trollprint.pro14
-rw-r--r--examples/linguist/trollprint/trollprint_pt.ts65
-rw-r--r--examples/network/blockingfortuneclient/blockingfortuneclient.pro3
-rw-r--r--examples/network/broadcastreceiver/broadcastreceiver.pro3
-rw-r--r--examples/network/broadcastsender/broadcastsender.pro3
-rw-r--r--examples/network/doc/src/blockingfortuneclient.qdoc5
-rw-r--r--examples/network/doc/src/broadcastreceiver.qdoc6
-rw-r--r--examples/network/doc/src/broadcastsender.qdoc6
-rw-r--r--examples/network/doc/src/fortuneclient.qdoc5
-rw-r--r--examples/network/doc/src/fortuneserver.qdoc9
-rw-r--r--examples/network/doc/src/googlesuggest.qdoc7
-rw-r--r--examples/network/doc/src/http.qdoc6
-rw-r--r--examples/network/doc/src/loopback.qdoc6
-rw-r--r--examples/network/doc/src/multicastreceiver.qdoc6
-rw-r--r--examples/network/doc/src/multicastsender.qdoc6
-rw-r--r--examples/network/doc/src/network-chat.qdoc7
-rw-r--r--examples/network/doc/src/network-download.qdoc41
-rw-r--r--examples/network/doc/src/network-downloadmanager.qdoc41
-rw-r--r--examples/network/doc/src/securesocketclient.qdoc9
-rw-r--r--examples/network/doc/src/threadedfortuneserver.qdoc1
-rw-r--r--examples/network/doc/src/torrent.qdoc8
-rw-r--r--examples/network/fortuneclient/fortuneclient.pro3
-rw-r--r--examples/network/fortuneserver/fortuneserver.pro3
-rw-r--r--examples/network/http/http.pro3
-rw-r--r--examples/network/loopback/loopback.pro3
-rw-r--r--examples/network/multicastreceiver/multicastreceiver.pro3
-rw-r--r--examples/network/network.pro2
-rw-r--r--examples/network/threadedfortuneserver/threadedfortuneserver.pro3
-rw-r--r--examples/network/torrent/mainwindow.cpp6
-rw-r--r--examples/network/torrent/torrent.pro4
-rw-r--r--examples/opengl/2dpainting/glwidget.cpp3
-rw-r--r--examples/opengl/2dpainting/glwidget.h4
-rw-r--r--examples/opengl/2dpainting/helper.cpp16
-rw-r--r--examples/opengl/2dpainting/helper.h6
-rw-r--r--examples/opengl/2dpainting/main.cpp3
-rw-r--r--examples/opengl/2dpainting/widget.cpp3
-rw-r--r--examples/opengl/2dpainting/widget.h3
-rw-r--r--examples/opengl/2dpainting/window.cpp10
-rw-r--r--examples/opengl/2dpainting/window.h7
-rw-r--r--examples/opengl/cube/cube.pro2
-rw-r--r--examples/opengl/cube/geometryengine.cpp3
-rw-r--r--examples/opengl/cube/geometryengine.h8
-rw-r--r--examples/opengl/cube/main.cpp19
-rw-r--r--examples/opengl/cube/mainwidget.cpp65
-rw-r--r--examples/opengl/cube/mainwidget.h24
-rw-r--r--examples/opengl/framebufferobject2/framebufferobject2.pro6
-rw-r--r--examples/opengl/grabber/glwidget.cpp63
-rw-r--r--examples/opengl/grabber/glwidget.h2
-rw-r--r--examples/opengl/grabber/grabber.pro6
-rw-r--r--examples/opengl/grabber/main.cpp8
-rw-r--r--examples/opengl/grabber/mainwindow.cpp5
-rw-r--r--examples/opengl/grabber/mainwindow.h4
-rw-r--r--examples/opengl/hellogl/hellogl.pro6
-rw-r--r--examples/opengl/hellogl_es2/bubble.h2
-rw-r--r--examples/opengl/hellogl_es2/mainwindow.h3
-rw-r--r--examples/opengl/hellowindow/hellowindow.cpp56
-rw-r--r--examples/opengl/hellowindow/hellowindow.h13
-rw-r--r--examples/opengl/hellowindow/main.cpp20
-rw-r--r--examples/opengl/opengl.pro2
-rw-r--r--examples/opengl/overpainting/bubble.cpp2
-rw-r--r--examples/opengl/overpainting/bubble.h12
-rw-r--r--examples/opengl/overpainting/glwidget.cpp12
-rw-r--r--examples/opengl/overpainting/glwidget.h10
-rw-r--r--examples/opengl/overpainting/main.cpp3
-rw-r--r--examples/opengl/overpainting/overpainting.pro10
-rw-r--r--examples/opengl/paintedwindow/paintedwindow.cpp16
-rw-r--r--examples/opengl/pbuffers/pbuffers.pro6
-rw-r--r--examples/opengl/pbuffers2/pbuffers2.pro6
-rw-r--r--examples/opengl/samplebuffers/samplebuffers.pro6
-rw-r--r--examples/opengl/shared/qtlogo.cpp49
-rw-r--r--examples/opengl/textures/glwidget.h2
-rw-r--r--examples/qmake/precompile/precompile.pro2
-rw-r--r--examples/qtconcurrent/imagescaling/doc/images/imagescaling_example.pngbin0 -> 23710 bytes
-rw-r--r--examples/qtconcurrent/imagescaling/doc/src/qtconcurrent-imagescaling.qdoc37
-rw-r--r--examples/qtconcurrent/map/doc/src/qtconcurrent-map.qdoc38
-rw-r--r--examples/qtconcurrent/progressdialog/doc/images/qtconcurrent-progressdialog.pngbin0 -> 4608 bytes
-rw-r--r--examples/qtconcurrent/progressdialog/doc/src/qtconcurrent-progressdialog.qdoc38
-rw-r--r--examples/qtconcurrent/qtconcurrent.pro2
-rw-r--r--examples/qtconcurrent/runfunction/doc/src/qtconcurrent-runfunction.qdoc39
-rw-r--r--examples/qtconcurrent/wordcount/doc/src/qtconcurrent-wordcount.qdoc39
-rw-r--r--examples/qtestlib/tutorial1/tutorial1.pro5
-rw-r--r--examples/qtestlib/tutorial2/tutorial2.pro5
-rw-r--r--examples/qtestlib/tutorial3/tutorial3.pro5
-rw-r--r--examples/qtestlib/tutorial4/tutorial4.pro5
-rw-r--r--examples/qtestlib/tutorial5/tutorial5.pro5
-rw-r--r--examples/threads/doc/src/mandelbrot.qdoc12
-rw-r--r--examples/threads/doc/src/queuedcustomtype.qdoc6
-rw-r--r--examples/threads/doc/src/semaphores.qdoc6
-rw-r--r--examples/threads/doc/src/waitconditions.qdoc6
-rw-r--r--examples/threads/mandelbrot/mandelbrot.pro4
-rw-r--r--examples/threads/mandelbrot/mandelbrotwidget.cpp2
-rw-r--r--examples/threads/mandelbrot/mandelbrotwidget.h2
-rw-r--r--examples/threads/threads.pro2
-rw-r--r--examples/tools/contiguouscache/contiguouscache.pro4
-rw-r--r--examples/tools/doc/textfinder.qdoc159
-rw-r--r--examples/touch/dials/dials.pro4
-rw-r--r--examples/touch/dials/doc/images/touch-dials-example.pngbin0 -> 17676 bytes
-rw-r--r--examples/touch/dials/doc/src/touch-dials.qdoc38
-rw-r--r--examples/touch/fingerpaint/fingerpaint.pro6
-rw-r--r--examples/touch/knobs/doc/images/touch-knobs-example.pngbin0 -> 1290 bytes
-rw-r--r--examples/touch/knobs/doc/src/touch-knobs.qdoc38
-rw-r--r--examples/touch/knobs/knobs.pro4
-rw-r--r--examples/touch/pinchzoom/pinchzoom.pro4
-rw-r--r--examples/webkit/webkit-guide/webkit-guide.pro2
-rw-r--r--examples/widgets/animation/animatedtiles/animatedtiles.pro4
-rw-r--r--examples/widgets/animation/animation.pro2
-rw-r--r--examples/widgets/animation/appchooser/appchooser.pro4
-rw-r--r--examples/widgets/animation/easing/easing.pro5
-rw-r--r--examples/widgets/animation/moveblocks/moveblocks.pro4
-rw-r--r--examples/widgets/animation/states/states.pro4
-rw-r--r--examples/widgets/animation/stickman/stickman.pro4
-rw-r--r--examples/widgets/animation/sub-attaq/sub-attaq.pro2
-rw-r--r--examples/widgets/desktop/desktop.pro2
-rw-r--r--examples/widgets/desktop/screenshot/screenshot.pro3
-rw-r--r--examples/widgets/desktop/systray/main.cpp25
-rw-r--r--examples/widgets/desktop/systray/window.cpp5
-rw-r--r--examples/widgets/desktop/systray/window.h5
-rw-r--r--examples/widgets/dialogs/classwizard/classwizard.pro3
-rw-r--r--examples/widgets/dialogs/classwizard/main.cpp2
-rw-r--r--examples/widgets/dialogs/configdialog/configdialog.pro3
-rw-r--r--examples/widgets/dialogs/configdialog/main.cpp1
-rw-r--r--examples/widgets/dialogs/dialogs.pro2
-rw-r--r--examples/widgets/dialogs/extension/extension.pro3
-rw-r--r--examples/widgets/dialogs/findfiles/findfiles.pro4
-rw-r--r--examples/widgets/dialogs/licensewizard/licensewizard.pro3
-rw-r--r--examples/widgets/dialogs/licensewizard/main.cpp4
-rw-r--r--examples/widgets/dialogs/sipdialog/sipdialog.pro4
-rw-r--r--examples/widgets/dialogs/standarddialogs/main.cpp2
-rw-r--r--examples/widgets/dialogs/standarddialogs/standarddialogs.pro4
-rw-r--r--examples/widgets/dialogs/tabdialog/tabdialog.pro3
-rw-r--r--examples/widgets/dialogs/trivialwizard/trivialwizard.cpp3
-rw-r--r--examples/widgets/dialogs/trivialwizard/trivialwizard.pro3
-rw-r--r--examples/widgets/doc/images/calendar-example.pngbin0 -> 13539 bytes
-rw-r--r--examples/widgets/doc/images/collidingmice-example.pngbin0 -> 59824 bytes
-rw-r--r--examples/widgets/doc/images/graphicsanchorlayout-example.pngbin0 -> 11592 bytes
-rw-r--r--examples/widgets/doc/images/graphicsflowlayout-example.pngbin0 -> 15345 bytes
-rw-r--r--examples/widgets/doc/images/graphicssimpleanchorlayout-example.pngbin0 -> 13715 bytes
-rw-r--r--examples/widgets/doc/images/itemviews-editabletreemodel.pngbin0 -> 32534 bytes
-rw-r--r--examples/widgets/doc/images/orderform-example.pngbin0 -> 17404 bytes
-rw-r--r--examples/widgets/doc/images/textedit-demo.pngbin0 -> 46980 bytes
-rw-r--r--examples/widgets/doc/images/textfinder-example-userinterface.pngbin7900 -> 0 bytes
-rw-r--r--examples/widgets/doc/images/weatheranchorlayout-example.pngbin0 -> 88805 bytes
-rw-r--r--examples/widgets/doc/src/addressbook.qdoc2
-rw-r--r--examples/widgets/doc/src/application.qdoc1
-rw-r--r--examples/widgets/doc/src/basicgraphicslayouts.qdoc4
-rw-r--r--examples/widgets/doc/src/basicsortfiltermodel.qdoc2
-rw-r--r--examples/widgets/doc/src/blurpicker.qdoc2
-rw-r--r--examples/widgets/doc/src/boxes.qdoc5
-rw-r--r--examples/widgets/doc/src/chart.qdoc2
-rw-r--r--examples/widgets/doc/src/chip.qdoc5
-rw-r--r--examples/widgets/doc/src/classwizard.qdoc1
-rw-r--r--examples/widgets/doc/src/collidingmice-example.qdoc273
-rw-r--r--examples/widgets/doc/src/coloreditorfactory.qdoc2
-rw-r--r--examples/widgets/doc/src/combowidgetmapper.qdoc2
-rw-r--r--examples/widgets/doc/src/configdialog.qdoc1
-rw-r--r--examples/widgets/doc/src/customsortfiltermodel.qdoc2
-rw-r--r--examples/widgets/doc/src/diagramscene.qdoc4
-rw-r--r--examples/widgets/doc/src/dirview.qdoc2
-rw-r--r--examples/widgets/doc/src/dockwidgets.qdoc1
-rw-r--r--examples/widgets/doc/src/dragdroprobot.qdoc4
-rw-r--r--examples/widgets/doc/src/editabletreemodel.qdoc2
-rw-r--r--examples/widgets/doc/src/elasticnodes.qdoc4
-rw-r--r--examples/widgets/doc/src/embeddeddialogs.qdoc4
-rw-r--r--examples/widgets/doc/src/extension.qdoc1
-rw-r--r--examples/widgets/doc/src/fademessage.qdoc4
-rw-r--r--examples/widgets/doc/src/fetchmore.qdoc2
-rw-r--r--examples/widgets/doc/src/findfiles.qdoc1
-rw-r--r--examples/widgets/doc/src/fridgemagnets.qdoc2
-rw-r--r--examples/widgets/doc/src/frozencolumn.qdoc2
-rw-r--r--examples/widgets/doc/src/graphicsview-anchorlayout.qdoc38
-rw-r--r--examples/widgets/doc/src/graphicsview-flowlayout.qdoc40
-rw-r--r--examples/widgets/doc/src/graphicsview-simpleanchorlayout.qdoc38
-rw-r--r--examples/widgets/doc/src/graphicsview-weatheranchorlayout.qdoc38
-rw-r--r--examples/widgets/doc/src/interview.qdoc2
-rw-r--r--examples/widgets/doc/src/itemviewspuzzle.qdoc2
-rw-r--r--examples/widgets/doc/src/licensewizard.qdoc1
-rw-r--r--examples/widgets/doc/src/lighting.qdoc2
-rw-r--r--examples/widgets/doc/src/mainwindow.qdoc1
-rw-r--r--examples/widgets/doc/src/mdi.qdoc1
-rw-r--r--examples/widgets/doc/src/menus.qdoc1
-rw-r--r--examples/widgets/doc/src/padnavigator.qdoc4
-rw-r--r--examples/widgets/doc/src/pixelator.qdoc2
-rw-r--r--examples/widgets/doc/src/plugandpaint.qdoc27
-rw-r--r--examples/widgets/doc/src/recentfiles.qdoc1
-rw-r--r--examples/widgets/doc/src/sdi.qdoc1
-rw-r--r--examples/widgets/doc/src/simpledommodel.qdoc2
-rw-r--r--examples/widgets/doc/src/simpletreemodel.qdoc3
-rw-r--r--examples/widgets/doc/src/simplewidgetmapper.qdoc2
-rw-r--r--examples/widgets/doc/src/spinboxdelegate.qdoc2
-rw-r--r--examples/widgets/doc/src/spreadsheet.qdoc2
-rw-r--r--examples/widgets/doc/src/standarddialogs.qdoc1
-rw-r--r--examples/widgets/doc/src/stardelegate.qdoc2
-rw-r--r--examples/widgets/doc/src/tabdialog.qdoc1
-rw-r--r--examples/widgets/doc/src/trivialwizard.qdoc1
-rw-r--r--examples/widgets/draganddrop/draganddrop.pro1
-rw-r--r--examples/widgets/draganddrop/draggableicons/draggableicons.pro4
-rw-r--r--examples/widgets/draganddrop/draggabletext/draggabletext.pro5
-rw-r--r--examples/widgets/draganddrop/dropsite/dropsite.pro3
-rw-r--r--examples/widgets/draganddrop/fridgemagnets/fridgemagnets.pro5
-rw-r--r--examples/widgets/draganddrop/puzzle/puzzle.pro3
-rw-r--r--examples/widgets/effects/blurpicker/blurpicker.pro4
-rw-r--r--examples/widgets/effects/effects.pro2
-rw-r--r--examples/widgets/effects/fademessage/fademessage.pro3
-rw-r--r--examples/widgets/effects/lighting/lighting.pro5
-rw-r--r--examples/widgets/graphicsview/anchorlayout/anchorlayout.pro8
-rw-r--r--examples/widgets/graphicsview/basicgraphicslayouts/basicgraphicslayouts.pro4
-rw-r--r--examples/widgets/graphicsview/chip/chip.pro4
-rw-r--r--examples/widgets/graphicsview/chip/view.cpp2
-rw-r--r--examples/widgets/graphicsview/chip/view.h2
-rw-r--r--examples/widgets/graphicsview/collidingmice/collidingmice.pro5
-rw-r--r--examples/widgets/graphicsview/diagramscene/diagramscene.pro4
-rw-r--r--examples/widgets/graphicsview/dragdroprobot/dragdroprobot.pro4
-rw-r--r--examples/widgets/graphicsview/elasticnodes/elasticnodes.pro4
-rw-r--r--examples/widgets/graphicsview/elasticnodes/graphwidget.cpp2
-rw-r--r--examples/widgets/graphicsview/elasticnodes/graphwidget.h2
-rw-r--r--examples/widgets/graphicsview/embeddeddialogs/embeddeddialogs.pro4
-rw-r--r--examples/widgets/graphicsview/graphicsview.pro4
-rw-r--r--examples/widgets/graphicsview/padnavigator/padnavigator.pro2
-rw-r--r--examples/widgets/graphicsview/simpleanchorlayout/simpleanchorlayout.pro7
-rw-r--r--examples/widgets/itemviews/addressbook/addressbook.pro4
-rw-r--r--examples/widgets/itemviews/basicsortfiltermodel/basicsortfiltermodel.pro5
-rw-r--r--examples/widgets/itemviews/chart/chart.pro5
-rw-r--r--examples/widgets/itemviews/coloreditorfactory/coloreditorfactory.pro5
-rw-r--r--examples/widgets/itemviews/combowidgetmapper/combowidgetmapper.pro3
-rw-r--r--examples/widgets/itemviews/customsortfiltermodel/customsortfiltermodel.pro5
-rw-r--r--examples/widgets/itemviews/dirview/dirview.pro4
-rw-r--r--examples/widgets/itemviews/editabletreemodel/editabletreemodel.pro5
-rw-r--r--examples/widgets/itemviews/fetchmore/fetchmore.pro4
-rw-r--r--examples/widgets/itemviews/frozencolumn/frozencolumn.pro3
-rw-r--r--examples/widgets/itemviews/interview/interview.pro4
-rw-r--r--examples/widgets/itemviews/itemviews.pro3
-rw-r--r--examples/widgets/itemviews/pixelator/pixelator.pro6
-rw-r--r--examples/widgets/itemviews/puzzle/puzzle.pro5
-rw-r--r--examples/widgets/itemviews/simpledommodel/simpledommodel.pro1
-rw-r--r--examples/widgets/itemviews/simpletreemodel/simpletreemodel.pro5
-rw-r--r--examples/widgets/itemviews/simplewidgetmapper/simplewidgetmapper.pro4
-rw-r--r--examples/widgets/itemviews/spinboxdelegate/spinboxdelegate.pro4
-rw-r--r--examples/widgets/itemviews/spreadsheet/spreadsheet.pro4
-rw-r--r--examples/widgets/itemviews/stardelegate/stardelegate.pro4
-rw-r--r--examples/widgets/layouts/basiclayouts/basiclayouts.pro4
-rw-r--r--examples/widgets/layouts/borderlayout/borderlayout.pro4
-rw-r--r--examples/widgets/layouts/dynamiclayouts/dynamiclayouts.pro4
-rw-r--r--examples/widgets/layouts/flowlayout/flowlayout.pro4
-rw-r--r--examples/widgets/layouts/layouts.pro2
-rw-r--r--examples/widgets/mainwindows/application/application.pro4
-rw-r--r--examples/widgets/mainwindows/dockwidgets/dockwidgets.pro6
-rw-r--r--examples/widgets/mainwindows/mainwindow/mainwindow.pro4
-rw-r--r--examples/widgets/mainwindows/mainwindows.pro2
-rw-r--r--examples/widgets/mainwindows/mdi/mdi.pro4
-rw-r--r--examples/widgets/mainwindows/menus/menus.pro4
-rw-r--r--examples/widgets/mainwindows/recentfiles/recentfiles.pro4
-rw-r--r--examples/widgets/mainwindows/sdi/sdi.pro4
-rw-r--r--examples/widgets/painting/affine/affine.pro2
-rw-r--r--examples/widgets/painting/affine/xform.cpp2
-rw-r--r--examples/widgets/painting/affine/xform.h2
-rw-r--r--examples/widgets/painting/basicdrawing/basicdrawing.pro4
-rw-r--r--examples/widgets/painting/composition/composition.pro2
-rw-r--r--examples/widgets/painting/concentriccircles/concentriccircles.pro5
-rw-r--r--examples/widgets/painting/deform/deform.pro2
-rw-r--r--examples/widgets/painting/fontsampler/fontsampler.pro6
-rw-r--r--examples/widgets/painting/gradients/gradients.pro2
-rw-r--r--examples/widgets/painting/imagecomposition/imagecomposition.pro5
-rw-r--r--examples/widgets/painting/painterpaths/painterpaths.pro5
-rw-r--r--examples/widgets/painting/painting.pro2
-rw-r--r--examples/widgets/painting/pathstroke/pathstroke.pro2
-rw-r--r--examples/widgets/painting/shared/shared.pri2
-rw-r--r--examples/widgets/painting/shared/shared.pro6
-rw-r--r--examples/widgets/painting/transformations/transformations.pro4
-rw-r--r--examples/widgets/richtext/calendar/calendar.pro4
-rw-r--r--examples/widgets/richtext/orderform/orderform.pro6
-rw-r--r--examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter.pro4
-rw-r--r--examples/widgets/richtext/textedit/textedit.pro8
-rw-r--r--examples/widgets/richtext/textedit/textedit.qdoc5
-rw-r--r--examples/widgets/scroller/graphicsview/graphicsview.pro3
-rw-r--r--examples/widgets/statemachine/eventtransitions/eventtransitions.pro4
-rw-r--r--examples/widgets/statemachine/rogue/rogue.pro5
-rw-r--r--examples/widgets/statemachine/statemachine.pro2
-rw-r--r--examples/widgets/statemachine/trafficlight/trafficlight.pro3
-rw-r--r--examples/widgets/statemachine/twowaybutton/twowaybutton.pro3
-rw-r--r--examples/widgets/tools/codecs/codecs.pro4
-rw-r--r--examples/widgets/tools/completer/completer.pro4
-rw-r--r--examples/widgets/tools/customcompleter/customcompleter.pro4
-rw-r--r--examples/widgets/tools/echoplugin/echoplugin.pro2
-rw-r--r--examples/widgets/tools/echoplugin/echowindow/echowindow.pro4
-rw-r--r--examples/widgets/tools/echoplugin/plugin/plugin.pro3
-rw-r--r--examples/widgets/tools/i18n/i18n.pro4
-rw-r--r--examples/widgets/tools/plugandpaint/plugandpaint.pro4
-rw-r--r--examples/widgets/tools/plugandpaintplugins/basictools/basictools.pro3
-rw-r--r--examples/widgets/tools/plugandpaintplugins/basictools/basictoolsplugin.h2
-rw-r--r--examples/widgets/tools/plugandpaintplugins/extrafilters/extrafilters.pro3
-rw-r--r--examples/widgets/tools/plugandpaintplugins/plugandpaintplugins.pro2
-rw-r--r--examples/widgets/tools/regexp/regexp.pro4
-rw-r--r--examples/widgets/tools/settingseditor/settingseditor.pro4
-rw-r--r--examples/widgets/tools/styleplugin/plugin/plugin.pro4
-rw-r--r--examples/widgets/tools/styleplugin/styleplugin.pro2
-rw-r--r--examples/widgets/tools/styleplugin/stylewindow/stylewindow.pro4
-rw-r--r--examples/widgets/tools/tools.pro2
-rw-r--r--examples/widgets/tools/treemodelcompleter/treemodelcompleter.pro4
-rw-r--r--examples/widgets/tools/undo/undo.pro4
-rw-r--r--examples/widgets/tools/undoframework/undoframework.pro4
-rw-r--r--examples/widgets/tutorials/addressbook-fr/addressbook-fr.pro1
-rw-r--r--examples/widgets/tutorials/addressbook-fr/part1/part1.pro4
-rw-r--r--examples/widgets/tutorials/addressbook-fr/part2/part2.pro4
-rw-r--r--examples/widgets/tutorials/addressbook-fr/part3/part3.pro4
-rw-r--r--examples/widgets/tutorials/addressbook-fr/part4/part4.pro4
-rw-r--r--examples/widgets/tutorials/addressbook-fr/part5/part5.pro4
-rw-r--r--examples/widgets/tutorials/addressbook-fr/part6/part6.pro4
-rw-r--r--examples/widgets/tutorials/addressbook-fr/part7/part7.pro4
-rw-r--r--examples/widgets/tutorials/addressbook/addressbook.pro2
-rw-r--r--examples/widgets/tutorials/addressbook/part1/part1.pro4
-rw-r--r--examples/widgets/tutorials/addressbook/part2/part2.pro4
-rw-r--r--examples/widgets/tutorials/addressbook/part3/part3.pro4
-rw-r--r--examples/widgets/tutorials/addressbook/part4/part4.pro4
-rw-r--r--examples/widgets/tutorials/addressbook/part5/part5.pro4
-rw-r--r--examples/widgets/tutorials/addressbook/part6/part6.pro4
-rw-r--r--examples/widgets/tutorials/addressbook/part7/part7.pro4
-rw-r--r--examples/widgets/tutorials/gettingStarted/gettingStarted.pro1
-rw-r--r--examples/widgets/tutorials/gettingStarted/gsQt/gsqt.pro2
-rw-r--r--examples/widgets/tutorials/modelview/1_readonly/1_readonly.pro4
-rw-r--r--examples/widgets/tutorials/modelview/2_formatting/2_formatting.pro4
-rw-r--r--examples/widgets/tutorials/modelview/3_changingmodel/3_changingmodel.pro4
-rw-r--r--examples/widgets/tutorials/modelview/4_headers/4_headers.pro4
-rw-r--r--examples/widgets/tutorials/modelview/5_edit/5_edit.pro4
-rw-r--r--examples/widgets/tutorials/modelview/6_treeview/6_treeview.pro3
-rw-r--r--examples/widgets/tutorials/modelview/7_selections/7_selections.pro3
-rw-r--r--examples/widgets/tutorials/modelview/modelview.pro2
-rw-r--r--examples/widgets/tutorials/threads/clock/clock.pro4
-rw-r--r--examples/widgets/tutorials/threads/movedobject/movedobject.pro3
-rw-r--r--examples/widgets/tutorials/threads/threads.pro4
-rw-r--r--examples/widgets/tutorials/widgets/childwidget/childwidget.pro4
-rw-r--r--examples/widgets/tutorials/widgets/nestedlayouts/nestedlayouts.pro4
-rw-r--r--examples/widgets/tutorials/widgets/toplevel/toplevel.pro4
-rw-r--r--examples/widgets/tutorials/widgets/widgets.pro1
-rw-r--r--examples/widgets/tutorials/widgets/windowlayout/windowlayout.pro4
-rw-r--r--examples/widgets/widgets.pro1
-rw-r--r--examples/widgets/widgets/analogclock/analogclock.pro5
-rw-r--r--examples/widgets/widgets/calculator/calculator.pro5
-rw-r--r--examples/widgets/widgets/calendarwidget/calendarwidget.pro4
-rw-r--r--examples/widgets/widgets/charactermap/charactermap.pro4
-rw-r--r--examples/widgets/widgets/codeeditor/codeeditor.pro5
-rw-r--r--examples/widgets/widgets/digitalclock/digitalclock.pro4
-rw-r--r--examples/widgets/widgets/groupbox/groupbox.pro4
-rw-r--r--examples/widgets/widgets/icons/icons.pro3
-rw-r--r--examples/widgets/widgets/imageviewer/imageviewer.pro5
-rw-r--r--examples/widgets/widgets/lineedits/lineedits.pro4
-rw-r--r--examples/widgets/widgets/mousebuttons/buttontester.cpp58
-rw-r--r--examples/widgets/widgets/mousebuttons/buttontester.h3
-rw-r--r--examples/widgets/widgets/mousebuttons/main.cpp4
-rw-r--r--examples/widgets/widgets/movie/movie.pro4
-rw-r--r--examples/widgets/widgets/scribble/scribble.pro6
-rw-r--r--examples/widgets/widgets/shapedclock/shapedclock.pro5
-rw-r--r--examples/widgets/widgets/sliders/sliders.pro4
-rw-r--r--examples/widgets/widgets/spinboxes/spinboxes.pro4
-rw-r--r--examples/widgets/widgets/styles/styles.pro4
-rw-r--r--examples/widgets/widgets/stylesheet/stylesheet.pro4
-rw-r--r--examples/widgets/widgets/tablet/tablet.pro4
-rw-r--r--examples/widgets/widgets/tetrix/tetrix.pro5
-rw-r--r--examples/widgets/widgets/tooltips/tooltips.pro4
-rw-r--r--examples/widgets/widgets/wiggly/wiggly.pro2
-rw-r--r--examples/widgets/widgets/windowflags/windowflags.pro4
-rw-r--r--examples/xml/doc/images/xmlstreamexample-filemenu.pngbin0 -> 9380 bytes
-rw-r--r--examples/xml/doc/images/xmlstreamexample-helpmenu.pngbin0 -> 10856 bytes
-rw-r--r--examples/xml/doc/images/xmlstreamexample-screenshot.pngbin0 -> 22323 bytes
-rw-r--r--examples/xml/doc/src/qxmlstreambookmarks.qdoc194
-rw-r--r--examples/xml/doc/src/saxbookmarks.qdoc7
-rw-r--r--examples/xml/xml.pro2
-rw-r--r--mkspecs/common/gcc-base-unix.conf1
-rw-r--r--mkspecs/devices/linux-imx6-g++/qeglfshooks_imx6.cpp4
-rw-r--r--mkspecs/devices/linux-imx6-g++/qmake.conf2
-rw-r--r--mkspecs/devices/linux-tegra2-g++/qmake.conf2
-rw-r--r--mkspecs/features/create_cmake.prf26
-rw-r--r--mkspecs/features/ctest_testcase.prf2
-rw-r--r--mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in (renamed from mkspecs/cmake/Qt5BasicConfig.cmake.in)0
-rw-r--r--mkspecs/features/data/cmake/Qt5ConfigVersion.cmake.in (renamed from mkspecs/cmake/Qt5ConfigVersion.cmake.in)0
-rw-r--r--mkspecs/features/data/headersclean/tst_headersclean.cpp.in (renamed from tests/auto/other/headersclean/tst_headersclean.h)18
-rw-r--r--mkspecs/features/dbuscommon.pri11
-rw-r--r--mkspecs/features/default_post.prf11
-rw-r--r--mkspecs/features/default_pre.prf9
-rw-r--r--mkspecs/features/device_config.prf2
-rw-r--r--mkspecs/features/moc.prf5
-rw-r--r--mkspecs/features/qml1_module.prf11
-rw-r--r--mkspecs/features/qml1_plugin.prf11
-rw-r--r--mkspecs/features/qml_module.prf11
-rw-r--r--mkspecs/features/qml_plugin.prf11
-rw-r--r--mkspecs/features/qt.prf102
-rw-r--r--mkspecs/features/qt_build_config.prf12
-rw-r--r--mkspecs/features/qt_build_paths.prf11
-rw-r--r--mkspecs/features/qt_config.prf2
-rw-r--r--mkspecs/features/qt_docs.prf16
-rw-r--r--mkspecs/features/qt_docs_targets.prf74
-rw-r--r--mkspecs/features/qt_example_installs.prf18
-rw-r--r--mkspecs/features/qt_functions.prf23
-rw-r--r--mkspecs/features/qt_headersclean.prf (renamed from tests/auto/other/headersclean/headersclean.pri)25
-rw-r--r--mkspecs/features/qt_installs.prf11
-rw-r--r--mkspecs/features/qt_module.prf46
-rw-r--r--mkspecs/features/qt_module_fwdpri.prf13
-rw-r--r--mkspecs/features/qt_module_headers.prf11
-rw-r--r--mkspecs/features/qt_parts.prf11
-rw-r--r--mkspecs/features/qt_plugin.prf25
-rw-r--r--mkspecs/features/qt_tool.prf13
-rw-r--r--mkspecs/features/resolve_target.prf11
-rw-r--r--mkspecs/features/resources.prf1
-rw-r--r--mkspecs/features/simd.prf11
-rw-r--r--mkspecs/features/spec_post.prf6
-rw-r--r--mkspecs/features/spec_pre.prf4
-rw-r--r--mkspecs/features/testcase_targets.prf9
-rw-r--r--mkspecs/features/uic.prf38
-rw-r--r--mkspecs/features/win32/thread.prf22
-rw-r--r--mkspecs/features/win32/thread_off.prf2
-rw-r--r--qmake/Makefile.win326
-rw-r--r--qmake/generators/mac/pbuilder_pbx.cpp12
-rw-r--r--qmake/generators/makefile.cpp13
-rw-r--r--qmake/generators/projectgenerator.cpp1
-rw-r--r--qmake/generators/unix/unixmake.cpp7
-rw-r--r--qmake/generators/win32/mingw_make.cpp21
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp9
-rw-r--r--qmake/generators/win32/msvc_objectmodel.cpp10
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp11
-rw-r--r--qmake/generators/win32/winmakefile.cpp21
-rw-r--r--qmake/library/proitems.h20
-rw-r--r--qmake/project.h8
-rw-r--r--qmake/property.cpp2
-rw-r--r--qmake/qmake.pri2
-rw-r--r--src/3rdparty/angle/include/KHR/khrplatform.h7
-rw-r--r--src/3rdparty/angle/src/libEGL/libEGL_mingw32.def36
-rw-r--r--src/3rdparty/angle/src/libEGL/libEGLd_mingw32.def36
-rw-r--r--src/3rdparty/angle/src/libGLESv2/libGLESv2_mingw32.def182
-rw-r--r--src/3rdparty/angle/src/libGLESv2/libGLESv2d_mingw32.def182
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-arabic.c2
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-external.h2
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-global.h2
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-greek.c2
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-hangul.c2
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-hebrew.c2
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-impl.c2
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp2
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-khmer.c2
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-myanmar.c2
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-shaper-all.cpp2
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-shaper-private.h2
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp2
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-shaper.h2
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-stream.c2
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-stream.h2
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-thai.c2
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-tibetan.c2
-rw-r--r--src/3rdparty/harfbuzz/tests/shaping/harfbuzz-qt.cpp2
-rw-r--r--src/3rdparty/harfbuzz/tests/shaping/main.cpp2
-rw-r--r--src/3rdparty/iaccessible2/iaccessible2.pri8
-rw-r--r--src/angle/README.qt5
-rw-r--r--src/angle/patches/0007-ANGLE-Fix-typedefs-for-Win64.patch38
-rw-r--r--src/angle/src/libEGL/libEGL.pro5
-rw-r--r--src/angle/src/libGLESv2/libGLESv2.pro6
-rw-r--r--src/concurrent/doc/qtconcurrent.qdocconf10
-rw-r--r--src/concurrent/qtconcurrentfunctionwrappers.h1
-rw-r--r--src/corelib/Qt5CTestMacros.cmake5
-rw-r--r--src/corelib/Qt5CoreConfigExtras.cmake.in6
-rw-r--r--src/corelib/corelib.pro28
-rw-r--r--src/corelib/doc/qtcore.qdocconf16
-rw-r--r--src/corelib/doc/snippets/code/doc_src_plugins-howto.cpp17
-rw-r--r--src/corelib/doc/snippets/code/doc_src_plugins-howto.pro11
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_io_qsettings.cpp2
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_kernel_qobject.cpp2
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_tools_qbytearray.cpp2
-rw-r--r--src/corelib/doc/snippets/hellotrmain.cpp (renamed from examples/linguist/hellotr/main.cpp)17
-rw-r--r--src/corelib/doc/src/custom-types.qdoc165
-rw-r--r--src/corelib/doc/src/implicit-sharing.qdoc2
-rw-r--r--src/corelib/doc/src/json.qdoc2
-rw-r--r--src/corelib/doc/src/objectmodel/object.qdoc3
-rw-r--r--src/corelib/doc/src/objectmodel/properties.qdoc4
-rw-r--r--src/corelib/doc/src/plugins-howto.qdoc25
-rw-r--r--src/corelib/doc/src/statemachine.qdoc2
-rw-r--r--src/corelib/doc/src/threads-basics.qdoc18
-rw-r--r--src/corelib/doc/src/threads.qdoc8
-rw-r--r--src/corelib/doc/src/timers.qdoc123
-rw-r--r--src/corelib/global/qconfig-minimal.h3
-rw-r--r--src/corelib/global/qconfig-nacl.h3
-rw-r--r--src/corelib/global/qconfig-small.h5
-rw-r--r--src/corelib/global/qfeatures.h6
-rw-r--r--src/corelib/global/qfeatures.txt9
-rw-r--r--src/corelib/global/qflags.h3
-rw-r--r--src/corelib/global/qglobal.cpp20
-rw-r--r--src/corelib/global/qglobal.h15
-rw-r--r--src/corelib/global/qlogging.cpp2
-rw-r--r--src/corelib/global/qnamespace.qdoc6
-rw-r--r--src/corelib/global/qsysinfo.h4
-rw-r--r--src/corelib/global/qtypeinfo.h4
-rw-r--r--src/corelib/global/qtypetraits.h3
-rw-r--r--src/corelib/io/qabstractfileengine.cpp2
-rw-r--r--src/corelib/io/qprocess_win.cpp3
-rw-r--r--src/corelib/io/qstandardpaths.h2
-rw-r--r--src/corelib/io/qstandardpaths_unix.cpp1
-rw-r--r--src/corelib/io/qurl.cpp251
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel.cpp2
-rw-r--r--src/corelib/itemmodels/qabstractproxymodel.cpp4
-rw-r--r--src/corelib/itemmodels/qsortfilterproxymodel.cpp4
-rw-r--r--src/corelib/json/qjsonarray.cpp8
-rw-r--r--src/corelib/json/qjsonobject.cpp13
-rw-r--r--src/corelib/kernel/qeventdispatcher_blackberry.cpp2
-rw-r--r--src/corelib/kernel/qmetatype.h17
-rw-r--r--src/corelib/kernel/qobject.cpp16
-rw-r--r--src/corelib/kernel/qtimer.cpp6
-rw-r--r--src/corelib/kernel/qtranslator.cpp6
-rw-r--r--src/corelib/kernel/qvariant.cpp4
-rw-r--r--src/corelib/kernel/qwineventnotifier.h9
-rw-r--r--src/corelib/mimetypes/qmimedatabase.cpp14
-rw-r--r--src/corelib/plugin/qfactoryloader.cpp21
-rw-r--r--src/corelib/plugin/qlibrary.cpp2
-rw-r--r--src/corelib/plugin/qlibrary_p.h2
-rw-r--r--src/corelib/plugin/qlibrary_unix.cpp100
-rw-r--r--src/corelib/plugin/qlibrary_win.cpp11
-rw-r--r--src/corelib/plugin/qpluginloader.cpp54
-rw-r--r--src/corelib/plugin/quuid.cpp13
-rw-r--r--src/corelib/plugin/quuid.h4
-rw-r--r--src/corelib/statemachine/qstatemachine.cpp8
-rw-r--r--src/corelib/thread/qatomic.cpp88
-rw-r--r--src/corelib/thread/qatomic.h10
-rw-r--r--src/corelib/thread/qbasicatomic.h4
-rw-r--r--src/corelib/thread/qfuture.qdoc8
-rw-r--r--src/corelib/thread/qmutex.cpp4
-rw-r--r--src/corelib/thread/qmutex_linux.cpp5
-rw-r--r--src/corelib/thread/qthread_unix.cpp7
-rw-r--r--src/corelib/thread/qwaitcondition.qdoc2
-rw-r--r--src/corelib/tools/qbytearray.cpp46
-rw-r--r--src/corelib/tools/qbytearray.h4
-rw-r--r--src/corelib/tools/qelapsedtimer_unix.cpp2
-rw-r--r--src/corelib/tools/qharfbuzz_p.h3
-rw-r--r--src/corelib/tools/qhash.cpp12
-rw-r--r--src/corelib/tools/qlinkedlist.cpp12
-rw-r--r--src/corelib/tools/qlist.cpp12
-rw-r--r--src/corelib/tools/qlist.h2
-rw-r--r--src/corelib/tools/qlocale.cpp25
-rw-r--r--src/corelib/tools/qlocale.h1
-rw-r--r--src/corelib/tools/qlocale.qdoc7
-rw-r--r--src/corelib/tools/qmap.cpp12
-rw-r--r--src/corelib/tools/qregexp.cpp4
-rw-r--r--src/corelib/tools/qset.qdoc16
-rw-r--r--src/corelib/tools/qstring.cpp12
-rw-r--r--src/corelib/tools/qunicodetools.cpp3
-rw-r--r--src/corelib/tools/qvarlengtharray.qdoc12
-rw-r--r--src/corelib/tools/qvector.cpp12
-rw-r--r--src/corelib/tools/tools.pri3
-rw-r--r--src/dbus/doc/images/qurl-ftppath.pngbin0 -> 1974 bytes
-rw-r--r--src/dbus/doc/qtdbus.qdocconf12
-rw-r--r--src/dbus/qdbusxmlparser.cpp156
-rw-r--r--src/gui/accessible/qaccessible.cpp14
-rw-r--r--src/gui/accessible/qaccessible.h3
-rw-r--r--src/gui/accessible/qaccessible2.cpp13
-rw-r--r--src/gui/accessible/qaccessible2.h1
-rw-r--r--src/gui/accessible/qaccessibleobject.cpp2
-rw-r--r--src/gui/doc/qtgui.qdocconf17
-rw-r--r--src/gui/doc/src/dnd.qdoc37
-rw-r--r--src/gui/doc/src/richtext.qdoc4
-rw-r--r--src/gui/gui.pro4
-rw-r--r--src/gui/image/qimage.cpp1
-rw-r--r--src/gui/image/qimageiohandler.cpp4
-rw-r--r--src/gui/image/qimageiohandler.h4
-rw-r--r--src/gui/image/qimagereader.cpp29
-rw-r--r--src/gui/image/qimagewriter.cpp22
-rw-r--r--src/gui/kernel/qguiapplication.cpp7
-rw-r--r--src/gui/kernel/qkeysequence.cpp2
-rw-r--r--src/gui/kernel/qopenglcontext.cpp2
-rw-r--r--src/gui/kernel/qplatformcursor.h2
-rw-r--r--src/gui/kernel/qplatformdialoghelper.cpp4
-rw-r--r--src/gui/kernel/qplatformnativeinterface.cpp6
-rw-r--r--src/gui/kernel/qplatformnativeinterface.h2
-rw-r--r--src/gui/kernel/qplatformwindow.cpp35
-rw-r--r--src/gui/kernel/qplatformwindow.h1
-rw-r--r--src/gui/kernel/qshortcutmap.cpp2
-rw-r--r--src/gui/kernel/qwindow.cpp193
-rw-r--r--src/gui/kernel/qwindow.h82
-rw-r--r--src/gui/kernel/qwindow_p.h4
-rw-r--r--src/gui/math3d/qmatrix4x4.cpp18
-rw-r--r--src/gui/math3d/qmatrix4x4.h2
-rw-r--r--src/gui/math3d/qquaternion.cpp2
-rw-r--r--src/gui/opengl/opengl.pri2
-rw-r--r--src/gui/opengl/qopenglpaintdevice.cpp44
-rw-r--r--src/gui/painting/qcolor.cpp2
-rw-r--r--src/gui/painting/qdrawhelper_ssse3.cpp2
-rw-r--r--src/gui/painting/qmath_p.h1
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp2
-rw-r--r--src/gui/text/qfontdatabase.cpp27
-rw-r--r--src/gui/text/qfontdatabase_qpa.cpp5
-rw-r--r--src/gui/text/qfontengine_ft.cpp14
-rw-r--r--src/gui/text/qplatformfontdatabase.cpp10
-rw-r--r--src/gui/text/qplatformfontdatabase.h3
-rw-r--r--src/gui/text/text.pri2
-rw-r--r--src/gui/util/qdesktopservices.cpp2
-rw-r--r--src/network/access/qnetworkcookie.cpp4
-rw-r--r--src/network/access/qnetworkreplyhttpimpl_p.h2
-rw-r--r--src/network/doc/images/network-examples.pngbin0 -> 8946 bytes
-rw-r--r--src/network/doc/qtnetwork.qdocconf10
-rw-r--r--src/network/doc/snippets/code/src_network_access_qftp.cpp4
-rw-r--r--src/network/doc/src/examples.qdoc68
-rw-r--r--src/network/doc/src/ssl.qdoc4
-rw-r--r--src/network/kernel/qnetworkproxy.cpp2
-rw-r--r--src/network/socket/qabstractsocket.cpp4
-rw-r--r--src/network/socket/qlocalserver_tcp.cpp6
-rw-r--r--src/network/socket/qlocalsocket_tcp.cpp2
-rw-r--r--src/network/socket/qlocalsocket_win.cpp2
-rw-r--r--src/network/ssl/qsslcertificate.cpp2
-rw-r--r--src/network/ssl/qsslerror.h4
-rw-r--r--src/network/ssl/qsslsocket.h4
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp6
-rw-r--r--src/network/ssl/qsslsocket_openssl_symbols.cpp8
-rw-r--r--src/network/ssl/qsslsocket_openssl_symbols_p.h4
-rw-r--r--src/opengl/doc/qtopengl.qdocconf9
-rw-r--r--src/opengl/opengl.pro2
-rw-r--r--src/opengl/qgl.cpp5
-rw-r--r--src/opengl/qgl_qpa.cpp7
-rw-r--r--src/platformsupport/dnd/qsimpledrag.cpp2
-rw-r--r--src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp2
-rw-r--r--src/platformsupport/fbconvenience/qfbcursor.cpp2
-rw-r--r--src/platformsupport/fbconvenience/qfbcursor_p.h2
-rw-r--r--src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp2
-rw-r--r--src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp14
-rw-r--r--src/platformsupport/fontdatabases/fontdatabases.pri1
-rw-r--r--src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm3
-rw-r--r--src/platformsupport/input/evdevtouch/qevdevtouch.cpp2
-rw-r--r--src/platformsupport/linuxaccessibility/application.cpp4
-rw-r--r--src/platformsupport/linuxaccessibility/application_p.h4
-rw-r--r--src/platformsupport/linuxaccessibility/atspiadaptor.cpp116
-rw-r--r--src/platformsupport/linuxaccessibility/atspiadaptor_p.h6
-rw-r--r--src/platformsupport/linuxaccessibility/bridge.cpp4
-rw-r--r--src/platformsupport/linuxaccessibility/bridge_p.h4
-rw-r--r--src/platformsupport/linuxaccessibility/cache.cpp4
-rw-r--r--src/platformsupport/linuxaccessibility/cache_p.h4
-rw-r--r--src/platformsupport/linuxaccessibility/constant_mappings.cpp6
-rw-r--r--src/platformsupport/linuxaccessibility/constant_mappings_p.h3
-rw-r--r--src/platformsupport/linuxaccessibility/dbusconnection.cpp4
-rw-r--r--src/platformsupport/linuxaccessibility/dbusconnection_p.h4
-rw-r--r--src/platformsupport/linuxaccessibility/linuxaccessibility.pri2
-rw-r--r--src/platformsupport/linuxaccessibility/struct_marshallers.cpp4
-rw-r--r--src/plugins/accessible/widgets/main.cpp4
-rw-r--r--src/plugins/accessible/widgets/qaccessiblemenu.cpp2
-rw-r--r--src/plugins/accessible/widgets/qaccessiblewidgets.cpp8
-rw-r--r--src/plugins/accessible/widgets/qaccessiblewidgets.h6
-rw-r--r--src/plugins/accessible/widgets/rangecontrols.cpp10
-rw-r--r--src/plugins/accessible/widgets/rangecontrols.h2
-rw-r--r--src/plugins/accessible/widgets/simplewidgets.cpp8
-rw-r--r--src/plugins/accessible/widgets/simplewidgets.h1
-rw-r--r--src/plugins/accessible/widgets/widgets.pro1
-rw-r--r--src/plugins/bearer/bearer.pro2
-rw-r--r--src/plugins/bearer/blackberry/blackberry.pro1
-rw-r--r--src/plugins/bearer/connman/connman.pro1
-rw-r--r--src/plugins/bearer/connman/qconnmanservice_linux.cpp48
-rw-r--r--src/plugins/bearer/connman/qconnmanservice_linux_p.h13
-rw-r--r--src/plugins/bearer/corewlan/corewlan.pro1
-rw-r--r--src/plugins/bearer/generic/generic.pro1
-rw-r--r--src/plugins/bearer/nativewifi/nativewifi.pro1
-rw-r--r--src/plugins/bearer/networkmanager/networkmanager.pro1
-rw-r--r--src/plugins/bearer/nla/nla.pro1
-rw-r--r--src/plugins/generic/evdevkeyboard/evdevkeyboard.pro1
-rw-r--r--src/plugins/generic/evdevmouse/evdevmouse.pro1
-rw-r--r--src/plugins/generic/evdevtablet/evdevtablet.pro1
-rw-r--r--src/plugins/generic/evdevtouch/evdevtouch.pro1
-rw-r--r--src/plugins/generic/meego/meego.pro1
-rw-r--r--src/plugins/generic/tslib/tslib.pro1
-rw-r--r--src/plugins/imageformats/gif/gif.pro1
-rw-r--r--src/plugins/imageformats/gif/main.h4
-rw-r--r--src/plugins/imageformats/ico/ico.pro1
-rw-r--r--src/plugins/imageformats/jpeg/jpeg.pro1
-rw-r--r--src/plugins/platforminputcontexts/ibus/ibus.pro1
-rw-r--r--src/plugins/platforminputcontexts/maliit/maliit.pro1
-rw-r--r--src/plugins/platforminputcontexts/platforminputcontexts.pro2
-rw-r--r--src/plugins/platforms/cocoa/cocoa.pro12
-rw-r--r--src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm8
-rw-r--r--src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm18
-rw-r--r--src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm6
-rw-r--r--src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm16
-rw-r--r--src/plugins/platforms/cocoa/qcocoahelpers.mm41
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintegration.h4
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintegration.mm6
-rw-r--r--src/plugins/platforms/cocoa/qcocoakeymapper.h111
-rw-r--r--src/plugins/platforms/cocoa/qcocoakeymapper.mm468
-rw-r--r--src/plugins/platforms/cocoa/qcocoanativeinterface.mm6
-rw-r--r--src/plugins/platforms/cocoa/qcocoasystemsettings.mm32
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm13
-rw-r--r--src/plugins/platforms/cocoa/qnsview.h1
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm35
-rw-r--r--src/plugins/platforms/cocoa/qnsviewaccessibility.mm2
-rw-r--r--src/plugins/platforms/directfb/directfb.pro1
-rw-r--r--src/plugins/platforms/directfb/qdirectfbblitter.cpp2
-rw-r--r--src/plugins/platforms/directfb/qdirectfbcursor.cpp4
-rw-r--r--src/plugins/platforms/directfb/qdirectfbcursor.h4
-rw-r--r--src/plugins/platforms/eglfs/eglfs.pro1
-rw-r--r--src/plugins/platforms/eglfs/qeglfscursor.cpp4
-rw-r--r--src/plugins/platforms/eglfs/qeglfscursor.h4
-rw-r--r--src/plugins/platforms/eglfs/qeglfshooks_stub.cpp1
-rw-r--r--src/plugins/platforms/eglfs/qeglfswindow.cpp2
-rw-r--r--src/plugins/platforms/kms/kms.pro1
-rw-r--r--src/plugins/platforms/linuxfb/linuxfb.pro1
-rw-r--r--src/plugins/platforms/minimal/minimal.pro1
-rw-r--r--src/plugins/platforms/minimalegl/minimalegl.pro1
-rw-r--r--src/plugins/platforms/openwfd/openwf.pro1
-rw-r--r--src/plugins/platforms/qnx/qnx.pro3
-rw-r--r--src/plugins/platforms/qnx/qqnxfiledialoghelper.cpp15
-rw-r--r--src/plugins/platforms/qnx/qqnxfiledialoghelper.h6
-rw-r--r--src/plugins/platforms/qnx/qqnxintegration.cpp2
-rw-r--r--src/plugins/platforms/qnx/qqnxintegration.h2
-rw-r--r--src/plugins/platforms/qnx/qqnxscreen.cpp2
-rw-r--r--src/plugins/platforms/qnx/qqnxtheme.cpp14
-rw-r--r--src/plugins/platforms/qnx/qqnxtheme.h9
-rw-r--r--src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp5
-rw-r--r--src/plugins/platforms/qnx/qqnxwindow.cpp6
-rw-r--r--src/plugins/platforms/windows/accessible/comutils.cpp20
-rw-r--r--src/plugins/platforms/windows/accessible/comutils.h3
-rw-r--r--src/plugins/platforms/windows/accessible/iaccessible2.cpp6
-rw-r--r--src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp30
-rw-r--r--src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowsfontdatabase.cpp167
-rw-r--r--src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp8
-rw-r--r--src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp5
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp22
-rw-r--r--src/plugins/platforms/windows/windows.pro5
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp71
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.h10
-rw-r--r--src/plugins/platforms/xcb/qxcbcursor.cpp2
-rw-r--r--src/plugins/platforms/xcb/qxcbcursor.h6
-rw-r--r--src/plugins/platforms/xcb/qxcbnativeinterface.cpp46
-rw-r--r--src/plugins/platforms/xcb/qxcbnativeinterface.h11
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.cpp52
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp103
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.h5
-rw-r--r--src/plugins/platforms/xcb/xcb-plugin.pro5
-rw-r--r--src/plugins/platforms/xcb/xcb-static/xcb-static.pro2
-rw-r--r--src/plugins/plugins.pro6
-rw-r--r--src/plugins/printsupport/cocoa/cocoa.pro1
-rw-r--r--src/plugins/printsupport/cups/cups.pro1
-rw-r--r--src/plugins/printsupport/windows/windows.pro1
-rw-r--r--src/plugins/sqldrivers/db2/db2.pro1
-rw-r--r--src/plugins/sqldrivers/ibase/ibase.pro1
-rw-r--r--src/plugins/sqldrivers/mysql/mysql.pro1
-rw-r--r--src/plugins/sqldrivers/oci/oci.pro1
-rw-r--r--src/plugins/sqldrivers/odbc/odbc.pro1
-rw-r--r--src/plugins/sqldrivers/psql/psql.pro1
-rw-r--r--src/plugins/sqldrivers/sqlite/sqlite.pro1
-rw-r--r--src/plugins/sqldrivers/sqlite2/sqlite2.pro1
-rw-r--r--src/plugins/sqldrivers/tds/tds.pro1
-rw-r--r--src/printsupport/doc/qtprintsupport.qdocconf10
-rw-r--r--src/sql/doc/qtsql.qdocconf12
-rw-r--r--src/sql/doc/src/sql-driver.qdoc2
-rw-r--r--src/sql/doc/src/sql-programming.qdoc6
-rw-r--r--src/sql/drivers/mysql/qsql_mysql.cpp1
-rw-r--r--src/sql/drivers/odbc/qsql_odbc.cpp27
-rw-r--r--src/sql/drivers/psql/qsql_psql.cpp38
-rw-r--r--src/sql/drivers/sqlite/qsql_sqlite.cpp1
-rw-r--r--src/sql/kernel/qsql.qdoc3
-rw-r--r--src/sql/kernel/qsqldriver.cpp1
-rw-r--r--src/sql/kernel/qsqlresult.cpp2
-rw-r--r--src/sql/models/qsqlrelationaldelegate.cpp6
-rw-r--r--src/sql/models/qsqlrelationaltablemodel.cpp1
-rw-r--r--src/testlib/3rdparty/valgrind_p.h1
-rw-r--r--src/testlib/doc/qttestlib.qdocconf38
-rw-r--r--src/testlib/doc/snippets/code/doc_src_qsignalspy.cpp4
-rw-r--r--src/testlib/qsignalspy.qdoc3
-rw-r--r--src/testlib/qtestaccessible.h4
-rw-r--r--src/testlib/qtestcase.cpp5
-rw-r--r--src/testlib/testlib.pro1
-rw-r--r--src/tools/bootstrap/bootstrap.pro20
-rw-r--r--src/tools/moc/moc.cpp6
-rw-r--r--src/tools/qdbuscpp2xml/qdbuscpp2xml.pro1
-rw-r--r--src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp2
-rw-r--r--src/tools/qdbusxml2cpp/qdbusxml2cpp.pro1
-rw-r--r--src/tools/qdoc/codemarker.cpp34
-rw-r--r--src/tools/qdoc/codemarker.h6
-rw-r--r--src/tools/qdoc/cppcodemarker.cpp86
-rw-r--r--src/tools/qdoc/generator.cpp6
-rw-r--r--src/tools/qdoc/htmlgenerator.cpp4
-rw-r--r--src/tools/qdoc/node.h5
-rw-r--r--src/tools/qdoc/qdoc.pro3
-rw-r--r--src/tools/qdoc/qdocdatabase.cpp35
-rw-r--r--src/tools/qdoc/qdocdatabase.h30
-rw-r--r--src/tools/qdoc/qdocindexfiles.cpp6
-rw-r--r--src/tools/qdoc/tree.cpp48
-rw-r--r--src/tools/rcc/rcc.cpp4
-rw-r--r--src/tools/tools.pro14
-rw-r--r--src/tools/uic/uic.cpp3
-rw-r--r--src/widgets/accessible/qaccessiblewidget.cpp2
-rw-r--r--src/widgets/dialogs/qdialog.cpp2
-rw-r--r--src/widgets/dialogs/qfiledialog.cpp4
-rw-r--r--src/widgets/dialogs/qmessagebox.cpp30
-rw-r--r--src/widgets/dialogs/qwizard.cpp2
-rw-r--r--src/widgets/doc/images/dialog-examples.pngbin0 -> 7049 bytes
-rw-r--r--src/widgets/doc/images/graphicsview-examples.pngbin0 -> 223121 bytes
-rw-r--r--src/widgets/doc/images/itemviews-examples.pngbin0 -> 32534 bytes
-rw-r--r--src/widgets/doc/images/mainwindow-examples.pngbin0 -> 10271 bytes
-rw-r--r--src/widgets/doc/qtwidgets.qdocconf12
-rw-r--r--src/widgets/doc/snippets/code/src_gui_kernel_qapplication.cpp30
-rw-r--r--src/widgets/doc/src/model-view-programming.qdoc3
-rw-r--r--src/widgets/doc/src/qtwidgets-examples.qdoc70
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/styles.qdoc4
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc32
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.cpp31
-rw-r--r--src/widgets/graphicsview/qgraphicsview.cpp106
-rw-r--r--src/widgets/graphicsview/qgraphicsview_p.h1
-rw-r--r--src/widgets/itemviews/qabstractitemview.cpp2
-rw-r--r--src/widgets/itemviews/qlistview.cpp4
-rw-r--r--src/widgets/itemviews/qlistwidget.cpp4
-rw-r--r--src/widgets/itemviews/qtableview.cpp4
-rw-r--r--src/widgets/itemviews/qtablewidget.cpp4
-rw-r--r--src/widgets/itemviews/qtreeview.cpp16
-rw-r--r--src/widgets/itemviews/qtreewidget.cpp4
-rw-r--r--src/widgets/kernel/qapplication.cpp13
-rw-r--r--src/widgets/kernel/qapplication.h3
-rw-r--r--src/widgets/kernel/qapplication_qpa.cpp3
-rw-r--r--src/widgets/kernel/qformlayout.cpp4
-rw-r--r--src/widgets/kernel/qwidget.cpp44
-rw-r--r--src/widgets/kernel/qwidgetsfunctions_wince.h2
-rw-r--r--src/widgets/styles/qcommonstyle.cpp8
-rw-r--r--src/widgets/styles/qfusionstyle.cpp2
-rw-r--r--src/widgets/styles/qgtkpainter.cpp1
-rw-r--r--src/widgets/styles/qgtkstyle.cpp4
-rw-r--r--src/widgets/styles/qmacstyle.qdoc2
-rw-r--r--src/widgets/styles/qmacstyle_mac.mm139
-rw-r--r--src/widgets/styles/qmacstyle_mac_p_p.h26
-rw-r--r--src/widgets/styles/qstylehelper.cpp2
-rw-r--r--src/widgets/styles/qstyleoption.cpp1
-rw-r--r--src/widgets/widgets.pro10
-rw-r--r--src/widgets/widgets/qabstractscrollarea.cpp31
-rw-r--r--src/widgets/widgets/qcheckbox.cpp4
-rw-r--r--src/widgets/widgets/qdatetimeedit.cpp12
-rw-r--r--src/widgets/widgets/qdial.cpp4
-rw-r--r--src/widgets/widgets/qfontcombobox.cpp2
-rw-r--r--src/widgets/widgets/qgroupbox.cpp4
-rw-r--r--src/widgets/widgets/qlabel.cpp4
-rw-r--r--src/widgets/widgets/qlcdnumber.cpp4
-rw-r--r--src/widgets/widgets/qlineedit.cpp4
-rw-r--r--src/widgets/widgets/qmenu.cpp2
-rw-r--r--src/widgets/widgets/qmenu_wince.rc4
-rw-r--r--src/widgets/widgets/qprogressbar.cpp4
-rw-r--r--src/widgets/widgets/qpushbutton.cpp4
-rw-r--r--src/widgets/widgets/qradiobutton.cpp4
-rw-r--r--src/widgets/widgets/qscrollbar.cpp20
-rw-r--r--src/widgets/widgets/qslider.cpp4
-rw-r--r--src/widgets/widgets/qspinbox.cpp4
-rw-r--r--src/widgets/widgets/qsplitter.cpp35
-rw-r--r--src/widgets/widgets/qtabwidget.cpp4
-rw-r--r--src/widgets/widgets/qtextedit.cpp15
-rw-r--r--src/widgets/widgets/qtextedit.h1
-rw-r--r--src/widgets/widgets/qtextedit_p.h1
-rw-r--r--src/widgets/widgets/qtoolbar.cpp30
-rw-r--r--src/winmain/winmain.pro2
-rw-r--r--src/xml/doc/qtxml.qdocconf10
-rw-r--r--sync.profile28
-rw-r--r--tests/auto/auto.pro8
-rw-r--r--tests/auto/corelib/animation/animation.pro2
-rw-r--r--tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp3
-rw-r--r--tests/auto/corelib/io/qfilesystementry/qfilesystementry.pro4
-rw-r--r--tests/auto/corelib/io/qprocess/qprocess.pri2
-rw-r--r--tests/auto/corelib/io/qprocess/tst_qprocess.cpp4
-rw-r--r--tests/auto/corelib/io/qsettings/tst_qsettings.cpp8
-rw-r--r--tests/auto/corelib/io/qurl/tst_qurl.cpp156
-rw-r--r--tests/auto/corelib/itemmodels/itemmodels.pro2
-rw-r--r--tests/auto/corelib/json/tst_qtjson.cpp17
-rw-r--r--tests/auto/corelib/kernel/qmetatype/qmetatype.pro9
-rw-r--r--tests/auto/corelib/kernel/qobject/tst_qobject.cpp89
-rw-r--r--tests/auto/corelib/kernel/qpointer/qpointer.pro2
-rw-r--r--tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/qmimedatabase-cache.pro2
-rw-r--r--tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/qmimedatabase-xml.pro4
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.pro1
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.pro5
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/tst/tst.pro1
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp29
-rw-r--r--tests/auto/corelib/statemachine/qstatemachine/qstatemachine.pro2
-rw-r--r--tests/auto/corelib/thread/qmutex/tst_qmutex.cpp51
-rw-r--r--tests/auto/corelib/thread/qthread/tst_qthread.cpp16
-rw-r--r--tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp2
-rw-r--r--tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp44
-rw-r--r--tests/auto/corelib/tools/qfreelist/qfreelist.pro2
-rw-r--r--tests/auto/dbus/qdbusxmlparser/qdbusxmlparser.pro2
-rw-r--r--tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp112
-rw-r--r--tests/auto/gui/image/qicon/qicon.pro2
-rw-r--r--tests/auto/gui/image/qimage/tst_qimage.cpp4
-rw-r--r--tests/auto/gui/image/qmovie/qmovie.pro2
-rw-r--r--tests/auto/gui/image/qpicture/qpicture.pro2
-rw-r--r--tests/auto/gui/image/qpixmap/qpixmap.pro2
-rw-r--r--tests/auto/gui/itemmodels/itemmodels.pro2
-rw-r--r--tests/auto/gui/kernel/kernel.pro2
-rw-r--r--tests/auto/gui/kernel/qwindow/tst_qwindow.cpp4
-rw-r--r--tests/auto/gui/painting/qpainter/qpainter.pro4
-rw-r--r--tests/auto/gui/painting/qpainter/tst_qpainter.cpp20
-rw-r--r--tests/auto/gui/text/qabstracttextdocumentlayout/qabstracttextdocumentlayout.pro2
-rw-r--r--tests/auto/gui/text/qfont/qfont.pro2
-rw-r--r--tests/auto/gui/text/qglyphrun/qglyphrun.pro2
-rw-r--r--tests/auto/gui/text/qrawfont/qrawfont.pro2
-rw-r--r--tests/auto/gui/text/qstatictext/qstatictext.pro1
-rw-r--r--tests/auto/gui/text/qsyntaxhighlighter/qsyntaxhighlighter.pro2
-rw-r--r--tests/auto/gui/text/qtextdocumentlayout/qtextdocumentlayout.pro2
-rw-r--r--tests/auto/gui/text/qtextlayout/qtextlayout.pro1
-rw-r--r--tests/auto/gui/text/qtextobject/qtextobject.pro2
-rw-r--r--tests/auto/gui/text/qtextscriptengine/generate/generate.pro2
-rw-r--r--tests/auto/gui/text/qtextscriptengine/qtextscriptengine.pro1
-rw-r--r--tests/auto/gui/text/qtexttable/qtexttable.pro2
-rw-r--r--tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp2
-rw-r--r--tests/auto/network/access/qftp/tst_qftp.cpp2
-rw-r--r--tests/auto/network/access/qhttpnetworkconnection/qhttpnetworkconnection.pro1
-rw-r--r--tests/auto/network/access/qhttpnetworkreply/qhttpnetworkreply.pro1
-rw-r--r--tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp2
-rw-r--r--tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp3
-rw-r--r--tests/auto/opengl/qgl/qgl.pro2
-rw-r--r--tests/auto/opengl/qglbuffer/qglbuffer.pro2
-rw-r--r--tests/auto/opengl/qglfunctions/qglfunctions.pro2
-rw-r--r--tests/auto/opengl/qglthreads/qglthreads.pro2
-rw-r--r--tests/auto/other/atwrapper/atWrapper.pro2
-rw-r--r--tests/auto/other/headersclean/headersclean.pro4
-rw-r--r--tests/auto/other/other.pro2
-rw-r--r--tests/auto/other/qaccessibility/qaccessibility.pro2
-rw-r--r--tests/auto/other/qaccessibility/tst_qaccessibility.cpp27
-rw-r--r--tests/auto/other/qcomplextext/qcomplextext.pro1
-rw-r--r--tests/auto/sql/kernel/kernel.pro1
-rw-r--r--tests/auto/sql/kernel/qsql/qsql.pro2
-rw-r--r--tests/auto/sql/kernel/qsqldatabase/tst_databases.h7
-rw-r--r--tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp37
-rw-r--r--tests/auto/sql/kernel/qsqlresult/qsqlresult.pro11
-rw-r--r--tests/auto/sql/kernel/qsqlresult/testsqldriver.h95
-rw-r--r--tests/auto/sql/kernel/qsqlresult/tst_qsqlresult.cpp (renamed from tests/auto/other/headersclean/qt_headersclean_headers.h)48
-rw-r--r--tests/auto/sql/models/models.pro2
-rw-r--r--tests/auto/tools/moc/moc.pro2
-rw-r--r--tests/auto/tools/qmake/testdata/one_space/one_space.pro1
-rw-r--r--tests/auto/tools/qmake/testdata/quotedfilenames/quotedfilenames.pro1
-rw-r--r--tests/auto/tools/qmake/testdata/simple_app/simple_app.pro1
-rw-r--r--tests/auto/tools/qmake/testdata/simple_dll/simple_dll.pro2
-rw-r--r--tests/auto/tools/qmake/testdata/simple_lib/simple_lib.pro2
-rw-r--r--tests/auto/tools/qmake/testdata/subdirs/simple_app/simple_app.pro1
-rw-r--r--tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple_dll.pro2
-rw-r--r--tests/auto/tools/rcc/data/images/images.expected3
-rw-r--r--tests/auto/tools/tools.pro2
-rw-r--r--tests/auto/tools/uic/baseline/Dialog_with_Buttons_Bottom.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/Dialog_with_Buttons_Right.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/Dialog_without_Buttons.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/Main_Window.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/Widget.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/addlinkdialog.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/addtorrentform.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/authenticationdialog.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/backside.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/batchtranslation.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/bookmarkdialog.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/bookwindow.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/browserwidget.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/bug18156QTreeWidget.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/calculator.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/calculatorform.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/certificateinfo.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/chatdialog.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/chatmainwindow.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/chatsetnickname.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/config.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/connectdialog.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/controller.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/cookies.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/cookiesexceptions.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/default.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/dialog.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/downloaditem.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/downloads.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/embeddeddialog.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/filespage.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/filternamedialog.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/filterpage.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/finddialog.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/form.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/formwindowsettings.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/generalpage.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/gridalignment.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/gridpanel.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/helpdialog.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/history.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/icontheme.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/identifierpage.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/imagedialog.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/inputpage.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/installdialog.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/languagesdialog.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/listwidgeteditor.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/mainwindow.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/mydialog.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/myform.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/newactiondialog.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/newdynamicpropertydialog.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/newform.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/orderdialog.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/outputpage.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/pagefold.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/paletteeditor.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/passworddialog.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/pathpage.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/phrasebookbox.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/plugindialog.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/preferencesdialog.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/previewconfigurationwidget.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/previewdialogbase.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/previewwidget.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/proxy.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/qfiledialog.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/qpagesetupwidget.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/qprintpropertieswidget.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/qprintsettingsoutput.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/qprintwidget.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/qsqlconnectiondialog.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/qtgradientdialog.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/qtgradienteditor.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/qtgradientview.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/qtresourceeditordialog.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/qttoolbardialog.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/querywidget.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/remotecontrol.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/saveformastemplate.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/settings.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/signalslotdialog.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/sslclient.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/sslerrors.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/statistics.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/stringlisteditor.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/stylesheeteditor.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/tabbedbrowser.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/tetrixwindow.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/textfinder.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/topicchooser.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/translatedialog.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/translationsettings.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/treewidgeteditor.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/trpreviewtool.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/validators.ui.h3
-rw-r--r--tests/auto/tools/uic/baseline/wateringconfigdialog.ui.h3
-rw-r--r--tests/auto/tools/uic/tst_uic.cpp6
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp4
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp4
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp41
-rw-r--r--tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp30
-rw-r--r--tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp18
-rw-r--r--tests/auto/widgets/styles/qstyle/tst_qstyle.cpp36
-rw-r--r--tests/auto/widgets/widgets/qabstractscrollarea/tst_qabstractscrollarea.cpp16
-rw-r--r--tests/auto/widgets/widgets/qmdiarea/qmdiarea.pro2
-rw-r--r--tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp9
-rw-r--r--tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp41
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/qxmlsimplereader.pro1
-rw-r--r--tests/baselineserver/shared/baselineprotocol.pri1
-rw-r--r--tests/benchmarks/benchmarks.pro4
-rw-r--r--tests/benchmarks/corelib/kernel/kernel.pro2
-rw-r--r--tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/qtimer_vs_qmetaobject.pro1
-rw-r--r--tests/benchmarks/corelib/tools/qregexp/qregexp.pro5
-rw-r--r--tests/benchmarks/corelib/tools/qstring/fromlatin1.cpp10
-rw-r--r--tests/benchmarks/gui/animation/animation.pro2
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/GraphicsViewBenchmark.pro2
-rw-r--r--tests/benchmarks/gui/graphicsview/graphicsview.pro2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.pro2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.pri2
-rw-r--r--tests/benchmarks/gui/gui.pro2
-rw-r--r--tests/benchmarks/gui/image/image.pro2
-rw-r--r--tests/benchmarks/gui/kernel/kernel.pro2
-rw-r--r--tests/benchmarks/gui/painting/painting.pro2
-rw-r--r--tests/benchmarks/gui/painting/qtracebench/qtracebench.pro2
-rw-r--r--tests/benchmarks/gui/styles/styles.pro2
-rw-r--r--tests/manual/cocoa/qmaccocoaviewcontainer/qmaccocoaviewcontainer.pro1
-rw-r--r--tests/manual/cocoa/wheelevent/wheelevent.pro2
-rw-r--r--tests/manual/cocoa/wheelevent/window.cpp23
-rw-r--r--tests/manual/dialogs/filedialogpanel.cpp4
-rw-r--r--tests/manual/filetest/filetest.pro6
-rw-r--r--tests/manual/filetest/main.cpp142
-rw-r--r--tests/manual/highdpi/highdpi.pro1
-rw-r--r--tests/manual/lance/lance.pro2
-rw-r--r--tests/manual/lance/widgets.h4
-rw-r--r--tests/manual/manual.pro1
-rw-r--r--tests/manual/network_remote_stresstest/network_remote_stresstest.pro1
-rw-r--r--tests/manual/network_stresstest/network_stresstest.pro1
-rw-r--r--tests/manual/qhttpnetworkconnection/qhttpnetworkconnection.pro1
-rw-r--r--tests/manual/qmetatype/declare_metatype_noninline.cpp (renamed from tests/auto/other/headersclean/tst_headersclean.cpp)13
-rw-r--r--tests/manual/qmetatype/declare_metatype_noninline.h52
-rw-r--r--tests/manual/qmetatype/qmetatype.pro5
-rw-r--r--tests/manual/qmetatype/tst_qmetatype.cpp55
-rw-r--r--tests/manual/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro1
-rw-r--r--tests/manual/qnetworkreply/qnetworkreply.pro1
-rw-r--r--tests/manual/qssloptions/qssloptions.pro1
-rw-r--r--tests/manual/socketengine/socketengine.pro1
-rw-r--r--tests/manual/widgets/qgraphicsview/rubberband/rubberbandtest.cpp21
-rw-r--r--tests/manual/windowgeometry/windowgeometry.pro2
-rw-r--r--tools/configure/configureapp.cpp116
-rw-r--r--tools/configure/configureapp.h1
1164 files changed, 8636 insertions, 5898 deletions
diff --git a/.gitignore b/.gitignore
index fe9fe84693..ec33ed9737 100644
--- a/.gitignore
+++ b/.gitignore
@@ -312,3 +312,6 @@ tests/auto/dbus/qdbusinterface/qmyserver/qmyserver
tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal
tests/auto/network/bearer/qnetworksession/lackey/lackey
tests/auto/widgets/kernel/qapplication/modal/modal
+
+# Generated static plugin import sources
+*_plugin_import.cpp
diff --git a/.qmake.conf b/.qmake.conf
index 42ba8e45fb..5de255cb69 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -1 +1,2 @@
load(qt_build_config)
+CONFIG += qt_example_installs
diff --git a/bin/syncqt b/bin/syncqt
index a10117bf2e..ac81b0a8e2 100755
--- a/bin/syncqt
+++ b/bin/syncqt
@@ -87,7 +87,7 @@ my $mkspecsdir = dirname(dirname($0));
normalizePath(\$mkspecsdir) if (defined $mkspecsdir);
# will be defined based on the modules sync.profile
-our (%modules, %moduleheaders, @allmoduleheadersprivate, %classnames, %modulepris, %explicitheaders, %deprecatedheaders);
+our (%modules, %moduleheaders, @allmoduleheadersprivate, %classnames, %explicitheaders, %deprecatedheaders);
our @qpa_headers = ();
# global variables (modified by options)
@@ -291,8 +291,7 @@ sub classNames {
foreach my $symbol (@symbols) {
$symbol = (join("::", @namespaces) . "::" . $symbol) if (scalar @namespaces);
- if ($symbol =~ /^Q[^:]*$/ # no-namespace, starting with Q
- || $symbol =~ /^Phonon::/) { # or in the Phonon namespace
+ if ($symbol =~ /^Q[^:]*$/) { # no-namespace, starting with Q
push @ret, $symbol;
} elsif (defined($publicclassregexp)) {
push @ret, $symbol if ($symbol =~ $publicclassregexp);
@@ -803,26 +802,14 @@ foreach my $lib (@modules_to_sync) {
die "No such module: $lib" unless(defined $modules{$lib});
#iteration info
- my $dir = $modules{$lib};
+ my @dirs = split(/;/, $modules{$lib});
+ my $dir = $dirs[0];
my $project = $dir;
$project =~ s,/([^/]+)$,/$1/$1.pro,;
my $module_version = fileContents($project);
$module_version = $qt_version unless ($module_version =~ s,.*^VERSION[ \t]*=[ \t]*(\S+).*,$1,sm);
- # Backwards compatibility for modules with checked in .pri files.
- if (defined $modulepris{$lib} and -e "$modulepris{$lib}") {
- my $content = fileContents($modulepris{$lib});
- my @version_rows = grep(/QT\..*\.VERSION/, split('\n', $content));
- if(@version_rows) {
- # We only pick the first one, since each module need a separate .pri file
- $module_version = $version_rows[0];
- chomp $module_version;
- $module_version =~ s/^\s*QT\..*\.VERSION\s*=\s*([^#]+).*$/$1/;
- $module_version =~ s/\s+$//;
- }
- }
-
my $pathtoheaders = "";
$pathtoheaders = $moduleheaders{$lib} if ($moduleheaders{$lib});
@@ -883,7 +870,9 @@ foreach my $lib (@modules_to_sync) {
}
#create the new ones
- foreach my $current_dir (split(/;/, $dir)) {
+ foreach my $current_dir (@dirs) {
+ my $thisprivate = 0;
+ ($current_dir =~ s/^\^//) and $thisprivate = 1;
my @headers_paths = split(/;/, $pathtoheaders);
if (@headers_paths) {
@headers_paths = map { "$current_dir/$_" } @headers_paths;
@@ -919,7 +908,7 @@ foreach my $lib (@modules_to_sync) {
if(isQpaHeader($public_header)) {
$public_header = 0;
$qpa_header = 1;
- } elsif($allheadersprivate || $public_header =~ /_p.h$/ || $public_header =~ /_pch.h$/) {
+ } elsif($allheadersprivate || $thisprivate || $public_header =~ /_p.h$/ || $public_header =~ /_pch.h$/) {
$public_header = 0;
} else {
foreach (@ignore_for_master_contents) {
@@ -956,11 +945,6 @@ foreach my $lib (@modules_to_sync) {
$class_lib_map_contents .= "QT_CLASS_LIB($full_class, $lib, $header_base)\n";
$header_copies++ if(syncHeader($lib, "$out_basedir/include/$lib/$class", "$out_basedir/include/$lib/$header", 0, $ts));
}
-
- # KDE-Compat headers for Phonon
- if ($lib eq "phonon") {
- $header_copies++ if (syncHeader($lib, "$out_basedir/include/phonon_compat/Phonon/$class", "$out_basedir/include/$lib/$header", 0, $ts));
- }
}
if ($explicitheaders{$lib}{basename($header)}) {
@@ -980,7 +964,7 @@ foreach my $lib (@modules_to_sync) {
if($public_header) {
#deal with the install directives
if($public_header) {
- my $pri_install_iheader = fixPaths($iheader, $current_dir);
+ my $pri_install_iheader = fixPaths($iheader, $dir);
foreach my $class (@classes) {
# Strip namespaces:
$class =~ s/^.*:://;
@@ -988,23 +972,24 @@ foreach my $lib (@modules_to_sync) {
# $class =~ s,::,/,g;
# }
my $class_header = fixPaths("$out_basedir/include/$lib/$class",
- $current_dir) . " ";
+ $dir) . " ";
$pri_install_classes .= $class_header
unless($pri_install_classes =~ $class_header);
}
if ($explicitheaders{$lib}{basename($iheader)}) {
- my $compat_header = fixPaths("$out_basedir/include/$lib/$explicitheaders{$lib}{basename($iheader)}", $current_dir) . " ";
+ my $compat_header = fixPaths("$out_basedir/include/$lib/$explicitheaders{$lib}{basename($iheader)}",
+ $dir) . " ";
$pri_install_files .= $compat_header unless($pri_install_files =~ $compat_header);
}
$pri_install_files.= "$pri_install_iheader ";;
}
}
elsif ($qpa_header) {
- my $pri_install_iheader = fixPaths($iheader, $current_dir);
+ my $pri_install_iheader = fixPaths($iheader, $dir);
$pri_install_qpafiles.= "$pri_install_iheader ";;
}
else {
- my $pri_install_iheader = fixPaths($iheader, $current_dir);
+ my $pri_install_iheader = fixPaths($iheader, $dir);
$pri_install_pfiles.= "$pri_install_iheader ";;
}
}
@@ -1104,11 +1089,6 @@ foreach my $lib (@modules_to_sync) {
$pri_install_files .= fixPaths($vheader, $dir) . " ";
$pri_install_classes .= fixPaths($VHeader, $dir) . " ";
- # KDE-Compat master header for Phonon
- if ($lib eq "phonon") {
- syncHeader($lib, "$out_basedir/include/phonon_compat/Phonon/Phonon", "$out_basedir/include/phonon/phonon", 0);
- }
-
#handle the headers.pri for each module
my $headers_pri_contents = "";
$headers_pri_contents .= "SYNCQT.HEADER_FILES = $pri_install_files\n";
@@ -1156,17 +1136,11 @@ unless($showonly || !$create_uic_class_map) {
}
if($check_includes) {
- for my $lib (keys(%modules)) {
+ foreach my $lib (@modules_to_sync) {
#calc subdirs
- my @subdirs = listSubdirs($modules{$lib});
+ my @subdirs = listSubdirs(map { s/^\^//; $_ } split(/;/, $modules{$lib}));
foreach my $subdir (@subdirs) {
- my $header_skip_qt_module_test = 0;
- foreach(@ignore_for_qt_module_check) {
- foreach (split(/;/, $_)) {
- $header_skip_qt_module_test = 1 if ($subdir =~ /^$_/);
- }
- }
my @headers = findFiles($subdir, "^[-a-z0-9_]*\\.h\$" , 0);
foreach my $header (@headers) {
my $header_skip_qt_begin_header_test = 0;
diff --git a/configure b/configure
index cb9497e62e..faf8a6d380 100755
--- a/configure
+++ b/configure
@@ -861,7 +861,6 @@ PLATFORM=$QMAKESPEC
QT_CROSS_COMPILE=no
OPT_CONFIRM_LICENSE=no
OPT_SHADOW=maybe
-OPT_FAST=auto
OPT_VERBOSE=no
OPT_HELP=
CFG_SILENT=no
@@ -874,6 +873,7 @@ CFG_FORCE_ASSERTS=no
CFG_PCRE=auto
QPA_PLATFORM_GUARD=yes
CFG_CXX11=auto
+CFG_DIRECTWRITE=no
# initalize variables used for installation
QT_INSTALL_PREFIX=
@@ -2014,13 +2014,6 @@ while [ "$#" -gt 0 ]; do
UNKNOWN_OPT=yes
fi
;;
- fast)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- OPT_FAST="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
rpath)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_RPATH="$VAL"
@@ -2116,6 +2109,17 @@ while [ "$#" -gt 0 ]; do
UNKNOWN_OPT=yes
fi
;;
+ directwrite)
+ if [ "$XPLATFORM_MINGW" = "yes" ] ; then
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_DIRECTWRITE="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
*)
UNKNOWN_OPT=yes
;;
@@ -2293,14 +2297,6 @@ if [ ! -d "${outpath}/lib/fonts" ]; then
fi
fi
-if [ "$OPT_FAST" = "auto" ]; then
- if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
- OPT_FAST=yes
- else
- OPT_FAST=no
- fi
-fi
-
# find a make command
if [ -z "$MAKE" ]; then
MAKE=
@@ -3087,12 +3083,6 @@ Configure options:
-fully-process ..... Generate Makefiles for the entire Qt tree.
-dont-process ...... Do not generate any Makefiles.
- * -no-fast ........... Configure Qt normally by generating Makefiles for all
- project files.
- -fast .............. Configure Qt quickly by generating Makefiles only for
- library and subdirectory targets. All other Makefiles
- are created as wrappers, which will in turn run qmake.
-
-no-largefile ...... Disables large file support.
+ -largefile ......... Enables Qt to access files larger than 4 GB.
@@ -5333,7 +5323,6 @@ fi
QMAKE_CONFIG="$QMAKE_CONFIG qpa"
QT_CONFIG="$QT_CONFIG qpa"
QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
-rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
if [ "$XPLATFORM_MINGW" != "yes" ]; then
# Do not set this here for Windows. Let qmake do it so
@@ -5469,6 +5458,7 @@ fi
[ "$CFG_XCB" != "no" ] && QT_CONFIG="$QT_CONFIG xcb"
[ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
[ "$CFG_SYSTEM_PROXIES" = "yes" ] && QT_CONFIG="$QT_CONFIG system-proxies"
+[ "$CFG_DIRECTWRITE" = "yes" ] && QT_CONFIG="$QT_CONFIG directwrite"
[ '!' -z "$DEFINES" ] && QMakeVar add DEFINES "$DEFINES"
[ '!' -z "$L_FLAGS" ] && QMakeVar add LIBS "$L_FLAGS"
@@ -6027,6 +6017,11 @@ QT_NAMESPACE = $QT_NAMESPACE
EOF
+if [ "$CFG_SHARED" = "no" ]; then
+ echo "QT_DEFAULT_QPA_PLUGIN = q$QT_QPA_DEFAULT_PLATFORM" >> "$QTCONFIG.tmp"
+ echo >> "$QTCONFIG.tmp"
+fi
+
if [ -n "$PKG_CONFIG_SYSROOT_DIR" ] || [ -n "$PKG_CONFIG_LIBDIR" ]; then
echo "# pkgconfig" >> "$QTCONFIG.tmp"
echo "PKG_CONFIG_SYSROOT_DIR = $PKG_CONFIG_SYSROOT_DIR" >> "$QTCONFIG.tmp"
@@ -6110,7 +6105,7 @@ fi
# cmdline args
cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
-rm -f "$QMAKE_VARS_FILE" 2>/dev/null
+# QMAKE_VARS_FILE will be still needed for a status message.
# replace qmodule.pri if it differs from the newly created temp file
if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
@@ -6126,7 +6121,6 @@ fi
CACHEFILE="$outpath/.qmake.cache"
[ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
cat >>"$CACHEFILE.tmp" <<EOF
-#paths
QT_SOURCE_TREE = \$\$quote($relpath)
QT_BUILD_TREE = \$\$quote($outpath)
EOF
@@ -6274,6 +6268,10 @@ echo "FontConfig support ..... $CFG_FONTCONFIG"
echo "XKB Support ............ $CFG_XKB"
echo "GTK theme support ...... $CFG_QGTKSTYLE"
+if [ "$XPLATFORM_MINGW" = "yes" ] ; then
+ echo "DirectWrite support .... $CFG_DIRECTWRITE"
+fi
+
[ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
[ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support ..... $CFG_SQL_psql"
[ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........... $CFG_SQL_odbc"
@@ -6340,6 +6338,7 @@ sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
PROCS=1
EXEC=""
+rm -f "$QMAKE_VARS_FILE" 2>/dev/null
#-------------------------------------------------------------------------------
# build makefiles based on the configuration
@@ -6354,43 +6353,6 @@ if [ "$CFG_PROCESS" != "no" ]; then
else
"$outpath/bin/qmake" "$relpath"
fi
-
- if [ "$OPT_FAST" = "yes" ]; then
- PART_ROOTS=
- for part in $CFG_BUILD_PARTS; do
- case "$part" in
- examples|tests) PART_ROOTS="$PART_ROOTS $part" ;;
- esac
- done
- if [ "x$PART_ROOTS" != "x" ]; then
- echo
- echo "Creating stub makefiles. Please wait..."
- QMAKE="$outpath/bin/qmake"
- [ "$CFG_DEBUG_RELEASE" = "no" ] && first_tgt="first_target: first" || first_tgt=
- (cd "$relpath" && find $PART_ROOTS -name '*.pro') | grep -v /testdata/ | while read p; do
- d=${p%/*}
- test -f "$outpath/$d/Makefile" && continue
- echo " for $relpath/$p"
-
- mkdir -p "$outpath/$d" || exit
- cat > "$outpath/$d/Makefile" <<EOF || exit
-# $outpath/$d/Makefile: generated by configure
-#
-# WARNING: This makefile will be replaced with a real makefile.
-# All changes made to this file will be lost.
-
-QMAKE = "$QMAKE"
-
-$first_tgt
-all clean install qmake first Makefile: FORCE
- \$(QMAKE) $QMAKE_SWITCHES "$relpath/$p"
- \$(MAKE) \$@
-FORCE:
-EOF
- done || exit
- echo "Done"
- fi
- fi
fi
#-------------------------------------------------------------------------------
diff --git a/dist/README b/dist/README
index 2828cf1b37..d9eed68fb7 100644
--- a/dist/README
+++ b/dist/README
@@ -91,10 +91,6 @@ Running Example Applications
You can open example applications in the Qt Creator Welcome mode to build and
run them.
-Ready to run example applications are located in
-<install_dir>/<version>/<compiler>/examples. You can launch the C++ based
-examples directly either from command line or your file system browser.
-
The QML based Quick 2 examples are located in
<install_dir>/<version>/<compiler>/examples/qtdeclarative. You can load them
using the qmlscene application.
@@ -156,3 +152,8 @@ Much more information is available at:
We hope you will enjoy using Qt!
- The Qt developers @ qt-project.org
+
+
+
+ In memory of Trond Kjernåsen.
+ You will not be forgotten. \ No newline at end of file
diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0
index 5987c95108..6d58c21133 100644
--- a/dist/changes-5.0.0
+++ b/dist/changes-5.0.0
@@ -11,6 +11,14 @@ information about a particular change.
* Source incompatible changes *
****************************************************************************
+- The Qt 3 support module and all related code was removed.
+
+- QAtomicInt's and QAtomicPointer's non-atomic convenience methods
+ (i.e., operator=, operator int / operator T*, operator!, operator==,
+ operator!= and operator->) have been removed as they did implicit
+ loads and stores of unspecified memory ordering. Code dealing with
+ is expected to use load(), loadAquire(), store() and storeRelease()
+ as necessary instead.
- QObject
* The signatures of the connectNotify() and disconnectNotify() functions
@@ -60,6 +68,8 @@ information about a particular change.
in Qt4, so these methods return a bool now. If your code used the undocumented
QBool, simply replace it with bool.
+- The old macros TRUE and FALSE have been removed, use true and false instead.
+
- qIsDetached<> has been removed without replacement.
- The return type of QFlags<Enum>::operator int() now matches the Enum's underlying
@@ -274,23 +284,6 @@ information about a particular change.
- QIconEngineV2 was merged into QIconEngine
You might need to adjust your code if it used a QIconEngine.
-- qmake
- * Projects which explicitly set an empty TARGET are considered broken now.
- * The makespec and .qmake.cache do not see build pass specific variables any more.
- * load()/include() with a target namespace and infile()/$$fromfile() now start with
- an entirely pristine context.
- * Configure's -sysroot and -hostprefix are now handled slightly differently.
- The QT_INSTALL_... properties are now automatically prefixed with the sysroot;
- the raw values are available as QT_INSTALL_.../raw and the sysroot as QT_SYSROOT.
- The new QT_HOST_... properties can be used to refer to the Qt host tools.
- * Several functions and built-in variables were modified to return normalized paths.
- * The -(no-)exception flags in configure have been removed. Qt modules are now compiled
- without exceptions by default, as they do not use them and can neither handle them
- properly. Qt Core still has exceptions enabled to correctly throw bad_alloc exceptions
- in our tool classes.
- Whether code should be compiled with exception support enabled or disabled can be
- controlled by a CONFIG += exceptions/exceptions_off setting in the .pro file.
-
- QTextCodecPlugin has been removed since it is no longer used. All text codecs
are now built into QtCore.
@@ -838,6 +831,18 @@ appended in parantheses.
* Platform Specific Changes *
****************************************************************************
+The Qt platform implementations have been rewritten as plugins for the Qt
+Platform Abstraction (QPA):
+
+* The platform plugin(s) needs to be bundled when applications are deployed.
+* The platform implementations are in large parts rewrites.
+* Q_WS_* defines are no longer defined. Q_OS_* is.
+* Some platform specific functionality and API is missing from the 5.0
+ release and will be added later.
+* Platform spesific functionality will be added in separate modules:
+ QtMacExtras: http://qt.gitorious.org/qtplayground/qtmacextras
+
+
Qt for Linux/X11
----------------
@@ -849,6 +854,35 @@ Qt for Windows
Qt for Mac OS X
---------------
+* Qt now uses Cocoa, the Carbon port has been removed.
+* The minimum supported OS X version is 10.6. PPC is not supported.
+* Qt generally supports cross OS X version build and deployment (build
+ on any supported version and deploy to any other). One exception is
+ QtWebkit, which should be built using the 10.6 SDK if you want to target
+ that platform.
+* The Qt binary installer has been changed to use the Qt installer framework.
+ Qt is now installed into one location instead of being spread out over multiple
+ directories.
+* The Qt binary installer is built against the 10.7 SDK and does not
+ run on 10.6.
+* The Clang compiler is used by default. Gcc is available trough the
+ macx-g++* mkspecs.
+* Build-system support for universal binaries has been removed. The "lipo"
+ command-line tool can be used as a workaround.
+* Qt now use the raster paint engine on all platforms for drawing widgets.
+ CoreGraphics is still used for printing on Mac.
+* Support for high-dpi "retina" displays has been added for widgets,
+ OpenGL and QtQuick.
+* The unified toolbar implementation from Qt 4 has not and will not be ported
+ to Qt 5. This means calling QMainWindow::setUnifiedTitleAndToolBarOnMac has
+ no effect on Qt 5. A replacement API which wraps NSToolbar is available in
+ QtMacExtras.
+* MacDeployQt plugin deployment has been improved. It will no longer try to
+ deploy all plugins with all dependencies.
+* Qt has been updated to be in compliance with the Mac App Store sandbox, and
+ will for example no longer try to write settings to files outside the sandbox.
+* The "qt_menu.nib" issue preventing static/non-framework builds from working
+ has been fixed.
Qt for Embedded Linux
@@ -870,9 +904,66 @@ Qt for Windows CE
- Build System
- * Remove qttest_p4.prf file. From now on we should explicitly enable the
- things from it which we want. Autotest .pro files should stop using
- 'load(qttest_p4)' and start using 'CONFIG+=testcase' instead.
+ * Qt has been split into numerous repositories. Configure covers mostly only qtbase's options.
+ * Qt will now install CMake configuration files for all its libraries.
+
+- configure
+
+ * The Mac OS X -dwarf2 configure argument has been removed. DWARF2 is always
+ used on Mac OS X now.
+ * The following options have been added: (-no)-force-asserts, (-no)-strip, (-no)-gui &
+ (-no)-widgets, -device & -device-option, -archdatadir, -libexecdir & -qmldir,
+ and numerous changes relating to specific Qt features and dependencies.
+ * Configure will no longer call "qmake -recursive" by default, as the subsequent
+ build invokes qmake as needed. Use -fully-process to restore the old behavior.
+
+- qmake
+
+ * default_pre.prf is now evaluated per subproject & build pass, symmetrically
+ to default_post.prf.
+ * .qmake.conf files (.qmake.cache equivalent in source tree) are read now.
+ * Project-specific mkspecs/ and features/ directories are supported now.
+ QMAKEPATH and QMAKEFEATURES can be set in .qmake.{config,cache} to specifiy their
+ location, and qmake will find them in the project's top-level directory automatically.
+ * Mixing host and target subprojects is now supported. "default-host" makespec
+ was added; option(host_build) enables its use.
+ * QMAKE_MOC_OPTIONS variable is now available for passing additional parameters
+ to the moc.
+ * The CROSS_COMPILE variable and property can be used to parametrize the device
+ and mingw makespecs.
+ * QMAKE_RPATHLINKDIR (complementary to QMAKE_RPATHDIR) is now understood.
+ * The "aux" TEMPLATE was added. Does not work with vcproj and xcode output files.
+ * The properties QT_INSTALL_ARCHDATA, QT_INSTALL_LIBEXECS, QT_INSTALL_QML,
+ QMAKE_SPEC & QMAKE_XSPEC were added. QT_INSTALL_DEMOS is obsolete.
+ * The following functions have been added: $$sort_depends, $$resolve_depends,
+ $$enumerate_vars, $$reverse, $$val_escape, $$format_number, $$shadowed,
+ $$clean_path, $$system_path, $$shell_path, $$absolute_path, $$relative_path,
+ $$system_quote, $$shell_quote, cache, write_file, touch, mkpath & log.
+ defined can now query variables; $$cat and $$system support more splitting modes.
+ qtCompileTest (available from configure.prf) was added.
+ * Removed qttest_p4.prf. Use CONFIG+=testcase and other flags instead.
+ * QMAKE_SUBSTITUTES can now copy files verbatim.
+ * MSVC desktop builds now use -Zc:wchar_t.
+ * The following variables were added: QMAKESPEC, _QMAKE_CONF_ & _QMAKE_SUPER_CACHE_.
+ * QDBUSXML2CPP_{INTERFACES,ADAPTORS}_{HEADER,SOURCE}_FLAGS are now understood,
+ and DBUS_{INTERFACES,ADAPTORS} support file groups with individual flags now.
+ * QT_PRIVATE and PKGCONFIG_PRIVATE (analogous to LIBS_PRIVATE resp. PKGCONFIG) are now understood.
+ * INSTALLS entries now support copying with subdirectory (e.g., entry.base = $$dirname(PWD)).
+ * Defining QTPLUGIN in dynamically linked projects does not hurt any more.
+ * CONFIG+=import_plugins will now cause plugin imports for QTPLUGIN being auto-generated.
+ * Debug info generation can now be enabled also for release builds (CONFIG+=force_debug_info).
+ * The following CONFIG flags have been deprecated in favor of QT module entries:
+ qtestlib, qdbus, help, designer, uitools, qaxserver & qaxcontainer (the leading 'q'
+ was stripped from the affected modules).
+ * The IN_PWD alias for PWD was deprecated.
+ * QMAKE_{DIST,}CLEAN support normalized path separators now.
+ * CONFIG+=depend_includepath is on by default now. DEPENDPATH is unnecessary in most projects.
+ * Makespecs should be adjusted in the following ways:
+ * The QMAKE_INCDIR_QT, QMAKE_LIBDIR_QT, QMAKE_MOC, QMAKE_UIC, QMAKE_IDC, TEMPLATE & QT
+ variables should not be defined any more. Furthermore, QMAKE_LIBS_X11SM is obsolete.
+ * The qt, warn_on, release, & link_prl CONFIG flags should not be set any more.
+ * The QMAKE_PLATFORM & QMAKE_COMPILER variables should be defined now.
+ Several other variables should be defined by including files from mkspecs/common/.
- Assistant
@@ -883,6 +974,11 @@ Qt for Windows CE
- Linguist
+ * The integration with Mac OS' document handling was improved
+ * lupdate can now treat other .ts files as sources
+ * lupdate's CODECFORTR is deprecated and will be removed soon. All source code
+ written with Qt is expected to use UTF-8 encoding.
+
- rcc
@@ -895,20 +991,6 @@ Qt for Windows CE
- uic
-- uic3
-
-
-- qmake
-
-* QMAKE_MOC_OPTIONS variable is now available for passing additional parameters
- to the moc.
-
-
-- configure
-
- * The Mac OS X -dwarf2 configure argument has been removed. DWARF2 is always
- used on Mac OS X now.
-
- qtconfig
@@ -957,6 +1039,10 @@ Qt for Windows CE
in the URL by themselves. Now, it will return "%25", like
QUrl::toEncoded().
+- QLibraryInfo
+
+ * location() always returns paths with normalized separators now.
+
- QVariant
* Definition of QVariant::UserType changed. Currently it is the same as
@@ -977,9 +1063,59 @@ Qt for Windows CE
Please, notice that QMetaType::UnknownType has value 0, which previously was
reserved for QMetaType::Void.
+- QWidget
+
+ * No need to set the application name in setWindowTitle() anymore, this is done
+ automatically, on Windows and Unix/X11, provided that the (possibly translated)
+ application display name is set with QGuiApplication::setApplicationDisplayName().
- QMessageBox
* The static function QMessageBox::question has changed the default argument
for buttons. Before the default was to have an Ok button. That is changed
to having a yes and a no button.
+
+- qmake & configure
+
+ * The project file parser has been rewritten from scratch. Invalid syntax will be
+ rejected more aggressively, and interpretation may have changed in some corner cases.
+ * Projects which explicitly set an empty TARGET are considered broken now.
+ * The makespec and .qmake.cache do not see build pass specific variables any more.
+ * load()/include() with a target namespace and infile()/$$fromfile() now start with
+ an entirely pristine context.
+ * Configure's -sysroot and -hostprefix are now handled slightly differently.
+ The QT_INSTALL_... properties are now automatically prefixed with the sysroot;
+ the raw values are available as QT_INSTALL_.../raw and the sysroot as QT_SYSROOT.
+ The new QT_HOST_... properties can be used to refer to the Qt host tools.
+ -no-gcc-sysroot can be used for non-standard sysroot configurations.
+ * The QMAKE_MKSPECS property became unavailable at the command line. Query QT_HOST_DATA instead.
+ * The TEMPLATE_PREFIX variable is gone. Use contains(TEMPLATE, vc.*) instead.
+ * The "default" makespec symlink/directory is gone. Use qmake -query QMAKE_XSPEC instead.
+ * DEPENDPATH does not end up in VPATH any more. Some SOURCES may not be found any more.
+ * Several functions and built-in variables were modified to return normalized paths.
+ * The -(no-)exception flags in configure have been removed. Qt modules are now compiled
+ without exceptions by default, as they do not use them and can neither handle them
+ properly. Qt Core still has exceptions enabled to correctly throw bad_alloc exceptions
+ in our tool classes.
+ Whether code should be compiled with exception support enabled or disabled can be
+ controlled by a CONFIG += exceptions/exceptions_off setting in the .pro file.
+ * The -no/-stl configure options are gone. Qt always uses the STL now.
+ * The -no/-fast configure options are gone.
+ * The -prefix-install configure option is gone. Use -prefix, etc. instead.
+ * The -make option of the Windows configure was renamed to -make-tool.
+ -make now complements -no-make, like in the Unix version.
+ * The object_with_source CONFIG flag was removed. Use object_parallel_to_source instead.
+ * Support for universal binaries on Mac OS has been removed.
+ * The processor architecture handling changed significantly. This affects the -arch & -*-endian
+ configure options, the QT_ARCH qmake variable, and more.
+ * No "make_default" make targets will be generated any more. Use "make_first" instead.
+ * The "qmake" make targets are non-recursive now. Use "qmake_all" to recurse.
+ * load() with paths relative to the current project is not supported any more.
+ Use include() instead.
+ * Persistent qmake properties are not versioned any more. Also, the vendor changed to
+ "QtProject", so old settings are lost.
+ * Support for the Borland toolchain was removed. Numerous obsolete makespecs were culled.
+ * setcepaths.bat is gone. QMake-generated Makefiles are self-contained now.
+ * moc_dir, rcc_dir and some other tool variables are not defined in Qt's .pc files any more;
+ the generic host_bins is defined instead.
+
diff --git a/dist/changes-5.0.1 b/dist/changes-5.0.1
new file mode 100644
index 0000000000..479ac344ce
--- /dev/null
+++ b/dist/changes-5.0.1
@@ -0,0 +1,115 @@
+Qt 5.0.1 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 5.0.0.
+
+For more details, refer to the online documentation included in this
+distribution. The documentation is also available online:
+
+ http://qt-project.org/doc/qt-5.0/
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+ http://bugreports.qt-project.org/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+
+****************************************************************************
+* General *
+****************************************************************************
+
+General Improvements
+--------------------
+
+Third party components
+----------------------
+
+Legal
+-----
+
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+
+QtCore
+-----
+
+QtGui
+-----
+
+QtWidgets
+---------
+
+QtNetwork
+---------
+
+QtDBus
+------
+
+QtConcurrent
+------------
+
+QtOpenGL
+--------
+
+QtScript
+--------
+
+QTestLib
+--------
+
+QtSql
+-----
+
+****************************************************************************
+* Database Drivers *
+****************************************************************************
+
+sqlite
+------
+
+postgres
+--------
+
+****************************************************************************
+* Platform Specific Changes *
+****************************************************************************
+
+Qt for Linux/X11
+----------------
+
+Qt for Windows
+--------------
+
+Qt for Mac OS X
+---------------
+
+Qt for Embedded Linux
+---------------------
+
+Qt for Windows CE
+-----------------
+
+
+****************************************************************************
+* Compiler Specific Changes *
+****************************************************************************
+
+
+****************************************************************************
+* Tools *
+****************************************************************************
+
+
+****************************************************************************
+* Plugins *
+****************************************************************************
+
+
+****************************************************************************
+* Important Behavior Changes *
+****************************************************************************
+
diff --git a/doc/README b/doc/README
new file mode 100644
index 0000000000..355f61d353
--- /dev/null
+++ b/doc/README
@@ -0,0 +1,109 @@
+Qt 5 Documentation
+==================
+
+New in Qt 5.0, each module has its own documentation package. The documentation
+resides in the module sources as well as the configuration files needed to build
+the module documentation. The main Qt 5.0 Reference Documentation resides in the
+qtdoc repository.
+
+There are two ways to build Qt documentation:
+* run "make docs" in qt5/ or in the repositories
+* run the QDoc tool for each module
+
+
+Running "make docs"
+===================
+
+To build the documentation using Makefiles, qtbase needs to be compiled and
+installed.
+
+Running qmake will create make targets to build the documentation:
+* html_docs - builds only the HTML documentation
+* qch_docs - packages the HTML documentation into QCH files for Qt Creator and
+ Qt Assistant.
+* docs - runs html_docs and qch_docs
+
+Note: qch_docs needs qhelpgenerator to package the documentation. qhelpgenerator
+is in the qttools repository.
+
+These make targets use qmake's QT_INSTALL_DOCS variable as the output directory.
+Running "qmake -query" will list the directory set to QT_INSTALL_DOCS.
+
+To create all of the modules' documentation, run "make docs" in the
+qt5 directory:
+ $> make docs # builds the bundled modules' documentation
+
+It is also possible to build only a small subset of the documentation by using
+make:
+ $> cd qtbase
+ $> make docs # builds the documentation for modules in qtbase
+
+ $> cd qtbase/src/sql
+ $> make docs # builds only the Qt SQL documentation
+
+
+Running QDoc
+============
+
+QDoc is the tool for generating Qt documentation and is located in qtbase.
+The simplest way to compile QDoc is to compile qtbase or only the tools in
+qtbase.
+
+ $> cd qtbase/src
+ $> make sub-tools # compiles QDoc
+
+Each module has a QDoc configuration file (.qdocconf). To build a module's
+documentation, run the "qdoc" binary and pass the qdocconf file as a parameter.
+A mandatory "outputdir" must be specified.
+
+ $> qdoc doc/config/qtdoc.qdocconf -outputdir html
+
+ Note that QDoc will delete the contents of the "html" output directory.
+
+Packaging the Documentation
+===========================
+
+To package the documentation, the HTML files must be compiled
+into a QCH file (.qch).
+
+Required binaries:
+ * assistant - found in qttools
+ * qhelpgenerator - found in qttools
+
+To compile the qch file for each module, first enter the output directory that
+contains the .qhp file and generate the QCH file.
+
+ $> cd qtbase/doc/qtdoc #the default path for QT_INSTALL_DOCS for qtdoc
+ $> qhelpgenerator qtdoc.qhp #creates the QCH file called qtdoc.qch
+
+The QCH file can then be loaded in Qt Assistant or Qt Creator. For Qt Assistant,
+the QCH file can be registered to automatically load it.
+
+ $> assistant -register qtdoc.qch #to automatically load the documentation
+
+
+Global Files
+============
+
+The qtbase/doc/global directory contains various files used by the modules to
+build the documentation. These include macros, stylesheets, and images for
+displaying documentation.
+
+To include these files in a qdocconf, add the following to a qdocconf file:
+
+ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
+
+
+Documentation Structure
+=======================
+For a typical module, the documentation will reside in the source directory.
+The examples and the example documentation are in the "examples" directory.
+
+ qtbase/src/sql/doc/src #Qt SQL's documentation
+ qtbase/examples/sql #Qt SQL's examples
+
+More Information
+================
+
+For more information about Qt 5's documentation, refer to the Qt Project wiki:
+http://qt-project.org/wiki/Qt5DocumentationProject
diff --git a/doc/global/externalsites/external-resources.qdoc b/doc/global/externalsites/external-resources.qdoc
index 61f9c01bdb..39e72204d6 100644
--- a/doc/global/externalsites/external-resources.qdoc
+++ b/doc/global/externalsites/external-resources.qdoc
@@ -464,7 +464,7 @@
*/
/*!
- \externalpage ftp://ftp.qt.nokia.com/pub/qt/solutions/lgpl/qtmotifextension-2.7_1-opensource.tar.gz
+ \externalpage ftp://ftp.qt-project.org/pub/qt/solutions/lgpl/qtmotifextension-2.7_1-opensource.tar.gz
\title Motif Extension
*/
diff --git a/doc/global/qt-html-templates-offline.qdocconf b/doc/global/qt-html-templates-offline.qdocconf
index abe7e5e349..5f989d2fa8 100644
--- a/doc/global/qt-html-templates-offline.qdocconf
+++ b/doc/global/qt-html-templates-offline.qdocconf
@@ -1,6 +1,26 @@
HTML.nobreadcrumbs = "true"
HTML.stylesheets = template/style/offline.css
+HTML.extraimages += template/images/ico_out.png \
+ template/images/ico_note.png \
+ template/images/ico_note_attention.png \
+ template/images/btn_prev.png \
+ template/images/btn_next.png \
+ template/images/bullet_dn.png \
+ template/images/bullet_sq.png \
+ template/images/bgrContent.png
+
+#specify which files in the output directory should be packed into the qch file.
+qhp.extraFiles += style/offline.css \
+ images/ico_out.png \
+ images/ico_note.png \
+ images/ico_note_attention.png \
+ images/btn_prev.png \
+ images/btn_next.png \
+ images/bullet_dn.png \
+ images/bullet_sq.png \
+ images/bgrContent.png
+
HTML.headerstyles = \
" <link rel=\"stylesheet\" type=\"text/css\" href=\"style/offline.css\" />\n"
diff --git a/doc/global/qt-html-templates-online.qdocconf b/doc/global/qt-html-templates-online.qdocconf
index d6c6b00e99..040a5483c2 100644
--- a/doc/global/qt-html-templates-online.qdocconf
+++ b/doc/global/qt-html-templates-online.qdocconf
@@ -1,36 +1,14 @@
HTML.nobreadcrumbs = "true"
HTML.stylesheets = template/style/online.css
-HTML.extraimages = template/images/btn_next_green.png \
- template/images/box_bg.png \
- template/images/page.png \
- template/images/arrow_down.png \
- template/images/btn_prev.png \
- template/images/blu_dot.png \
+HTML.extraimages += template/images/ico_out.png \
+ template/images/ico_note.png \
template/images/ico_note_attention.png \
- template/images/btn_prev_green.png \
- template/images/bg_ll_blank.png \
+ template/images/btn_prev.png \
template/images/btn_next.png \
- template/images/bg_l_blank.png \
- template/images/ico_note.png \
- template/images/home.png \
- template/images/ico_out.png \
- template/images/header_bg.png \
- template/images/page_bg.png \
- template/images/bg_l.png \
- template/images/bg_r.png \
- template/images/breadcrumb.png \
template/images/bullet_dn.png \
- template/images/feedbackground.png \
- template/images/bullet_gt.png \
- template/images/arrow.png \
template/images/bullet_sq.png \
- template/images/bullet_up.png \
- template/images/sprites-combined.png \
- template/images/horBar.png \
- template/images/bg_ul_blank.png \
- template/images/bgrContent.png \
-
+ template/images/bgrContent.png
HTML.headerstyles = \
" <link rel=\"stylesheet\" type=\"text/css\" href=\"style/online.css\" />\n"
@@ -38,7 +16,7 @@ HTML.headerstyles = \
HTML.endheader = \
"</head>\n" \
"<body>\n" \
- "<div class=\"header\" id=\"qtdocheader\"></div>\n"
+ "<div class=\"header\" id=\"qtdocheader\"></div>\n" \
" <header>\n" \
" <div class=\"nav\">\n" \
" <a href=\"http://qt-project.org/\">Qt Home</a>\n" \
diff --git a/doc/global/qt-module-defaults.qdocconf b/doc/global/qt-module-defaults.qdocconf
index 7d0705c475..8c8df29437 100644
--- a/doc/global/qt-module-defaults.qdocconf
+++ b/doc/global/qt-module-defaults.qdocconf
@@ -25,8 +25,5 @@ versionsym = QT_VERSION_STR
macro.raisedaster.HTML = "<sup>*</sup>"
-#for including files into the qch file
-qhp.extraFiles += style/offline.css
-
#include the external websites
sourcedirs += externalsites
diff --git a/doc/global/template/images/btn_next.png b/doc/global/template/images/btn_next.png
index f7bc2b7170..c649f18572 100755..100644
--- a/doc/global/template/images/btn_next.png
+++ b/doc/global/template/images/btn_next.png
Binary files differ
diff --git a/doc/global/template/images/btn_next_green.png b/doc/global/template/images/btn_next_green.png
deleted file mode 100644
index c649f18572..0000000000
--- a/doc/global/template/images/btn_next_green.png
+++ /dev/null
Binary files differ
diff --git a/doc/global/template/images/btn_prev.png b/doc/global/template/images/btn_prev.png
index 10a620c518..d1d29895b2 100755..100644
--- a/doc/global/template/images/btn_prev.png
+++ b/doc/global/template/images/btn_prev.png
Binary files differ
diff --git a/doc/global/template/images/btn_prev_green.png b/doc/global/template/images/btn_prev_green.png
deleted file mode 100644
index d1d29895b2..0000000000
--- a/doc/global/template/images/btn_prev_green.png
+++ /dev/null
Binary files differ
diff --git a/doc/global/template/images/ico_out.png b/doc/global/template/images/ico_out.png
index ff6e458fb1..790a05e51d 100755
--- a/doc/global/template/images/ico_out.png
+++ b/doc/global/template/images/ico_out.png
Binary files differ
diff --git a/doc/global/template/style/offline.css b/doc/global/template/style/offline.css
index 748effcee4..8b8a7d9ae1 100644
--- a/doc/global/template/style/offline.css
+++ b/doc/global/template/style/offline.css
@@ -8,6 +8,9 @@ margin-left:5px;
margin-right:5px;
}
+p {
+line-height: 20px;
+}
img{
-moz-box-shadow: 3px 3px 3px #ccc;
-webkit-box-shadow: 3px 3px 3px #ccc;
@@ -63,6 +66,16 @@ color: #44a51c;
text-align:left;
}
+a[href*="http://"], a[href*="ftp://"],a[href*="https://"]
+{
+text-decoration: none;
+background-image:url(../images/ico_out.png);
+background-repeat:no-repeat;
+background-position:left;
+padding-left:20px;
+text-align:left;
+}
+
.flags{
text-decoration:none;
text-height:24px;
@@ -155,71 +168,6 @@ height:20px;
margin-left:30px;
}
-.breadcrumb{
-display: block;
-position: relative;
-top:-20px;
-/*border-top:2px solid #ffffff;*/
-border-bottom: 1px solid #cecece;
-background-color:#F2F2F2;
-z-index:1;
-height:20px;
-padding:0px;
-margin:0px;
-padding-left:10px;
-padding-top:2px;
-margin-left:-5px;
-margin-right:-5px;
-}
-
-.breadcrumb ul{
- margin:0px;
- padding:0px;
-}
-
-.breadcrumb ul li{
-background-color:#F2F2F2;
-list-style-type:none;
-padding:0;
-margin:0;
-height:20px;
-}
-
-.breadcrumb li{
-float:left;
-}
-
-.breadcrumb .first {
-background:url(../images/home.png);
-background-position:left;
-background-repeat:no-repeat;
-padding-left:20px;
-}
-
-
-.breadcrumb li a{
-color:#2C418D;
-display:block;
-text-decoration:none;
-background:url(../images/arrow.png);
-background-repeat:no-repeat;
-background-position:right;
-padding-right:25px;
-padding-left:10px;
-}
-
-.breadcrumb li a:hover{
-color:#909090;
-display:block;
-text-decoration:none;
-background:url(../images/arrow.png);
-background-repeat:no-repeat;
-background-position:right;
-padding-right:20px;
-padding-left:10px;
-}
-
-
/* table of content
no display
*/
@@ -483,7 +431,7 @@ margin: 10;
overflow: hidden;
overflow-x: hidden;
overflow-y: hidden;
-padding: 20px 0 20px 0;
+padding: 20px 20px 20px 20px;
}
.qmldefault{
@@ -566,8 +514,7 @@ padding-right:5px;
.toc ul li{
margin-left:15px;
-list-style-image:url(../images/blu_dot.png);
-list-style:outside;
+list-style-image:url(../images/bullet_dn.png);
marker-offset: 0px;
margin-bottom:8px;
padding-left:0px;
@@ -643,7 +590,7 @@ margin-bottom: 20px;
.indexboxcont .sectionlist ul li
{
-line-height: 12px;
+line-height: 1.5;
}
.content .indexboxcont li
diff --git a/doc/global/template/style/online.css b/doc/global/template/style/online.css
index 21e371b132..f933bac5eb 100644
--- a/doc/global/template/style/online.css
+++ b/doc/global/template/style/online.css
@@ -8,6 +8,9 @@ margin-right:5px;
background: none repeat scroll 0% 0% rgb(230,231,232);
}
+p {
+line-height: 20px;
+}
img{
-moz-box-shadow: 3px 3px 3px #ccc;
-webkit-box-shadow: 3px 3px 3px #ccc;
@@ -540,7 +543,7 @@ margin: 10;
overflow: hidden;
overflow-x: hidden;
overflow-y: hidden;
-padding: 20px 0 20px 0;
+padding: 20px 20px 20px 20px;
}
.qmldefault{
@@ -701,7 +704,7 @@ margin-bottom: 20px;
.indexboxcont .sectionlist ul li
{
-line-height: 12px;
+line-height: 1.5;
}
.content .indexboxcont li
diff --git a/doc/src/examples/arrowpad.qdoc b/doc/src/examples/arrowpad.qdoc
deleted file mode 100644
index 39c0558117..0000000000
--- a/doc/src/examples/arrowpad.qdoc
+++ /dev/null
@@ -1,223 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Free Documentation License Usage
-** 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. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \example linguist/arrowpad
- \title Arrow Pad Example
-
- This example is a slightly more involved and introduces a key \e
- {Qt Linguist} concept: "contexts". It also shows how to use two
- or more languages.
-
- \image linguist-arrowpad_en.png
-
- We will use two translations, French and Dutch, although there is no
- effective limit on the number of possible translations that can be used
- with an application. The relevant lines of \c arrowpad.pro are
-
- \snippet examples/linguist/arrowpad/arrowpad.pro 0
- \codeline
- \snippet examples/linguist/arrowpad/arrowpad.pro 1
-
- Run \c lupdate; it should produce two identical message files
- \c arrowpad_fr.ts and \c arrowpad_nl.ts. These files will contain all the source
- texts marked for translation with \c tr() calls and their contexts.
-
- See the \l{Qt Linguist manual} for more information about
- translating Qt application.
-
- \section1 Line by Line Walkthrough
-
- In \c arrowpad.h we define the \c ArrowPad subclass which is a
- subclass of QWidget. In the screenshot above, the central
- widget with the four buttons is an \c ArrowPad.
-
- \snippet examples/linguist/arrowpad/arrowpad.h 0
- \snippet examples/linguist/arrowpad/arrowpad.h 1
- \snippet examples/linguist/arrowpad/arrowpad.h 2
-
- When \c lupdate is run it not only extracts the source texts but it
- also groups them into contexts. A context is the name of the class in
- which the source text appears. Thus, in this example, "ArrowPad" is a
- context: it is the context of the texts in the \c ArrowPad class.
- The \c Q_OBJECT macro defines \c tr(x) in \c ArrowPad like this:
-
- \snippet doc/src/snippets/code/doc_src_examples_arrowpad.cpp 0
-
- Knowing which class each source text appears in enables \e {Qt
- Linguist} to group texts that are logically related together, e.g.
- all the text in a dialog will have the context of the dialog's class
- name and will be shown together. This provides useful information for
- the translator since the context in which text appears may influence how
- it should be translated. For some translations keyboard
- accelerators may need to be changed and having all the source texts in a
- particular context (class) grouped together makes it easier for the
- translator to perform any accelerator changes without introducing
- conflicts.
-
- In \c arrowpad.cpp we implement the \c ArrowPad class.
-
- \snippet examples/linguist/arrowpad/arrowpad.cpp 0
- \snippet examples/linguist/arrowpad/arrowpad.cpp 1
- \snippet examples/linguist/arrowpad/arrowpad.cpp 2
- \snippet examples/linguist/arrowpad/arrowpad.cpp 3
-
- We call \c ArrowPad::tr() for each button's label since the labels are
- user-visible text.
-
- \image linguist-arrowpad_en.png
-
- \snippet examples/linguist/arrowpad/mainwindow.h 0
- \snippet examples/linguist/arrowpad/mainwindow.h 1
-
- In the screenshot above, the whole window is a \c MainWindow.
- This is defined in the \c mainwindow.h header file. Here too, we
- use \c Q_OBJECT, so that \c MainWindow will become a context in
- \e {Qt Linguist}.
-
- \snippet examples/linguist/arrowpad/mainwindow.cpp 0
-
- In the implementation of \c MainWindow, \c mainwindow.cpp, we create
- an instance of our \c ArrowPad class.
-
- \snippet examples/linguist/arrowpad/mainwindow.cpp 1
-
- We also call \c MainWindow::tr() twice, once for the action and
- once for the shortcut.
-
- Note the use of \c tr() to support different keys in other
- languages. "Ctrl+Q" is a good choice for Quit in English, but a
- Dutch translator might want to use "Ctrl+A" (for Afsluiten) and a
- German translator "Strg+E" (for Beenden). When using \c tr() for
- \uicontrol Ctrl key accelerators, the two argument form should be used
- with the second argument describing the function that the
- accelerator performs.
-
- Our \c main() function is defined in \c main.cpp as usual.
-
- \snippet examples/linguist/arrowpad/main.cpp 2
- \snippet examples/linguist/arrowpad/main.cpp 3
-
- We choose which translation to use according to the current locale.
- QLocale::system() can be influenced by setting the \c LANG
- environment variable, for example. Notice that the use of a naming
- convention that incorporates the locale for \c .qm message files,
- (and TS files), makes it easy to implement choosing the
- translation file according to locale.
-
- If there is no QM message file for the locale chosen the original
- source text will be used and no error raised.
-
- \section1 Translating to French and Dutch
-
- We'll begin by translating the example application into French. Start
- \e {Qt Linguist} with \c arrowpad_fr.ts. You should get the seven source
- texts ("\&Up", "\&Left", etc.) grouped in two contexts ("ArrowPad"
- and "MainWindow").
-
- Now, enter the following translations:
-
- \list
- \li \c ArrowPad
- \list
- \li \&Up - \&Haut
- \li \&Left - \&Gauche
- \li \&Right - \&Droite
- \li \&Down - \&Bas
- \endlist
- \li \c MainWindow
- \list
- \li E\&xit - \&Quitter
- \li Ctrl+Q - Ctrl+Q
- \li \&File - \&Fichier
- \endlist
- \endlist
-
- It's quickest to press \uicontrol{Alt+D} (which clicks the \uicontrol {Done \& Next}
- button) after typing each translation, since this marks the
- translation as done and moves on to the next source text.
-
- Save the file and do the same for Dutch working with \c arrowpad_nl.ts:
-
- \list
- \li \c ArrowPad
- \list
- \li \&Up - \&Omhoog
- \li \&Left - \&Links
- \li \&Right - \&Rechts
- \li \&Down - Omlaa\&g
- \endlist
- \li \c MainWindow
- \list
- \li E\&xit - \&Afsluiten
- \li Ctrl+Q - Ctrl+A
- \li File - \&Bestand
- \endlist
- \endlist
-
- We have to convert the \c tt1_fr.ts and \c tt1_nl.ts translation source
- files into QM files. We could use \e {Qt Linguist} as we've done
- before; however using the command line tool \c lrelease ensures that
- \e all the QM files for the application are created without us
- having to remember to load and \uicontrol File|Release each one
- individually from \e {Qt Linguist}.
-
- Type
-
- \snippet doc/src/snippets/code/doc_src_examples_arrowpad.qdoc 1
-
- This should create both \c arrowpad_fr.qm and \c arrowpad_nl.qm. Set the \c
- LANG environment variable to \c fr. In Unix, one of the two following
- commands should work
-
- \snippet doc/src/snippets/code/doc_src_examples_arrowpad.qdoc 2
-
- In Windows, either modify \c autoexec.bat or run
-
- \snippet doc/src/snippets/code/doc_src_examples_arrowpad.qdoc 3
-
- When you run the program, you should now see the French version:
-
- \image linguist-arrowpad_fr.png
-
- Try the same with Dutch, by setting \c LANG=nl. Now the Dutch
- version should appear:
-
- \image linguist-arrowpad_nl.png
-
- \section1 Exercises
-
- Mark one of the translations in \e {Qt Linguist} as not done, i.e.
- by unchecking the "done" checkbox; run \c lupdate, then \c lrelease,
- then the example. What effect did this change have?
-
- Set \c LANG=fr_CA (French Canada) and run the example program again.
- Explain why the result is the same as with \c LANG=fr.
-
- Change one of the accelerators in the Dutch translation to eliminate the
- conflict between \e \&Bestand and \e \&Boven.
-*/
diff --git a/doc/src/examples/hellotr.qdoc b/doc/src/examples/hellotr.qdoc
deleted file mode 100644
index ca4d4282ad..0000000000
--- a/doc/src/examples/hellotr.qdoc
+++ /dev/null
@@ -1,174 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Free Documentation License Usage
-** 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. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \example linguist/hellotr
- \title Hello tr() Example
-
- This example is a small Hello World program with a Latin translation. The
- screenshot below shows the English version.
-
- \image linguist-hellotr_en.png
-
- See the \l{Qt Linguist manual} for more information about
- translating Qt application.
-
- \section1 Line by Line Walkthrough
-
-
- \snippet examples/linguist/hellotr/main.cpp 0
-
- This line includes the definition of the QTranslator class.
- Objects of this class provide translations for user-visible text.
-
- \snippet examples/linguist/hellotr/main.cpp 5
-
- Creates a QTranslator object without a parent.
-
- \snippet examples/linguist/hellotr/main.cpp 6
-
- Tries to load a file called \c hellotr_la.qm (the \c .qm file extension is
- implicit) that contains Latin translations for the source texts used in
- the program. No error will occur if the file is not found.
-
- \snippet examples/linguist/hellotr/main.cpp 7
-
- Adds the translations from \c hellotr_la.qm to the pool of translations used
- by the program.
-
- \snippet examples/linguist/hellotr/main.cpp 8
-
- Creates a push button that displays "Hello world!". If \c hellotr_la.qm
- was found and contains a translation for "Hello world!", the
- translation appears; if not, the source text appears.
-
- All classes that inherit QObject have a \c tr() function. Inside
- a member function of a QObject class, we simply write \c tr("Hello
- world!") instead of \c QPushButton::tr("Hello world!") or \c
- QObject::tr("Hello world!").
-
- \section1 Running the Application in English
-
- Since we haven't made the translation file \c hellotr_la.qm, the source text
- is shown when we run the application:
-
- \image linguist-hellotr_en.png
-
- \section1 Creating a Latin Message File
-
- The first step is to create a project file, \c hellotr.pro, that lists
- all the source files for the project. The project file can be a qmake
- project file, or even an ordinary makefile. Any file that contains
-
- \snippet examples/linguist/hellotr/hellotr.pro 0
- \snippet examples/linguist/hellotr/hellotr.pro 1
-
- will work. \c TRANSLATIONS specifies the message files we want to
- maintain. In this example, we just maintain one set of translations,
- namely Latin.
-
- Note that the file extension is \c .ts, not \c .qm. The \c .ts
- translation source format is designed for use during the
- application's development. Programmers or release managers run
- the \c lupdate program to generate and update TS files with
- the source text that is extracted from the source code.
- Translators read and update the TS files using \e {Qt
- Linguist} adding and editing their translations.
-
- The TS format is human-readable XML that can be emailed directly
- and is easy to put under version control. If you edit this file
- manually, be aware that the default encoding for XML is UTF-8, not
- Latin1 (ISO 8859-1). One way to type in a Latin1 character such as
- '\oslash' (Norwegian o with slash) is to use an XML entity:
- "\&#xf8;". This will work for any Unicode 4.0 character.
-
- Once the translations are complete the \c lrelease program is used to
- convert the TS files into the QM Qt message file format. The
- QM format is a compact binary format designed to deliver very
- fast lookup performance. Both \c lupdate and \c lrelease read all the
- project's source and header files (as specified in the HEADERS and
- SOURCES lines of the project file) and extract the strings that
- appear in \c tr() function calls.
-
- \c lupdate is used to create and update the message files (\c hellotr_la.ts
- in this case) to keep them in sync with the source code. It is safe to
- run \c lupdate at any time, as \c lupdate does not remove any
- information. For example, you can put it in the makefile, so the TS
- files are updated whenever the source changes.
-
- Try running \c lupdate right now, like this:
-
- \snippet doc/src/snippets/code/doc_src_examples_hellotr.qdoc 0
-
- (The \c -verbose option instructs \c lupdate to display messages that
- explain what it is doing.) You should now have a file \c hellotr_la.ts in
- the current directory, containing this:
-
- \snippet doc/src/snippets/code/doc_src_examples_hellotr.qdoc 1
-
- You don't need to understand the file format since it is read and
- updated using tools (\c lupdate, \e {Qt Linguist}, \c lrelease).
-
- \section1 Translating to Latin with Qt Linguist
-
- We will use \e {Qt Linguist} to provide the translation, although
- you can use any XML or plain text editor to enter a translation into a
- TS file.
-
- To start \e {Qt Linguist}, type
-
- \snippet doc/src/snippets/code/doc_src_examples_hellotr.qdoc 2
-
- You should now see the text "QPushButton" in the top left pane.
- Double-click it, then click on "Hello world!" and enter "Orbis, te
- saluto!" in the \uicontrol Translation pane (the middle right of the
- window). Don't forget the exclamation mark!
-
- Click the \uicontrol Done checkbox and choose \uicontrol File|Save from the
- menu bar. The TS file will no longer contain
-
- \snippet doc/src/snippets/code/doc_src_examples_hellotr.qdoc 3
-
- but instead will have
-
- \snippet doc/src/snippets/code/doc_src_examples_hellotr.qdoc 4
-
- \section1 Running the Application in Latin
-
- To see the application running in Latin, we have to generate a QM
- file from the TS file. Generating a QM file can be achieved
- either from within \e {Qt Linguist} (for a single TS file), or
- by using the command line program \c lrelease which will produce one
- QM file for each of the TS files listed in the project file.
- Generate \c hellotr_la.qm from \c hellotr_la.ts by choosing
- \uicontrol File|Release from \e {Qt Linguist}'s menu bar and pressing
- \uicontrol Save in the file save dialog that pops up. Now run the \c hellotr
- program again. This time the button will be labelled "Orbis, te
- saluto!".
-
- \image linguist-hellotr_la.png
-*/
diff --git a/doc/src/examples/multipleinheritance.qdoc b/doc/src/examples/multipleinheritance.qdoc
deleted file mode 100644
index 541dc3c719..0000000000
--- a/doc/src/examples/multipleinheritance.qdoc
+++ /dev/null
@@ -1,94 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Free Documentation License Usage
-** 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. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \example uitools/multipleinheritance
- \title Multiple Inheritance Example
-
- The Multiple Inheritance Example shows how to use a form created with
- Qt Designer in an application by subclassing both QWidget and the user
- interface class, which is \c{Ui::CalculatorForm}.
-
- \image multipleinheritance-example.png
-
- To subclass the \c calculatorform.ui file and ensure that \c qmake
- processes it with the \c uic, we have to include \c calculatorform.ui
- in the \c .pro file, as shown below:
-
- \snippet examples/uitools/multipleinheritance/multipleinheritance.pro 0
-
- When the project is compiled, the \c uic will generate a corresponding
- \c ui_calculatorform.h.
-
- \section1 CalculatorForm Definition
-
- In the \c CalculatorForm definition, we include the \c ui_calculatorform.h
- that was generated earlier.
-
- \snippet examples/uitools/multipleinheritance/calculatorform.h 0
-
- As mentioned earlier, the class is a subclass of both QWidget and
- \c{Ui::CalculatorForm}.
-
- \snippet examples/uitools/multipleinheritance/calculatorform.h 1
-
- Two slots are defined according to the \l{Automatic Connections}
- {automatic connection} naming convention required by \c uic. This is
- to ensure that \l{QMetaObject}'s auto-connection facilities connect
- all the signals and slots involved automatically.
-
- \section1 CalculatorForm Implementation
-
- In the constructor, we call \c setupUi() to load the user interface file.
- Note that we do not need the \c{ui} prefix as \c CalculatorForm is a
- subclass of the user interface class.
-
- \snippet examples/uitools/multipleinheritance/calculatorform.cpp 0
-
- We include two slots, \c{on_inputSpinBox1_valueChanged()} and
- \c{on_inputSpinBox2_valueChanged()}. These slots respond to the
- \l{QSpinBox::valueChanged()}{valueChanged()} signal that both spin boxes
- emit. Whenever there is a change in one spin box's value, we take that
- value and add it to whatever value the other spin box has.
-
- \snippet examples/uitools/multipleinheritance/calculatorform.cpp 1
- \codeline
- \snippet examples/uitools/multipleinheritance/calculatorform.cpp 2
-
- \section1 \c main() Function
-
- The \c main() function instantiates QApplication and \c CalculatorForm.
- The \c calculator object is displayed by invoking the \l{QWidget::show()}
- {show()} function.
-
- \snippet examples/uitools/multipleinheritance/main.cpp 0
-
- There are various approaches to include forms into applications. The
- Multiple Inheritance approach is just one of them. See
- \l{Using a Designer UI File in Your Application} for more information on
- the other approaches available.
-*/
diff --git a/doc/src/examples/trollprint.qdoc b/doc/src/examples/trollprint.qdoc
deleted file mode 100644
index 5a4e84fd14..0000000000
--- a/doc/src/examples/trollprint.qdoc
+++ /dev/null
@@ -1,261 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Free Documentation License Usage
-** 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. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \example linguist/trollprint
- \title Troll Print Example
-
- Troll Print is an example application that lets the user choose
- printer settings. It comes in two versions: English and
- Portuguese.
-
- \image linguist-trollprint_10_en.png
-
- We've included a translation file, \c trollprint_pt.ts, which contains some
- Portuguese translations for this example.
-
- We will consider two releases of the same application: Troll Print
- 1.0 and 1.1. We will learn to reuse the translations created for one
- release in a subsequent release. (In this tutorial, you need to edit
- some source files. It's probably best to copy all the files to a new
- temporary directory and work from there.)
-
- See the \l{Qt Linguist manual} for more information about
- translating Qt application.
-
- \section1 Line by Line Walkthrough
-
- The \c PrintPanel class is defined in \c printpanel.h.
-
- \snippet examples/linguist/trollprint/printpanel.h 0
-
- \c PrintPanel is a QWidget. It needs the \c Q_OBJECT macro for \c
- tr() to work properly.
-
- The implementation file is \c printpanel.cpp.
-
- \snippet examples/linguist/trollprint/printpanel.cpp 0
-
- Some of the code is commented out in Troll Print 1.0; you will
- uncomment it later, for Troll Print 1.1.
-
- \snippet examples/linguist/trollprint/printpanel.cpp 1
- \snippet examples/linguist/trollprint/printpanel.cpp 2
-
- Notice the two occurrences of \c tr("Enabled") and of \c
- tr("Disabled") in PrintPanel. Since both "Enabled"s and "Disabled"s
- appear in the same context \e {Qt Linguist} will only display one
- occurrence of each and will use the same translations for the
- duplicates that it doesn't display. Whilst this is a useful
- timesaver, in some languages, such as Portuguese, the second
- occurrence requires a separate translation. We will see how \e {Qt
- Linguist} can be made to display all the occurrences for separate
- translation shortly.
-
- The header file for \c MainWindow, \c mainwindow.h, contains no
- surprises. In the implementation, \c mainwindow.cpp, we have some
- user-visible source texts that must be marked for translation.
-
- \snippet examples/linguist/trollprint/mainwindow.cpp 0
-
- We must translate the window title.
-
- \snippet examples/linguist/trollprint/mainwindow.cpp 1
- \snippet examples/linguist/trollprint/mainwindow.cpp 3
-
- We also need to translate the actions and menus. Note that the
- two argument form of \c tr() is used for the keyboard
- accelerator, "Ctrl+Q", since the second argument is the only clue
- the translator has to indicate what function that accelerator
- will perform.
-
- \snippet examples/linguist/trollprint/main.cpp 0
-
- The \c main() function in \c main.cpp is the same as the one in
- the \l{linguist/arrowpad}{Arrow Pad} example. In particular, it
- chooses a translation file based on the current locale.
-
- \section1 Running Troll Print 1.0 in English and in Portuguese
-
- We will use the translations in the \c trollprint_pt.ts file that is provided.
-
- Set the \c LANG environment variable to \c pt, and then run \c
- trollprint. You should still see the English version. Now run \c
- lrelease, e.g. \c {lrelease trollprint.pro}, and then run the
- example again. Now you should see the Portuguese edition (Troll
- Imprimir 1.0):
-
- \image linguist-trollprint_10_pt_bad.png
-
- Whilst the translation has appeared correctly, it is in fact wrong. In
- good Portuguese, the second occurrence of "Enabled" should be
- "Ativadas", not "Ativado" and the ending for the second translation of
- "Disabled" must change similarly too.
-
- If you open \c trollprint_pt.ts using \e {Qt Linguist}, you will see that
- there is just one occurrence of "Enabled" and of "Disabled" in the
- translation source file, even though there are two of each in the
- source code. This is because \e {Qt Linguist} tries to minimize the
- translator's work by using the same translation for duplicate source
- texts. In cases such as this where an identical translation is wrong,
- the programmer must disambiguate the duplicate occurrences. This is
- easily achieved by using the two argument form of \c tr().
-
- We can easily determine which file must be changed because the
- translator's "context" is in fact the class name for the class where
- the texts that must be changed appears. In this case the file is \c
- printpanel.cpp, where there are four lines to change. Add the
- second argument "two-sided" in the appropriate \c tr() calls to the
- first pair of radio buttons:
-
- \snippet doc/src/snippets/code/doc_src_examples_trollprint.cpp 0
-
- and add the second argument "colors" in the appropriate \c tr() calls
- for the second pair of radio buttons:
-
- \snippet doc/src/snippets/code/doc_src_examples_trollprint.cpp 1
-
- Now run \c lupdate and open \c trollprint_pt.ts with \e {Qt Linguist}. You
- should now see two changes.
-
- First, the translation source file now contains \e three "Enabled",
- "Disabled" pairs. The first pair is marked "(obs.)" signifying that they
- are obsolete. This is because these texts appeared in \c tr() calls that
- have been replaced by new calls with two arguments. The second pair has
- "two-sided" as their comment, and the third pair has "colors" as their
- comment. The comments are shown in the \uicontrol {Source text and comments}
- area in \e {Qt Linguist}.
-
- Second, the translation text "Ativado" and "Desativado" have been
- automatically used as translations for the new "Enabled" and "Disabled"
- texts, again to minimize the translator's work. Of course in this case
- these are not correct for the second occurrence of each word, but they
- provide a good starting point.
-
- Change the second "Ativado" into "Ativadas" and the second
- "Desativado" into "Desativadas", then save and quit. Run \c lrelease
- to obtain an up-to-date binary \c trollprint_pt.qm file, and run Troll Print
- (or rather Troll Imprimir).
-
- \image linguist-trollprint_10_pt_good.png
-
- The second argument to \c tr() calls, called "comments" in \e {Qt
- Linguist}, distinguish between identical source texts that occur in
- the same context (class). They are also useful in other cases to give
- clues to the translator, and in the case of Ctrl key accelerators are
- the only means of conveying the function performed by the accelerator to
- the translator.
-
- An additional way of helping the translator is to provide information on
- how to navigate to the particular part of the application that contains
- the source texts they must translate. This helps them see the context
- in which the translation appears and also helps them to find and test
- the translations. This can be achieved by using a \c TRANSLATOR comment
- in the source code:
-
- \snippet doc/src/snippets/code/doc_src_examples_trollprint.cpp 2
-
- Try adding these comments to some source files, particularly to
- dialog classes, describing the navigation necessary to reach the
- dialogs. You could also add them to the example files, e.g. \c
- mainwindow.cpp and \c printpanel.cpp are appropriate files. Run \c
- lupdate and then start \e {Qt Linguist} and load in \c trollprint_pt.ts.
- You should see the comments in the \uicontrol {Source text and comments} area
- as you browse through the list of source texts.
-
- Sometimes, particularly with large programs, it can be difficult for
- the translator to find their translations and check that they're
- correct. Comments that provide good navigation information can save
- them time:
-
- \snippet doc/src/snippets/code/doc_src_examples_trollprint.cpp 3
-
- \section1 Troll Print 1.1
-
- We'll now prepare release 1.1 of Troll Print. Start your favorite text
- editor and follow these steps:
-
- \list
- \li Uncomment the two lines that create a QLabel with the text
- "\<b\>TROLL PRINT\</b\>" in \c printpanel.cpp.
- \li Word-tidying: Replace "2-sided" by "Two-sided" in \c printpanel.cpp.
- \li Replace "1.0" with "1.1" everywhere it occurs in \c mainwindow.cpp.
- \li Update the copyright year to 1999-2000 in \c mainwindow.cpp.
- \endlist
-
- (Of course the version number and copyright year would be consts or
- #defines in a real application.)
-
- Once finished, run \c lupdate, then open \c trollprint_pt.ts in \e {Qt
- Linguist}. The following items are of special interest:
-
- \list
- \li \c MainWindow
- \list
- \li Troll Print 1.0 - marked "(obs.)", obsolete
- \li About Troll Print 1.0 - marked "(obs.)", obsolete
- \li Troll Print 1.0. Copyright 1999 Software, Inc. -
- marked obsolete
- \li Troll Print 1.1 - automatically translated as
- "Troll Imprimir 1.1"
- \li About Troll Print 1.1 - automatically translated as
- "Troll Imprimir 1.1"
- \li Troll Print 1.1. Copyright 1999-2000 Software,
- Inc. - automatically translated as "Troll Imprimir 1.1.
- Copyright 1999-2000 Software, Inc."
- \endlist
- \li \c PrintPanel
- \list
- \li 2-sided - marked "(obs.)", obsolete
- \li \<b\>TROLL PRINT\</b\> - unmarked, i.e. untranslated
- \li Two-sided - unmarked, i.e. untranslated.
- \endlist
- \endlist
-
- Notice that \c lupdate works hard behind the scenes to make revisions
- easier, and it's pretty smart with numbers.
-
- Go over the translations in \c MainWindow and mark these as "done".
- Translate "\<b\>TROLL PRINT\</b\>" as "\<b\>TROLL IMPRIMIR\</b\>".
- When you're translating "Two-sided", press the \uicontrol {Guess Again}
- button to translate "Two-sided", but change the "2" into "Dois".
-
- Save and quit, then run \c lrelease. The Portuguese version
- should look like this:
-
- \image linguist-trollprint_11_pt.png
-
- Choose \uicontrol{Ajuda|Sobre} (\uicontrol{Help|About}) to see the about box.
-
- If you choose \uicontrol {Ajuda|Sobre Qt} (\uicontrol {Help|About Qt}), you'll get
- an English dialog. Oops! Qt itself needs to be translated. See
- \l{Internationalization with Qt} for details.
-
- Now set \c LANG=en to get the original English version:
-
- \image linguist-trollprint_11_en.png
-*/
diff --git a/doc/src/images/linguist-arrowpad_en.png b/doc/src/images/linguist-arrowpad_en.png
deleted file mode 100644
index 9a95eb24ff..0000000000
--- a/doc/src/images/linguist-arrowpad_en.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/linguist-arrowpad_fr.png b/doc/src/images/linguist-arrowpad_fr.png
deleted file mode 100644
index fc33f9fd73..0000000000
--- a/doc/src/images/linguist-arrowpad_fr.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/linguist-arrowpad_nl.png b/doc/src/images/linguist-arrowpad_nl.png
deleted file mode 100644
index f2645a81b3..0000000000
--- a/doc/src/images/linguist-arrowpad_nl.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/linguist-hellotr_en.png b/doc/src/images/linguist-hellotr_en.png
deleted file mode 100644
index 6b3d8072cd..0000000000
--- a/doc/src/images/linguist-hellotr_en.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/linguist-hellotr_la.png b/doc/src/images/linguist-hellotr_la.png
deleted file mode 100644
index f1ecdb07ad..0000000000
--- a/doc/src/images/linguist-hellotr_la.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/linguist-trollprint_10_en.png b/doc/src/images/linguist-trollprint_10_en.png
deleted file mode 100644
index e460481f96..0000000000
--- a/doc/src/images/linguist-trollprint_10_en.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/linguist-trollprint_10_pt_bad.png b/doc/src/images/linguist-trollprint_10_pt_bad.png
deleted file mode 100644
index b96d477240..0000000000
--- a/doc/src/images/linguist-trollprint_10_pt_bad.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/linguist-trollprint_10_pt_good.png b/doc/src/images/linguist-trollprint_10_pt_good.png
deleted file mode 100644
index 293c44a746..0000000000
--- a/doc/src/images/linguist-trollprint_10_pt_good.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/linguist-trollprint_11_en.png b/doc/src/images/linguist-trollprint_11_en.png
deleted file mode 100644
index f718c995c0..0000000000
--- a/doc/src/images/linguist-trollprint_11_en.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/linguist-trollprint_11_pt.png b/doc/src/images/linguist-trollprint_11_pt.png
deleted file mode 100644
index 0ff8c399b3..0000000000
--- a/doc/src/images/linguist-trollprint_11_pt.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/snippets/code/doc_src_examples_arrowpad.cpp b/doc/src/snippets/code/doc_src_examples_arrowpad.cpp
deleted file mode 100644
index 58e790d3ae..0000000000
--- a/doc/src/snippets/code/doc_src_examples_arrowpad.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** 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 Digia Plc 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]
-qApp->translate("ArrowPad", x)
-//! [0]
diff --git a/doc/src/snippets/code/doc_src_examples_arrowpad.qdoc b/doc/src/snippets/code/doc_src_examples_arrowpad.qdoc
deleted file mode 100644
index 4b3ea343a3..0000000000
--- a/doc/src/snippets/code/doc_src_examples_arrowpad.qdoc
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** 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 Digia Plc 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$
-**
-****************************************************************************/
-
-//! [1]
-lrelease arrowpad.pro
-//! [1]
-
-
-//! [2]
-export LANG=fr
-setenv LANG fr
-//! [2]
-
-
-//! [3]
-set LANG=fr
-//! [3]
diff --git a/doc/src/snippets/code/doc_src_examples_hellotr.qdoc b/doc/src/snippets/code/doc_src_examples_hellotr.qdoc
deleted file mode 100644
index 2e57cac8a5..0000000000
--- a/doc/src/snippets/code/doc_src_examples_hellotr.qdoc
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** 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 Digia Plc 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]
-lupdate -verbose hellotr.pro
-//! [0]
-
-
-//! [1]
-<!DOCTYPE TS><TS>
-<context>
- <name>QPushButton</name>
- <message>
- <source>Hello world!</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-</TS>
-//! [1]
-
-
-//! [2]
-linguist hellotr_la.ts
-//! [2]
-
-
-//! [3]
-<translation type='unfinished'></translation>
-//! [3]
-
-
-//! [4]
-<translation>Orbis, te saluto!</translation>
-//! [4]
diff --git a/doc/src/snippets/code/doc_src_examples_textfinder.pro b/doc/src/snippets/code/doc_src_examples_textfinder.pro
deleted file mode 100644
index 4446e8eb7b..0000000000
--- a/doc/src/snippets/code/doc_src_examples_textfinder.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-#! [0]
-QT += uitools
-HEADERS = textfinder.h
-RESOURCES = textfinder.qrc
-SOURCES = textfinder.cpp main.cpp
-#! [0]
diff --git a/doc/src/snippets/code/doc_src_examples_trollprint.cpp b/doc/src/snippets/code/doc_src_examples_trollprint.cpp
deleted file mode 100644
index 493e245e83..0000000000
--- a/doc/src/snippets/code/doc_src_examples_trollprint.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** 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 Digia Plc 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]
-twoSidedEnabledRadio = new QRadioButton(tr("Enabled", "two-sided"));
-twoSidedDisabledRadio = new QRadioButton(tr("Disabled", "two-sided"));
-//! [0]
-
-
-//! [1]
-colorsEnabledRadio = new QRadioButton(tr("Enabled", "colors"), colors);
-colorsDisabledRadio = new QRadioButton(tr("Disabled", "colors"), colors);
-//! [1]
-
-
-//! [2]
-/*
- TRANSLATOR MainWindow
-
- In this application the whole application is a MainWindow.
- Choose Help|About from the menu bar to see some text
- belonging to MainWindow.
-
- ...
-*/
-//! [2]
-
-
-//! [3]
-/*
- TRANSLATOR ZClientErrorDialog
-
- Choose Client|Edit to reach the Client Edit dialog, then choose
- Client Specification from the drop down list at the top and pick
- client Bartel Leendert van der Waerden. Now check the Profile
- checkbox and then click the Start Processing button. You should
- now see a pop up window with the text "Error: Name too long!".
- This window is a ZClientErrorDialog.
-*/
-//! [3]
diff --git a/examples/aggregate/examples.pro b/examples/aggregate/examples.pro
new file mode 100644
index 0000000000..bf5e48fd59
--- /dev/null
+++ b/examples/aggregate/examples.pro
@@ -0,0 +1,6 @@
+TEMPLATE = subdirs
+
+sd = $$files(*)
+for(d, sd): \
+ exists($$d/$${d}.pro): \
+ SUBDIRS += $$d
diff --git a/examples/dbus/complexpingpong/complexpingpong.pro b/examples/dbus/complexpingpong/complexpingpong.pro
index 1dfeff92ac..cd618d549d 100644
--- a/examples/dbus/complexpingpong/complexpingpong.pro
+++ b/examples/dbus/complexpingpong/complexpingpong.pro
@@ -2,4 +2,3 @@ TEMPLATE = subdirs
CONFIG += ordered
win32:CONFIG += console
SUBDIRS = complexping.pro complexpong.pro
-QT += widgets
diff --git a/examples/dbus/dbus.pro b/examples/dbus/dbus.pro
index 89d42bf7fe..fd43c23fa3 100644
--- a/examples/dbus/dbus.pro
+++ b/examples/dbus/dbus.pro
@@ -3,9 +3,7 @@ SUBDIRS = listnames \
pingpong \
complexpingpong
-!contains(QT_CONFIG, no-widgets) {
+qtHaveModule(widgets) {
SUBDIRS += chat \
remotecontrolledcar
}
-
-QT += widgets
diff --git a/examples/dbus/doc/src/chat.qdoc b/examples/dbus/doc/src/chat.qdoc
new file mode 100644
index 0000000000..b06338d87e
--- /dev/null
+++ b/examples/dbus/doc/src/chat.qdoc
@@ -0,0 +1,31 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** 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. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example chat
+ \title D-Bus Chat Example
+*/
diff --git a/examples/dbus/doc/src/complexpingpong.qdoc b/examples/dbus/doc/src/complexpingpong.qdoc
new file mode 100644
index 0000000000..60b0e10feb
--- /dev/null
+++ b/examples/dbus/doc/src/complexpingpong.qdoc
@@ -0,0 +1,31 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** 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. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example complexpingpong
+ \title D-Bus Complex Ping Pong Example
+*/
diff --git a/examples/dbus/doc/src/listnames.qdoc b/examples/dbus/doc/src/listnames.qdoc
new file mode 100644
index 0000000000..e5dc2671dd
--- /dev/null
+++ b/examples/dbus/doc/src/listnames.qdoc
@@ -0,0 +1,31 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** 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. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example listnames
+ \title D-Bus List Names Example
+*/
diff --git a/examples/dbus/doc/src/pingpong.qdoc b/examples/dbus/doc/src/pingpong.qdoc
new file mode 100644
index 0000000000..f16ecb9c98
--- /dev/null
+++ b/examples/dbus/doc/src/pingpong.qdoc
@@ -0,0 +1,31 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** 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. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example pingpong
+ \title D-Bus Ping Pong Example
+*/
diff --git a/examples/dbus/doc/src/remotecontrolledcar.qdoc b/examples/dbus/doc/src/remotecontrolledcar.qdoc
new file mode 100644
index 0000000000..cb91ac28b6
--- /dev/null
+++ b/examples/dbus/doc/src/remotecontrolledcar.qdoc
@@ -0,0 +1,31 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** 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. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example remotecontrolledcar
+ \title D-Bus Remote Controlled Car Example
+*/
diff --git a/examples/dbus/pingpong/pingpong.pro b/examples/dbus/pingpong/pingpong.pro
index 701e778676..07fca74c9a 100644
--- a/examples/dbus/pingpong/pingpong.pro
+++ b/examples/dbus/pingpong/pingpong.pro
@@ -2,4 +2,3 @@ TEMPLATE = subdirs
CONFIG += ordered
win32:CONFIG += console
SUBDIRS = ping.pro pong.pro
-QT += widgets
diff --git a/examples/dbus/remotecontrolledcar/doc/images/remotecontrolledcar-car-example.png b/examples/dbus/remotecontrolledcar/doc/images/remotecontrolledcar-car-example.png
new file mode 100644
index 0000000000..7e08340c80
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/doc/images/remotecontrolledcar-car-example.png
Binary files differ
diff --git a/examples/dbus/remotecontrolledcar/doc/src/dbus-remotecontrolledcar.qdoc b/examples/dbus/remotecontrolledcar/doc/src/dbus-remotecontrolledcar.qdoc
new file mode 100644
index 0000000000..05c750803e
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/doc/src/dbus-remotecontrolledcar.qdoc
@@ -0,0 +1,36 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** 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. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example dbus/remotecontrolledcar
+ \title D-Bus Remote Controlled Car Example
+
+ The Remote Controlled Car example shows how to use D-Bus to control one
+ application using another.
+
+ \image remotecontrolledcar-car-example.png
+*/
diff --git a/examples/dbus/remotecontrolledcar/remotecontrolledcar.pro b/examples/dbus/remotecontrolledcar/remotecontrolledcar.pro
index f5a0c27435..2a1fddb500 100644
--- a/examples/dbus/remotecontrolledcar/remotecontrolledcar.pro
+++ b/examples/dbus/remotecontrolledcar/remotecontrolledcar.pro
@@ -1,5 +1,3 @@
TEMPLATE = subdirs
SUBDIRS = car \
controller
-
-QT += widgets
diff --git a/examples/embedded/embedded.pro b/examples/embedded/embedded.pro
index aa01bda368..d7d69d3efe 100644
--- a/examples/embedded/embedded.pro
+++ b/examples/embedded/embedded.pro
@@ -3,5 +3,3 @@ SUBDIRS = styleexample raycasting flickable digiflip
SUBDIRS += lightmaps
SUBDIRS += flightinfo
-
-QT += widgets widgets
diff --git a/examples/embedded/flickable/flickable.pro b/examples/embedded/flickable/flickable.pro
index 3bc86c661f..5929207414 100644
--- a/examples/embedded/flickable/flickable.pro
+++ b/examples/embedded/flickable/flickable.pro
@@ -1,6 +1,7 @@
+QT += widgets
+
SOURCES = flickable.cpp main.cpp
HEADERS = flickable.h
target.path = $$[QT_INSTALL_EXAMPLES]/embedded/flickable
INSTALLS += target
-QT += widgets widgets
diff --git a/examples/embedded/raycasting/raycasting.pro b/examples/embedded/raycasting/raycasting.pro
index 79b560ffeb..51bf4bf4b0 100644
--- a/examples/embedded/raycasting/raycasting.pro
+++ b/examples/embedded/raycasting/raycasting.pro
@@ -1,7 +1,7 @@
TEMPLATE = app
+QT += widgets
SOURCES = raycasting.cpp
RESOURCES += raycasting.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/embedded/raycasting
INSTALLS += target
-QT += widgets widgets
diff --git a/examples/examples.pro b/examples/examples.pro
index 7c149ff7ac..e66226703e 100644
--- a/examples/examples.pro
+++ b/examples/examples.pro
@@ -8,19 +8,24 @@ SUBDIRS = \
xml \
qpa
-!contains(QT_CONFIG, no-widgets) {
+qtHaveModule(widgets) {
SUBDIRS += widgets \
ipc \
- linguist \
sql \
tools \
touch \
gestures
}
-wince*|embedded|x11:!contains(QT_CONFIG, no-gui): SUBDIRS += embedded
+wince*|embedded|x11:qtHaveModule(gui): SUBDIRS += embedded
-contains(QT_BUILD_PARTS, tools):!contains(QT_CONFIG, no-gui):!contains(QT_CONFIG, no-widgets):SUBDIRS += qtestlib
-contains(QT_CONFIG, opengl):!contains(QT_CONFIG, no-widgets):SUBDIRS += opengl
-contains(QT_CONFIG, dbus): SUBDIRS += dbus
-contains(QT_CONFIG, concurrent): SUBDIRS += qtconcurrent
+contains(QT_BUILD_PARTS, tools):qtHaveModule(gui):qtHaveModule(widgets): SUBDIRS += qtestlib
+qtHaveModule(opengl):qtHaveModule(widgets): SUBDIRS += opengl
+qtHaveModule(dbus): SUBDIRS += dbus
+qtHaveModule(concurrent): SUBDIRS += qtconcurrent
+
+aggregate.files = aggregate/examples.pro
+aggregate.path = $$[QT_INSTALL_EXAMPLES]
+readme.files = README
+readme.path = $$[QT_INSTALL_EXAMPLES]
+INSTALLS += aggregate readme
diff --git a/examples/gestures/gestures.pro b/examples/gestures/gestures.pro
index 678fbc5829..35b60bef38 100644
--- a/examples/gestures/gestures.pro
+++ b/examples/gestures/gestures.pro
@@ -2,5 +2,3 @@ TEMPLATE = \
subdirs
SUBDIRS = \
imagegestures
-
-QT += widgets
diff --git a/examples/gestures/imagegestures/imagegestures.pro b/examples/gestures/imagegestures/imagegestures.pro
index 7844cc2ea1..c40c29564f 100644
--- a/examples/gestures/imagegestures/imagegestures.pro
+++ b/examples/gestures/imagegestures/imagegestures.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = imagewidget.h \
mainwidget.h
SOURCES = imagewidget.cpp \
@@ -8,5 +10,3 @@ SOURCES = imagewidget.cpp \
target.path = $$[QT_INSTALL_EXAMPLES]/gestures/imagegestures
INSTALLS += target
-QT += widgets
-
diff --git a/examples/gui/analogclock/analogclock.pro b/examples/gui/analogclock/analogclock.pro
index 7e0360d28a..eef17274f5 100644
--- a/examples/gui/analogclock/analogclock.pro
+++ b/examples/gui/analogclock/analogclock.pro
@@ -1,4 +1,10 @@
include(../rasterwindow/rasterwindow.pri)
+# work-around for QTBUG-13496
+CONFIG += no_batch
+
SOURCES += \
main.cpp
+
+target.path = $$[QT_INSTALL_EXAMPLES]/gui/analogclock
+INSTALLS += target
diff --git a/doc/src/images/openglwindow-example.png b/examples/gui/doc/images/openglwindow-example.png
index 63ba4ed2f4..63ba4ed2f4 100644
--- a/doc/src/images/openglwindow-example.png
+++ b/examples/gui/doc/images/openglwindow-example.png
Binary files differ
diff --git a/examples/gui/doc/analogclockwindow.qdoc b/examples/gui/doc/src/analogclockwindow.qdoc
index ebe9f9a418..ff361a27b1 100644
--- a/examples/gui/doc/analogclockwindow.qdoc
+++ b/examples/gui/doc/src/analogclockwindow.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
- \example gui/analogclock
+ \example analogclock
\title Analog Clock Window Example
\brief The Analog Clock Window example shows how to draw the contents of
diff --git a/examples/gui/doc/openglwindow.qdoc b/examples/gui/doc/src/openglwindow.qdoc
index 9d693bc50e..d26fd477af 100644
--- a/examples/gui/doc/openglwindow.qdoc
+++ b/examples/gui/doc/src/openglwindow.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
- \example gui/openglwindow
+ \example openglwindow
\title OpenGL Window Example
\brief This example shows how to create a minimal QWindow based application
@@ -105,8 +105,8 @@
QOpenGLContext::functions(). QOpenGLFunctions gives access to all the
OpenGL ES 2.0 level OpenGL calls that are not already standard in both
OpenGL ES 2.0 and desktop OpenGL. For more information about the OpenGL and
- OpenGL ES APIs, refer to the official \l{OpenGL Registry} and
- \l{Khronos OpenGL ES API Registry}.
+ OpenGL ES APIs, refer to the official \l{http://www.opengl.org/registry/}{OpenGL Registry} and
+ \l {http://www.khronos.org/registry/gles/}{Khronos OpenGL ES API Registry}.
If animation has been enabled with OpenGLWindow::setAnimating(true), we
call renderLater() to put another update request on the event loop.
diff --git a/examples/gui/doc/rasterwindow.qdoc b/examples/gui/doc/src/rasterwindow.qdoc
index 971b921d30..f246533c4f 100644
--- a/examples/gui/doc/rasterwindow.qdoc
+++ b/examples/gui/doc/src/rasterwindow.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
- \example gui/rasterwindow
+ \example rasterwindow
\title Raster Window Example
\brief This example shows how to create a minimal QWindow based
diff --git a/examples/gui/openglwindow/openglwindow.pro b/examples/gui/openglwindow/openglwindow.pro
index 6a664f9a96..93f18f3d3f 100644
--- a/examples/gui/openglwindow/openglwindow.pro
+++ b/examples/gui/openglwindow/openglwindow.pro
@@ -2,3 +2,6 @@ include(openglwindow.pri)
SOURCES += \
main.cpp
+
+target.path = $$[QT_INSTALL_EXAMPLES]/gui/openglwindow
+INSTALLS += target
diff --git a/examples/gui/rasterwindow/rasterwindow.pro b/examples/gui/rasterwindow/rasterwindow.pro
index 0ea830b037..8ca4f7a89d 100644
--- a/examples/gui/rasterwindow/rasterwindow.pro
+++ b/examples/gui/rasterwindow/rasterwindow.pro
@@ -2,3 +2,6 @@ include(rasterwindow.pri)
SOURCES += \
main.cpp
+
+target.path = $$[QT_INSTALL_EXAMPLES]/gui/rasterwindow
+INSTALLS += target
diff --git a/examples/ipc/ipc.pro b/examples/ipc/ipc.pro
index ba3990d869..ffa313beef 100644
--- a/examples/ipc/ipc.pro
+++ b/examples/ipc/ipc.pro
@@ -2,5 +2,3 @@ TEMPLATE = subdirs
# no QSharedMemory
!vxworks:!qnx:SUBDIRS = sharedmemory
!wince*: SUBDIRS += localfortuneserver localfortuneclient
-
-QT += widgets
diff --git a/examples/ipc/sharedmemory/sharedmemory.pro b/examples/ipc/sharedmemory/sharedmemory.pro
index f6f2fc3c42..0d25a30b1b 100644
--- a/examples/ipc/sharedmemory/sharedmemory.pro
+++ b/examples/ipc/sharedmemory/sharedmemory.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
SOURCES += main.cpp \
dialog.cpp
@@ -12,6 +14,4 @@ EXAMPLE_FILES = *.png
target.path = $$[QT_INSTALL_EXAMPLES]/ipc/sharedmemory
INSTALLS += target
-QT += widgets
-
simulator: warning(This example does not work on Simulator platform)
diff --git a/examples/ja_JP/linguist/hellotr/hellotr.pro b/examples/ja_JP/linguist/hellotr/hellotr.pro
deleted file mode 100644
index e4a1ee11bb..0000000000
--- a/examples/ja_JP/linguist/hellotr/hellotr.pro
+++ /dev/null
@@ -1,11 +0,0 @@
-#! [0]
-SOURCES = main.cpp
-#! [0] #! [1]
-TRANSLATIONS = hellotr_ja.ts
-#! [1]
-
-# install
-target.path = $$[QT_INSTALL_EXAMPLES]/linguist/hellotr
-INSTALLS += target
-
-QT += widgets
diff --git a/examples/ja_JP/linguist/hellotr/main.cpp b/examples/ja_JP/linguist/hellotr/main.cpp
deleted file mode 100644
index df4546f4b5..0000000000
--- a/examples/ja_JP/linguist/hellotr/main.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** 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 Digia Plc 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 <QPushButton>
-//! [0]
-#include <QTranslator>
-//! [0]
-
-//! [1] //! [2]
-int main(int argc, char *argv[])
-//! [1] //! [3] //! [4]
-{
- QApplication app(argc, argv);
-//! [3]
-
-//! [5]
- QTranslator translator;
-//! [5] //! [6]
- translator.load("hellotr_ja");
-//! [6] //! [7]
- app.installTranslator(&translator);
-//! [4] //! [7]
-
-//! [8]
- QPushButton hello(QPushButton::tr("Hello world!"));
-//! [8]
- hello.resize(100, 30);
-
- hello.show();
- return app.exec();
-}
-//! [2]
diff --git a/examples/linguist/README b/examples/linguist/README
deleted file mode 100644
index 15817742da..0000000000
--- a/examples/linguist/README
+++ /dev/null
@@ -1,6 +0,0 @@
-Internationalization is a core feature of Qt. These examples show how to
-access translation and localization facilities at run-time.
-
-
-Documentation for these examples can be found via the Examples
-link in the main Qt documentation.
diff --git a/examples/linguist/arrowpad/arrowpad.cpp b/examples/linguist/arrowpad/arrowpad.cpp
deleted file mode 100644
index 7b33238295..0000000000
--- a/examples/linguist/arrowpad/arrowpad.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** 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 Digia Plc 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 <QtWidgets>
-
-#include "arrowpad.h"
-
-ArrowPad::ArrowPad(QWidget *parent)
- : QWidget(parent)
-{
-//! [0]
- upButton = new QPushButton(tr("&Up"));
-//! [0] //! [1]
- downButton = new QPushButton(tr("&Down"));
-//! [1] //! [2]
- leftButton = new QPushButton(tr("&Left"));
-//! [2] //! [3]
- rightButton = new QPushButton(tr("&Right"));
-//! [3]
-
- QGridLayout *mainLayout = new QGridLayout;
- mainLayout->addWidget(upButton, 0, 1);
- mainLayout->addWidget(leftButton, 1, 0);
- mainLayout->addWidget(rightButton, 1, 2);
- mainLayout->addWidget(downButton, 2, 1);
- setLayout(mainLayout);
-}
diff --git a/examples/linguist/arrowpad/arrowpad.h b/examples/linguist/arrowpad/arrowpad.h
deleted file mode 100644
index 30ebf98e92..0000000000
--- a/examples/linguist/arrowpad/arrowpad.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** 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 Digia Plc 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 ARROWPAD_H
-#define ARROWPAD_H
-
-#include <QWidget>
-
-QT_BEGIN_NAMESPACE
-class QPushButton;
-QT_END_NAMESPACE
-
-//! [0]
-class ArrowPad : public QWidget
-//! [0] //! [1]
-{
-//! [1] //! [2]
- Q_OBJECT
-//! [2]
-
-public:
- ArrowPad(QWidget *parent = 0);
-
-private:
- QPushButton *upButton;
- QPushButton *downButton;
- QPushButton *leftButton;
- QPushButton *rightButton;
-};
-
-#endif
diff --git a/examples/linguist/arrowpad/arrowpad.pro b/examples/linguist/arrowpad/arrowpad.pro
deleted file mode 100644
index 3b5916684b..0000000000
--- a/examples/linguist/arrowpad/arrowpad.pro
+++ /dev/null
@@ -1,18 +0,0 @@
-#! [0]
-HEADERS = arrowpad.h \
- mainwindow.h
-SOURCES = arrowpad.cpp \
- main.cpp \
- mainwindow.cpp
-#! [0] #! [1]
-TRANSLATIONS = arrowpad_fr.ts \
- arrowpad_nl.ts
-#! [1]
-
-# install
-target.path = $$[QT_INSTALL_EXAMPLES]/linguist/arrowpad
-INSTALLS += target
-
-QT += widgets
-
-simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/linguist/arrowpad/main.cpp b/examples/linguist/arrowpad/main.cpp
deleted file mode 100644
index c43b17556f..0000000000
--- a/examples/linguist/arrowpad/main.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** 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 Digia Plc 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 <QtWidgets>
-
-#include "mainwindow.h"
-
-//! [0]
-int main(int argc, char *argv[])
-//! [0] //! [1]
-{
- QApplication app(argc, argv);
-
- QString locale = QLocale::system().name();
-
-//! [2]
- QTranslator translator;
-//! [2] //! [3]
- translator.load(QString("arrowpad_") + locale);
- app.installTranslator(&translator);
-//! [1] //! [3]
-
- MainWindow mainWindow;
- mainWindow.show();
- return app.exec();
-}
diff --git a/examples/linguist/arrowpad/mainwindow.cpp b/examples/linguist/arrowpad/mainwindow.cpp
deleted file mode 100644
index 75a489e518..0000000000
--- a/examples/linguist/arrowpad/mainwindow.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** 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 Digia Plc 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 <QtWidgets>
-
-#include "arrowpad.h"
-#include "mainwindow.h"
-
-MainWindow::MainWindow()
-{
-//! [0]
- arrowPad = new ArrowPad;
-//! [0]
- setCentralWidget(arrowPad);
-
-//! [1]
- exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcuts(QKeySequence::Quit);
- connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
-//! [1]
-
- fileMenu = menuBar()->addMenu(tr("&File"));
- fileMenu->addAction(exitAct);
-}
diff --git a/examples/linguist/arrowpad/mainwindow.h b/examples/linguist/arrowpad/mainwindow.h
deleted file mode 100644
index 7ccac6ac59..0000000000
--- a/examples/linguist/arrowpad/mainwindow.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** 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 Digia Plc 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 <QMainWindow>
-
-QT_BEGIN_NAMESPACE
-class QAction;
-class QMenu;
-QT_END_NAMESPACE
-class ArrowPad;
-
-//! [0]
-class MainWindow : public QMainWindow
-//! [0] //! [1]
-{
- Q_OBJECT
-//! [1]
-
-public:
- MainWindow();
-
-private:
- ArrowPad *arrowPad;
- QMenu *fileMenu;
- QAction *exitAct;
-};
-
-#endif
diff --git a/examples/linguist/hellotr/hellotr.pro b/examples/linguist/hellotr/hellotr.pro
deleted file mode 100644
index 38e5a5b366..0000000000
--- a/examples/linguist/hellotr/hellotr.pro
+++ /dev/null
@@ -1,13 +0,0 @@
-#! [0]
-SOURCES = main.cpp
-#! [0] #! [1]
-TRANSLATIONS = hellotr_la.ts
-#! [1]
-
-# install
-target.path = $$[QT_INSTALL_EXAMPLES]/linguist/hellotr
-INSTALLS += target
-
-QT += widgets
-
-simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/linguist/linguist.pro b/examples/linguist/linguist.pro
deleted file mode 100644
index 6109ef0045..0000000000
--- a/examples/linguist/linguist.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-TEMPLATE = subdirs
-SUBDIRS = arrowpad \
- hellotr \
- trollprint
-
-QT += widgets
diff --git a/examples/linguist/trollprint/main.cpp b/examples/linguist/trollprint/main.cpp
deleted file mode 100644
index 9438d987b2..0000000000
--- a/examples/linguist/trollprint/main.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** 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 Digia Plc 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 <QtWidgets>
-
-#include "mainwindow.h"
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- QString locale = QLocale::system().name();
-
-//! [0]
- QTranslator translator;
- translator.load(QString("trollprint_") + locale);
- app.installTranslator(&translator);
-//! [0]
-
- MainWindow mainWindow;
- mainWindow.show();
- return app.exec();
-}
diff --git a/examples/linguist/trollprint/mainwindow.cpp b/examples/linguist/trollprint/mainwindow.cpp
deleted file mode 100644
index d98aba6f3d..0000000000
--- a/examples/linguist/trollprint/mainwindow.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** 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 Digia Plc 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 <QtWidgets>
-
-#include "mainwindow.h"
-#include "printpanel.h"
-
-MainWindow::MainWindow()
-{
- printPanel = new PrintPanel;
- setCentralWidget(printPanel);
-
- createActions();
- createMenus();
-
-//! [0]
- setWindowTitle(tr("Troll Print 1.0"));
-//! [0]
-}
-
-void MainWindow::about()
-{
- QMessageBox::information(this, tr("About Troll Print 1.0"),
- tr("Troll Print 1.0.\n\n"
- "Copyright 1999 Software, Inc."));
-}
-
-//! [1]
-void MainWindow::createActions()
-{
-//! [2]
- exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcut(tr("Ctrl+Q", "Quit"));
-//! [2]
- connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
-
- aboutAct = new QAction(tr("&About"), this);
- aboutAct->setShortcut(Qt::Key_F1);
- connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
-
- aboutQtAct = new QAction(tr("About &Qt"), this);
- connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
-}
-
-void MainWindow::createMenus()
-//! [1] //! [3]
-{
- QMenu *fileMenu = menuBar()->addMenu(tr("&File"));
- fileMenu->addAction(exitAct);
-
- menuBar()->addSeparator();
-
- QMenu *helpMenu = menuBar()->addMenu(tr("&Help"));
- helpMenu->addAction(aboutAct);
- helpMenu->addAction(aboutQtAct);
-}
-//! [3]
diff --git a/examples/linguist/trollprint/mainwindow.h b/examples/linguist/trollprint/mainwindow.h
deleted file mode 100644
index d55d6fb897..0000000000
--- a/examples/linguist/trollprint/mainwindow.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** 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 Digia Plc 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 <QMainWindow>
-
-QT_BEGIN_NAMESPACE
-class QAction;
-class QMenu;
-QT_END_NAMESPACE
-class PrintPanel;
-
-class MainWindow : public QMainWindow
-{
- Q_OBJECT
-
-public:
- MainWindow();
-
-private slots:
- void about();
-
-private:
- void createActions();
- void createMenus();
-
- PrintPanel *printPanel;
- QMenu *fileMenu;
- QMenu *helpMenu;
- QAction *exitAct;
- QAction *aboutAct;
- QAction *aboutQtAct;
-};
-
-#endif
diff --git a/examples/linguist/trollprint/printpanel.cpp b/examples/linguist/trollprint/printpanel.cpp
deleted file mode 100644
index 163fc6de11..0000000000
--- a/examples/linguist/trollprint/printpanel.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** 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 Digia Plc 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 <QtWidgets>
-
-#include "printpanel.h"
-
-//! [0]
-PrintPanel::PrintPanel(QWidget *parent)
- : QWidget(parent)
-{
-/*
- QLabel *label = new QLabel(tr("<b>TROLL PRINT</b>"));
- label->setAlignment(Qt::AlignCenter);
-*/
-//! [0]
-
-//! [1]
- twoSidedGroupBox = new QGroupBox(tr("2-sided"));
- twoSidedEnabledRadio = new QRadioButton(tr("Enabled"));
- twoSidedDisabledRadio = new QRadioButton(tr("Disabled"));
-//! [1] //! [2]
- twoSidedDisabledRadio->setChecked(true);
-
- colorsGroupBox = new QGroupBox(tr("Colors"));
- colorsEnabledRadio = new QRadioButton(tr("Enabled"));
- colorsDisabledRadio = new QRadioButton(tr("Disabled"));
-//! [2]
- colorsDisabledRadio->setChecked(true);
-
- QHBoxLayout *twoSidedLayout = new QHBoxLayout;
- twoSidedLayout->addWidget(twoSidedEnabledRadio);
- twoSidedLayout->addWidget(twoSidedDisabledRadio);
- twoSidedGroupBox->setLayout(twoSidedLayout);
-
- QHBoxLayout *colorsLayout = new QHBoxLayout;
- colorsLayout->addWidget(colorsEnabledRadio);
- colorsLayout->addWidget(colorsDisabledRadio);
- colorsGroupBox->setLayout(colorsLayout);
-
- QVBoxLayout *mainLayout = new QVBoxLayout;
-/*
- mainLayout->addWidget(label);
-*/
- mainLayout->addWidget(twoSidedGroupBox);
- mainLayout->addWidget(colorsGroupBox);
- setLayout(mainLayout);
-}
diff --git a/examples/linguist/trollprint/printpanel.h b/examples/linguist/trollprint/printpanel.h
deleted file mode 100644
index a773a29700..0000000000
--- a/examples/linguist/trollprint/printpanel.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** 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 Digia Plc 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 PRINTPANEL_H
-#define PRINTPANEL_H
-
-#include <QWidget>
-
-QT_BEGIN_NAMESPACE
-class QGroupBox;
-class QRadioButton;
-QT_END_NAMESPACE
-
-//! [0]
-class PrintPanel : public QWidget
-{
- Q_OBJECT
-//! [0]
-
-public:
- PrintPanel(QWidget *parent = 0);
-
-private:
- QGroupBox *twoSidedGroupBox;
- QGroupBox *colorsGroupBox;
- QRadioButton *twoSidedEnabledRadio;
- QRadioButton *twoSidedDisabledRadio;
- QRadioButton *colorsEnabledRadio;
- QRadioButton *colorsDisabledRadio;
-};
-
-#endif
diff --git a/examples/linguist/trollprint/trollprint.pro b/examples/linguist/trollprint/trollprint.pro
deleted file mode 100644
index f4f60c41cf..0000000000
--- a/examples/linguist/trollprint/trollprint.pro
+++ /dev/null
@@ -1,14 +0,0 @@
-HEADERS = mainwindow.h \
- printpanel.h
-SOURCES = main.cpp \
- mainwindow.cpp \
- printpanel.cpp
-TRANSLATIONS = trollprint_pt.ts
-
-# install
-target.path = $$[QT_INSTALL_EXAMPLES]/linguist/trollprint
-INSTALLS += target
-
-QT += widgets
-
-simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/linguist/trollprint/trollprint_pt.ts b/examples/linguist/trollprint/trollprint_pt.ts
deleted file mode 100644
index e5871bd087..0000000000
--- a/examples/linguist/trollprint/trollprint_pt.ts
+++ /dev/null
@@ -1,65 +0,0 @@
-<!DOCTYPE TS><TS>
-<context>
- <name>MainWindow</name>
- <message>
- <source>Troll Print 1.0</source>
- <translation>Troll Imprimir 1.0</translation>
- </message>
- <message>
- <source>E&amp;xit</source>
- <translation>&amp;Sair</translation>
- </message>
- <message>
- <source>&amp;About</source>
- <translation>&amp;Sobre</translation>
- </message>
- <message>
- <source>About &amp;Qt</source>
- <translation>Sobre &amp;Qt</translation>
- </message>
- <message>
- <source>&amp;File</source>
- <translation>&amp;Arquivo</translation>
- </message>
- <message>
- <source>&amp;Help</source>
- <translation>A&amp;juda</translation>
- </message>
- <message>
- <source>About Troll Print 1.0</source>
- <translation>Sobre Troll Imprimir 1.0</translation>
- </message>
- <message>
- <source>Troll Print 1.0.
-
-Copyright 1999 Software, Inc.</source>
- <translation>Troll Imprimir 1.0
-
-Copyright 1999 Software, Inc.</translation>
- </message>
- <message>
- <source>Ctrl+Q</source>
- <comment>Quit</comment>
- <translation>Ctrl+Q</translation>
- </message>
-</context>
-<context>
- <name>PrintPanel</name>
- <message>
- <source>2-sided</source>
- <translation>2-lados</translation>
- </message>
- <message>
- <source>Enabled</source>
- <translation>Ativado</translation>
- </message>
- <message>
- <source>Disabled</source>
- <translation>Desativado</translation>
- </message>
- <message>
- <source>Colors</source>
- <translation>Cores</translation>
- </message>
-</context>
-</TS>
diff --git a/examples/network/blockingfortuneclient/blockingfortuneclient.pro b/examples/network/blockingfortuneclient/blockingfortuneclient.pro
index bcf5346d35..2bd1f78c14 100644
--- a/examples/network/blockingfortuneclient/blockingfortuneclient.pro
+++ b/examples/network/blockingfortuneclient/blockingfortuneclient.pro
@@ -1,11 +1,10 @@
-QT += widgets
+QT += network widgets
HEADERS = blockingclient.h \
fortunethread.h
SOURCES = blockingclient.cpp \
main.cpp \
fortunethread.cpp
-QT += network
# install
target.path = $$[QT_INSTALL_EXAMPLES]/network/blockingfortuneclient
diff --git a/examples/network/broadcastreceiver/broadcastreceiver.pro b/examples/network/broadcastreceiver/broadcastreceiver.pro
index e1708f36da..edadf1c28d 100644
--- a/examples/network/broadcastreceiver/broadcastreceiver.pro
+++ b/examples/network/broadcastreceiver/broadcastreceiver.pro
@@ -1,9 +1,8 @@
-QT += widgets
+QT += network widgets
HEADERS = receiver.h
SOURCES = receiver.cpp \
main.cpp
-QT += network
# install
target.path = $$[QT_INSTALL_EXAMPLES]/network/broadcastreceiver
diff --git a/examples/network/broadcastsender/broadcastsender.pro b/examples/network/broadcastsender/broadcastsender.pro
index 611b617471..4c5af7f849 100644
--- a/examples/network/broadcastsender/broadcastsender.pro
+++ b/examples/network/broadcastsender/broadcastsender.pro
@@ -1,9 +1,8 @@
-QT += widgets
+QT += network widgets
HEADERS = sender.h
SOURCES = sender.cpp \
main.cpp
-QT += network
# install
target.path = $$[QT_INSTALL_EXAMPLES]/network/broadcastsender
diff --git a/examples/network/doc/src/blockingfortuneclient.qdoc b/examples/network/doc/src/blockingfortuneclient.qdoc
index 581cbe6699..c16fd60248 100644
--- a/examples/network/doc/src/blockingfortuneclient.qdoc
+++ b/examples/network/doc/src/blockingfortuneclient.qdoc
@@ -28,9 +28,8 @@
/*!
\example blockingfortuneclient
\title Blocking Fortune Client Example
-
- \brief The Blocking Fortune Client example shows how to create a client for a
- network service using QTcpSocket's synchronous API in a non-GUI thread.
+ \ingroup examples-network
+ \brief Demonstrates how to create a client for a network service
\image blockingfortuneclient-example.png
diff --git a/examples/network/doc/src/broadcastreceiver.qdoc b/examples/network/doc/src/broadcastreceiver.qdoc
index 99a4cd3823..2ab3c6be67 100644
--- a/examples/network/doc/src/broadcastreceiver.qdoc
+++ b/examples/network/doc/src/broadcastreceiver.qdoc
@@ -28,9 +28,11 @@
/*!
\example broadcastreceiver
\title Broadcast Receiver Example
+ \ingroup examples-network
+ \brief Demonstrates how to receive information broadcasted over a local network.
- \brief The Broadcast Receiver example shows how to receive information that is broadcasted
- over a local network.
+ This example uses the Qt Network APIs to demonstrate how to receive
+ messages broadcasted over a local network.
\image broadcastreceiver-example.png
*/
diff --git a/examples/network/doc/src/broadcastsender.qdoc b/examples/network/doc/src/broadcastsender.qdoc
index dc916e3fed..a9aa1f96d8 100644
--- a/examples/network/doc/src/broadcastsender.qdoc
+++ b/examples/network/doc/src/broadcastsender.qdoc
@@ -28,9 +28,11 @@
/*!
\example broadcastsender
\title Broadcast Sender Example
+ \ingroup examples-network
+ \brief Demonstrates how to broadcast information to multiple clients on a local network.
- \brief The Broadcast Sender example shows how to broadcast information to multiple clients
- on a local network.
+ This example uses Qt Network APIs to demonstrate how to broadcast messages
+ to multiple clients over a local network.
\image broadcastsender-example.png
*/
diff --git a/examples/network/doc/src/fortuneclient.qdoc b/examples/network/doc/src/fortuneclient.qdoc
index 6ef9155337..1d69415f3c 100644
--- a/examples/network/doc/src/fortuneclient.qdoc
+++ b/examples/network/doc/src/fortuneclient.qdoc
@@ -28,9 +28,10 @@
/*!
\example fortuneclient
\title Fortune Client Example
+ \ingroup examples-network
+ \brief Demonstrates how to create a client for a network service
- \brief The Fortune Client example shows how to create a client for a simple
- network service using QTcpSocket. It is intended to be run alongside the
+ This example uses QTcpSocket, and is intended to be run alongside the
\l{fortuneserver}{Fortune Server} example or
the \l{threadedfortuneserver}{Threaded Fortune Server} example.
diff --git a/examples/network/doc/src/fortuneserver.qdoc b/examples/network/doc/src/fortuneserver.qdoc
index 05e96b4ded..ca04d80ade 100644
--- a/examples/network/doc/src/fortuneserver.qdoc
+++ b/examples/network/doc/src/fortuneserver.qdoc
@@ -28,15 +28,16 @@
/*!
\example fortuneserver
\title Fortune Server Example
+ \ingroup examples-network
+ \brief Demonstrates how to create a server for a network service.
- \brief The Fortune Server example shows how to create a server for a simple
- network service. It is intended to be run alongside the
+ This example is intended to be run alongside the
\l{fortuneclient}{Fortune Client} example or the
\l{blockingfortuneclient}{Blocking Fortune Client} example.
\image fortuneserver-example.png Screenshot of the Fortune Server example
- This example uses QTcpServer to accept incoming TCP connections, and a
+ It uses QTcpServer to accept incoming TCP connections, and a
simple QDataStream based data transfer protocol to write a fortune to the
connecting client (from the \l{fortuneclient}{Fortune Client}
example), before closing the connection.
@@ -55,7 +56,7 @@
\snippet fortuneserver/server.cpp 2
- Our server generates a list of random fortunes that is can send to
+ Our server generates a list of random fortunes that it can send to
connecting clients.
\snippet fortuneserver/server.cpp 3
diff --git a/examples/network/doc/src/googlesuggest.qdoc b/examples/network/doc/src/googlesuggest.qdoc
index ff16cbf9e0..b53c394d76 100644
--- a/examples/network/doc/src/googlesuggest.qdoc
+++ b/examples/network/doc/src/googlesuggest.qdoc
@@ -28,10 +28,11 @@
/*!
\example googlesuggest
\title Google Suggest Example
+ \ingroup examples-network
+ \brief Obtains the list of search recommendations by the Google search engine
- \brief The Google Suggest example demonstrates how to use the QNetworkAccessManager
- class to obtain a list of suggestions from the Google search engine as the
- user types into a QLineEdit.
+ The example uses the QNetworkAccessManager to obtain the list of search
+ recommendations by Google as the user types into a QLineEdit.
\image googlesuggest-example.png
diff --git a/examples/network/doc/src/http.qdoc b/examples/network/doc/src/http.qdoc
index 67bdbdb558..62cfffd603 100644
--- a/examples/network/doc/src/http.qdoc
+++ b/examples/network/doc/src/http.qdoc
@@ -28,9 +28,11 @@
/*!
\example http
\title HTTP Example
+ \ingroup examples-network
+ \brief Demonstrates a simple HTTP client
- \brief The HTTP example demonstrates a simple HTTP client that shows how to fetch files
- specified by URLs from remote hosts.
+ This example demonstrates how a simple HTTP client can fetch files
+ from remote hosts.
\image http-example.png
*/
diff --git a/examples/network/doc/src/loopback.qdoc b/examples/network/doc/src/loopback.qdoc
index 52518a0028..6d74a187fd 100644
--- a/examples/network/doc/src/loopback.qdoc
+++ b/examples/network/doc/src/loopback.qdoc
@@ -28,9 +28,11 @@
/*!
\example loopback
\title Loopback Example
+ \ingroup examples-network
+ \brief Demonstrates the client-server communication on a local host
- \brief The Loopback example shows how to communicate between simple clients and servers on a local
- host.
+ The example demonstrates how the clients and servers on a local host
+ communicate with each other.
\image loopback-example.png
*/
diff --git a/examples/network/doc/src/multicastreceiver.qdoc b/examples/network/doc/src/multicastreceiver.qdoc
index fddbafe788..62174f5d4d 100644
--- a/examples/network/doc/src/multicastreceiver.qdoc
+++ b/examples/network/doc/src/multicastreceiver.qdoc
@@ -28,9 +28,9 @@
/*!
\example multicastreceiver
\title Multicast Receiver Example
+ \ingroup examples-network
+ \brief Demonstrates how to receive information sent to a multicast group
- \brief The Multicast Receiever example shows how to receive information that is
- sent to a multicast group.
-
+ This example demonstrates how to receive messages sent to a multicast group
\image multicastreceiver-example.png
*/
diff --git a/examples/network/doc/src/multicastsender.qdoc b/examples/network/doc/src/multicastsender.qdoc
index 8d8a400769..c4b93ea0a6 100644
--- a/examples/network/doc/src/multicastsender.qdoc
+++ b/examples/network/doc/src/multicastsender.qdoc
@@ -28,9 +28,11 @@
/*!
\example multicastsender
\title Multicast Sender Example
+ \ingroup examples-network
+ \brief Demonstrates how to send messages to a multicast group
- \brief The Multicast Sender example shows how to send information to multiple
- clients in a multicast group.
+ This example demonstrates how to send messages to the clients of a
+ multicast group.
\image multicastsender-example.png
*/
diff --git a/examples/network/doc/src/network-chat.qdoc b/examples/network/doc/src/network-chat.qdoc
index 0430b5219d..b95a13098f 100644
--- a/examples/network/doc/src/network-chat.qdoc
+++ b/examples/network/doc/src/network-chat.qdoc
@@ -28,10 +28,11 @@
/*!
\example network-chat
\title Network Chat Example
+ \ingroup examples-network
+ \brief Demonstrates a stateful peer-to-peer Chat client
- \brief The Network Chat example demonstrates a stateful peer-to-peer Chat client
- that uses broadcasting with QUdpSocket and QNetworkInterface to discover
- its peers.
+ This example uses broadcasting with QUdpSocket and QNetworkInterface to
+ discover its peers.
\image network-chat-example.png
*/
diff --git a/examples/network/doc/src/network-download.qdoc b/examples/network/doc/src/network-download.qdoc
new file mode 100644
index 0000000000..1144361fb5
--- /dev/null
+++ b/examples/network/doc/src/network-download.qdoc
@@ -0,0 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** 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. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example network/download
+ \title Network Download Example
+ \brief Demonstrates how to use networking APIs for multiple downloads
+ \ingroup examples-network
+
+ The Network Download example shows how to perform multiple downloads in
+ parallel using the QNetworkAccessManager class.
+
+ This example is designed to be run from the command-line.
+
+ The \l{Network Download Manager Example} implements a more complex system
+ that places files in a queue for sequential downloading.
+*/
diff --git a/examples/network/doc/src/network-downloadmanager.qdoc b/examples/network/doc/src/network-downloadmanager.qdoc
new file mode 100644
index 0000000000..9722996d30
--- /dev/null
+++ b/examples/network/doc/src/network-downloadmanager.qdoc
@@ -0,0 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** 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. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example network/downloadmanager
+ \title Network Download Manager Example
+ \brief Demonstrates how to use the networking APIs for multiple downloads
+ \ingroup examples-network
+
+ The Network Download example shows how to implement a queue for multiple
+ downloads using the QNetworkAccessManager class.
+
+ This example is designed to be run from the command-line.
+
+ See the \l{Network Download Example} for a simpler version of this example
+ that obtains multiple files in parallel.
+*/
diff --git a/examples/network/doc/src/securesocketclient.qdoc b/examples/network/doc/src/securesocketclient.qdoc
index 16986292af..e025b51931 100644
--- a/examples/network/doc/src/securesocketclient.qdoc
+++ b/examples/network/doc/src/securesocketclient.qdoc
@@ -28,11 +28,12 @@
/*!
\example securesocketclient
\title Secure Socket Client Example
+ \ingroup examples-network
+ \brief Demonstrates how to communicate over an encrypted (SSL) connection
- \brief The Secure Socket Client example shows how to use QSslSocket to
- communicate over an encrypted (SSL) connection. It also demonstrates how
- to deal with authenticity problems, and how to display security and
- certificate information.
+ This example uses QSslSocket to demonstrate how to communicate over an
+ encrypted connection, deal with authenticity problems, and display security
+ and certificate information.
\image securesocketclient.png
\image securesocketclient2.png
diff --git a/examples/network/doc/src/threadedfortuneserver.qdoc b/examples/network/doc/src/threadedfortuneserver.qdoc
index f8441bcc2f..43a7e88241 100644
--- a/examples/network/doc/src/threadedfortuneserver.qdoc
+++ b/examples/network/doc/src/threadedfortuneserver.qdoc
@@ -28,6 +28,7 @@
/*!
\example threadedfortuneserver
\title Threaded Fortune Server Example
+ \ingroup examples-network
\brief The Threaded Fortune Server example shows how to create a server for a
simple network service that uses threads to handle requests from different
diff --git a/examples/network/doc/src/torrent.qdoc b/examples/network/doc/src/torrent.qdoc
index ef13ef6ed9..4bd70eed97 100644
--- a/examples/network/doc/src/torrent.qdoc
+++ b/examples/network/doc/src/torrent.qdoc
@@ -28,16 +28,18 @@
/*!
\example torrent
\title Torrent Example
+ \ingroup examples-network
+ \brief Demonstrates complex TCP/IP operations
- \brief The Torrent example is a functional BitTorrent client that
- illustrates how to write a complex TCP/IP application using Qt.
+ This example demonstrates some of the complex TCP/IP operations
+ supported by the Qt Network APIs.
\image torrent-example.png
\section1 License Information
The implementation of the US Secure Hash Algorithm 1 (SHA1) in this example is
- derived from the original description in \l{RFC 3174}.
+ derived from the original description in \l{http://www.rfc-editor.org/rfc/rfc3174.txt}{RFC 3174}.
\legalese
Copyright (C) The Internet Society (2001). All Rights Reserved.
diff --git a/examples/network/fortuneclient/fortuneclient.pro b/examples/network/fortuneclient/fortuneclient.pro
index b921941da3..8b376d9c53 100644
--- a/examples/network/fortuneclient/fortuneclient.pro
+++ b/examples/network/fortuneclient/fortuneclient.pro
@@ -1,9 +1,8 @@
-QT += widgets
+QT += network widgets
HEADERS = client.h
SOURCES = client.cpp \
main.cpp
-QT += network
# install
target.path = $$[QT_INSTALL_EXAMPLES]/network/fortuneclient
diff --git a/examples/network/fortuneserver/fortuneserver.pro b/examples/network/fortuneserver/fortuneserver.pro
index cfcf680f81..8c8ad3f0d3 100644
--- a/examples/network/fortuneserver/fortuneserver.pro
+++ b/examples/network/fortuneserver/fortuneserver.pro
@@ -1,9 +1,8 @@
-QT += widgets
+QT += network widgets
HEADERS = server.h
SOURCES = server.cpp \
main.cpp
-QT += network
# install
target.path = $$[QT_INSTALL_EXAMPLES]/network/fortuneserver
diff --git a/examples/network/http/http.pro b/examples/network/http/http.pro
index 1543584cf5..2f2d3b00ae 100644
--- a/examples/network/http/http.pro
+++ b/examples/network/http/http.pro
@@ -1,10 +1,9 @@
-QT += widgets
+QT += network widgets
HEADERS += httpwindow.h
SOURCES += httpwindow.cpp \
main.cpp
FORMS += authenticationdialog.ui
-QT += network
# install
target.path = $$[QT_INSTALL_EXAMPLES]/network/http
diff --git a/examples/network/loopback/loopback.pro b/examples/network/loopback/loopback.pro
index c7b8d060b8..14b22daa57 100644
--- a/examples/network/loopback/loopback.pro
+++ b/examples/network/loopback/loopback.pro
@@ -1,9 +1,8 @@
-QT += widgets
+QT += network widgets
HEADERS = dialog.h
SOURCES = dialog.cpp \
main.cpp
-QT += network
# install
target.path = $$[QT_INSTALL_EXAMPLES]/network/loopback
diff --git a/examples/network/multicastreceiver/multicastreceiver.pro b/examples/network/multicastreceiver/multicastreceiver.pro
index bbba25a626..6906fc6cb5 100644
--- a/examples/network/multicastreceiver/multicastreceiver.pro
+++ b/examples/network/multicastreceiver/multicastreceiver.pro
@@ -1,9 +1,8 @@
-QT += widgets
+QT += network widgets
HEADERS = receiver.h
SOURCES = receiver.cpp \
main.cpp
-QT += network
# install
target.path = $$[QT_INSTALL_EXAMPLES]/network/multicastreceiver
diff --git a/examples/network/network.pro b/examples/network/network.pro
index f473a112f6..342297528b 100644
--- a/examples/network/network.pro
+++ b/examples/network/network.pro
@@ -4,7 +4,7 @@ SUBDIRS = \
download \
downloadmanager
-!contains(QT_CONFIG, no-widgets) {
+qtHaveModule(widgets) {
SUBDIRS += \
blockingfortuneclient \
broadcastreceiver \
diff --git a/examples/network/threadedfortuneserver/threadedfortuneserver.pro b/examples/network/threadedfortuneserver/threadedfortuneserver.pro
index cb6be41d33..2538701b94 100644
--- a/examples/network/threadedfortuneserver/threadedfortuneserver.pro
+++ b/examples/network/threadedfortuneserver/threadedfortuneserver.pro
@@ -1,4 +1,4 @@
-QT += widgets
+QT += network widgets
HEADERS = dialog.h \
fortuneserver.h \
@@ -7,7 +7,6 @@ SOURCES = dialog.cpp \
fortuneserver.cpp \
fortunethread.cpp \
main.cpp
-QT += network
# install
target.path = $$[QT_INSTALL_EXAMPLES]/network/threadedfortuneserver
diff --git a/examples/network/torrent/mainwindow.cpp b/examples/network/torrent/mainwindow.cpp
index 1b10241f6e..b574429808 100644
--- a/examples/network/torrent/mainwindow.cpp
+++ b/examples/network/torrent/mainwindow.cpp
@@ -52,12 +52,14 @@ class TorrentView : public QTreeWidget
public:
TorrentView(QWidget *parent = 0);
+#ifndef QT_NO_DRAGANDDROP
signals:
void fileDropped(const QString &fileName);
protected:
void dragMoveEvent(QDragMoveEvent *event);
void dropEvent(QDropEvent *event);
+#endif
};
// TorrentViewDelegate is used to draw the progress bars.
@@ -688,9 +690,12 @@ void MainWindow::closeEvent(QCloseEvent *)
TorrentView::TorrentView(QWidget *parent)
: QTreeWidget(parent)
{
+#ifndef QT_NO_DRAGANDDROP
setAcceptDrops(true);
+#endif
}
+#ifndef QT_NO_DRAGANDDROP
void TorrentView::dragMoveEvent(QDragMoveEvent *event)
{
// Accept file actions with a '.torrent' extension.
@@ -708,5 +713,6 @@ void TorrentView::dropEvent(QDropEvent *event)
if (QFile::exists(fileName) && fileName.toLower().endsWith(".torrent"))
emit fileDropped(fileName);
}
+#endif
#include "mainwindow.moc"
diff --git a/examples/network/torrent/torrent.pro b/examples/network/torrent/torrent.pro
index a080ec07e2..76887ae649 100644
--- a/examples/network/torrent/torrent.pro
+++ b/examples/network/torrent/torrent.pro
@@ -1,4 +1,4 @@
-QT += widgets
+QT += network widgets
HEADERS += addtorrentdialog.h \
bencodeparser.h \
@@ -29,8 +29,6 @@ SOURCES += main.cpp \
FORMS += forms/addtorrentform.ui
RESOURCES += icons.qrc
-QT += network
-
# install
target.path = $$[QT_INSTALL_EXAMPLES]/network/torrent
INSTALLS += target
diff --git a/examples/opengl/2dpainting/glwidget.cpp b/examples/opengl/2dpainting/glwidget.cpp
index 23065a0b42..e1e40ea84c 100644
--- a/examples/opengl/2dpainting/glwidget.cpp
+++ b/examples/opengl/2dpainting/glwidget.cpp
@@ -38,10 +38,11 @@
**
****************************************************************************/
-#include <QtWidgets>
#include "glwidget.h"
#include "helper.h"
+#include <QTimer>
+
//! [0]
GLWidget::GLWidget(Helper *helper, QWidget *parent)
: QGLWidget(QGLFormat(QGL::SampleBuffers), parent), helper(helper)
diff --git a/examples/opengl/2dpainting/glwidget.h b/examples/opengl/2dpainting/glwidget.h
index f8e44f8a3e..3540810983 100644
--- a/examples/opengl/2dpainting/glwidget.h
+++ b/examples/opengl/2dpainting/glwidget.h
@@ -45,10 +45,6 @@
//! [0]
class Helper;
-QT_BEGIN_NAMESPACE
-class QPaintEvent;
-class QWidget;
-QT_END_NAMESPACE
class GLWidget : public QGLWidget
{
diff --git a/examples/opengl/2dpainting/helper.cpp b/examples/opengl/2dpainting/helper.cpp
index b412dc11dc..168df2aff3 100644
--- a/examples/opengl/2dpainting/helper.cpp
+++ b/examples/opengl/2dpainting/helper.cpp
@@ -38,9 +38,12 @@
**
****************************************************************************/
-#include <QtWidgets>
#include "helper.h"
+#include <QPainter>
+#include <QPaintEvent>
+#include <QWidget>
+
//! [0]
Helper::Helper()
{
@@ -70,14 +73,15 @@ void Helper::paint(QPainter *painter, QPaintEvent *event, int elapsed)
painter->setPen(circlePen);
painter->rotate(elapsed * 0.030);
- qreal r = elapsed/1000.0;
+ qreal r = elapsed / 1000.0;
int n = 30;
for (int i = 0; i < n; ++i) {
painter->rotate(30);
- qreal radius = 0 + 120.0*((i+r)/n);
- qreal circleRadius = 1 + ((i+r)/n)*20;
+ qreal factor = (i + r) / n;
+ qreal radius = 0 + 120.0 * factor;
+ qreal circleRadius = 1 + factor * 20;
painter->drawEllipse(QRectF(radius, -circleRadius,
- circleRadius*2, circleRadius*2));
+ circleRadius * 2, circleRadius * 2));
}
painter->restore();
//! [2]
@@ -85,6 +89,6 @@ void Helper::paint(QPainter *painter, QPaintEvent *event, int elapsed)
//! [3]
painter->setPen(textPen);
painter->setFont(textFont);
- painter->drawText(QRect(-50, -50, 100, 100), Qt::AlignCenter, "Qt");
+ painter->drawText(QRect(-50, -50, 100, 100), Qt::AlignCenter, QStringLiteral("Qt"));
}
//! [3]
diff --git a/examples/opengl/2dpainting/helper.h b/examples/opengl/2dpainting/helper.h
index 10bb2a5a9c..47f4c96639 100644
--- a/examples/opengl/2dpainting/helper.h
+++ b/examples/opengl/2dpainting/helper.h
@@ -44,11 +44,7 @@
#include <QBrush>
#include <QFont>
#include <QPen>
-
-QT_BEGIN_NAMESPACE
-class QPainter;
-class QPaintEvent;
-QT_END_NAMESPACE
+#include <QWidget>
//! [0]
class Helper
diff --git a/examples/opengl/2dpainting/main.cpp b/examples/opengl/2dpainting/main.cpp
index 3374e57964..903795685f 100644
--- a/examples/opengl/2dpainting/main.cpp
+++ b/examples/opengl/2dpainting/main.cpp
@@ -38,9 +38,10 @@
**
****************************************************************************/
-#include <QApplication>
#include "window.h"
+#include <QApplication>
+
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
diff --git a/examples/opengl/2dpainting/widget.cpp b/examples/opengl/2dpainting/widget.cpp
index 49ce8b1329..832f37eb36 100644
--- a/examples/opengl/2dpainting/widget.cpp
+++ b/examples/opengl/2dpainting/widget.cpp
@@ -38,10 +38,11 @@
**
****************************************************************************/
-#include <QtWidgets>
#include "widget.h"
#include "helper.h"
+#include <QPainter>
+#include <QTimer>
//! [0]
Widget::Widget(Helper *helper, QWidget *parent)
diff --git a/examples/opengl/2dpainting/widget.h b/examples/opengl/2dpainting/widget.h
index 7d665b3952..ccf424330c 100644
--- a/examples/opengl/2dpainting/widget.h
+++ b/examples/opengl/2dpainting/widget.h
@@ -45,9 +45,6 @@
//! [0]
class Helper;
-QT_BEGIN_NAMESPACE
-class QPaintEvent;
-QT_END_NAMESPACE
class Widget : public QWidget
{
diff --git a/examples/opengl/2dpainting/window.cpp b/examples/opengl/2dpainting/window.cpp
index 700d0caaa8..b6aba2a945 100644
--- a/examples/opengl/2dpainting/window.cpp
+++ b/examples/opengl/2dpainting/window.cpp
@@ -38,15 +38,19 @@
**
****************************************************************************/
-#include <QtWidgets>
#include "glwidget.h"
#include "widget.h"
#include "window.h"
+#include <QGridLayout>
+#include <QLabel>
+#include <QTimer>
+
//! [0]
Window::Window()
- : QWidget()
{
+ setWindowTitle(tr("2D Painting on Native and OpenGL Widgets"));
+
Widget *native = new Widget(&helper, this);
GLWidget *openGL = new GLWidget(&helper, this);
QLabel *nativeLabel = new QLabel(tr("Native"));
@@ -65,7 +69,5 @@ Window::Window()
connect(timer, SIGNAL(timeout()), native, SLOT(animate()));
connect(timer, SIGNAL(timeout()), openGL, SLOT(animate()));
timer->start(50);
-
- setWindowTitle(tr("2D Painting on Native and OpenGL Widgets"));
}
//! [0]
diff --git a/examples/opengl/2dpainting/window.h b/examples/opengl/2dpainting/window.h
index 263572637e..acded9895f 100644
--- a/examples/opengl/2dpainting/window.h
+++ b/examples/opengl/2dpainting/window.h
@@ -41,14 +41,9 @@
#ifndef WINDOW_H
#define WINDOW_H
-#include <QWidget>
-
#include "helper.h"
-QT_BEGIN_NAMESPACE
-class QLabel;
-class QWidget;
-QT_END_NAMESPACE
+#include <QWidget>
//! [0]
class Window : public QWidget
diff --git a/examples/opengl/cube/cube.pro b/examples/opengl/cube/cube.pro
index aaa933c1e2..710b4442c7 100644
--- a/examples/opengl/cube/cube.pro
+++ b/examples/opengl/cube/cube.pro
@@ -5,7 +5,7 @@ TEMPLATE = app
SOURCES += main.cpp
-contains(QT_CONFIG, opengl) {
+qtHaveModule(opengl) {
QT += opengl
SOURCES += mainwidget.cpp \
diff --git a/examples/opengl/cube/geometryengine.cpp b/examples/opengl/cube/geometryengine.cpp
index d8dfeab822..277a6e9cfc 100644
--- a/examples/opengl/cube/geometryengine.cpp
+++ b/examples/opengl/cube/geometryengine.cpp
@@ -49,14 +49,13 @@ struct VertexData
QVector2D texCoord;
};
-GeometryEngine::GeometryEngine() : vboIds(new GLuint[2])
+GeometryEngine::GeometryEngine()
{
}
GeometryEngine::~GeometryEngine()
{
glDeleteBuffers(2, vboIds);
- delete[] vboIds;
}
void GeometryEngine::init()
diff --git a/examples/opengl/cube/geometryengine.h b/examples/opengl/cube/geometryengine.h
index 2716b05c2b..6a15c3ce03 100644
--- a/examples/opengl/cube/geometryengine.h
+++ b/examples/opengl/cube/geometryengine.h
@@ -41,8 +41,8 @@
#ifndef GEOMETRYENGINE_H
#define GEOMETRYENGINE_H
-#include <QtOpenGL/QGLFunctions>
-#include <QtOpenGL/QGLShaderProgram>
+#include <QGLFunctions>
+#include <QGLShaderProgram>
class GeometryEngine : protected QGLFunctions
{
@@ -51,14 +51,12 @@ public:
virtual ~GeometryEngine();
void init();
-
void drawCubeGeometry(QGLShaderProgram *program);
private:
void initCubeGeometry();
- GLuint *vboIds;
-
+ GLuint vboIds[2];
};
#endif // GEOMETRYENGINE_H
diff --git a/examples/opengl/cube/main.cpp b/examples/opengl/cube/main.cpp
index fbc1d93e4a..fdae1caa16 100644
--- a/examples/opengl/cube/main.cpp
+++ b/examples/opengl/cube/main.cpp
@@ -47,16 +47,15 @@
int main(int argc, char *argv[])
{
- QApplication a(argc, argv);
- a.setApplicationName("cube");
- a.setApplicationVersion("0.1");
-#ifndef QT_NO_OPENGL
- MainWidget w;
- w.resize(640, 480);
- w.show();
+ QApplication app(argc, argv);
+ app.setApplicationName("cube");
+ app.setApplicationVersion("0.1");
+#ifdef QT_NO_OPENGL
+ MainWidget widget;
+ widget.show();
#else
- QLabel * notifyLabel = new QLabel("OpenGL Support required");
- notifyLabel->show();
+ QLabel note("OpenGL Support required");
+ note.show();
#endif
- return a.exec();
+ return app.exec();
}
diff --git a/examples/opengl/cube/mainwidget.cpp b/examples/opengl/cube/mainwidget.cpp
index 055dcf49cf..4a42eca159 100644
--- a/examples/opengl/cube/mainwidget.cpp
+++ b/examples/opengl/cube/mainwidget.cpp
@@ -40,39 +40,26 @@
#include "mainwidget.h"
-#include "geometryengine.h"
-
-#include <QtOpenGL/QGLShaderProgram>
-
-#include <QBasicTimer>
#include <QMouseEvent>
-#include <QDebug>
#include <math.h>
#include <locale.h>
MainWidget::MainWidget(QWidget *parent) :
QGLWidget(parent),
- timer(new QBasicTimer),
- program(new QGLShaderProgram),
- geometries(new GeometryEngine),
angularSpeed(0)
{
}
MainWidget::~MainWidget()
{
- delete timer; timer = 0;
- delete program; program = 0;
- delete geometries; geometries = 0;
-
deleteTexture(texture);
}
//! [0]
void MainWidget::mousePressEvent(QMouseEvent *e)
{
- // Saving mouse press position
+ // Save mouse press position
mousePressPosition = QVector2D(e->localPos());
}
@@ -97,17 +84,15 @@ void MainWidget::mouseReleaseEvent(QMouseEvent *e)
//! [0]
//! [1]
-void MainWidget::timerEvent(QTimerEvent *e)
+void MainWidget::timerEvent(QTimerEvent *)
{
- Q_UNUSED(e);
-
// Decrease angular speed (friction)
angularSpeed *= 0.99;
// Stop rotation when speed goes below threshold
- if (angularSpeed < 0.01)
+ if (angularSpeed < 0.01) {
angularSpeed = 0.0;
- else {
+ } else {
// Update rotation
rotation = QQuaternion::fromAxisAndAngle(rotationAxis, angularSpeed) * rotation;
@@ -120,13 +105,8 @@ void MainWidget::timerEvent(QTimerEvent *e)
void MainWidget::initializeGL()
{
initializeGLFunctions();
-
qglClearColor(Qt::black);
-
- qDebug() << "Initializing shaders...";
initShaders();
-
- qDebug() << "Initializing textures...";
initTextures();
//! [2]
@@ -137,33 +117,32 @@ void MainWidget::initializeGL()
glEnable(GL_CULL_FACE);
//! [2]
- qDebug() << "Initializing geometries...";
- geometries->init();
+ geometries.init();
- // using QBasicTimer because its faster that QTimer
- timer->start(12, this);
+ // Use QBasicTimer because its faster than QTimer
+ timer.start(12, this);
}
//! [3]
void MainWidget::initShaders()
{
- // Overriding system locale until shaders are compiled
+ // Override system locale until shaders are compiled
setlocale(LC_NUMERIC, "C");
- // Compiling vertex shader
- if (!program->addShaderFromSourceFile(QGLShader::Vertex, ":/vshader.glsl"))
+ // Compile vertex shader
+ if (!program.addShaderFromSourceFile(QGLShader::Vertex, ":/vshader.glsl"))
close();
- // Compiling fragment shader
- if (!program->addShaderFromSourceFile(QGLShader::Fragment, ":/fshader.glsl"))
+ // Compile fragment shader
+ if (!program.addShaderFromSourceFile(QGLShader::Fragment, ":/fshader.glsl"))
close();
- // Linking shader pipeline
- if (!program->link())
+ // Link shader pipeline
+ if (!program.link())
close();
- // Binding shader pipeline for use
- if (!program->bind())
+ // Bind shader pipeline for use
+ if (!program.bind())
close();
// Restore system locale
@@ -174,7 +153,7 @@ void MainWidget::initShaders()
//! [4]
void MainWidget::initTextures()
{
- // Loading cube.png
+ // Load cube.png image
glEnable(GL_TEXTURE_2D);
texture = bindTexture(QImage(":/cube.png"));
@@ -198,7 +177,7 @@ void MainWidget::resizeGL(int w, int h)
glViewport(0, 0, w, h);
// Calculate aspect ratio
- qreal aspect = (qreal)w / ((qreal)h?h:1);
+ qreal aspect = qreal(w) / qreal(h ? h : 1);
// Set near plane to 3.0, far plane to 7.0, field of view 45 degrees
const qreal zNear = 3.0, zFar = 7.0, fov = 45.0;
@@ -223,12 +202,12 @@ void MainWidget::paintGL()
matrix.rotate(rotation);
// Set modelview-projection matrix
- program->setUniformValue("mvp_matrix", projection * matrix);
+ program.setUniformValue("mvp_matrix", projection * matrix);
//! [6]
- // Using texture unit 0 which contains cube.png
- program->setUniformValue("texture", 0);
+ // Use texture unit 0 which contains cube.png
+ program.setUniformValue("texture", 0);
// Draw cube geometry
- geometries->drawCubeGeometry(program);
+ geometries.drawCubeGeometry(&program);
}
diff --git a/examples/opengl/cube/mainwidget.h b/examples/opengl/cube/mainwidget.h
index bd30ea93a0..cebfb30999 100644
--- a/examples/opengl/cube/mainwidget.h
+++ b/examples/opengl/cube/mainwidget.h
@@ -41,30 +41,26 @@
#ifndef MAINWIDGET_H
#define MAINWIDGET_H
-#include <QtOpenGL/QGLWidget>
-#include <QtOpenGL/QGLFunctions>
+#include "geometryengine.h"
+#include <QGLWidget>
+#include <QGLFunctions>
#include <QMatrix4x4>
#include <QQuaternion>
#include <QVector2D>
+#include <QBasicTimer>
+#include <QGLShaderProgram>
-QT_BEGIN_NAMESPACE
-class QBasicTimer;
-class QGLShaderProgram;
-QT_END_NAMESPACE
class GeometryEngine;
class MainWidget : public QGLWidget, protected QGLFunctions
{
Q_OBJECT
+
public:
explicit MainWidget(QWidget *parent = 0);
- virtual ~MainWidget();
-
-signals:
-
-public slots:
+ ~MainWidget();
protected:
void mousePressEvent(QMouseEvent *e);
@@ -79,9 +75,9 @@ protected:
void initTextures();
private:
- QBasicTimer *timer;
- QGLShaderProgram *program;
- GeometryEngine *geometries;
+ QBasicTimer timer;
+ QGLShaderProgram program;
+ GeometryEngine geometries;
GLuint texture;
diff --git a/examples/opengl/framebufferobject2/framebufferobject2.pro b/examples/opengl/framebufferobject2/framebufferobject2.pro
index d26751ab0e..3a0dbb4446 100644
--- a/examples/opengl/framebufferobject2/framebufferobject2.pro
+++ b/examples/opengl/framebufferobject2/framebufferobject2.pro
@@ -10,3 +10,9 @@ INSTALLS += target
simulator: warning(This example might not fully work on Simulator platform)
+
+contains(QT_CONFIG, opengles.) {
+ contains(QT_CONFIG, angle): \
+ warning("Qt was built with ANGLE, which provides only OpenGL ES 2.0 on top of DirectX 9.0c")
+ error("This example requires Qt to be configured with -opengl desktop")
+}
diff --git a/examples/opengl/grabber/glwidget.cpp b/examples/opengl/grabber/glwidget.cpp
index 6d8ef0049f..00964c1a0f 100644
--- a/examples/opengl/grabber/glwidget.cpp
+++ b/examples/opengl/grabber/glwidget.cpp
@@ -38,12 +38,12 @@
**
****************************************************************************/
-#include <QtWidgets>
-#include <QtOpenGL>
+#include "glwidget.h"
-#include <math.h>
+#include <QMouseEvent>
+#include <QTimer>
-#include "glwidget.h"
+#include <math.h>
GLWidget::GLWidget(QWidget *parent)
: QGLWidget(parent)
@@ -191,57 +191,52 @@ GLuint GLWidget::makeGear(const GLfloat *reflectance, GLdouble innerRadius,
GLdouble r2 = outerRadius + toothSize / 2.0;
GLdouble delta = (2.0 * Pi / toothCount) / 4.0;
GLdouble z = thickness / 2.0;
- int i, j;
glShadeModel(GL_FLAT);
- for (i = 0; i < 2; ++i) {
+ for (int i = 0; i < 2; ++i) {
GLdouble sign = (i == 0) ? +1.0 : -1.0;
glNormal3d(0.0, 0.0, sign);
glBegin(GL_QUAD_STRIP);
- for (j = 0; j <= toothCount; ++j) {
+ for (int j = 0; j <= toothCount; ++j) {
GLdouble angle = 2.0 * Pi * j / toothCount;
- glVertex3d(r0 * cos(angle), r0 * sin(angle), sign * z);
- glVertex3d(r1 * cos(angle), r1 * sin(angle), sign * z);
- glVertex3d(r0 * cos(angle), r0 * sin(angle), sign * z);
- glVertex3d(r1 * cos(angle + 3 * delta), r1 * sin(angle + 3 * delta),
- sign * z);
+ glVertex3d(r0 * cos(angle), r0 * sin(angle), sign * z);
+ glVertex3d(r1 * cos(angle), r1 * sin(angle), sign * z);
+ glVertex3d(r0 * cos(angle), r0 * sin(angle), sign * z);
+ glVertex3d(r1 * cos(angle + 3 * delta), r1 * sin(angle + 3 * delta), sign * z);
}
glEnd();
glBegin(GL_QUADS);
- for (j = 0; j < toothCount; ++j) {
+ for (int j = 0; j < toothCount; ++j) {
GLdouble angle = 2.0 * Pi * j / toothCount;
- glVertex3d(r1 * cos(angle), r1 * sin(angle), sign * z);
- glVertex3d(r2 * cos(angle + delta), r2 * sin(angle + delta),
- sign * z);
- glVertex3d(r2 * cos(angle + 2 * delta), r2 * sin(angle + 2 * delta),
- sign * z);
- glVertex3d(r1 * cos(angle + 3 * delta), r1 * sin(angle + 3 * delta),
- sign * z);
+ glVertex3d(r1 * cos(angle), r1 * sin(angle), sign * z);
+ glVertex3d(r2 * cos(angle + delta), r2 * sin(angle + delta), sign * z);
+ glVertex3d(r2 * cos(angle + 2 * delta), r2 * sin(angle + 2 * delta), sign * z);
+ glVertex3d(r1 * cos(angle + 3 * delta), r1 * sin(angle + 3 * delta), sign * z);
}
glEnd();
}
glBegin(GL_QUAD_STRIP);
- for (i = 0; i < toothCount; ++i) {
- for (j = 0; j < 2; ++j) {
- GLdouble angle = 2.0 * Pi * (i + (j / 2.0)) / toothCount;
+ for (int i = 0; i < toothCount; ++i) {
+ for (int j = 0; j < 2; ++j) {
+ GLdouble angle = 2.0 * Pi * (i + j / 2.0) / toothCount;
GLdouble s1 = r1;
GLdouble s2 = r2;
if (j == 1)
qSwap(s1, s2);
- glNormal3d(cos(angle), sin(angle), 0.0);
- glVertex3d(s1 * cos(angle), s1 * sin(angle), +z);
- glVertex3d(s1 * cos(angle), s1 * sin(angle), -z);
+ glNormal3d(cos(angle), sin(angle), 0.0);
+ glVertex3d(s1 * cos(angle), s1 * sin(angle), +z);
+ glVertex3d(s1 * cos(angle), s1 * sin(angle), -z);
- glNormal3d(s2 * sin(angle + delta) - s1 * sin(angle),
+ glNormal3d(s2 * sin(angle + delta) - s1 * sin(angle),
s1 * cos(angle) - s2 * cos(angle + delta), 0.0);
- glVertex3d(s2 * cos(angle + delta), s2 * sin(angle + delta), +z);
- glVertex3d(s2 * cos(angle + delta), s2 * sin(angle + delta), -z);
+ glVertex3d(s2 * cos(angle + delta), s2 * sin(angle + delta), +z);
+ glVertex3d(s2 * cos(angle + delta), s2 * sin(angle + delta), -z);
}
}
glVertex3d(r1, 0.0, +z);
@@ -251,11 +246,11 @@ GLuint GLWidget::makeGear(const GLfloat *reflectance, GLdouble innerRadius,
glShadeModel(GL_SMOOTH);
glBegin(GL_QUAD_STRIP);
- for (i = 0; i <= toothCount; ++i) {
- GLdouble angle = i * 2.0 * Pi / toothCount;
- glNormal3d(-cos(angle), -sin(angle), 0.0);
- glVertex3d(r0 * cos(angle), r0 * sin(angle), +z);
- glVertex3d(r0 * cos(angle), r0 * sin(angle), -z);
+ for (int i = 0; i <= toothCount; ++i) {
+ GLdouble angle = i * 2.0 * Pi / toothCount;
+ glNormal3d(-cos(angle), -sin(angle), 0.0);
+ glVertex3d(r0 * cos(angle), r0 * sin(angle), +z);
+ glVertex3d(r0 * cos(angle), r0 * sin(angle), -z);
}
glEnd();
diff --git a/examples/opengl/grabber/glwidget.h b/examples/opengl/grabber/glwidget.h
index 88a97ac8b0..6f48102111 100644
--- a/examples/opengl/grabber/glwidget.h
+++ b/examples/opengl/grabber/glwidget.h
@@ -94,4 +94,4 @@ private:
QPoint lastPos;
};
-#endif
+#endif // GLWIDGET_H
diff --git a/examples/opengl/grabber/grabber.pro b/examples/opengl/grabber/grabber.pro
index a60dbbe2dc..c4c54c7c32 100644
--- a/examples/opengl/grabber/grabber.pro
+++ b/examples/opengl/grabber/grabber.pro
@@ -11,3 +11,9 @@ INSTALLS += target
simulator: warning(This example might not fully work on Simulator platform)
+
+contains(QT_CONFIG, opengles.) {
+ contains(QT_CONFIG, angle): \
+ warning("Qt was built with ANGLE, which provides only OpenGL ES 2.0 on top of DirectX 9.0c")
+ error("This example requires Qt to be configured with -opengl desktop")
+}
diff --git a/examples/opengl/grabber/main.cpp b/examples/opengl/grabber/main.cpp
index f03543e449..be0e7b11cc 100644
--- a/examples/opengl/grabber/main.cpp
+++ b/examples/opengl/grabber/main.cpp
@@ -38,14 +38,14 @@
**
****************************************************************************/
-#include <QApplication>
-
#include "mainwindow.h"
+#include <QApplication>
+
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- MainWindow mainWin;
- mainWin.show();
+ MainWindow window;
+ window.show();
return app.exec();
}
diff --git a/examples/opengl/grabber/mainwindow.cpp b/examples/opengl/grabber/mainwindow.cpp
index a559649c55..e521b39dab 100644
--- a/examples/opengl/grabber/mainwindow.cpp
+++ b/examples/opengl/grabber/mainwindow.cpp
@@ -38,12 +38,11 @@
**
****************************************************************************/
-#include <QtWidgets>
-#include <QtOpenGL>
-
#include "glwidget.h"
#include "mainwindow.h"
+#include <QtWidgets>
+
MainWindow::MainWindow()
{
centralWidget = new QWidget;
diff --git a/examples/opengl/grabber/mainwindow.h b/examples/opengl/grabber/mainwindow.h
index 6f981c5381..552f902c07 100644
--- a/examples/opengl/grabber/mainwindow.h
+++ b/examples/opengl/grabber/mainwindow.h
@@ -44,12 +44,12 @@
#include <QMainWindow>
QT_BEGIN_NAMESPACE
-class QAction;
class QLabel;
class QMenu;
class QScrollArea;
class QSlider;
QT_END_NAMESPACE
+
class GLWidget;
class MainWindow : public QMainWindow
@@ -91,4 +91,4 @@ private:
QAction *aboutQtAct;
};
-#endif
+#endif // MAINWINDOW_H
diff --git a/examples/opengl/hellogl/hellogl.pro b/examples/opengl/hellogl/hellogl.pro
index acaca35635..42913835a2 100644
--- a/examples/opengl/hellogl/hellogl.pro
+++ b/examples/opengl/hellogl/hellogl.pro
@@ -16,3 +16,9 @@ INSTALLS += target
simulator: warning(This example might not fully work on Simulator platform)
+
+contains(QT_CONFIG, opengles.) {
+ contains(QT_CONFIG, angle): \
+ warning("Qt was built with ANGLE, which provides only OpenGL ES 2.0 on top of DirectX 9.0c")
+ error("This example requires Qt to be configured with -opengl desktop")
+}
diff --git a/examples/opengl/hellogl_es2/bubble.h b/examples/opengl/hellogl_es2/bubble.h
index cd4c8d91cc..b913d3620d 100644
--- a/examples/opengl/hellogl_es2/bubble.h
+++ b/examples/opengl/hellogl_es2/bubble.h
@@ -47,7 +47,7 @@
#include <QRect>
#include <QRectF>
-class QPainter;
+QT_FORWARD_DECLARE_CLASS(QPainter)
class Bubble
{
diff --git a/examples/opengl/hellogl_es2/mainwindow.h b/examples/opengl/hellogl_es2/mainwindow.h
index 7e16a6b6a7..4aac220692 100644
--- a/examples/opengl/hellogl_es2/mainwindow.h
+++ b/examples/opengl/hellogl_es2/mainwindow.h
@@ -43,9 +43,6 @@
#include <QMainWindow>
-class QSlider;
-class GLWidget;
-
class MainWindow : public QMainWindow
{
Q_OBJECT
diff --git a/examples/opengl/hellowindow/hellowindow.cpp b/examples/opengl/hellowindow/hellowindow.cpp
index b5166abe50..b1140c4f1d 100644
--- a/examples/opengl/hellowindow/hellowindow.cpp
+++ b/examples/opengl/hellowindow/hellowindow.cpp
@@ -41,9 +41,6 @@
#include "hellowindow.h"
#include <QOpenGLContext>
-
-#include <QTimer>
-
#include <qmath.h>
Renderer::Renderer(const QSurfaceFormat &format, Renderer *share, QScreen *screen)
@@ -77,10 +74,8 @@ HelloWindow::HelloWindow(const QSharedPointer<Renderer> &renderer)
updateColor();
}
-void HelloWindow::exposeEvent(QExposeEvent *event)
+void HelloWindow::exposeEvent(QExposeEvent *)
{
- Q_UNUSED(event);
-
render();
if (!m_timer) {
@@ -109,10 +104,7 @@ void HelloWindow::updateColor()
};
m_color = colors[m_colorIndex];
-
- m_colorIndex++;
- if (m_colorIndex >= int(sizeof(colors) / sizeof(colors[0])))
- m_colorIndex = 0;
+ m_colorIndex = 1 - m_colorIndex;
}
void Renderer::render(QSurface *surface, const QColor &color, const QSize &viewSize)
@@ -171,31 +163,29 @@ void Renderer::initialize()
glClearColor(0.1f, 0.1f, 0.2f, 1.0f);
QOpenGLShader *vshader = new QOpenGLShader(QOpenGLShader::Vertex, this);
- const char *vsrc =
- "attribute highp vec4 vertex;\n"
- "attribute mediump vec3 normal;\n"
- "uniform mediump mat4 matrix;\n"
- "uniform lowp vec4 sourceColor;\n"
- "varying mediump vec4 color;\n"
- "void main(void)\n"
- "{\n"
- " vec3 toLight = normalize(vec3(0.0, 0.3, 1.0));\n"
- " float angle = max(dot(normal, toLight), 0.0);\n"
- " vec3 col = sourceColor.rgb;\n"
- " color = vec4(col * 0.2 + col * 0.8 * angle, 1.0);\n"
- " color = clamp(color, 0.0, 1.0);\n"
- " gl_Position = matrix * vertex;\n"
- "}\n";
- vshader->compileSourceCode(vsrc);
+ vshader->compileSourceCode(
+ "attribute highp vec4 vertex;"
+ "attribute mediump vec3 normal;"
+ "uniform mediump mat4 matrix;"
+ "uniform lowp vec4 sourceColor;"
+ "varying mediump vec4 color;"
+ "void main(void)"
+ "{"
+ " vec3 toLight = normalize(vec3(0.0, 0.3, 1.0));"
+ " float angle = max(dot(normal, toLight), 0.0);"
+ " vec3 col = sourceColor.rgb;"
+ " color = vec4(col * 0.2 + col * 0.8 * angle, 1.0);"
+ " color = clamp(color, 0.0, 1.0);"
+ " gl_Position = matrix * vertex;"
+ "}");
QOpenGLShader *fshader = new QOpenGLShader(QOpenGLShader::Fragment, this);
- const char *fsrc =
- "varying mediump vec4 color;\n"
- "void main(void)\n"
- "{\n"
- " gl_FragColor = color;\n"
- "}\n";
- fshader->compileSourceCode(fsrc);
+ fshader->compileSourceCode(
+ "varying mediump vec4 color;"
+ "void main(void)"
+ "{"
+ " gl_FragColor = color;"
+ "}");
m_program = new QOpenGLShaderProgram(this);
m_program->addShader(vshader);
diff --git a/examples/opengl/hellowindow/hellowindow.h b/examples/opengl/hellowindow/hellowindow.h
index adb85c1a6e..27cae4be7d 100644
--- a/examples/opengl/hellowindow/hellowindow.h
+++ b/examples/opengl/hellowindow/hellowindow.h
@@ -40,21 +40,15 @@
#include <QWindow>
-#include <QtGui/qopengl.h>
-#include <QtGui/qopenglshaderprogram.h>
-
#include <QColor>
-#include <QTime>
+#include <QOpenGLShaderProgram>
#include <QSharedPointer>
-
-QT_BEGIN_NAMESPACE
-class QOpenGLContext;
-class QTimer;
-QT_END_NAMESPACE
+#include <QTimer>
class Renderer : public QObject
{
Q_OBJECT
+
public:
explicit Renderer(const QSurfaceFormat &format, Renderer *share = 0, QScreen *screen = 0);
@@ -89,6 +83,7 @@ private:
class HelloWindow : public QWindow
{
Q_OBJECT
+
public:
explicit HelloWindow(const QSharedPointer<Renderer> &renderer);
diff --git a/examples/opengl/hellowindow/main.cpp b/examples/opengl/hellowindow/main.cpp
index 343160f755..e63b27d093 100644
--- a/examples/opengl/hellowindow/main.cpp
+++ b/examples/opengl/hellowindow/main.cpp
@@ -38,21 +38,22 @@
**
****************************************************************************/
-#include <QGuiApplication>
+#include "hellowindow.h"
+
#include <qpa/qplatformintegration.h>
#include <private/qguiapplication_p.h>
+
+#include <QGuiApplication>
#include <QScreen>
#include <QThread>
-#include "hellowindow.h"
-
-int main(int argc, char **argv)
+int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
const bool multipleWindows =
QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedOpenGL)
- && !QGuiApplication::arguments().contains(QLatin1String("--single"));
+ && !QGuiApplication::arguments().contains(QStringLiteral("--single"));
QScreen *screen = QGuiApplication::primaryScreen();
@@ -71,7 +72,7 @@ int main(int argc, char **argv)
HelloWindow *windowA = new HelloWindow(rendererA);
windowA->setGeometry(QRect(center, windowSize).translated(-windowSize.width() - delta / 2, 0));
- windowA->setTitle(QLatin1String("Thread A - Context A"));
+ windowA->setTitle(QStringLiteral("Thread A - Context A"));
windowA->setVisible(true);
windows.prepend(windowA);
@@ -85,13 +86,13 @@ int main(int argc, char **argv)
HelloWindow *windowB = new HelloWindow(rendererA);
windowB->setGeometry(QRect(center, windowSize).translated(delta / 2, 0));
- windowB->setTitle(QLatin1String("Thread A - Context A"));
+ windowB->setTitle(QStringLiteral("Thread A - Context A"));
windowB->setVisible(true);
windows.prepend(windowB);
HelloWindow *windowC = new HelloWindow(rendererB);
windowC->setGeometry(QRect(center, windowSize).translated(-windowSize.width() / 2, windowSize.height() + delta));
- windowC->setTitle(QLatin1String("Thread B - Context B"));
+ windowC->setTitle(QStringLiteral("Thread B - Context B"));
windowC->setVisible(true);
windows.prepend(windowC);
@@ -113,7 +114,7 @@ int main(int argc, char **argv)
window->setGeometry(QRect(center, windowSize).translated(-windowSize.width() / 2, -windowSize.height() / 2));
QChar id = QChar('B' + i);
- window->setTitle(QLatin1String("Thread ") + id + QLatin1String(" - Context ") + id);
+ window->setTitle(QStringLiteral("Thread ") + id + QStringLiteral(" - Context ") + id);
window->setVisible(true);
windows.prepend(window);
}
@@ -128,6 +129,7 @@ int main(int argc, char **argv)
for (int i = 0; i < renderThreads.size(); ++i)
renderThreads.at(i)->wait();
+
qDeleteAll(windows);
qDeleteAll(renderThreads);
diff --git a/examples/opengl/opengl.pro b/examples/opengl/opengl.pro
index 1a6ac3aeb2..25c337fdad 100644
--- a/examples/opengl/opengl.pro
+++ b/examples/opengl/opengl.pro
@@ -26,5 +26,3 @@ SUBDIRS += hellowindow \
paintedwindow
EXAMPLE_FILES = shared
-
-QT += widgets
diff --git a/examples/opengl/overpainting/bubble.cpp b/examples/opengl/overpainting/bubble.cpp
index 5f0e9710ea..0b3e3b8778 100644
--- a/examples/opengl/overpainting/bubble.cpp
+++ b/examples/opengl/overpainting/bubble.cpp
@@ -38,8 +38,6 @@
**
****************************************************************************/
-#include <QtWidgets>
-
#include "bubble.h"
Bubble::Bubble(const QPointF &position, qreal radius, const QPointF &velocity)
diff --git a/examples/opengl/overpainting/bubble.h b/examples/opengl/overpainting/bubble.h
index 2a3d27480b..42dedc6e8f 100644
--- a/examples/opengl/overpainting/bubble.h
+++ b/examples/opengl/overpainting/bubble.h
@@ -41,15 +41,7 @@
#ifndef BUBBLE_H
#define BUBBLE_H
-#include <QBrush>
-#include <QColor>
-#include <QPointF>
-#include <QRect>
-#include <QRectF>
-
-QT_BEGIN_NAMESPACE
-class QPainter;
-QT_END_NAMESPACE
+#include <QPainter>
class Bubble
{
@@ -72,4 +64,4 @@ private:
QColor outerColor;
};
-#endif
+#endif // BUBBLE_H
diff --git a/examples/opengl/overpainting/glwidget.cpp b/examples/opengl/overpainting/glwidget.cpp
index df546a125b..ea29325b6c 100644
--- a/examples/opengl/overpainting/glwidget.cpp
+++ b/examples/opengl/overpainting/glwidget.cpp
@@ -38,16 +38,16 @@
**
****************************************************************************/
-#include <QtWidgets>
-#include <QtOpenGL>
-#include <stdlib.h>
-
-#include <math.h>
-
#include "bubble.h"
#include "qtlogo.h"
#include "glwidget.h"
+#include <QMouseEvent>
+#include <QTime>
+
+#include <math.h>
+#include <stdlib.h>
+
#ifndef GL_MULTISAMPLE
#define GL_MULTISAMPLE 0x809D
#endif
diff --git a/examples/opengl/overpainting/glwidget.h b/examples/opengl/overpainting/glwidget.h
index ce2b29d7f3..497d5e1ac4 100644
--- a/examples/opengl/overpainting/glwidget.h
+++ b/examples/opengl/overpainting/glwidget.h
@@ -41,19 +41,11 @@
#ifndef GLWIDGET_H
#define GLWIDGET_H
-#include <QBrush>
-#include <QFont>
-#include <QImage>
-#include <QPen>
#include <QGLWidget>
#include <QTimer>
class Bubble;
class QtLogo;
-QT_BEGIN_NAMESPACE
-class QPaintEvent;
-class QWidget;
-QT_END_NAMESPACE
//! [0]
class GLWidget : public QGLWidget
@@ -108,4 +100,4 @@ private:
//! [4]
};
-#endif
+#endif // GLWIDGET_H
diff --git a/examples/opengl/overpainting/main.cpp b/examples/opengl/overpainting/main.cpp
index c4758956ba..2d40a7f76b 100644
--- a/examples/opengl/overpainting/main.cpp
+++ b/examples/opengl/overpainting/main.cpp
@@ -38,9 +38,10 @@
**
****************************************************************************/
-#include <QApplication>
#include "glwidget.h"
+#include <QApplication>
+
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
diff --git a/examples/opengl/overpainting/overpainting.pro b/examples/opengl/overpainting/overpainting.pro
index 08fe9b3dae..aecc14751b 100644
--- a/examples/opengl/overpainting/overpainting.pro
+++ b/examples/opengl/overpainting/overpainting.pro
@@ -1,10 +1,12 @@
+QT += opengl widgets
+
VPATH += ../shared
INCLUDEPATH += ../shared
-QT += opengl widgets
HEADERS = bubble.h \
glwidget.h \
qtlogo.h
+
SOURCES = bubble.cpp \
glwidget.cpp \
main.cpp \
@@ -15,3 +17,9 @@ target.path = $$[QT_INSTALL_EXAMPLES]/opengl/overpainting
INSTALLS += target
simulator: warning(This example might not fully work on Simulator platform)
+
+contains(QT_CONFIG, opengles.) {
+ contains(QT_CONFIG, angle): \
+ warning("Qt was built with ANGLE, which provides only OpenGL ES 2.0 on top of DirectX 9.0c")
+ error("This example requires Qt to be configured with -opengl desktop")
+}
diff --git a/examples/opengl/paintedwindow/paintedwindow.cpp b/examples/opengl/paintedwindow/paintedwindow.cpp
index 0920e6e89d..3aa21a04b6 100644
--- a/examples/opengl/paintedwindow/paintedwindow.cpp
+++ b/examples/opengl/paintedwindow/paintedwindow.cpp
@@ -70,12 +70,10 @@ PaintedWindow::PaintedWindow()
m_animation->setEndValue(qreal(1));
m_animation->setDuration(500);
- requestOrientation(Qt::PortraitOrientation);
-
QRect screenGeometry = screen()->availableGeometry();
QPoint center = screenGeometry.center();
- QRect windowRect = screen()->isLandscape(orientation()) ? QRect(0, 0, 640, 480) : QRect(0, 0, 480, 640);
+ QRect windowRect = screen()->isLandscape(screen()->orientation()) ? QRect(0, 0, 640, 480) : QRect(0, 0, 480, 640);
setGeometry(QRect(center - windowRect.center(), windowRect.size()));
m_rotation = 0;
@@ -142,13 +140,13 @@ void PaintedWindow::orientationChanged(Qt::ScreenOrientation newOrientation)
QPainter p;
p.begin(&m_prevImage);
- p.setTransform(screen()->transformBetween(contentOrientation(), orientation(), rect));
- paint(&p, screen()->mapBetween(contentOrientation(), orientation(), rect));
+ p.setTransform(screen()->transformBetween(contentOrientation(), screen()->orientation(), rect));
+ paint(&p, screen()->mapBetween(contentOrientation(), screen()->orientation(), rect));
p.end();
p.begin(&m_nextImage);
- p.setTransform(screen()->transformBetween(newOrientation, orientation(), rect));
- paint(&p, screen()->mapBetween(newOrientation, orientation(), rect));
+ p.setTransform(screen()->transformBetween(newOrientation, screen()->orientation(), rect));
+ paint(&p, screen()->mapBetween(newOrientation, screen()->orientation(), rect));
p.end();
m_deltaRotation = screen()->angleBetween(newOrientation, contentOrientation());
@@ -207,9 +205,9 @@ void PaintedWindow::paint()
painter.setOpacity(m_rotation);
painter.drawImage(0, 0, m_nextImage);
} else {
- QRect mapped = screen()->mapBetween(contentOrientation(), orientation(), rect);
+ QRect mapped = screen()->mapBetween(contentOrientation(), screen()->orientation(), rect);
- painter.setTransform(screen()->transformBetween(contentOrientation(), orientation(), rect));
+ painter.setTransform(screen()->transformBetween(contentOrientation(), screen()->orientation(), rect));
paint(&painter, mapped);
painter.end();
}
diff --git a/examples/opengl/pbuffers/pbuffers.pro b/examples/opengl/pbuffers/pbuffers.pro
index 1a9882c45d..57bb3aa32a 100644
--- a/examples/opengl/pbuffers/pbuffers.pro
+++ b/examples/opengl/pbuffers/pbuffers.pro
@@ -11,3 +11,9 @@ target.path = $$[QT_INSTALL_EXAMPLES]/opengl/pbuffers
INSTALLS += target
simulator: warning(This example might not fully work on Simulator platform)
+
+contains(QT_CONFIG, opengles.) {
+ contains(QT_CONFIG, angle): \
+ warning("Qt was built with ANGLE, which provides only OpenGL ES 2.0 on top of DirectX 9.0c")
+ error("This example requires Qt to be configured with -opengl desktop")
+}
diff --git a/examples/opengl/pbuffers2/pbuffers2.pro b/examples/opengl/pbuffers2/pbuffers2.pro
index 31fd22cced..c53309d1fa 100644
--- a/examples/opengl/pbuffers2/pbuffers2.pro
+++ b/examples/opengl/pbuffers2/pbuffers2.pro
@@ -9,3 +9,9 @@ target.path = $$[QT_INSTALL_EXAMPLES]/opengl/pbuffers2
INSTALLS += target
simulator: warning(This example might not fully work on Simulator platform)
+
+contains(QT_CONFIG, opengles.) {
+ contains(QT_CONFIG, angle): \
+ warning("Qt was built with ANGLE, which provides only OpenGL ES 2.0 on top of DirectX 9.0c")
+ error("This example requires Qt to be configured with -opengl desktop")
+}
diff --git a/examples/opengl/samplebuffers/samplebuffers.pro b/examples/opengl/samplebuffers/samplebuffers.pro
index 5793ea3e68..d16993adfe 100644
--- a/examples/opengl/samplebuffers/samplebuffers.pro
+++ b/examples/opengl/samplebuffers/samplebuffers.pro
@@ -9,3 +9,9 @@ INSTALLS += target
simulator: warning(This example might not fully work on Simulator platform)
+
+contains(QT_CONFIG, opengles.) {
+ contains(QT_CONFIG, angle): \
+ warning("Qt was built with ANGLE, which provides only OpenGL ES 2.0 on top of DirectX 9.0c")
+ error("This example requires Qt to be configured with -opengl desktop")
+}
diff --git a/examples/opengl/shared/qtlogo.cpp b/examples/opengl/shared/qtlogo.cpp
index fa3d91c840..e49ed7e67c 100644
--- a/examples/opengl/shared/qtlogo.cpp
+++ b/examples/opengl/shared/qtlogo.cpp
@@ -38,14 +38,14 @@
**
****************************************************************************/
+#include "qtlogo.h"
+
#include <QGLWidget>
#include <QMatrix4x4>
#include <QVector3D>
#include <qmath.h>
-#include "qtlogo.h"
-
static const qreal tee_height = 0.311126;
static const qreal cross_width = 0.25;
static const qreal bar_thickness = 0.113137;
@@ -117,7 +117,7 @@ void Geometry::finalize()
void Geometry::appendSmooth(const QVector3D &a, const QVector3D &n, int from)
{
- // Smooth normals are acheived by averaging the normals for faces meeting
+ // Smooth normals are achieved by averaging the normals for faces meeting
// at a point. First find the point in geometry already generated
// (working backwards, since most often the points shared are between faces
// recently added).
@@ -125,28 +125,27 @@ void Geometry::appendSmooth(const QVector3D &a, const QVector3D &n, int from)
for ( ; v >= from; --v)
if (qFuzzyCompare(vertices[v], a))
break;
- if (v < from)
- {
- // The vert was not found so add it as a new one, and initialize
+
+ if (v < from) {
+ // The vertex was not found so add it as a new one, and initialize
// its corresponding normal
v = vertices.count();
vertices.append(a);
normals.append(n);
- }
- else
- {
+ } else {
// Vert found, accumulate normals into corresponding normal slot.
// Must call finalize once finished accumulating normals
normals[v] += n;
}
- // In both cases (found or not) reference the vert via its index
+
+ // In both cases (found or not) reference the vertex via its index
faces.append(v);
}
void Geometry::appendFaceted(const QVector3D &a, const QVector3D &n)
{
- // Faceted normals are achieved by duplicating the vert for every
- // normal, so that faces meeting at a vert get a sharp edge.
+ // Faceted normals are achieved by duplicating the vertex for every
+ // normal, so that faces meeting at a vertex get a sharp edge.
int v = vertices.count();
vertices.append(a);
normals.append(n);
@@ -189,32 +188,29 @@ void Patch::draw() const
void Patch::addTri(const QVector3D &a, const QVector3D &b, const QVector3D &c, const QVector3D &n)
{
QVector3D norm = n.isNull() ? QVector3D::normal(a, b, c) : n;
- if (sm == Smooth)
- {
+
+ if (sm == Smooth) {
geom->appendSmooth(a, norm, initv);
geom->appendSmooth(b, norm, initv);
geom->appendSmooth(c, norm, initv);
- }
- else
- {
+ } else {
geom->appendFaceted(a, norm);
geom->appendFaceted(b, norm);
geom->appendFaceted(c, norm);
}
+
count += 3;
}
void Patch::addQuad(const QVector3D &a, const QVector3D &b, const QVector3D &c, const QVector3D &d)
{
QVector3D norm = QVector3D::normal(a, b, c);
- if (sm == Smooth)
- {
+
+ if (sm == Smooth) {
addTri(a, b, c, norm);
addTri(a, c, d, norm);
- }
- else
- {
- // If faceted share the two common verts
+ } else {
+ // If faceted share the two common vertices
addTri(a, b, c, norm);
int k = geom->vertices.count();
geom->appendSmooth(a, norm, k);
@@ -224,9 +220,9 @@ void Patch::addQuad(const QVector3D &a, const QVector3D &b, const QVector3D &c,
}
}
-static inline QVector<QVector3D> extrude(const QVector<QVector3D> &verts, qreal depth)
+static inline QVector<QVector3D> extrude(const QVector<QVector3D> &vertices, qreal depth)
{
- QVector<QVector3D> extr = verts;
+ QVector<QVector3D> extr = vertices;
for (int v = 0; v < extr.count(); ++v)
extr[v].setZ(extr[v].z() - depth);
return extr;
@@ -240,6 +236,7 @@ public:
for (int i = 0; i < parts.count(); ++i)
parts[i]->translate(t);
}
+
void rotate(qreal deg, QVector3D axis)
{
for (int i = 0; i < parts.count(); ++i)
@@ -248,7 +245,7 @@ public:
// No special Rectoid destructor - the parts are fetched out of this member
// variable, and destroyed by the new owner
- QList<Patch*> parts;
+ QList<Patch *> parts;
};
class RectPrism : public Rectoid
diff --git a/examples/opengl/textures/glwidget.h b/examples/opengl/textures/glwidget.h
index 11a9818e19..757a7df627 100644
--- a/examples/opengl/textures/glwidget.h
+++ b/examples/opengl/textures/glwidget.h
@@ -44,7 +44,7 @@
#include <QtWidgets>
#include <QGLWidget>
-class QGLShaderProgram;
+QT_FORWARD_DECLARE_CLASS(QGLShaderProgram);
class GLWidget : public QGLWidget
{
diff --git a/examples/qmake/precompile/precompile.pro b/examples/qmake/precompile/precompile.pro
index b51677023a..6a23d82c32 100644
--- a/examples/qmake/precompile/precompile.pro
+++ b/examples/qmake/precompile/precompile.pro
@@ -8,6 +8,7 @@ TEMPLATE = app
LANGUAGE = C++
CONFIG += console precompile_header
CONFIG -= app_bundle
+QT += widgets
# Use Precompiled headers (PCH)
PRECOMPILED_HEADER = stable.h
@@ -21,4 +22,3 @@ SOURCES = main.cpp \
util.cpp
FORMS = mydialog.ui
#! [0]
-QT += widgets
diff --git a/examples/qtconcurrent/imagescaling/doc/images/imagescaling_example.png b/examples/qtconcurrent/imagescaling/doc/images/imagescaling_example.png
new file mode 100644
index 0000000000..7c6794132a
--- /dev/null
+++ b/examples/qtconcurrent/imagescaling/doc/images/imagescaling_example.png
Binary files differ
diff --git a/examples/qtconcurrent/imagescaling/doc/src/qtconcurrent-imagescaling.qdoc b/examples/qtconcurrent/imagescaling/doc/src/qtconcurrent-imagescaling.qdoc
new file mode 100644
index 0000000000..c270bda102
--- /dev/null
+++ b/examples/qtconcurrent/imagescaling/doc/src/qtconcurrent-imagescaling.qdoc
@@ -0,0 +1,37 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** 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. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example qtconcurrent/imagescaling
+ \title Image Scaling Example
+ \brief Demonstrates how to asynchronously scale images.
+ \ingroup qtconcurrentexamples
+ \image imagescaling_example.png
+
+ The QtConcurrent Map example shows how to use the asynchronous
+ QtConcurrent API to load and scale a collection of images.
+*/
diff --git a/examples/qtconcurrent/map/doc/src/qtconcurrent-map.qdoc b/examples/qtconcurrent/map/doc/src/qtconcurrent-map.qdoc
new file mode 100644
index 0000000000..7522baf2c4
--- /dev/null
+++ b/examples/qtconcurrent/map/doc/src/qtconcurrent-map.qdoc
@@ -0,0 +1,38 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** 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. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example qtconcurrent/map
+ \title Map Example
+ \brief Demonstrates how to scale images synchronously.
+ \ingroup qtconcurrentexamples
+
+ The QtConcurrent Map example shows how to use the synchronous (blocking)
+ QtConcurrent API to scale a collection of images.
+
+ This is a command-line application.
+*/
diff --git a/examples/qtconcurrent/progressdialog/doc/images/qtconcurrent-progressdialog.png b/examples/qtconcurrent/progressdialog/doc/images/qtconcurrent-progressdialog.png
new file mode 100644
index 0000000000..2e8b7735ad
--- /dev/null
+++ b/examples/qtconcurrent/progressdialog/doc/images/qtconcurrent-progressdialog.png
Binary files differ
diff --git a/examples/qtconcurrent/progressdialog/doc/src/qtconcurrent-progressdialog.qdoc b/examples/qtconcurrent/progressdialog/doc/src/qtconcurrent-progressdialog.qdoc
new file mode 100644
index 0000000000..aa5cd517a5
--- /dev/null
+++ b/examples/qtconcurrent/progressdialog/doc/src/qtconcurrent-progressdialog.qdoc
@@ -0,0 +1,38 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** 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. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example qtconcurrent/progressdialog
+ \title QtConcurrent Progress Dialog Example
+ \brief Demonstrates how to monitor the progress of the active processes.
+ \ingroup qtconcurrentexamples
+
+ The QtConcurrent Progress Dialog example shows how to use the
+ QFutureWatcher class to monitor the progress of a long-running operation.
+
+ \image qtconcurrent-progressdialog.png
+*/
diff --git a/examples/qtconcurrent/qtconcurrent.pro b/examples/qtconcurrent/qtconcurrent.pro
index 72220b1ab3..dafbabb5c3 100644
--- a/examples/qtconcurrent/qtconcurrent.pro
+++ b/examples/qtconcurrent/qtconcurrent.pro
@@ -8,7 +8,7 @@ SUBDIRS = imagescaling \
SUBDIRS += progressdialog
}
-contains(QT_CONFIG, no-widgets) {
+!qtHaveModule(widgets) {
SUBDIRS -= \
imagescaling \
progressdialog \
diff --git a/examples/qtconcurrent/runfunction/doc/src/qtconcurrent-runfunction.qdoc b/examples/qtconcurrent/runfunction/doc/src/qtconcurrent-runfunction.qdoc
new file mode 100644
index 0000000000..1c4e367240
--- /dev/null
+++ b/examples/qtconcurrent/runfunction/doc/src/qtconcurrent-runfunction.qdoc
@@ -0,0 +1,39 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** 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. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example qtconcurrent/runfunction
+ \title Run Function Example
+ \brief Demonstrates how to run standard functions concurrently.
+ \ingroup qtconcurrentexamples
+
+ The QtConcurrent Run Function example shows how to apply concurrency to
+ a standard function, using QFuture instances to retrieve return values
+ at a later time.
+
+ This is a command-line application.
+*/
diff --git a/examples/qtconcurrent/wordcount/doc/src/qtconcurrent-wordcount.qdoc b/examples/qtconcurrent/wordcount/doc/src/qtconcurrent-wordcount.qdoc
new file mode 100644
index 0000000000..b8d04fa553
--- /dev/null
+++ b/examples/qtconcurrent/wordcount/doc/src/qtconcurrent-wordcount.qdoc
@@ -0,0 +1,39 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** 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. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example qtconcurrent/wordcount
+ \title QtConcurrent Word Count Example
+ \brief Demonstrates how to use the map-reduce algorithm
+ \ingroup qtconcurrentexamples
+
+ The QtConcurrent Word Count example demonstrates the use of the map-reduce
+ algorithm when applied to the problem of counting words in a collection
+ of files.
+
+ This is a command-line application.
+*/
diff --git a/examples/qtestlib/tutorial1/tutorial1.pro b/examples/qtestlib/tutorial1/tutorial1.pro
index 8e77a9c5ff..d0d45ceb04 100644
--- a/examples/qtestlib/tutorial1/tutorial1.pro
+++ b/examples/qtestlib/tutorial1/tutorial1.pro
@@ -1,8 +1,7 @@
+QT += widgets testlib
+
SOURCES = testqstring.cpp
-QT += testlib
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtestlib/tutorial1
INSTALLS += target
-
-QT += widgets
diff --git a/examples/qtestlib/tutorial2/tutorial2.pro b/examples/qtestlib/tutorial2/tutorial2.pro
index 58e70d4508..039c047fa8 100644
--- a/examples/qtestlib/tutorial2/tutorial2.pro
+++ b/examples/qtestlib/tutorial2/tutorial2.pro
@@ -1,8 +1,7 @@
+QT += widgets testlib
+
SOURCES = testqstring.cpp
-QT += testlib
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtestlib/tutorial2
INSTALLS += target
-
-QT += widgets
diff --git a/examples/qtestlib/tutorial3/tutorial3.pro b/examples/qtestlib/tutorial3/tutorial3.pro
index 918dbf1187..297b0c9926 100644
--- a/examples/qtestlib/tutorial3/tutorial3.pro
+++ b/examples/qtestlib/tutorial3/tutorial3.pro
@@ -1,8 +1,7 @@
+QT += widgets testlib
+
SOURCES = testgui.cpp
-QT += testlib
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtestlib/tutorial3
INSTALLS += target
-
-QT += widgets
diff --git a/examples/qtestlib/tutorial4/tutorial4.pro b/examples/qtestlib/tutorial4/tutorial4.pro
index f7b40dd4ca..4c1f431563 100644
--- a/examples/qtestlib/tutorial4/tutorial4.pro
+++ b/examples/qtestlib/tutorial4/tutorial4.pro
@@ -1,8 +1,7 @@
+QT += widgets testlib
+
SOURCES = testgui.cpp
-QT += testlib
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtestlib/tutorial4
INSTALLS += target
-
-QT += widgets
diff --git a/examples/qtestlib/tutorial5/tutorial5.pro b/examples/qtestlib/tutorial5/tutorial5.pro
index facb21ea14..8499fd2085 100644
--- a/examples/qtestlib/tutorial5/tutorial5.pro
+++ b/examples/qtestlib/tutorial5/tutorial5.pro
@@ -1,8 +1,7 @@
+QT += widgets testlib
+
SOURCES = benchmarking.cpp
-QT += testlib
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtestlib/tutorial5
INSTALLS += target
-
-QT += widgets
diff --git a/examples/threads/doc/src/mandelbrot.qdoc b/examples/threads/doc/src/mandelbrot.qdoc
index 842f4222ae..6ca0909f12 100644
--- a/examples/threads/doc/src/mandelbrot.qdoc
+++ b/examples/threads/doc/src/mandelbrot.qdoc
@@ -26,21 +26,23 @@
****************************************************************************/
/*!
- \example threads/mandelbrot
+ \example mandelbrot
\title Mandelbrot Example
+ \ingroup qtconcurrent-mtexamples
- The Mandelbrot example shows how to use a worker thread to
+ \brief The Mandelbrot example demonstrates multi-thread programming
+ using Qt. It shows how to use a worker thread to
perform heavy computations without blocking the main thread's
event loop.
+ \image mandelbrot-example.png Screenshot of the Mandelbrot example
+
The heavy computation here is the Mandelbrot set, probably the
world's most famous fractal. These days, while sophisticated
- programs such as \l{XaoS} that provide real-time zooming in the
+ programs such as \l{http://xaos.sourceforge.net/}{XaoS} that provide real-time zooming in the
Mandelbrot set, the standard Mandelbrot algorithm is just slow
enough for our purposes.
- \image mandelbrot-example.png Screenshot of the Mandelbrot example
-
In real life, the approach described here is applicable to a
large set of problems, including synchronous network I/O and
database access, where the user interface must remain responsive
diff --git a/examples/threads/doc/src/queuedcustomtype.qdoc b/examples/threads/doc/src/queuedcustomtype.qdoc
index a1f2d54a21..df825b2db3 100644
--- a/examples/threads/doc/src/queuedcustomtype.qdoc
+++ b/examples/threads/doc/src/queuedcustomtype.qdoc
@@ -26,10 +26,12 @@
****************************************************************************/
/*!
- \example threads/queuedcustomtype
+ \example queuedcustomtype
\title Queued Custom Type Example
+ \brief Demonstrates multi-thread programming using Qt
+ \ingroup qtconcurrent-mtexamples
- The Queued Custom Type example shows how to send custom types between
+ \brief The Queued Custom Type example shows how to send custom types between
threads with queued signals and slots.
\image queuedcustomtype-example.png
diff --git a/examples/threads/doc/src/semaphores.qdoc b/examples/threads/doc/src/semaphores.qdoc
index a712cb6414..4cfccf00f8 100644
--- a/examples/threads/doc/src/semaphores.qdoc
+++ b/examples/threads/doc/src/semaphores.qdoc
@@ -26,10 +26,12 @@
****************************************************************************/
/*!
- \example threads/semaphores
+ \example semaphores
\title Semaphores Example
+ \brief Demonstrates multi-thread programming using Qt
+ \ingroup qtconcurrent-mtexamples
- The Semaphores example shows how to use QSemaphore to control
+ \brief The Semaphores example shows how to use QSemaphore to control
access to a circular buffer shared by a producer thread and a
consumer thread.
diff --git a/examples/threads/doc/src/waitconditions.qdoc b/examples/threads/doc/src/waitconditions.qdoc
index 3ca1970685..6969e46491 100644
--- a/examples/threads/doc/src/waitconditions.qdoc
+++ b/examples/threads/doc/src/waitconditions.qdoc
@@ -26,10 +26,12 @@
****************************************************************************/
/*!
- \example threads/waitconditions
+ \example waitconditions
\title Wait Conditions Example
+ \brief Demonstrates multi-thread programming using Qt
+ \ingroup qtconcurrent-mtexamples
- The Wait Conditions example shows how to use QWaitCondition and
+ \brief The Wait Conditions example shows how to use QWaitCondition and
QMutex to control access to a circular buffer shared by a
producer thread and a consumer thread.
diff --git a/examples/threads/mandelbrot/mandelbrot.pro b/examples/threads/mandelbrot/mandelbrot.pro
index 08c320fff6..45f21baf08 100644
--- a/examples/threads/mandelbrot/mandelbrot.pro
+++ b/examples/threads/mandelbrot/mandelbrot.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = mandelbrotwidget.h \
renderthread.h
SOURCES = main.cpp \
@@ -9,5 +11,3 @@ unix:!mac:!vxworks:!integrity:LIBS += -lm
# install
target.path = $$[QT_INSTALL_EXAMPLES]/threads/mandelbrot
INSTALLS += target
-
-QT += widgets
diff --git a/examples/threads/mandelbrot/mandelbrotwidget.cpp b/examples/threads/mandelbrot/mandelbrotwidget.cpp
index c1ec029548..3a10a7a726 100644
--- a/examples/threads/mandelbrot/mandelbrotwidget.cpp
+++ b/examples/threads/mandelbrot/mandelbrotwidget.cpp
@@ -162,6 +162,7 @@ void MandelbrotWidget::keyPressEvent(QKeyEvent *event)
}
//! [11]
+#ifndef QT_NO_WHEELEVENT
//! [12]
void MandelbrotWidget::wheelEvent(QWheelEvent *event)
{
@@ -170,6 +171,7 @@ void MandelbrotWidget::wheelEvent(QWheelEvent *event)
zoom(pow(ZoomInFactor, numSteps));
}
//! [12]
+#endif
//! [13]
void MandelbrotWidget::mousePressEvent(QMouseEvent *event)
diff --git a/examples/threads/mandelbrot/mandelbrotwidget.h b/examples/threads/mandelbrot/mandelbrotwidget.h
index ea5fdc53c1..238a2bdca1 100644
--- a/examples/threads/mandelbrot/mandelbrotwidget.h
+++ b/examples/threads/mandelbrot/mandelbrotwidget.h
@@ -58,7 +58,9 @@ protected:
void paintEvent(QPaintEvent *event);
void resizeEvent(QResizeEvent *event);
void keyPressEvent(QKeyEvent *event);
+#ifndef QT_NO_WHEELEVENT
void wheelEvent(QWheelEvent *event);
+#endif
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
diff --git a/examples/threads/threads.pro b/examples/threads/threads.pro
index 027d4c2ebb..e47da84a06 100644
--- a/examples/threads/threads.pro
+++ b/examples/threads/threads.pro
@@ -4,4 +4,4 @@ CONFIG += no_docs_target
SUBDIRS = semaphores \
waitconditions
-!contains(QT_CONFIG, no-widgets):SUBDIRS += mandelbrot
+qtHaveModule(widgets): SUBDIRS += mandelbrot
diff --git a/examples/tools/contiguouscache/contiguouscache.pro b/examples/tools/contiguouscache/contiguouscache.pro
index 62cf862795..71130389be 100644
--- a/examples/tools/contiguouscache/contiguouscache.pro
+++ b/examples/tools/contiguouscache/contiguouscache.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = randomlistmodel.h
SOURCES = randomlistmodel.cpp \
main.cpp
@@ -5,7 +7,5 @@ SOURCES = randomlistmodel.cpp \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/tools/contiguouscache
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/tools/doc/textfinder.qdoc b/examples/tools/doc/textfinder.qdoc
deleted file mode 100644
index f958cf8623..0000000000
--- a/examples/tools/doc/textfinder.qdoc
+++ /dev/null
@@ -1,159 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Free Documentation License Usage
-** 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. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \example uitools/textfinder
- \title Text Finder Example
-
- \brief The Text Finder example demonstrates how to dynamically process forms
- using the QtUiTools module. Dynamic form processing enables a form to
- be processed at run-time only by changing the UI file for the project.
- The program allows the user to look up a particular word within the
- contents of a text file. This text file is included in the project's
- resource and is loaded into the display at startup.
-
- \table
- \row \li \inlineimage textfinder-example-find.png
- \li \inlineimage textfinder-example-find2.png
- \endtable
-
- \section1 Setting Up The Resource File
-
- The resources required for Text Finder are:
- \list
- \li \e{textfinder.ui} - the user interface file created in QtDesigner
- \li \e{input.txt} - a text file containing some text to be displayed
- in the QTextEdit
- \endlist
-
- \e{textfinder.ui} contains all the necessary QWidget objects for the
- Text Finder. A QLineEdit is used for the user input, a QTextEdit is
- used to display the contents of \e{input.txt}, a QLabel is used to
- display the text "Keyword", and a QPushButton is used for the "Find"
- button. The screenshot below shows the preview obtained in QtDesigner.
-
- \image textfinder-example-userinterface.png
-
- A \e{textfinder.qrc} file is used to store both the \e{textfinder.ui}
- and \e{input.txt} in the application's executable. The file contains
- the following code:
-
- \quotefile examples/uitools/textfinder/textfinder.qrc
-
- For more information on resource files, see \l{The Qt Resource System}.
-
- To generate a form at run-time, the example is linked against the
- QtUiTools module library. This is done in the \c{textfinder.pro} file
- that contains the following lines:
-
- \snippet doc/src/snippets/code/doc_src_examples_textfinder.pro 0
-
- \section1 TextFinder Class Definition
-
- The \c TextFinder class is a subclass of QWidget and it hosts the
- \l{QWidget}s we need to access in the user interface. The QLabel in the
- user interface is not declared here as we do not need to access it.
-
- \snippet examples/uitools/textfinder/textfinder.h 0
-
- The slot \c{on_findButton_clicked()} is a slot named according to the
- \l{Using a Designer UI File in Your Application#Automatic Connections}
- {Automatic Connection} naming convention required
- by \c uic.
-
- \section1 TextFinder Class Implementation
-
- The \c TextFinder class's constructor calls the \c loadUiFile() function
- and then uses \c qFindChild() to access the user interface's
- \l{QWidget}s.
-
- \snippet examples/uitools/textfinder/textfinder.cpp 0
-
- We then use QMetaObject's system to enable signal and slot connections.
-
- \snippet examples/uitools/textfinder/textfinder.cpp 2
-
- The loadTextFile() function is called to load \c{input.txt} into
- QTextEdit to displays its contents.
-
- \snippet examples/uitools/textfinder/textfinder.cpp 3a
-
- The \c{TextFinder}'s layout is set with \l{QWidget::}{setLayout()}.
-
- \snippet examples/uitools/textfinder/textfinder.cpp 3b
-
- Finally, the window title is set to \e {Text Finder} and \c isFirstTime is
- set to true.
-
- \c isFirstTime is used as a flag to indicate whether the search operation
- has been performed more than once. This is further explained with the
- \c{on_findButton_clicked()} function.
-
- The \c{loadUiFile()} function is used to load the user interface file
- previously created in QtDesigner. The QUiLoader class is instantiated
- and its \c load() function is used to load the form into \c{formWidget}
- that acts as a place holder for the user interface. The function then
- returns \c{formWidget} to its caller.
-
- \snippet examples/uitools/textfinder/textfinder.cpp 4
-
- As mentioned earlier, the loadTextFile() function loads \e{input.txt}
- into QTextEdit to display its contents. Data is read using QTextStream
- into a QString object, \c line with the QTextStream::readAll() function.
- The contents of \c line are then appended to \c{ui_textEdit}.
-
- \snippet examples/uitools/textfinder/textfinder.cpp 5
-
- The \c{on_findButton_clicked()} function is a slot that is connected to
- \c{ui_findButton}'s \c clicked() signal. The \c searchString is extracted
- from the \c ui_lineEdit and the \c document is extracted from \c textEdit.
- In event there is an empty \c searchString, a QMessageBox is used,
- requesting the user to enter a word. Otherwise, we traverse through the
- words in \c ui_textEdit, and highlight all ocurrences of the
- \c searchString . Two QTextCursor objects are used: One to traverse through
- the words in \c line and another to keep track of the edit blocks.
-
- \snippet examples/uitools/textfinder/textfinder.cpp 7
-
- The \c isFirstTime flag is set to false the moment \c findButton is
- clicked. This is necessary to undo the previous text highlight before
- highlighting the user's next search string. Also, the \c found flag
- is used to indicate if the \c searchString was found within the contents
- of \c ui_textEdit. If it was not found, a QMessageBox is used
- to inform the user.
-
- \snippet examples/uitools/textfinder/textfinder.cpp 9
-
- \section1 \c main() Function
-
- \snippet examples/uitools/textfinder/main.cpp 0
-
- The \c main() function initialises the \e{textfinder.qrc} resource file
- and instantiates as well as displays \c TextFinder.
-
- \sa {Calculator Builder Example}, {World Time Clock Builder Example}
- */
diff --git a/examples/touch/dials/dials.pro b/examples/touch/dials/dials.pro
index 0da1103432..aeba956892 100644
--- a/examples/touch/dials/dials.pro
+++ b/examples/touch/dials/dials.pro
@@ -1,10 +1,10 @@
+QT += widgets
+
SOURCES += main.cpp
FORMS += dials.ui
# install
target.path = $$[QT_INSTALL_EXAMPLES]/touch/dials
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/touch/dials/doc/images/touch-dials-example.png b/examples/touch/dials/doc/images/touch-dials-example.png
new file mode 100644
index 0000000000..60e1776fc3
--- /dev/null
+++ b/examples/touch/dials/doc/images/touch-dials-example.png
Binary files differ
diff --git a/examples/touch/dials/doc/src/touch-dials.qdoc b/examples/touch/dials/doc/src/touch-dials.qdoc
new file mode 100644
index 0000000000..c18d068e3f
--- /dev/null
+++ b/examples/touch/dials/doc/src/touch-dials.qdoc
@@ -0,0 +1,38 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** 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. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example touch/dials
+ \title Touch Dials Example
+ \ingroup touchinputexamples
+ \brief Shows how to apply touch to a set of standard Qt widgets
+
+ The Touch Dials example shows how to apply touch to a set of
+ standard Qt widgets.
+
+ \image touch-dials-example.png
+*/
diff --git a/examples/touch/fingerpaint/fingerpaint.pro b/examples/touch/fingerpaint/fingerpaint.pro
index a9083b39ca..5391897af7 100644
--- a/examples/touch/fingerpaint/fingerpaint.pro
+++ b/examples/touch/fingerpaint/fingerpaint.pro
@@ -1,3 +1,6 @@
+QT += widgets
+qtHaveModule(printsupport): QT += printsupport
+
HEADERS = mainwindow.h \
scribblearea.h
SOURCES = main.cpp \
@@ -8,7 +11,4 @@ SOURCES = main.cpp \
target.path = $$[QT_INSTALL_EXAMPLES]/touch/fingerpaint
INSTALLS += target
-QT += widgets
-!isEmpty(QT.printsupport.name): QT += printsupport
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/touch/knobs/doc/images/touch-knobs-example.png b/examples/touch/knobs/doc/images/touch-knobs-example.png
new file mode 100644
index 0000000000..1cbd90d101
--- /dev/null
+++ b/examples/touch/knobs/doc/images/touch-knobs-example.png
Binary files differ
diff --git a/examples/touch/knobs/doc/src/touch-knobs.qdoc b/examples/touch/knobs/doc/src/touch-knobs.qdoc
new file mode 100644
index 0000000000..548b0bad05
--- /dev/null
+++ b/examples/touch/knobs/doc/src/touch-knobs.qdoc
@@ -0,0 +1,38 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** 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. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example touch/knobs
+ \title Touch Knobs Example
+ \ingroup touchinputexamples
+ \brief Shows how to create custom controls that accept touch input
+
+ The Touch Knobs example shows how to create custom controls that
+ accept touch input.
+
+ \image touch-knobs-example.png
+*/
diff --git a/examples/touch/knobs/knobs.pro b/examples/touch/knobs/knobs.pro
index 7540a4b2cf..6a10a0776f 100644
--- a/examples/touch/knobs/knobs.pro
+++ b/examples/touch/knobs/knobs.pro
@@ -1,10 +1,10 @@
+QT += widgets
+
HEADERS = knob.h
SOURCES = main.cpp knob.cpp
# install
target.path = $$[QT_INSTALL_EXAMPLES]/touch/knobs
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/touch/pinchzoom/pinchzoom.pro b/examples/touch/pinchzoom/pinchzoom.pro
index df7ce246c3..5c101b2f5c 100644
--- a/examples/touch/pinchzoom/pinchzoom.pro
+++ b/examples/touch/pinchzoom/pinchzoom.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS += \
mouse.h \
graphicsview.h
@@ -12,7 +14,5 @@ RESOURCES += \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/touch/pinchzoom
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/webkit/webkit-guide/webkit-guide.pro b/examples/webkit/webkit-guide/webkit-guide.pro
index 6614b6d52c..a2c2dd4a20 100644
--- a/examples/webkit/webkit-guide/webkit-guide.pro
+++ b/examples/webkit/webkit-guide/webkit-guide.pro
@@ -254,5 +254,3 @@ js/form_tapper.js \
js/mob_condjs.js \
js/mobile.js \
js/storage.js \
-
-QT += widgets
diff --git a/examples/widgets/animation/animatedtiles/animatedtiles.pro b/examples/widgets/animation/animatedtiles/animatedtiles.pro
index c4e2553224..04c2b8f3d0 100644
--- a/examples/widgets/animation/animatedtiles/animatedtiles.pro
+++ b/examples/widgets/animation/animatedtiles/animatedtiles.pro
@@ -1,8 +1,8 @@
+QT += widgets
+
SOURCES = main.cpp
RESOURCES = animatedtiles.qrc
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/animation/animatedtiles
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/animation/animation.pro b/examples/widgets/animation/animation.pro
index 575fed4ead..a13f8bb65a 100644
--- a/examples/widgets/animation/animation.pro
+++ b/examples/widgets/animation/animation.pro
@@ -8,5 +8,3 @@ SUBDIRS += \
states \
stickman \
sub-attaq \
-
-QT += widgets
diff --git a/examples/widgets/animation/appchooser/appchooser.pro b/examples/widgets/animation/appchooser/appchooser.pro
index 8560db2c4c..674e623b2d 100644
--- a/examples/widgets/animation/appchooser/appchooser.pro
+++ b/examples/widgets/animation/appchooser/appchooser.pro
@@ -1,8 +1,8 @@
+QT += widgets
+
SOURCES = main.cpp
RESOURCES = appchooser.qrc
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/animation/appchooser
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/animation/easing/easing.pro b/examples/widgets/animation/easing/easing.pro
index 0e430df1ba..498180c0bb 100644
--- a/examples/widgets/animation/easing/easing.pro
+++ b/examples/widgets/animation/easing/easing.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = window.h \
animation.h
SOURCES = main.cpp \
@@ -10,6 +12,3 @@ RESOURCES = easing.qrc
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/animation/easing
INSTALLS += target
-
-QT += widgets
-
diff --git a/examples/widgets/animation/moveblocks/moveblocks.pro b/examples/widgets/animation/moveblocks/moveblocks.pro
index 2992315064..1397246b3f 100644
--- a/examples/widgets/animation/moveblocks/moveblocks.pro
+++ b/examples/widgets/animation/moveblocks/moveblocks.pro
@@ -1,7 +1,7 @@
+QT += widgets
+
SOURCES = main.cpp
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/animation/moveblocks
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/animation/states/states.pro b/examples/widgets/animation/states/states.pro
index 563160ce9f..491d557a8d 100644
--- a/examples/widgets/animation/states/states.pro
+++ b/examples/widgets/animation/states/states.pro
@@ -1,8 +1,8 @@
+QT += widgets
+
SOURCES += main.cpp
RESOURCES += states.qrc
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/animation/states
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/animation/stickman/stickman.pro b/examples/widgets/animation/stickman/stickman.pro
index 145a9a18f9..a803acf624 100644
--- a/examples/widgets/animation/stickman/stickman.pro
+++ b/examples/widgets/animation/stickman/stickman.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS += stickman.h \
animation.h \
node.h \
@@ -17,5 +19,3 @@ RESOURCES += stickman.qrc
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/animation/stickman
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/animation/sub-attaq/sub-attaq.pro b/examples/widgets/animation/sub-attaq/sub-attaq.pro
index 3ed823d1e6..ac79fd4249 100644
--- a/examples/widgets/animation/sub-attaq/sub-attaq.pro
+++ b/examples/widgets/animation/sub-attaq/sub-attaq.pro
@@ -1,5 +1,5 @@
QT += widgets
-contains(QT_CONFIG, opengl):QT += opengl
+qtHaveModule(opengl): QT += opengl
HEADERS += boat.h \
bomb.h \
mainwindow.h \
diff --git a/examples/widgets/desktop/desktop.pro b/examples/widgets/desktop/desktop.pro
index 5da59599d4..db518c1c7a 100644
--- a/examples/widgets/desktop/desktop.pro
+++ b/examples/widgets/desktop/desktop.pro
@@ -1,5 +1,3 @@
TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS = screenshot systray
-
-QT += widgets
diff --git a/examples/widgets/desktop/screenshot/screenshot.pro b/examples/widgets/desktop/screenshot/screenshot.pro
index 31ea646af0..f12bc82ca7 100644
--- a/examples/widgets/desktop/screenshot/screenshot.pro
+++ b/examples/widgets/desktop/screenshot/screenshot.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = screenshot.h
SOURCES = main.cpp \
screenshot.cpp
@@ -6,5 +8,4 @@ SOURCES = main.cpp \
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/desktop/screenshot
INSTALLS += target
-QT += widgets
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/desktop/systray/main.cpp b/examples/widgets/desktop/systray/main.cpp
index bb81bb78e4..ece04524b8 100644
--- a/examples/widgets/desktop/systray/main.cpp
+++ b/examples/widgets/desktop/systray/main.cpp
@@ -39,8 +39,10 @@
****************************************************************************/
#include <QApplication>
-#include <QMessageBox>
+#ifndef QT_NO_SYSTEMTRAYICON
+
+#include <QMessageBox>
#include "window.h"
int main(int argc, char *argv[])
@@ -61,3 +63,24 @@ int main(int argc, char *argv[])
window.show();
return app.exec();
}
+
+#else
+
+#include <QLabel>
+#include <QDebug>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QString text("QSystemTrayIcon is not supported on this platform");
+
+ QLabel *label = new QLabel(text);
+ label->setWordWrap(true);
+
+ label->show();
+ qDebug() << text;
+
+ app.exec();
+}
+
+#endif
diff --git a/examples/widgets/desktop/systray/window.cpp b/examples/widgets/desktop/systray/window.cpp
index 8de1f5843e..a7ea3b471e 100644
--- a/examples/widgets/desktop/systray/window.cpp
+++ b/examples/widgets/desktop/systray/window.cpp
@@ -39,6 +39,9 @@
****************************************************************************/
#include "window.h"
+
+#ifndef QT_NO_SYSTEMTRAYICON
+
#include <QtGui>
#include <QAction>
@@ -265,3 +268,5 @@ void Window::createTrayIcon()
trayIcon = new QSystemTrayIcon(this);
trayIcon->setContextMenu(trayIconMenu);
}
+
+#endif
diff --git a/examples/widgets/desktop/systray/window.h b/examples/widgets/desktop/systray/window.h
index 2c33812778..08919e8a49 100644
--- a/examples/widgets/desktop/systray/window.h
+++ b/examples/widgets/desktop/systray/window.h
@@ -42,6 +42,9 @@
#define WINDOW_H
#include <QSystemTrayIcon>
+
+#ifndef QT_NO_SYSTEMTRAYICON
+
#include <QDialog>
QT_BEGIN_NAMESPACE
@@ -109,4 +112,6 @@ private:
};
//! [0]
+#endif // QT_NO_SYSTEMTRAYICON
+
#endif
diff --git a/examples/widgets/dialogs/classwizard/classwizard.pro b/examples/widgets/dialogs/classwizard/classwizard.pro
index 9b272b9d3f..5226b38b7c 100644
--- a/examples/widgets/dialogs/classwizard/classwizard.pro
+++ b/examples/widgets/dialogs/classwizard/classwizard.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = classwizard.h
SOURCES = classwizard.cpp \
main.cpp
@@ -7,5 +9,4 @@ RESOURCES = classwizard.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/dialogs/classwizard
INSTALLS += target
-QT += widgets
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/dialogs/classwizard/main.cpp b/examples/widgets/dialogs/classwizard/main.cpp
index ec95d9d8d3..55fdf0fbb6 100644
--- a/examples/widgets/dialogs/classwizard/main.cpp
+++ b/examples/widgets/dialogs/classwizard/main.cpp
@@ -51,11 +51,13 @@ int main(int argc, char *argv[])
QApplication app(argc, argv);
+#ifndef QT_NO_TRANSLATION
QString translatorFileName = QLatin1String("qt_");
translatorFileName += QLocale::system().name();
QTranslator *translator = new QTranslator(&app);
if (translator->load(translatorFileName, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
app.installTranslator(translator);
+#endif
ClassWizard wizard;
wizard.show();
diff --git a/examples/widgets/dialogs/configdialog/configdialog.pro b/examples/widgets/dialogs/configdialog/configdialog.pro
index 616b5fd650..6e5b1e2725 100644
--- a/examples/widgets/dialogs/configdialog/configdialog.pro
+++ b/examples/widgets/dialogs/configdialog/configdialog.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = configdialog.h \
pages.h
SOURCES = configdialog.cpp \
@@ -11,5 +13,4 @@ INSTALLS += target
wince50standard-x86-msvc2005: LIBS += libcmt.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib ws2.lib
-QT += widgets
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/dialogs/configdialog/main.cpp b/examples/widgets/dialogs/configdialog/main.cpp
index 20a2709a1e..b23c64a56f 100644
--- a/examples/widgets/dialogs/configdialog/main.cpp
+++ b/examples/widgets/dialogs/configdialog/main.cpp
@@ -47,6 +47,7 @@ int main(int argc, char *argv[])
Q_INIT_RESOURCE(configdialog);
QApplication app(argc, argv);
+ app.setApplicationDisplayName("Qt Example");
ConfigDialog dialog;
return dialog.exec();
}
diff --git a/examples/widgets/dialogs/dialogs.pro b/examples/widgets/dialogs/dialogs.pro
index 0a4922eeaf..c31c37222d 100644
--- a/examples/widgets/dialogs/dialogs.pro
+++ b/examples/widgets/dialogs/dialogs.pro
@@ -11,5 +11,3 @@ SUBDIRS = classwizard \
contains(DEFINES, QT_NO_WIZARD): SUBDIRS -= trivialwizard licensewizard classwizard
wince*: SUBDIRS += sipdialog
-
-QT += widgets
diff --git a/examples/widgets/dialogs/extension/extension.pro b/examples/widgets/dialogs/extension/extension.pro
index e7cf493128..327eeff1f3 100644
--- a/examples/widgets/dialogs/extension/extension.pro
+++ b/examples/widgets/dialogs/extension/extension.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = finddialog.h
SOURCES = finddialog.cpp \
main.cpp
@@ -6,5 +8,4 @@ SOURCES = finddialog.cpp \
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/dialogs/extension
INSTALLS += target
-QT += widgets
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/dialogs/findfiles/findfiles.pro b/examples/widgets/dialogs/findfiles/findfiles.pro
index f02ec69e4c..2dd058ac5c 100644
--- a/examples/widgets/dialogs/findfiles/findfiles.pro
+++ b/examples/widgets/dialogs/findfiles/findfiles.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = window.h
SOURCES = main.cpp \
window.cpp
@@ -5,5 +7,3 @@ SOURCES = main.cpp \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/dialogs/findfiles
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/dialogs/licensewizard/licensewizard.pro b/examples/widgets/dialogs/licensewizard/licensewizard.pro
index 4bcfdad384..8a4b251737 100644
--- a/examples/widgets/dialogs/licensewizard/licensewizard.pro
+++ b/examples/widgets/dialogs/licensewizard/licensewizard.pro
@@ -1,3 +1,5 @@
+QT += widgets printsupport
+
HEADERS = licensewizard.h
SOURCES = licensewizard.cpp \
main.cpp
@@ -7,5 +9,4 @@ RESOURCES = licensewizard.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/dialogs/licensewizard
INSTALLS += target
-QT += widgets printsupport
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/dialogs/licensewizard/main.cpp b/examples/widgets/dialogs/licensewizard/main.cpp
index 9217d4f49e..a84c6241d4 100644
--- a/examples/widgets/dialogs/licensewizard/main.cpp
+++ b/examples/widgets/dialogs/licensewizard/main.cpp
@@ -51,12 +51,14 @@ int main(int argc, char *argv[])
QApplication app(argc, argv);
+#ifndef QT_NO_TRANSLATION
QString translatorFileName = QLatin1String("qt_");
translatorFileName += QLocale::system().name();
QTranslator *translator = new QTranslator(&app);
if (translator->load(translatorFileName, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
app.installTranslator(translator);
-
+#endif
+
LicenseWizard wizard;
wizard.show();
return app.exec();
diff --git a/examples/widgets/dialogs/sipdialog/sipdialog.pro b/examples/widgets/dialogs/sipdialog/sipdialog.pro
index 5e24335e8c..a7c82a0ebc 100644
--- a/examples/widgets/dialogs/sipdialog/sipdialog.pro
+++ b/examples/widgets/dialogs/sipdialog/sipdialog.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = dialog.h
SOURCES = main.cpp \
dialog.cpp
@@ -8,6 +10,4 @@ INSTALLS += target
wince50standard-x86-msvc2005: LIBS += libcmt.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib ws2.lib
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/dialogs/standarddialogs/main.cpp b/examples/widgets/dialogs/standarddialogs/main.cpp
index 15f18d7af1..96863e3aab 100644
--- a/examples/widgets/dialogs/standarddialogs/main.cpp
+++ b/examples/widgets/dialogs/standarddialogs/main.cpp
@@ -49,11 +49,13 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
+#ifndef QT_NO_TRANSLATION
QString translatorFileName = QLatin1String("qt_");
translatorFileName += QLocale::system().name();
QTranslator *translator = new QTranslator(&app);
if (translator->load(translatorFileName, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
app.installTranslator(translator);
+#endif
Dialog dialog;
dialog.show();
diff --git a/examples/widgets/dialogs/standarddialogs/standarddialogs.pro b/examples/widgets/dialogs/standarddialogs/standarddialogs.pro
index 89d0ad9a39..12a814cb69 100644
--- a/examples/widgets/dialogs/standarddialogs/standarddialogs.pro
+++ b/examples/widgets/dialogs/standarddialogs/standarddialogs.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = dialog.h
SOURCES = dialog.cpp \
main.cpp
@@ -7,5 +9,3 @@ target.path = $$[QT_INSTALL_EXAMPLES]/widgets/dialogs/standarddialogs
INSTALLS += target
wince50standard-x86-msvc2005: LIBS += libcmt.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib ws2.lib
-
-QT += widgets
diff --git a/examples/widgets/dialogs/tabdialog/tabdialog.pro b/examples/widgets/dialogs/tabdialog/tabdialog.pro
index 656c661844..c282505ac1 100644
--- a/examples/widgets/dialogs/tabdialog/tabdialog.pro
+++ b/examples/widgets/dialogs/tabdialog/tabdialog.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = tabdialog.h
SOURCES = main.cpp \
tabdialog.cpp
@@ -7,4 +9,3 @@ target.path = $$[QT_INSTALL_EXAMPLES]/widgets/dialogs/tabdialog
INSTALLS += target
wince50standard-x86-msvc2005: LIBS += libcmt.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib ws2.lib
-QT += widgets
diff --git a/examples/widgets/dialogs/trivialwizard/trivialwizard.cpp b/examples/widgets/dialogs/trivialwizard/trivialwizard.cpp
index a49e17e104..f302c0e390 100644
--- a/examples/widgets/dialogs/trivialwizard/trivialwizard.cpp
+++ b/examples/widgets/dialogs/trivialwizard/trivialwizard.cpp
@@ -115,12 +115,13 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
+#ifndef QT_NO_TRANSLATION
QString translatorFileName = QLatin1String("qt_");
translatorFileName += QLocale::system().name();
QTranslator *translator = new QTranslator(&app);
if (translator->load(translatorFileName, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
app.installTranslator(translator);
-
+#endif
QWizard wizard;
wizard.addPage(createIntroPage());
diff --git a/examples/widgets/dialogs/trivialwizard/trivialwizard.pro b/examples/widgets/dialogs/trivialwizard/trivialwizard.pro
index 63831e8576..d85826132c 100644
--- a/examples/widgets/dialogs/trivialwizard/trivialwizard.pro
+++ b/examples/widgets/dialogs/trivialwizard/trivialwizard.pro
@@ -1,8 +1,9 @@
+QT += widgets
+
SOURCES = trivialwizard.cpp
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/dialogs/trivialwizard
INSTALLS += target
-QT += widgets
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/doc/images/calendar-example.png b/examples/widgets/doc/images/calendar-example.png
new file mode 100644
index 0000000000..895ce76b09
--- /dev/null
+++ b/examples/widgets/doc/images/calendar-example.png
Binary files differ
diff --git a/examples/widgets/doc/images/collidingmice-example.png b/examples/widgets/doc/images/collidingmice-example.png
new file mode 100644
index 0000000000..41561de394
--- /dev/null
+++ b/examples/widgets/doc/images/collidingmice-example.png
Binary files differ
diff --git a/examples/widgets/doc/images/graphicsanchorlayout-example.png b/examples/widgets/doc/images/graphicsanchorlayout-example.png
new file mode 100644
index 0000000000..d30d6839d9
--- /dev/null
+++ b/examples/widgets/doc/images/graphicsanchorlayout-example.png
Binary files differ
diff --git a/examples/widgets/doc/images/graphicsflowlayout-example.png b/examples/widgets/doc/images/graphicsflowlayout-example.png
new file mode 100644
index 0000000000..a5f9b3dc40
--- /dev/null
+++ b/examples/widgets/doc/images/graphicsflowlayout-example.png
Binary files differ
diff --git a/examples/widgets/doc/images/graphicssimpleanchorlayout-example.png b/examples/widgets/doc/images/graphicssimpleanchorlayout-example.png
new file mode 100644
index 0000000000..d073b12c0c
--- /dev/null
+++ b/examples/widgets/doc/images/graphicssimpleanchorlayout-example.png
Binary files differ
diff --git a/examples/widgets/doc/images/itemviews-editabletreemodel.png b/examples/widgets/doc/images/itemviews-editabletreemodel.png
new file mode 100644
index 0000000000..a151ea857f
--- /dev/null
+++ b/examples/widgets/doc/images/itemviews-editabletreemodel.png
Binary files differ
diff --git a/examples/widgets/doc/images/orderform-example.png b/examples/widgets/doc/images/orderform-example.png
new file mode 100644
index 0000000000..c8545ad23a
--- /dev/null
+++ b/examples/widgets/doc/images/orderform-example.png
Binary files differ
diff --git a/examples/widgets/doc/images/textedit-demo.png b/examples/widgets/doc/images/textedit-demo.png
new file mode 100644
index 0000000000..3cf2883a12
--- /dev/null
+++ b/examples/widgets/doc/images/textedit-demo.png
Binary files differ
diff --git a/examples/widgets/doc/images/textfinder-example-userinterface.png b/examples/widgets/doc/images/textfinder-example-userinterface.png
deleted file mode 100644
index 2bebe2e9dd..0000000000
--- a/examples/widgets/doc/images/textfinder-example-userinterface.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/doc/images/weatheranchorlayout-example.png b/examples/widgets/doc/images/weatheranchorlayout-example.png
new file mode 100644
index 0000000000..59d3b55b7a
--- /dev/null
+++ b/examples/widgets/doc/images/weatheranchorlayout-example.png
Binary files differ
diff --git a/examples/widgets/doc/src/addressbook.qdoc b/examples/widgets/doc/src/addressbook.qdoc
index 65ed4b33bd..4712bf94ad 100644
--- a/examples/widgets/doc/src/addressbook.qdoc
+++ b/examples/widgets/doc/src/addressbook.qdoc
@@ -28,7 +28,7 @@
/*!
\example itemviews/addressbook
\title Address Book Example
-
+ \ingroup examples-itemviews
\brief The address book example shows how to use proxy models to display
different views onto data from a single model.
diff --git a/examples/widgets/doc/src/application.qdoc b/examples/widgets/doc/src/application.qdoc
index bd0f8fd09f..e6c135e138 100644
--- a/examples/widgets/doc/src/application.qdoc
+++ b/examples/widgets/doc/src/application.qdoc
@@ -28,6 +28,7 @@
/*!
\example mainwindows/application
\title Application Example
+ \ingroup examples-mainwindow
\brief The Application example shows how to implement a standard GUI
application with menus, toolbars, and a status bar. The example
diff --git a/examples/widgets/doc/src/basicgraphicslayouts.qdoc b/examples/widgets/doc/src/basicgraphicslayouts.qdoc
index 36ce914018..70f92a838a 100644
--- a/examples/widgets/doc/src/basicgraphicslayouts.qdoc
+++ b/examples/widgets/doc/src/basicgraphicslayouts.qdoc
@@ -28,8 +28,10 @@
/*!
\example graphicsview/basicgraphicslayouts
\title Basic Graphics Layouts Example
+ \ingroup examples-graphicsview-layout
+ \brief Demonstrates how to create basic graphics layout
- \brief The Basic Graphics Layouts example shows how to use the layout classes
+ The Basic Graphics Layouts example shows how to use the layout classes
in QGraphicsView: QGraphicsLinearLayout and QGraphicsGridLayout.
In addition to that it shows how to write your own custom layout item.
diff --git a/examples/widgets/doc/src/basicsortfiltermodel.qdoc b/examples/widgets/doc/src/basicsortfiltermodel.qdoc
index f9a3b94ba6..16f9fa61a2 100644
--- a/examples/widgets/doc/src/basicsortfiltermodel.qdoc
+++ b/examples/widgets/doc/src/basicsortfiltermodel.qdoc
@@ -28,7 +28,7 @@
/*!
\example itemviews/basicsortfiltermodel
\title Basic Sort/Filter Model Example
-
+ \ingroup examples-itemviews
\brief The Basic Sort/Filter Model example illustrates how to use
QSortFilterProxyModel to perform basic sorting and filtering.
diff --git a/examples/widgets/doc/src/blurpicker.qdoc b/examples/widgets/doc/src/blurpicker.qdoc
index aa89ba3cd8..06426c2ab3 100644
--- a/examples/widgets/doc/src/blurpicker.qdoc
+++ b/examples/widgets/doc/src/blurpicker.qdoc
@@ -28,6 +28,8 @@
/*!
\example effects/blurpicker
\title Blur Picker Effect Example
+ \ingroup examples-graphicsview-graphicseffects
+ \brief Demonstrates how to apply graphical effects on items in the view
\image blurpickereffect-example.png
*/
diff --git a/examples/widgets/doc/src/boxes.qdoc b/examples/widgets/doc/src/boxes.qdoc
index 96238f1efd..6ad50fff9f 100644
--- a/examples/widgets/doc/src/boxes.qdoc
+++ b/examples/widgets/doc/src/boxes.qdoc
@@ -28,9 +28,8 @@
/*!
\example graphicsview/boxes
\title Boxes
-
- \brief This demo shows Qt's ability to combine advanced OpenGL rendering with the
- the \l{Graphics View Framework}.
+ \ingroup examples-graphicsview
+ \brief Combines advanced OpenGL rendering with the Graphics View framework
\image boxes-demo.png
diff --git a/examples/widgets/doc/src/chart.qdoc b/examples/widgets/doc/src/chart.qdoc
index d12ee58422..a3b54f5328 100644
--- a/examples/widgets/doc/src/chart.qdoc
+++ b/examples/widgets/doc/src/chart.qdoc
@@ -28,7 +28,7 @@
/*!
\example itemviews/chart
\title Chart Example
-
+ \ingroup examples-itemviews
\brief The Chart example shows how to create a custom view for the model/view framework.
\image chart-example.png
diff --git a/examples/widgets/doc/src/chip.qdoc b/examples/widgets/doc/src/chip.qdoc
index aa31227e43..6fd15ac09c 100644
--- a/examples/widgets/doc/src/chip.qdoc
+++ b/examples/widgets/doc/src/chip.qdoc
@@ -28,9 +28,10 @@
/*!
\example graphicsview/chip
\title 40000 Chips
+ \ingroup examples-graphicsview
+ \brief Visualizes a huge graphic view scene with 40000 chip items
- \brief This demo shows how to visualize a huge scene with 40000 chip items
- using Graphics View. It also shows Graphics View's powerful navigation
+ This examples demonstrates Graphics View's powerful navigation
and interaction features, allowing you to zoom and rotate each of four
views independently, and you can select and move items around the scene.
diff --git a/examples/widgets/doc/src/classwizard.qdoc b/examples/widgets/doc/src/classwizard.qdoc
index 038f9e19b2..b4224a182f 100644
--- a/examples/widgets/doc/src/classwizard.qdoc
+++ b/examples/widgets/doc/src/classwizard.qdoc
@@ -28,6 +28,7 @@
/*!
\example dialogs/classwizard
\title Class Wizard Example
+ \ingroup examples-dialogs
\brief The License Wizard example shows how to implement linear
wizards using QWizard.
diff --git a/examples/widgets/doc/src/collidingmice-example.qdoc b/examples/widgets/doc/src/collidingmice-example.qdoc
new file mode 100644
index 0000000000..b6187677b8
--- /dev/null
+++ b/examples/widgets/doc/src/collidingmice-example.qdoc
@@ -0,0 +1,273 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** 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. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example graphicsview/collidingmice
+ \title Colliding Mice Example
+ \brief Demonstrates how to animate items on a graphics view
+ \ingroup examples-graphicsview
+
+ The Colliding Mice example shows how to use the Graphics View
+ framework to implement animated items and detect collision between
+ items.
+
+ \image collidingmice-example.png
+
+ Graphics View provides the QGraphicsScene class for managing and
+ interacting with a large number of custom-made 2D graphical items
+ derived from the QGraphicsItem class, and a QGraphicsView widget
+ for visualizing the items, with support for zooming and rotation.
+
+ The example consists of an item class and a main function:
+ the \c Mouse class represents the individual mice extending
+ QGraphicsItem, and the \c main() function provides the main
+ application window.
+
+ We will first review the \c Mouse class to see how to animate
+ items and detect item collision, and then we will review the \c
+ main() function to see how to put the items into a scene and how to
+ implement the corresponding view.
+
+ \section1 Mouse Class Definition
+
+ The \c mouse class inherits from QGraphicsItem. The
+ QGraphicsItem class is the base class for all graphical items in
+ the Graphics View framework, and provides a light-weight
+ foundation for writing your own custom items.
+
+ \snippet graphicsview/collidingmice/mouse.h 0
+
+ When writing a custom graphics item, you must implement
+ QGraphicsItem's two pure virtual public functions: \l
+ {QGraphicsItem::}{boundingRect()}, which returns an estimate of
+ the area painted by the item, and \l {QGraphicsItem::}{paint()},
+ which implements the actual painting. In addition, we reimplement
+ the \l {QGraphicsItem::}{shape()} and \l {QGraphicsItem::}{advance()}.
+ We reimplement \l {QGraphicsItem::}{shape()} to return an accurate
+ shape of our mouse item; the default implementation simply returns
+ the item's bounding rectangle. We reimplement \l {QGraphicsItem::}{advance()}
+ to handle the animation so it all happens on one update.
+
+ \section1 Mouse Class Definition
+
+ When constructing a mouse item, we first ensure that all the item's
+ private variables are properly initialized:
+
+ \snippet graphicsview/collidingmice/mouse.cpp 0
+
+ To calculate the various components of the mouse's color, we use
+ the global qrand() function which is a thread-safe version of the
+ standard C++ rand() function.
+
+ Then we call the \l {QGraphicsItem::setRotation()}{setRotation()} function
+ inherited from QGraphicsItem. Items live in their own local
+ coordinate system. Their coordinates are usually centered around
+ (0, 0), and this is also the center for all transformations. By
+ calling the item's \l {QGraphicsItem::setRotation()}{setRotation()} function
+ we alter the direction in which the mouse will start moving.
+
+ When the QGraphicsScene decides to advance the scene a frame it will
+ call QGraphicsItem::advance() on each of the items. This enables us to
+ animate our mouse using our reimplementation of the advance() function.
+
+ \snippet graphicsview/collidingmice/mouse.cpp 4
+ \snippet graphicsview/collidingmice/mouse.cpp 5
+ \snippet graphicsview/collidingmice/mouse.cpp 6
+
+ First, we don't bother doing any advance if the step is 0 since we want to our advance in
+ the actual advance (advance() is called twice, once with step == 0 indicating that items
+ are about to advance and with step == 1 for the actual advance). We also ensure that the
+ mice stays within a circle with a radius of 150 pixels.
+
+ Note the \l {QGraphicsItem::mapFromScene()}{mapFromScene()}
+ function provided by QGraphicsItem. This function maps a position
+ given in \e scene coordinates, to the item's coordinate system.
+
+ \snippet graphicsview/collidingmice/mouse.cpp 7
+ \snippet graphicsview/collidingmice/mouse.cpp 8
+ \snippet graphicsview/collidingmice/mouse.cpp 9
+ \codeline
+ \snippet graphicsview/collidingmice/mouse.cpp 10
+
+ Then we try to avoid colliding with other mice.
+
+ \snippet graphicsview/collidingmice/mouse.cpp 11
+
+ Finally, we calculate the mouse's speed and its eye direction (for
+ use when painting the mouse), and set its new position.
+
+ The position of an item describes its origin (local coordinate (0,
+ 0)) in the parent coordinates. The \l {QGraphicsItem::setPos()}
+ function sets the position of the item to the given position in
+ the parent's coordinate system. For items with no parent, the
+ given position is interpreted as scene coordinates. QGraphicsItem
+ also provides a \l {QGraphicsItem::}{mapToParent()} function to
+ map a position given in item coordinates, to the parent's
+ coordinate system. If the item has no parent, the position will be
+ mapped to the scene's coordinate system instead.
+
+ Then it is time to provide an implementation for the pure virtual
+ functions inherited from QGraphicsItem. Let's first take a look at
+ the \l {QGraphicsItem::}{boundingRect()} function:
+
+ \snippet graphicsview/collidingmice/mouse.cpp 1
+
+ The \l {QGraphicsItem::boundingRect()}{boundingRect()} function
+ defines the outer bounds of the item as a rectangle. Note that the
+ Graphics View framework uses the bounding rectangle to determine
+ whether the item requires redrawing, so all painting must be
+ restricted inside this rectangle.
+
+ \snippet graphicsview/collidingmice/mouse.cpp 3
+
+ The Graphics View framework calls the \l
+ {QGraphicsItem::paint()}{paint()} function to paint the contents
+ of the item; the function paints the item in local coordinates.
+
+ Note the painting of the ears: Whenever a mouse item collides with
+ other mice items its ears are filled with red; otherwise they are
+ filled with dark yellow. We use the
+ QGraphicsScene::collidingItems() function to check if there are
+ any colliding mice. The actual collision detection is handled by
+ the Graphics View framework using shape-shape intersection. All we
+ have to do is to ensure that the QGraphicsItem::shape() function
+ returns an accurate shape for our item:
+
+ \snippet graphicsview/collidingmice/mouse.cpp 2
+
+ Because the complexity of arbitrary shape-shape intersection grows
+ with an order of magnitude when the shapes are complex, this
+ operation can be noticably time consuming. An alternative approach
+ is to reimplement the \l
+ {QGraphicsItem::collidesWithItem()}{collidesWithItem()} function
+ to provide your own custom item and shape collision algorithm.
+
+ This completes the \c Mouse class implementation, it is now ready
+ for use. Let's take a look at the \c main() function to see how to
+ implement a scene for the mice and a view for displaying the
+ contents of the scene.
+
+ \section1 The Main() Function
+
+ In this example we have chosen to let the \c main() function
+ provide the main application window, creating the items and the
+ scene, putting the items into the scene and creating a
+ corresponding view.
+
+ \snippet graphicsview/collidingmice/main.cpp 0
+
+ First, we create an application object and call the global
+ qsrand() function to specify the seed used to generate a new
+ random number sequence of pseudo random integers with the
+ previously mentioned qrand() function.
+
+ Then it is time to create the scene:
+
+ \snippet graphicsview/collidingmice/main.cpp 1
+
+ The QGraphicsScene class serves as a container for
+ QGraphicsItems. It also provides functionality that lets you
+ efficiently determine the location of items as well as determining
+ which items that are visible within an arbitrary area on the
+ scene.
+
+ When creating a scene it is recommended to set the scene's
+ rectangle, i.e., the rectangle that defines the extent of the
+ scene. It is primarily used by QGraphicsView to determine the
+ view's default scrollable area, and by QGraphicsScene to manage
+ item indexing. If not explicitly set, the scene's default
+ rectangle will be the largest bounding rectangle of all the items
+ on the scene since the scene was created (i.e., the rectangle will
+ grow when items are added or moved in the scene, but it will never
+ shrink).
+
+ \snippet graphicsview/collidingmice/main.cpp 2
+
+ The item index function is used to speed up item discovery. \l
+ {QGraphicsScene::NoIndex}{NoIndex} implies that item location is
+ of linear complexity, as all items on the scene are
+ searched. Adding, moving and removing items, however, is done in
+ constant time. This approach is ideal for dynamic scenes, where
+ many items are added, moved or removed continuously. The
+ alternative is \l {QGraphicsScene::BspTreeIndex}{BspTreeIndex}
+ which makes use of binary search resulting in item location
+ algorithms that are of an order closer to logarithmic complexity.
+
+ \snippet graphicsview/collidingmice/main.cpp 3
+
+ Then we add the mice to the scene.
+
+ \snippet graphicsview/collidingmice/main.cpp 4
+
+ To be able to view the scene we must also create a QGraphicsView
+ widget. The QGraphicsView class visualizes the contents of a scene
+ in a scrollable viewport. We also ensure that the contents is
+ rendered using antialiasing, and we create the cheese background
+ by setting the view's background brush.
+
+ The image used for the background is stored as a binary file in
+ the application's executable using Qt's \l {The Qt Resource
+ System}{resource system}. The QPixmap constructor accepts both
+ file names that refer to actual files on disk and file names that
+ refer to the application's embedded resources.
+
+ \snippet graphicsview/collidingmice/main.cpp 5
+
+ Then we set the cache mode; QGraphicsView can cache pre-rendered
+ content in a pixmap, which is then drawn onto the viewport. The
+ purpose of such caching is to speed up the total rendering time
+ for areas that are slow to render, e.g., texture, gradient and
+ alpha blended backgrounds. The \l
+ {QGraphicsView::CacheMode}{CacheMode} property holds which parts
+ of the view that are cached, and the \l
+ {QGraphicsView::CacheBackground}{CacheBackground} flag enables
+ caching of the view's background.
+
+ By setting the \l {QGraphicsView::dragMode}{dragMode} property we
+ define what should happen when the user clicks on the scene
+ background and drags the mouse. The \l
+ {QGraphicsView::ScrollHandDrag}{ScrollHandDrag} flag makes the
+ cursor change into a pointing hand, and dragging the mouse around
+ will scroll the scrollbars.
+
+ \snippet graphicsview/collidingmice/main.cpp 6
+
+ In the end, we set the application window's title and size before
+ we enter the main event loop using the QApplication::exec()
+ function.
+
+ Finally, we create a QTimer and connect its timeout() signal to the
+ advance() slot of the scene. Every time the timer fires, the scene
+ will advance one frame.
+
+ We then tell the timer to fire every 1000/33 millisecond. This will
+ give us a frame rate of 30 frames a second, which is fast enough for most
+ animations. Doing the animation with a single timer connect to advance the
+ scene ensures that all the mice are moved at one point and, more
+ importantly, only one update is sent to the screen after all the mice have
+ moved.
+*/
diff --git a/examples/widgets/doc/src/coloreditorfactory.qdoc b/examples/widgets/doc/src/coloreditorfactory.qdoc
index 377491939e..f34622f37e 100644
--- a/examples/widgets/doc/src/coloreditorfactory.qdoc
+++ b/examples/widgets/doc/src/coloreditorfactory.qdoc
@@ -28,7 +28,7 @@
/*!
\example itemviews/coloreditorfactory
\title Color Editor Factory Example
-
+ \ingroup examples-itemviews
\brief This example shows how to create an editor that can be used by
a QItemDelegate.
diff --git a/examples/widgets/doc/src/combowidgetmapper.qdoc b/examples/widgets/doc/src/combowidgetmapper.qdoc
index df0d893f64..187934a816 100644
--- a/examples/widgets/doc/src/combowidgetmapper.qdoc
+++ b/examples/widgets/doc/src/combowidgetmapper.qdoc
@@ -28,7 +28,7 @@
/*!
\example itemviews/combowidgetmapper
\title Combo Widget Mapper Example
-
+ \ingroup examples-itemviews
\brief The Combo Widget Mapper example shows how to use a custom delegate to
map information from a model to specific widgets on a form.
diff --git a/examples/widgets/doc/src/configdialog.qdoc b/examples/widgets/doc/src/configdialog.qdoc
index 0fdbc5ddd0..18c14b79e3 100644
--- a/examples/widgets/doc/src/configdialog.qdoc
+++ b/examples/widgets/doc/src/configdialog.qdoc
@@ -28,6 +28,7 @@
/*!
\example dialogs/configdialog
\title Config Dialog Example
+ \ingroup examples-dialogs
\brief The Config Dialog examples shows how a configuration dialog can be created by
using an icon view with a stacked widget.
diff --git a/examples/widgets/doc/src/customsortfiltermodel.qdoc b/examples/widgets/doc/src/customsortfiltermodel.qdoc
index 2003dc767a..82f124606e 100644
--- a/examples/widgets/doc/src/customsortfiltermodel.qdoc
+++ b/examples/widgets/doc/src/customsortfiltermodel.qdoc
@@ -28,7 +28,7 @@
/*!
\example itemviews/customsortfiltermodel
\title Custom Sort/Filter Model Example
-
+ \ingroup examples-itemviews
\brief The Custom Sort/Filter Model example illustrates how to subclass
QSortFilterProxyModel to perform advanced sorting and filtering.
diff --git a/examples/widgets/doc/src/diagramscene.qdoc b/examples/widgets/doc/src/diagramscene.qdoc
index 9b94ca2ab1..4ad74cfee9 100644
--- a/examples/widgets/doc/src/diagramscene.qdoc
+++ b/examples/widgets/doc/src/diagramscene.qdoc
@@ -28,8 +28,8 @@
/*!
\example graphicsview/diagramscene
\title Diagram Scene Example
-
- \brief This example shows use of Qt's graphics framework.
+ \ingroup examples-graphicsview
+ \brief Demonstrate how to use the Graphics View framework
\image diagramscene.png
diff --git a/examples/widgets/doc/src/dirview.qdoc b/examples/widgets/doc/src/dirview.qdoc
index 8f860fd036..5deabcbb19 100644
--- a/examples/widgets/doc/src/dirview.qdoc
+++ b/examples/widgets/doc/src/dirview.qdoc
@@ -28,6 +28,8 @@
/*!
\example itemviews/dirview
\title Dir View Example
+ \ingroup examples-itemviews
+ \brief This example demonstrates the usage of a tree view.
\brief The Dir View example shows a tree view onto the local filing system. It uses the
QDirModel class to provide file and directory information.
diff --git a/examples/widgets/doc/src/dockwidgets.qdoc b/examples/widgets/doc/src/dockwidgets.qdoc
index 8f83c80417..88dc146c7e 100644
--- a/examples/widgets/doc/src/dockwidgets.qdoc
+++ b/examples/widgets/doc/src/dockwidgets.qdoc
@@ -28,6 +28,7 @@
/*!
\example mainwindows/dockwidgets
\title Dock Widgets Example
+ \ingroup examples-mainwindow
\brief The Dock Widgets example shows how to add dock windows to an
application. It also shows how to use Qt's rich text engine.
diff --git a/examples/widgets/doc/src/dragdroprobot.qdoc b/examples/widgets/doc/src/dragdroprobot.qdoc
index cc5e6bd07d..f58f3cfdf2 100644
--- a/examples/widgets/doc/src/dragdroprobot.qdoc
+++ b/examples/widgets/doc/src/dragdroprobot.qdoc
@@ -28,8 +28,10 @@
/*!
\example graphicsview/dragdroprobot
\title Drag and Drop Robot Example
+ \ingroup examples-graphicsview
+ \brief Demonstrates how to drag and drop items in a graphics view
- \brief The Drag and Drop Robot example shows how to implement Drag and Drop in a
+ The Drag and Drop Robot example shows how to implement Drag and Drop in a
QGraphicsItem subclass, as well as how to animate items using Qt's
\l{Animation Framework}.
diff --git a/examples/widgets/doc/src/editabletreemodel.qdoc b/examples/widgets/doc/src/editabletreemodel.qdoc
index fa72b77506..8c4c7cb89c 100644
--- a/examples/widgets/doc/src/editabletreemodel.qdoc
+++ b/examples/widgets/doc/src/editabletreemodel.qdoc
@@ -28,7 +28,7 @@
/*!
\example itemviews/editabletreemodel
\title Editable Tree Model Example
-
+ \ingroup examples-itemviews
\brief This example shows how to implement a simple item-based tree model that can
be used with other classes the model/view framework.
diff --git a/examples/widgets/doc/src/elasticnodes.qdoc b/examples/widgets/doc/src/elasticnodes.qdoc
index 2c081613bc..bfca70d2f1 100644
--- a/examples/widgets/doc/src/elasticnodes.qdoc
+++ b/examples/widgets/doc/src/elasticnodes.qdoc
@@ -28,8 +28,10 @@
/*!
\example graphicsview/elasticnodes
\title Elastic Nodes Example
+ \ingroup examples-graphicsview
+ \brief Demonstrates how to interact with graphical items in a scene
- \brief The Elastic Nodes example shows how to implement edges between nodes in a
+ The Elastic Nodes example shows how to implement edges between nodes in a
graph, with basic interaction. You can click to drag a node around, and
zoom in and out using the mouse wheel or the keyboard. Hitting the space
bar will randomize the nodes. The example is also resolution independent;
diff --git a/examples/widgets/doc/src/embeddeddialogs.qdoc b/examples/widgets/doc/src/embeddeddialogs.qdoc
index 878bb9f54a..34e800d75a 100644
--- a/examples/widgets/doc/src/embeddeddialogs.qdoc
+++ b/examples/widgets/doc/src/embeddeddialogs.qdoc
@@ -28,8 +28,10 @@
/*!
\example graphicsview/embeddeddialogs
\title Embedded Dialogs
+ \ingroup examples-graphicsview-layout
+ \brief Demonstrates how to embed dialogs into a graphics view
- \brief This example shows how to embed standard dialogs into
+ This example shows how to embed standard dialogs into
Graphics View. It also shows how you can customize the
proxy class and add window shadows.
diff --git a/examples/widgets/doc/src/extension.qdoc b/examples/widgets/doc/src/extension.qdoc
index 0ba1d0738e..423a829167 100644
--- a/examples/widgets/doc/src/extension.qdoc
+++ b/examples/widgets/doc/src/extension.qdoc
@@ -28,6 +28,7 @@
/*!
\example dialogs/extension
\title Extension Example
+ \ingroup examples-dialogs
\brief The Extension example shows how to add an extension to a QDialog
using the QAbstractButton::toggled() signal and the
diff --git a/examples/widgets/doc/src/fademessage.qdoc b/examples/widgets/doc/src/fademessage.qdoc
index e50f434e56..dcd429521d 100644
--- a/examples/widgets/doc/src/fademessage.qdoc
+++ b/examples/widgets/doc/src/fademessage.qdoc
@@ -28,8 +28,10 @@
/*!
\example effects/fademessage
\title Fade Message Effect Example
+ \ingroup examples-graphicsview-graphicseffects
+ \brief Demonstrates how to appliy effects on items in the view
- \div { style="text-align: center"}
+ \div { style="text-align: left"}
\inlineimage fademessageeffect-example.png
\inlineimage fademessageeffect-example-faded.png
\enddiv
diff --git a/examples/widgets/doc/src/fetchmore.qdoc b/examples/widgets/doc/src/fetchmore.qdoc
index 8e3ec973aa..2c9c5d5b3b 100644
--- a/examples/widgets/doc/src/fetchmore.qdoc
+++ b/examples/widgets/doc/src/fetchmore.qdoc
@@ -28,7 +28,7 @@
/*!
\example itemviews/fetchmore
\title Fetch More Example
-
+ \ingroup examples-itemviews
\brief The Fetch More example shows how two add items to an item view
model on demand.
diff --git a/examples/widgets/doc/src/findfiles.qdoc b/examples/widgets/doc/src/findfiles.qdoc
index 27d0cacade..61dbf05581 100644
--- a/examples/widgets/doc/src/findfiles.qdoc
+++ b/examples/widgets/doc/src/findfiles.qdoc
@@ -28,6 +28,7 @@
/*!
\example dialogs/findfiles
\title Find Files Example
+ \ingroup examples-dialogs
\brief The Find Files example shows how to use QProgressDialog to provide
feedback on the progress of a slow operation. The example also
diff --git a/examples/widgets/doc/src/fridgemagnets.qdoc b/examples/widgets/doc/src/fridgemagnets.qdoc
index b53c94f0bd..8e0732f7dd 100644
--- a/examples/widgets/doc/src/fridgemagnets.qdoc
+++ b/examples/widgets/doc/src/fridgemagnets.qdoc
@@ -176,7 +176,7 @@
handler, where drag and drop operations begin:
\snippet draganddrop/fridgemagnets/dragwidget.cpp 13
- \snippet examples/draganddrop/fridgemagnets/dragwidget.cpp 14
+ \snippet draganddrop/fridgemagnets/dragwidget.cpp 14
Mouse events occur when a mouse button is pressed or released
inside a widget, or when the mouse cursor is moved. By
diff --git a/examples/widgets/doc/src/frozencolumn.qdoc b/examples/widgets/doc/src/frozencolumn.qdoc
index 69e45de6df..39fe04c7bf 100644
--- a/examples/widgets/doc/src/frozencolumn.qdoc
+++ b/examples/widgets/doc/src/frozencolumn.qdoc
@@ -28,7 +28,7 @@
/*!
\example itemviews/frozencolumn
\title Frozen Column Example
-
+ \ingroup examples-itemviews
\brief This example demonstrates how to freeze a column within a QTableView.
\image frozencolumn-example.png "Screenshot of the example"
diff --git a/examples/widgets/doc/src/graphicsview-anchorlayout.qdoc b/examples/widgets/doc/src/graphicsview-anchorlayout.qdoc
new file mode 100644
index 0000000000..98c0958918
--- /dev/null
+++ b/examples/widgets/doc/src/graphicsview-anchorlayout.qdoc
@@ -0,0 +1,38 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** 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. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example graphicsview/anchorlayout
+ \title Anchor Layout Example
+ \ingroup examples-graphicsview-layout
+ \brief Demonstrates anchor layout in a graphics view scene
+
+ The Anchor Layout example demonstrates the use of the QGraphicsAnchorLayout
+ class.
+
+ \image graphicsanchorlayout-example.png
+*/
diff --git a/examples/widgets/doc/src/graphicsview-flowlayout.qdoc b/examples/widgets/doc/src/graphicsview-flowlayout.qdoc
new file mode 100644
index 0000000000..52d97164c3
--- /dev/null
+++ b/examples/widgets/doc/src/graphicsview-flowlayout.qdoc
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** 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. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example graphicsview/flowlayout
+ \title Graphics View Flow Layout Example
+ \ingroup examples-graphicsview-layout
+ \brief Demonstrates flow layout on a graphics view scene.
+
+ The Graphics View Flow Layout example shows the use of a flow layout
+ in a Graphics View widget.
+
+ \image graphicsflowlayout-example.png
+
+ See the \l{Flow Layout Example} for a corresponding widget-based example.
+*/
diff --git a/examples/widgets/doc/src/graphicsview-simpleanchorlayout.qdoc b/examples/widgets/doc/src/graphicsview-simpleanchorlayout.qdoc
new file mode 100644
index 0000000000..480c7c4e0c
--- /dev/null
+++ b/examples/widgets/doc/src/graphicsview-simpleanchorlayout.qdoc
@@ -0,0 +1,38 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** 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. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example graphicsview/simpleanchorlayout
+ \title Simple Anchor Layout Example
+ \ingroup examples-graphicsview-layout
+ \brief Demonstrates anchor layout on a graphics view scene
+
+ The Simple Anchor Layout example shows the basic use of the
+ QGraphicsAnchorLayout class.
+
+ \image graphicssimpleanchorlayout-example.png
+*/
diff --git a/examples/widgets/doc/src/graphicsview-weatheranchorlayout.qdoc b/examples/widgets/doc/src/graphicsview-weatheranchorlayout.qdoc
new file mode 100644
index 0000000000..88a5c60fb5
--- /dev/null
+++ b/examples/widgets/doc/src/graphicsview-weatheranchorlayout.qdoc
@@ -0,0 +1,38 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** 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. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example graphicsview/weatheranchorlayout
+ \title Weather Anchor Layout Example
+ \ingroup examples-graphicsview-layout
+ \brief Demonstrates anchor layout on a graphics view scene
+
+ The Weather Anchor Layout example shows more complex use of the
+ QGraphicsAnchorLayout class to create a real-world window layout.
+
+ \image weatheranchorlayout-example.png
+*/
diff --git a/examples/widgets/doc/src/interview.qdoc b/examples/widgets/doc/src/interview.qdoc
index 788af64f64..6528bef7d4 100644
--- a/examples/widgets/doc/src/interview.qdoc
+++ b/examples/widgets/doc/src/interview.qdoc
@@ -28,6 +28,8 @@
/*!
\example itemviews/interview
\title Interview
+ \ingroup examples-itemviews
+ \brief This example demonstrates the usage of the model/view framework.
\brief The Interview example explores the flexibility and scalability of the
model/view framework by presenting an infinitely deep data structure using a model
diff --git a/examples/widgets/doc/src/itemviewspuzzle.qdoc b/examples/widgets/doc/src/itemviewspuzzle.qdoc
index 68cbdc936d..2e37cd372c 100644
--- a/examples/widgets/doc/src/itemviewspuzzle.qdoc
+++ b/examples/widgets/doc/src/itemviewspuzzle.qdoc
@@ -28,7 +28,7 @@
/*!
\example itemviews/puzzle
\title Item Views Puzzle Example
-
+ \ingroup examples-itemviews
\brief The Puzzle example shows how to enable drag and drop with a custom model
to allow items to be transferred between a view and another widget.
diff --git a/examples/widgets/doc/src/licensewizard.qdoc b/examples/widgets/doc/src/licensewizard.qdoc
index aee60e11fe..e45c162f29 100644
--- a/examples/widgets/doc/src/licensewizard.qdoc
+++ b/examples/widgets/doc/src/licensewizard.qdoc
@@ -28,6 +28,7 @@
/*!
\example dialogs/licensewizard
\title License Wizard Example
+ \ingroup examples-dialogs
\brief The License Wizard example shows how to implement complex wizards in
Qt.
diff --git a/examples/widgets/doc/src/lighting.qdoc b/examples/widgets/doc/src/lighting.qdoc
index e457d20ada..e519bacb91 100644
--- a/examples/widgets/doc/src/lighting.qdoc
+++ b/examples/widgets/doc/src/lighting.qdoc
@@ -28,6 +28,8 @@
/*!
\example effects/lighting
\title Lighting Effect Example
+ \ingroup examples-graphicsview-graphicseffects
+ \brief Demonstrates how to apply effects on items in the view
\image lightingeffect-example.png
*/
diff --git a/examples/widgets/doc/src/mainwindow.qdoc b/examples/widgets/doc/src/mainwindow.qdoc
index 313b8cbc10..a0a7a43ee0 100644
--- a/examples/widgets/doc/src/mainwindow.qdoc
+++ b/examples/widgets/doc/src/mainwindow.qdoc
@@ -28,6 +28,7 @@
/*!
\example mainwindows/mainwindow
\title Main Window
+ \ingroup examples-mainwindow
\brief The Main Window example shows Qt's extensive support for tool bars,
dock windows, menus, and other standard application features.
diff --git a/examples/widgets/doc/src/mdi.qdoc b/examples/widgets/doc/src/mdi.qdoc
index e6b5eef4b4..fc1835c727 100644
--- a/examples/widgets/doc/src/mdi.qdoc
+++ b/examples/widgets/doc/src/mdi.qdoc
@@ -28,6 +28,7 @@
/*!
\example mainwindows/mdi
\title MDI Example
+ \ingroup examples-mainwindow
\brief The MDI example shows how to implement a Multiple Document Interface using Qt's
QMdiArea class.
diff --git a/examples/widgets/doc/src/menus.qdoc b/examples/widgets/doc/src/menus.qdoc
index 3b0c6079ab..09a43a1a45 100644
--- a/examples/widgets/doc/src/menus.qdoc
+++ b/examples/widgets/doc/src/menus.qdoc
@@ -28,6 +28,7 @@
/*!
\example mainwindows/menus
\title Menus Example
+ \ingroup examples-mainwindow
\brief The Menus example demonstrates how menus can be used in a main
window application.
diff --git a/examples/widgets/doc/src/padnavigator.qdoc b/examples/widgets/doc/src/padnavigator.qdoc
index b063d6de59..7b5e54e5ff 100644
--- a/examples/widgets/doc/src/padnavigator.qdoc
+++ b/examples/widgets/doc/src/padnavigator.qdoc
@@ -28,8 +28,10 @@
/*!
\example graphicsview/padnavigator
\title Pad Navigator Example
+ \ingroup examples-graphicsview
+ \brief Demonstrates how to create animated user interface
- \brief The Pad Navigator Example shows how you can use Graphics View together with
+ The Pad Navigator Example shows how you can use Graphics View together with
embedded widgets and Qt's \l{State Machine Framework} to create a simple
but useful, dynamic, animated user interface.
diff --git a/examples/widgets/doc/src/pixelator.qdoc b/examples/widgets/doc/src/pixelator.qdoc
index 9eddcd9f11..ebcee4e5f9 100644
--- a/examples/widgets/doc/src/pixelator.qdoc
+++ b/examples/widgets/doc/src/pixelator.qdoc
@@ -28,7 +28,7 @@
/*!
\example itemviews/pixelator
\title Pixelator Example
-
+ \ingroup examples-itemviews
\brief The Pixelator example shows how delegates can be used to customize the way that
items are rendered in standard item views.
diff --git a/examples/widgets/doc/src/plugandpaint.qdoc b/examples/widgets/doc/src/plugandpaint.qdoc
index 88433a5e2f..cf068e92c3 100644
--- a/examples/widgets/doc/src/plugandpaint.qdoc
+++ b/examples/widgets/doc/src/plugandpaint.qdoc
@@ -48,7 +48,7 @@
through plugins, we recommend that you start by reading this
overview, which explains how to make an application use plugins.
Afterward, you can read the
- \l{plugandpaintplugins/basictools}{Basic Tools} and
+ \l{tools/plugandpaintplugins/basictools}{Basic Tools} and
\l{plugandpaintplugins/extrafilters}{Extra Filters}
overviews, which show how to implement static and dynamic
plugins, respectively.
@@ -287,7 +287,7 @@
\snippet tools/plugandpaint/main.cpp 0
The argument to Q_IMPORT_PLUGIN() is the plugin's name, as
- specified with Q_EXPORT_PLUGIN2() in the \l{Exporting the
+ specified with Q_PLUGIN_METADATA() in the \l{Exporting the
Plugin}{plugin}.
In the \c .pro file, we need to specify the static library.
@@ -324,7 +324,7 @@
\list 1
\li Declare a plugin class.
\li Implement the interfaces provided by the plugin.
- \li Export the plugin using the Q_EXPORT_PLUGIN2() macro.
+ \li Export the plugin using the Q_PLUGIN_METADATA() macro.
\li Build the plugin using an adequate \c .pro file.
\endlist
@@ -346,6 +346,8 @@
interfaces. Without the \c Q_INTERFACES() macro, we couldn't use
\l qobject_cast() in the \l{plugandpaint}{Plug & Paint}
application to detect interfaces.
+ For an explanation for the \c Q_PLUGIN_METADATA() macro see
+ \l {Exporting the Plugin}.
\snippet tools/plugandpaintplugins/basictools/basictoolsplugin.h 2
@@ -440,15 +442,20 @@
\section1 Exporting the Plugin
- Whereas applications have a \c main() function as their entry
- point, plugins need to contain exactly one occurrence of the
- Q_EXPORT_PLUGIN2() macro to specify which class provides the
- plugin:
+ To finally export your plugin you just have to add the
+ \c Q_PLUGIN_METADATA() macro right next to the \c Q_OBJECT() macro
+ into the header file of the plugin.
+ It must contain the plugins IID and optionally a filename pointing
+ to a json file containing the metadata for the plugin.
+
+ \snippet tools/plugandpaintplugins/basictools/basictoolsplugin.h 4
- \snippet tools/plugandpaintplugins/basictools/basictoolsplugin.cpp 9
+ Within this example the json file does not need to export any metadata,
+ so it just contains an empty json object.
- This line may appear in any \c .cpp file that is part of the
- plugin's source code.
+ \code
+ {}
+ \endcode
\section1 The .pro File
diff --git a/examples/widgets/doc/src/recentfiles.qdoc b/examples/widgets/doc/src/recentfiles.qdoc
index 722e32f8cd..01a6975828 100644
--- a/examples/widgets/doc/src/recentfiles.qdoc
+++ b/examples/widgets/doc/src/recentfiles.qdoc
@@ -28,6 +28,7 @@
/*!
\example mainwindows/recentfiles
\title Recent Files Example
+ \ingroup examples-mainwindow
\brief The Recent Files example shows how a standard File menu can be extended to show
the most recent files loaded by a main window application.
diff --git a/examples/widgets/doc/src/sdi.qdoc b/examples/widgets/doc/src/sdi.qdoc
index 379f28dc08..b163930530 100644
--- a/examples/widgets/doc/src/sdi.qdoc
+++ b/examples/widgets/doc/src/sdi.qdoc
@@ -28,6 +28,7 @@
/*!
\example mainwindows/sdi
\title SDI Example
+ \ingroup examples-mainwindow
\brief The SDI example shows how to create a Single Document Interface. It uses a number of
top-level windows to display the contents of different text files.
diff --git a/examples/widgets/doc/src/simpledommodel.qdoc b/examples/widgets/doc/src/simpledommodel.qdoc
index 99df1e46ca..c48563f47c 100644
--- a/examples/widgets/doc/src/simpledommodel.qdoc
+++ b/examples/widgets/doc/src/simpledommodel.qdoc
@@ -28,7 +28,7 @@
/*!
\example itemviews/simpledommodel
\title Simple DOM Model Example
-
+ \ingroup examples-itemviews
\brief The Simple DOM Model example shows how an existing class can be adapted for use with
the model/view framework.
diff --git a/examples/widgets/doc/src/simpletreemodel.qdoc b/examples/widgets/doc/src/simpletreemodel.qdoc
index 2b8884d5ca..df23617d5d 100644
--- a/examples/widgets/doc/src/simpletreemodel.qdoc
+++ b/examples/widgets/doc/src/simpletreemodel.qdoc
@@ -28,6 +28,9 @@
/*!
\example itemviews/simpletreemodel
\title Simple Tree Model Example
+ \ingroup examples-itemviews
+ \brief The Simple Tree Model example shows how to use a hierarchical model
+ with Qt's standard view classes.
\brief The Simple Tree Model example shows how to create a basic, read-only
hierarchical model to use with Qt's standard view classes. For a
diff --git a/examples/widgets/doc/src/simplewidgetmapper.qdoc b/examples/widgets/doc/src/simplewidgetmapper.qdoc
index ca5e47e13c..3e827a4a41 100644
--- a/examples/widgets/doc/src/simplewidgetmapper.qdoc
+++ b/examples/widgets/doc/src/simplewidgetmapper.qdoc
@@ -28,7 +28,7 @@
/*!
\example itemviews/simplewidgetmapper
\title Simple Widget Mapper Example
-
+ \ingroup examples-itemviews
\brief The Simple Widget Mapper example shows how to use a widget mapper to display
data from a model in a collection of widgets.
diff --git a/examples/widgets/doc/src/spinboxdelegate.qdoc b/examples/widgets/doc/src/spinboxdelegate.qdoc
index f2add32286..3941afa95a 100644
--- a/examples/widgets/doc/src/spinboxdelegate.qdoc
+++ b/examples/widgets/doc/src/spinboxdelegate.qdoc
@@ -28,7 +28,7 @@
/*!
\example itemviews/spinboxdelegate
\title Spin Box Delegate Example
-
+ \ingroup examples-itemviews
\brief The Spin Box Delegate example shows how to create an editor for a custom delegate in
the model/view framework by reusing a standard Qt editor widget.
diff --git a/examples/widgets/doc/src/spreadsheet.qdoc b/examples/widgets/doc/src/spreadsheet.qdoc
index cd94e08cec..a869c7dbe7 100644
--- a/examples/widgets/doc/src/spreadsheet.qdoc
+++ b/examples/widgets/doc/src/spreadsheet.qdoc
@@ -28,6 +28,8 @@
/*!
\example itemviews/spreadsheet
\title Spreadsheet
+ \ingroup examples-itemviews
+ \brief The Spreadsheet example shows how to create a simple spreadsheet application.
\brief The Spreadsheet example shows how a table view can be used to create a
simple spreadsheet application. Custom delegates are used to render different
diff --git a/examples/widgets/doc/src/standarddialogs.qdoc b/examples/widgets/doc/src/standarddialogs.qdoc
index f9d9372a70..4b39ac64c5 100644
--- a/examples/widgets/doc/src/standarddialogs.qdoc
+++ b/examples/widgets/doc/src/standarddialogs.qdoc
@@ -28,6 +28,7 @@
/*!
\example dialogs/standarddialogs
\title Standard Dialogs Example
+ \ingroup examples-dialogs
\brief The Standard Dialogs example shows the standard dialogs that are provided by Qt.
diff --git a/examples/widgets/doc/src/stardelegate.qdoc b/examples/widgets/doc/src/stardelegate.qdoc
index 38e4cdfe22..f3da875422 100644
--- a/examples/widgets/doc/src/stardelegate.qdoc
+++ b/examples/widgets/doc/src/stardelegate.qdoc
@@ -28,7 +28,7 @@
/*!
\example itemviews/stardelegate
\title Star Delegate Example
-
+ \ingroup examples-itemviews
\brief The Star Delegate example shows how to create a delegate that
can paint itself and that supports editing.
diff --git a/examples/widgets/doc/src/tabdialog.qdoc b/examples/widgets/doc/src/tabdialog.qdoc
index e2ac57550f..b3e74389af 100644
--- a/examples/widgets/doc/src/tabdialog.qdoc
+++ b/examples/widgets/doc/src/tabdialog.qdoc
@@ -28,6 +28,7 @@
/*!
\example dialogs/tabdialog
\title Tab Dialog Example
+ \ingroup examples-dialogs
\brief The Tab Dialog example shows how to construct a tab dialog using the
QTabWidget class.
diff --git a/examples/widgets/doc/src/trivialwizard.qdoc b/examples/widgets/doc/src/trivialwizard.qdoc
index c67bb09c0d..4ccee9a625 100644
--- a/examples/widgets/doc/src/trivialwizard.qdoc
+++ b/examples/widgets/doc/src/trivialwizard.qdoc
@@ -28,6 +28,7 @@
/*!
\example dialogs/trivialwizard
\title Trivial Wizard Example
+ \ingroup examples-dialogs
\brief The Trivial Wizard example illustrates how to create a linear three-page
registration wizard using three instances of QWizardPage and one instance
diff --git a/examples/widgets/draganddrop/draganddrop.pro b/examples/widgets/draganddrop/draganddrop.pro
index 3f2691a516..098651d2f6 100644
--- a/examples/widgets/draganddrop/draganddrop.pro
+++ b/examples/widgets/draganddrop/draganddrop.pro
@@ -6,4 +6,3 @@ SUBDIRS = draggableicons \
puzzle
wince*: SUBDIRS -= dropsite
-QT += widgets
diff --git a/examples/widgets/draganddrop/draggableicons/draggableicons.pro b/examples/widgets/draganddrop/draggableicons/draggableicons.pro
index 194814a8c8..f87ec4ad60 100644
--- a/examples/widgets/draganddrop/draggableicons/draggableicons.pro
+++ b/examples/widgets/draganddrop/draggableicons/draggableicons.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = dragwidget.h
RESOURCES = draggableicons.qrc
SOURCES = dragwidget.cpp \
@@ -6,5 +8,3 @@ SOURCES = dragwidget.cpp \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/draganddrop/draggableicons
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/draganddrop/draggabletext/draggabletext.pro b/examples/widgets/draganddrop/draggabletext/draggabletext.pro
index 1eb579a2bd..2815be1613 100644
--- a/examples/widgets/draganddrop/draggabletext/draggabletext.pro
+++ b/examples/widgets/draganddrop/draggabletext/draggabletext.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = draglabel.h \
dragwidget.h
RESOURCES = draggabletext.qrc
@@ -8,6 +10,3 @@ SOURCES = draglabel.cpp \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/draganddrop/draggabletext
INSTALLS += target
-
-QT += widgets
-
diff --git a/examples/widgets/draganddrop/dropsite/dropsite.pro b/examples/widgets/draganddrop/dropsite/dropsite.pro
index 008030be85..9496cc4940 100644
--- a/examples/widgets/draganddrop/dropsite/dropsite.pro
+++ b/examples/widgets/draganddrop/dropsite/dropsite.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = droparea.h \
dropsitewindow.h
SOURCES = droparea.cpp \
@@ -8,5 +10,4 @@ SOURCES = droparea.cpp \
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/draganddrop/dropsite
INSTALLS += target
-QT += widgets
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/draganddrop/fridgemagnets/fridgemagnets.pro b/examples/widgets/draganddrop/fridgemagnets/fridgemagnets.pro
index 350dee6561..2c3165d1c5 100644
--- a/examples/widgets/draganddrop/fridgemagnets/fridgemagnets.pro
+++ b/examples/widgets/draganddrop/fridgemagnets/fridgemagnets.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = draglabel.h \
dragwidget.h
RESOURCES = fridgemagnets.qrc
@@ -8,6 +10,3 @@ SOURCES = draglabel.cpp \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/draganddrop/fridgemagnets
INSTALLS += target
-
-QT += widgets
-
diff --git a/examples/widgets/draganddrop/puzzle/puzzle.pro b/examples/widgets/draganddrop/puzzle/puzzle.pro
index 4d85778073..95008fc29b 100644
--- a/examples/widgets/draganddrop/puzzle/puzzle.pro
+++ b/examples/widgets/draganddrop/puzzle/puzzle.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = mainwindow.h \
pieceslist.h \
puzzlewidget.h
@@ -18,4 +20,3 @@ wince*: {
addFile.path = .
DEPLOYMENT += addFile
}
-QT += widgets
diff --git a/examples/widgets/effects/blurpicker/blurpicker.pro b/examples/widgets/effects/blurpicker/blurpicker.pro
index 1d232190ac..c570ac3b98 100644
--- a/examples/widgets/effects/blurpicker/blurpicker.pro
+++ b/examples/widgets/effects/blurpicker/blurpicker.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
SOURCES += main.cpp blurpicker.cpp blureffect.cpp
HEADERS += blurpicker.h blureffect.h
RESOURCES += blurpicker.qrc
@@ -5,5 +7,3 @@ RESOURCES += blurpicker.qrc
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/effects/blurpicker
INSTALLS += target
-QT += widgets
-
diff --git a/examples/widgets/effects/effects.pro b/examples/widgets/effects/effects.pro
index ee3d655815..795e0508ac 100644
--- a/examples/widgets/effects/effects.pro
+++ b/examples/widgets/effects/effects.pro
@@ -4,5 +4,3 @@ SUBDIRS = \
blurpicker \
lighting \
fademessage
-
-QT += widgets
diff --git a/examples/widgets/effects/fademessage/fademessage.pro b/examples/widgets/effects/fademessage/fademessage.pro
index ff860af4f1..727181e1a1 100644
--- a/examples/widgets/effects/fademessage/fademessage.pro
+++ b/examples/widgets/effects/fademessage/fademessage.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
SOURCES += main.cpp fademessage.cpp
HEADERS += fademessage.h
RESOURCES += fademessage.qrc
@@ -6,5 +8,4 @@ RESOURCES += fademessage.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/effects/fademessage
INSTALLS += target
-QT += widgets
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/effects/lighting/lighting.pro b/examples/widgets/effects/lighting/lighting.pro
index 5450b62093..0a3b397de5 100644
--- a/examples/widgets/effects/lighting/lighting.pro
+++ b/examples/widgets/effects/lighting/lighting.pro
@@ -1,9 +1,8 @@
+QT += widgets
+
SOURCES += main.cpp lighting.cpp
HEADERS += lighting.h
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/effects/lighting
INSTALLS += target
-QT += widgets
-
-
diff --git a/examples/widgets/graphicsview/anchorlayout/anchorlayout.pro b/examples/widgets/graphicsview/anchorlayout/anchorlayout.pro
index bc396226c8..fbfeaac049 100644
--- a/examples/widgets/graphicsview/anchorlayout/anchorlayout.pro
+++ b/examples/widgets/graphicsview/anchorlayout/anchorlayout.pro
@@ -1,11 +1,11 @@
+TARGET = anchorlayout
+
+QT += widgets
+
SOURCES = main.cpp
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/graphicsview/anchorlayout
INSTALLS += target
-TARGET = anchorlayout
-QT += widgets
-
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/graphicsview/basicgraphicslayouts/basicgraphicslayouts.pro b/examples/widgets/graphicsview/basicgraphicslayouts/basicgraphicslayouts.pro
index 59abd2b405..46fce9b97a 100644
--- a/examples/widgets/graphicsview/basicgraphicslayouts/basicgraphicslayouts.pro
+++ b/examples/widgets/graphicsview/basicgraphicslayouts/basicgraphicslayouts.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = layoutitem.h \
window.h
SOURCES = layoutitem.cpp \
@@ -8,5 +10,3 @@ RESOURCES = basicgraphicslayouts.qrc
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/graphicsview/basicgraphicslayouts
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/graphicsview/chip/chip.pro b/examples/widgets/graphicsview/chip/chip.pro
index 8e3d91f38e..a46f07ce35 100644
--- a/examples/widgets/graphicsview/chip/chip.pro
+++ b/examples/widgets/graphicsview/chip/chip.pro
@@ -5,8 +5,8 @@ SOURCES += main.cpp
SOURCES += mainwindow.cpp view.cpp chip.cpp
QT += widgets
-!isEmpty(QT.printsupport.name): QT += printsupport
-contains(QT_CONFIG, opengl):QT += opengl
+qtHaveModule(printsupport): QT += printsupport
+qtHaveModule(opengl): QT += opengl
build_all:!build_pass {
CONFIG -= build_all
diff --git a/examples/widgets/graphicsview/chip/view.cpp b/examples/widgets/graphicsview/chip/view.cpp
index cb83175744..4b7e6c2ed8 100644
--- a/examples/widgets/graphicsview/chip/view.cpp
+++ b/examples/widgets/graphicsview/chip/view.cpp
@@ -50,6 +50,7 @@
#endif
#include <qmath.h>
+#ifndef QT_NO_WHEELEVENT
void GraphicsView::wheelEvent(QWheelEvent *e)
{
if (e->modifiers() & Qt::ControlModifier) {
@@ -62,6 +63,7 @@ void GraphicsView::wheelEvent(QWheelEvent *e)
QGraphicsView::wheelEvent(e);
}
}
+#endif
View::View(const QString &name, QWidget *parent)
: QFrame(parent)
diff --git a/examples/widgets/graphicsview/chip/view.h b/examples/widgets/graphicsview/chip/view.h
index b6cdc41200..90e0951716 100644
--- a/examples/widgets/graphicsview/chip/view.h
+++ b/examples/widgets/graphicsview/chip/view.h
@@ -60,7 +60,9 @@ public:
GraphicsView(View *v) : QGraphicsView(), view(v) { }
protected:
+#ifndef QT_NO_WHEELEVENT
void wheelEvent(QWheelEvent *);
+#endif
private:
View *view;
diff --git a/examples/widgets/graphicsview/collidingmice/collidingmice.pro b/examples/widgets/graphicsview/collidingmice/collidingmice.pro
index 0337b6da4a..c96e3dad79 100644
--- a/examples/widgets/graphicsview/collidingmice/collidingmice.pro
+++ b/examples/widgets/graphicsview/collidingmice/collidingmice.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS += \
mouse.h
SOURCES += \
@@ -10,6 +12,3 @@ RESOURCES += \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/graphicsview/collidingmice
INSTALLS += target
-
-QT += widgets
-
diff --git a/examples/widgets/graphicsview/diagramscene/diagramscene.pro b/examples/widgets/graphicsview/diagramscene/diagramscene.pro
index ac70e7af17..0c769a0f74 100644
--- a/examples/widgets/graphicsview/diagramscene/diagramscene.pro
+++ b/examples/widgets/graphicsview/diagramscene/diagramscene.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = mainwindow.h \
diagramitem.h \
diagramscene.h \
@@ -16,6 +18,4 @@ RESOURCES = diagramscene.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/graphicsview/diagramscene
INSTALLS += target
-
-QT += widgets
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/graphicsview/dragdroprobot/dragdroprobot.pro b/examples/widgets/graphicsview/dragdroprobot/dragdroprobot.pro
index 4f8cebc755..8e4197c965 100644
--- a/examples/widgets/graphicsview/dragdroprobot/dragdroprobot.pro
+++ b/examples/widgets/graphicsview/dragdroprobot/dragdroprobot.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS += \
coloritem.h \
robot.h
@@ -15,6 +17,4 @@ RESOURCES += \
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/graphicsview/dragdroprobot
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/graphicsview/elasticnodes/elasticnodes.pro b/examples/widgets/graphicsview/elasticnodes/elasticnodes.pro
index 71ac21ffe9..419fdad617 100644
--- a/examples/widgets/graphicsview/elasticnodes/elasticnodes.pro
+++ b/examples/widgets/graphicsview/elasticnodes/elasticnodes.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS += \
edge.h \
node.h \
@@ -12,5 +14,3 @@ SOURCES += \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/graphicsview/elasticnodes
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/graphicsview/elasticnodes/graphwidget.cpp b/examples/widgets/graphicsview/elasticnodes/graphwidget.cpp
index 67b6088079..b501a4f3c1 100644
--- a/examples/widgets/graphicsview/elasticnodes/graphwidget.cpp
+++ b/examples/widgets/graphicsview/elasticnodes/graphwidget.cpp
@@ -174,12 +174,14 @@ void GraphWidget::timerEvent(QTimerEvent *event)
}
//! [4]
+#ifndef QT_NO_WHEELEVENT
//! [5]
void GraphWidget::wheelEvent(QWheelEvent *event)
{
scaleView(pow((double)2, -event->delta() / 240.0));
}
//! [5]
+#endif
//! [6]
void GraphWidget::drawBackground(QPainter *painter, const QRectF &rect)
diff --git a/examples/widgets/graphicsview/elasticnodes/graphwidget.h b/examples/widgets/graphicsview/elasticnodes/graphwidget.h
index 064d3bf00a..202c17c204 100644
--- a/examples/widgets/graphicsview/elasticnodes/graphwidget.h
+++ b/examples/widgets/graphicsview/elasticnodes/graphwidget.h
@@ -63,7 +63,9 @@ public slots:
protected:
void keyPressEvent(QKeyEvent *event);
void timerEvent(QTimerEvent *event);
+#ifndef QT_NO_WHEELEVENT
void wheelEvent(QWheelEvent *event);
+#endif
void drawBackground(QPainter *painter, const QRectF &rect);
void scaleView(qreal scaleFactor);
diff --git a/examples/widgets/graphicsview/embeddeddialogs/embeddeddialogs.pro b/examples/widgets/graphicsview/embeddeddialogs/embeddeddialogs.pro
index dd01312788..993a5f22b7 100644
--- a/examples/widgets/graphicsview/embeddeddialogs/embeddeddialogs.pro
+++ b/examples/widgets/graphicsview/embeddeddialogs/embeddeddialogs.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
SOURCES += main.cpp
SOURCES += customproxy.cpp embeddeddialog.cpp
HEADERS += customproxy.h embeddeddialog.h
@@ -13,5 +15,3 @@ build_all:!build_pass {
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/graphicsview/embeddeddialogs
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/graphicsview/graphicsview.pro b/examples/widgets/graphicsview/graphicsview.pro
index f7142709c8..9d6d7a75f6 100644
--- a/examples/widgets/graphicsview/graphicsview.pro
+++ b/examples/widgets/graphicsview/graphicsview.pro
@@ -15,8 +15,6 @@ SUBDIRS = \
contains(DEFINES, QT_NO_CURSOR)|contains(DEFINES, QT_NO_DRAGANDDROP): SUBDIRS -= dragdroprobot
-contains(QT_CONFIG, opengl):!contains(QT_CONFIG, opengles1):!contains(QT_CONFIG, opengles2):{
+qtHaveModule(opengl):!contains(QT_CONFIG, opengles.) {
SUBDIRS += boxes
}
-
-QT += widgets
diff --git a/examples/widgets/graphicsview/padnavigator/padnavigator.pro b/examples/widgets/graphicsview/padnavigator/padnavigator.pro
index 460cc90219..c2bc79b5cc 100644
--- a/examples/widgets/graphicsview/padnavigator/padnavigator.pro
+++ b/examples/widgets/graphicsview/padnavigator/padnavigator.pro
@@ -17,7 +17,7 @@ FORMS += \
form.ui
QT += widgets
-contains(QT_CONFIG, opengl):QT += opengl
+qtHaveModule(opengl): QT += opengl
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/graphicsview/padnavigator
diff --git a/examples/widgets/graphicsview/simpleanchorlayout/simpleanchorlayout.pro b/examples/widgets/graphicsview/simpleanchorlayout/simpleanchorlayout.pro
index c8c992adbe..59e37ff64f 100644
--- a/examples/widgets/graphicsview/simpleanchorlayout/simpleanchorlayout.pro
+++ b/examples/widgets/graphicsview/simpleanchorlayout/simpleanchorlayout.pro
@@ -1,10 +1,11 @@
+TARGET = simpleanchorlayout
+
+QT += widgets
+
SOURCES = main.cpp
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/graphicsview/simpleanchorlayout
INSTALLS += target
-TARGET = simpleanchorlayout
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/itemviews/addressbook/addressbook.pro b/examples/widgets/itemviews/addressbook/addressbook.pro
index 0d421cb3e3..5e2f1bcbbc 100644
--- a/examples/widgets/itemviews/addressbook/addressbook.pro
+++ b/examples/widgets/itemviews/addressbook/addressbook.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
SOURCES = adddialog.cpp \
addresswidget.cpp \
main.cpp \
@@ -13,5 +15,3 @@ HEADERS = adddialog.h \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/itemviews/addressbook
INSTALLS += target
-QT += widgets
-
diff --git a/examples/widgets/itemviews/basicsortfiltermodel/basicsortfiltermodel.pro b/examples/widgets/itemviews/basicsortfiltermodel/basicsortfiltermodel.pro
index 6c0924cf7f..2469a4ef20 100644
--- a/examples/widgets/itemviews/basicsortfiltermodel/basicsortfiltermodel.pro
+++ b/examples/widgets/itemviews/basicsortfiltermodel/basicsortfiltermodel.pro
@@ -1,10 +1,9 @@
+QT += widgets
+
HEADERS = window.h
SOURCES = main.cpp \
window.cpp
-CONFIG += qt
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/itemviews/basicsortfiltermodel
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/itemviews/chart/chart.pro b/examples/widgets/itemviews/chart/chart.pro
index 927c469e88..caa28276bc 100644
--- a/examples/widgets/itemviews/chart/chart.pro
+++ b/examples/widgets/itemviews/chart/chart.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = mainwindow.h \
pieview.h
RESOURCES = chart.qrc
@@ -9,6 +11,3 @@ unix:!mac:!vxworks:!integrity:LIBS+= -lm
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/itemviews/chart
INSTALLS += target
-
-QT += widgets
-
diff --git a/examples/widgets/itemviews/coloreditorfactory/coloreditorfactory.pro b/examples/widgets/itemviews/coloreditorfactory/coloreditorfactory.pro
index 4c16a6fbc1..82cb264ddd 100644
--- a/examples/widgets/itemviews/coloreditorfactory/coloreditorfactory.pro
+++ b/examples/widgets/itemviews/coloreditorfactory/coloreditorfactory.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = colorlisteditor.h \
window.h
SOURCES = colorlisteditor.cpp \
@@ -7,6 +9,3 @@ SOURCES = colorlisteditor.cpp \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/itemviews/coloreditorfactory
INSTALLS += target
-
-QT += widgets
-
diff --git a/examples/widgets/itemviews/combowidgetmapper/combowidgetmapper.pro b/examples/widgets/itemviews/combowidgetmapper/combowidgetmapper.pro
index a093f88e88..37f82fa5ae 100644
--- a/examples/widgets/itemviews/combowidgetmapper/combowidgetmapper.pro
+++ b/examples/widgets/itemviews/combowidgetmapper/combowidgetmapper.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = window.h
SOURCES = main.cpp \
window.cpp
@@ -5,5 +7,4 @@ SOURCES = main.cpp \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/itemviews/combowidgetmapper
INSTALLS += target
-QT += widgets
diff --git a/examples/widgets/itemviews/customsortfiltermodel/customsortfiltermodel.pro b/examples/widgets/itemviews/customsortfiltermodel/customsortfiltermodel.pro
index 66ea1063c8..b722e606d3 100644
--- a/examples/widgets/itemviews/customsortfiltermodel/customsortfiltermodel.pro
+++ b/examples/widgets/itemviews/customsortfiltermodel/customsortfiltermodel.pro
@@ -1,12 +1,11 @@
+QT += widgets
+
HEADERS = mysortfilterproxymodel.h \
window.h
SOURCES = main.cpp \
mysortfilterproxymodel.cpp \
window.cpp
-CONFIG += qt
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/itemviews/customsortfiltermodel
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/itemviews/dirview/dirview.pro b/examples/widgets/itemviews/dirview/dirview.pro
index 0c1cd92a58..511ec0ed98 100644
--- a/examples/widgets/itemviews/dirview/dirview.pro
+++ b/examples/widgets/itemviews/dirview/dirview.pro
@@ -1,7 +1,7 @@
+QT += widgets
+
SOURCES = main.cpp
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/itemviews/dirview
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/itemviews/editabletreemodel/editabletreemodel.pro b/examples/widgets/itemviews/editabletreemodel/editabletreemodel.pro
index fcbdfd997f..a6c1e5563f 100644
--- a/examples/widgets/itemviews/editabletreemodel/editabletreemodel.pro
+++ b/examples/widgets/itemviews/editabletreemodel/editabletreemodel.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
FORMS = mainwindow.ui
HEADERS = mainwindow.h \
treeitem.h \
@@ -7,10 +9,7 @@ SOURCES = mainwindow.cpp \
treeitem.cpp \
treemodel.cpp \
main.cpp
-CONFIG += qt
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/itemviews/editabletreemodel
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/itemviews/fetchmore/fetchmore.pro b/examples/widgets/itemviews/fetchmore/fetchmore.pro
index 67006de9c7..eb4275da19 100644
--- a/examples/widgets/itemviews/fetchmore/fetchmore.pro
+++ b/examples/widgets/itemviews/fetchmore/fetchmore.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = filelistmodel.h \
window.h
SOURCES = filelistmodel.cpp \
@@ -7,5 +9,3 @@ SOURCES = filelistmodel.cpp \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/itemviews/fetchmore
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/itemviews/frozencolumn/frozencolumn.pro b/examples/widgets/itemviews/frozencolumn/frozencolumn.pro
index 00247b71c7..717ba40a9d 100644
--- a/examples/widgets/itemviews/frozencolumn/frozencolumn.pro
+++ b/examples/widgets/itemviews/frozencolumn/frozencolumn.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS += freezetablewidget.h
SOURCES += main.cpp freezetablewidget.cpp
RESOURCES += grades.qrc
@@ -5,5 +7,4 @@ RESOURCES += grades.qrc
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/itemviews/frozencolumn
INSTALLS += target
-QT += widgets
diff --git a/examples/widgets/itemviews/interview/interview.pro b/examples/widgets/itemviews/interview/interview.pro
index 08dd9b991e..0e480e939c 100644
--- a/examples/widgets/itemviews/interview/interview.pro
+++ b/examples/widgets/itemviews/interview/interview.pro
@@ -1,6 +1,6 @@
TEMPLATE = app
+QT += widgets
-CONFIG += qt warn_on
HEADERS += model.h
SOURCES += model.cpp main.cpp
RESOURCES += interview.qrc
@@ -13,5 +13,3 @@ build_all:!build_pass {
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/itemviews/interview
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/itemviews/itemviews.pro b/examples/widgets/itemviews/itemviews.pro
index 60512e2b66..5d5eef1b0f 100644
--- a/examples/widgets/itemviews/itemviews.pro
+++ b/examples/widgets/itemviews/itemviews.pro
@@ -18,5 +18,4 @@ SUBDIRS = addressbook \
spinboxdelegate \
spreadsheet \
stardelegate
-
-QT += widgets
+contains(DEFINES, QT_NO_DRAGANDDROP): SUBDIRS -= puzzle
diff --git a/examples/widgets/itemviews/pixelator/pixelator.pro b/examples/widgets/itemviews/pixelator/pixelator.pro
index 37e54f937a..35176a6026 100644
--- a/examples/widgets/itemviews/pixelator/pixelator.pro
+++ b/examples/widgets/itemviews/pixelator/pixelator.pro
@@ -1,3 +1,6 @@
+QT += widgets
+qtHaveModule(printsupport): QT += printsupport
+
HEADERS = imagemodel.h \
mainwindow.h \
pixeldelegate.h
@@ -10,6 +13,3 @@ RESOURCES += images.qrc
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/itemviews/pixelator
INSTALLS += target
-
-QT += widgets
-!isEmpty(QT.printsupport.name): QT += printsupport
diff --git a/examples/widgets/itemviews/puzzle/puzzle.pro b/examples/widgets/itemviews/puzzle/puzzle.pro
index a05ad83f79..a5379293ff 100644
--- a/examples/widgets/itemviews/puzzle/puzzle.pro
+++ b/examples/widgets/itemviews/puzzle/puzzle.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = mainwindow.h \
piecesmodel.h \
puzzlewidget.h
@@ -15,6 +17,3 @@ INSTALLS += target
wince* {
DEPLOYMENT_PLUGIN += qjpeg qgif
}
-
-QT += widgets
-
diff --git a/examples/widgets/itemviews/simpledommodel/simpledommodel.pro b/examples/widgets/itemviews/simpledommodel/simpledommodel.pro
index e52ea4f71e..db15632ba9 100644
--- a/examples/widgets/itemviews/simpledommodel/simpledommodel.pro
+++ b/examples/widgets/itemviews/simpledommodel/simpledommodel.pro
@@ -5,7 +5,6 @@ SOURCES = domitem.cpp \
dommodel.cpp \
main.cpp \
mainwindow.cpp
-CONFIG += qt
QT += xml widgets
# install
diff --git a/examples/widgets/itemviews/simpletreemodel/simpletreemodel.pro b/examples/widgets/itemviews/simpletreemodel/simpletreemodel.pro
index 289939fb2f..82484c9971 100644
--- a/examples/widgets/itemviews/simpletreemodel/simpletreemodel.pro
+++ b/examples/widgets/itemviews/simpletreemodel/simpletreemodel.pro
@@ -1,13 +1,12 @@
+QT += widgets
+
HEADERS = treeitem.h \
treemodel.h
RESOURCES = simpletreemodel.qrc
SOURCES = treeitem.cpp \
treemodel.cpp \
main.cpp
-CONFIG += qt
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/itemviews/simpletreemodel
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/itemviews/simplewidgetmapper/simplewidgetmapper.pro b/examples/widgets/itemviews/simplewidgetmapper/simplewidgetmapper.pro
index c19cb0eef8..1d5cca3f01 100644
--- a/examples/widgets/itemviews/simplewidgetmapper/simplewidgetmapper.pro
+++ b/examples/widgets/itemviews/simplewidgetmapper/simplewidgetmapper.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = window.h
SOURCES = main.cpp \
window.cpp
@@ -5,5 +7,3 @@ SOURCES = main.cpp \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/itemviews/simplewidgetmapper
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/itemviews/spinboxdelegate/spinboxdelegate.pro b/examples/widgets/itemviews/spinboxdelegate/spinboxdelegate.pro
index c156a4f425..92f6b9d712 100644
--- a/examples/widgets/itemviews/spinboxdelegate/spinboxdelegate.pro
+++ b/examples/widgets/itemviews/spinboxdelegate/spinboxdelegate.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = delegate.h
SOURCES = delegate.cpp \
main.cpp
@@ -6,6 +8,4 @@ SOURCES = delegate.cpp \
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/itemviews/spinboxdelegate
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/itemviews/spreadsheet/spreadsheet.pro b/examples/widgets/itemviews/spreadsheet/spreadsheet.pro
index b69811a4b8..56f7424a93 100644
--- a/examples/widgets/itemviews/spreadsheet/spreadsheet.pro
+++ b/examples/widgets/itemviews/spreadsheet/spreadsheet.pro
@@ -1,6 +1,6 @@
QT += widgets
-!isEmpty(QT.printsupport.name): QT += printsupport
-#unix:contains(QT_CONFIG, dbus):QT += dbus widgets
+qtHaveModule(printsupport): QT += printsupport
+#unix:qtHaveModule(dbus): QT += dbus widgets
HEADERS += printview.h spreadsheet.h spreadsheetdelegate.h spreadsheetitem.h
SOURCES += main.cpp \
diff --git a/examples/widgets/itemviews/stardelegate/stardelegate.pro b/examples/widgets/itemviews/stardelegate/stardelegate.pro
index 13c260d268..fefb8b5b95 100644
--- a/examples/widgets/itemviews/stardelegate/stardelegate.pro
+++ b/examples/widgets/itemviews/stardelegate/stardelegate.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = stardelegate.h \
stareditor.h \
starrating.h
@@ -10,6 +12,4 @@ SOURCES = main.cpp \
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/itemviews/stardelegate
INSTALLS += target
-
-QT += widgets
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/layouts/basiclayouts/basiclayouts.pro b/examples/widgets/layouts/basiclayouts/basiclayouts.pro
index cfa8594516..bc53b27782 100644
--- a/examples/widgets/layouts/basiclayouts/basiclayouts.pro
+++ b/examples/widgets/layouts/basiclayouts/basiclayouts.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = dialog.h
SOURCES = dialog.cpp \
main.cpp
@@ -6,6 +8,4 @@ SOURCES = dialog.cpp \
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/layouts/basiclayouts
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/layouts/borderlayout/borderlayout.pro b/examples/widgets/layouts/borderlayout/borderlayout.pro
index 2b7d55919a..53c9647bd7 100644
--- a/examples/widgets/layouts/borderlayout/borderlayout.pro
+++ b/examples/widgets/layouts/borderlayout/borderlayout.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = borderlayout.h \
window.h
SOURCES = borderlayout.cpp \
@@ -7,5 +9,3 @@ SOURCES = borderlayout.cpp \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/layouts/borderlayout
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/layouts/dynamiclayouts/dynamiclayouts.pro b/examples/widgets/layouts/dynamiclayouts/dynamiclayouts.pro
index 293137c426..8424799ca3 100644
--- a/examples/widgets/layouts/dynamiclayouts/dynamiclayouts.pro
+++ b/examples/widgets/layouts/dynamiclayouts/dynamiclayouts.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = dialog.h
SOURCES = dialog.cpp \
main.cpp
@@ -6,6 +8,4 @@ SOURCES = dialog.cpp \
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/layouts/dynamiclayouts
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/layouts/flowlayout/flowlayout.pro b/examples/widgets/layouts/flowlayout/flowlayout.pro
index bd977f2a0e..a0cfd409bb 100644
--- a/examples/widgets/layouts/flowlayout/flowlayout.pro
+++ b/examples/widgets/layouts/flowlayout/flowlayout.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = flowlayout.h \
window.h
SOURCES = flowlayout.cpp \
@@ -7,5 +9,3 @@ SOURCES = flowlayout.cpp \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/layouts/flowlayout
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/layouts/layouts.pro b/examples/widgets/layouts/layouts.pro
index cfd9b4b01c..c641e8cf7f 100644
--- a/examples/widgets/layouts/layouts.pro
+++ b/examples/widgets/layouts/layouts.pro
@@ -3,5 +3,3 @@ SUBDIRS = basiclayouts \
borderlayout \
dynamiclayouts \
flowlayout
-
-QT += widgets
diff --git a/examples/widgets/mainwindows/application/application.pro b/examples/widgets/mainwindows/application/application.pro
index f202a60979..652cc73485 100644
--- a/examples/widgets/mainwindows/application/application.pro
+++ b/examples/widgets/mainwindows/application/application.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = mainwindow.h
SOURCES = main.cpp \
mainwindow.cpp
@@ -9,6 +11,4 @@ RESOURCES = application.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/mainwindows/application
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/mainwindows/dockwidgets/dockwidgets.pro b/examples/widgets/mainwindows/dockwidgets/dockwidgets.pro
index ec3a5813e1..f445c5a89e 100644
--- a/examples/widgets/mainwindows/dockwidgets/dockwidgets.pro
+++ b/examples/widgets/mainwindows/dockwidgets/dockwidgets.pro
@@ -1,3 +1,6 @@
+QT += widgets
+qtHaveModule(printsupport): QT += printsupport
+
HEADERS = mainwindow.h
SOURCES = main.cpp \
mainwindow.cpp
@@ -7,7 +10,4 @@ RESOURCES = dockwidgets.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/mainwindows/dockwidgets
INSTALLS += target
-QT += widgets
-!isEmpty(QT.printsupport.name): QT += printsupport
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/mainwindows/mainwindow/mainwindow.pro b/examples/widgets/mainwindows/mainwindow/mainwindow.pro
index 2bef5f0b71..bf92d0e3ca 100644
--- a/examples/widgets/mainwindows/mainwindow/mainwindow.pro
+++ b/examples/widgets/mainwindows/mainwindow/mainwindow.pro
@@ -1,4 +1,6 @@
TEMPLATE = app
+QT += widgets
+
HEADERS += colorswatch.h mainwindow.h toolbar.h
SOURCES += colorswatch.cpp mainwindow.cpp toolbar.cpp main.cpp
build_all:!build_pass {
@@ -11,5 +13,3 @@ RESOURCES += mainwindow.qrc
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/mainwindows/mainwindow
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/mainwindows/mainwindows.pro b/examples/widgets/mainwindows/mainwindows.pro
index 848fdb04df..52179ec9bd 100644
--- a/examples/widgets/mainwindows/mainwindows.pro
+++ b/examples/widgets/mainwindows/mainwindows.pro
@@ -6,5 +6,3 @@ SUBDIRS = application \
menus \
recentfiles \
sdi
-
-QT += widgets
diff --git a/examples/widgets/mainwindows/mdi/mdi.pro b/examples/widgets/mainwindows/mdi/mdi.pro
index 786bbd3569..9f8ed1184a 100644
--- a/examples/widgets/mainwindows/mdi/mdi.pro
+++ b/examples/widgets/mainwindows/mdi/mdi.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = mainwindow.h \
mdichild.h
SOURCES = main.cpp \
@@ -9,6 +11,4 @@ RESOURCES = mdi.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/mainwindows/mdi
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/mainwindows/menus/menus.pro b/examples/widgets/mainwindows/menus/menus.pro
index 1ac5df4a3b..9be318759c 100644
--- a/examples/widgets/mainwindows/menus/menus.pro
+++ b/examples/widgets/mainwindows/menus/menus.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = mainwindow.h
SOURCES = mainwindow.cpp \
main.cpp
@@ -5,5 +7,3 @@ SOURCES = mainwindow.cpp \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/mainwindows/menus
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/mainwindows/recentfiles/recentfiles.pro b/examples/widgets/mainwindows/recentfiles/recentfiles.pro
index 4ab5a6820e..898ebd7842 100644
--- a/examples/widgets/mainwindows/recentfiles/recentfiles.pro
+++ b/examples/widgets/mainwindows/recentfiles/recentfiles.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = mainwindow.h
SOURCES = main.cpp \
mainwindow.cpp
@@ -6,6 +8,4 @@ SOURCES = main.cpp \
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/mainwindows/recentfiles
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/mainwindows/sdi/sdi.pro b/examples/widgets/mainwindows/sdi/sdi.pro
index 30ae4f5f3d..7d46b327e7 100644
--- a/examples/widgets/mainwindows/sdi/sdi.pro
+++ b/examples/widgets/mainwindows/sdi/sdi.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = mainwindow.h
SOURCES = main.cpp \
mainwindow.cpp
@@ -7,6 +9,4 @@ RESOURCES = sdi.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/mainwindows/sdi
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/painting/affine/affine.pro b/examples/widgets/painting/affine/affine.pro
index e94f4d12fb..1f2f8df87f 100644
--- a/examples/widgets/painting/affine/affine.pro
+++ b/examples/widgets/painting/affine/affine.pro
@@ -1,7 +1,7 @@
SOURCES += main.cpp xform.cpp
HEADERS += xform.h
-contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2) {
+qtHaveModule(opengl) {
DEFINES += QT_OPENGL_SUPPORT
QT += opengl
}
diff --git a/examples/widgets/painting/affine/xform.cpp b/examples/widgets/painting/affine/xform.cpp
index a873ba7af8..d4485df0b3 100644
--- a/examples/widgets/painting/affine/xform.cpp
+++ b/examples/widgets/painting/affine/xform.cpp
@@ -251,12 +251,14 @@ void XFormView::timerEvent(QTimerEvent *e)
}
}
+#ifndef QT_NO_WHEELEVENT
void XFormView::wheelEvent(QWheelEvent *e)
{
m_scale += e->delta() / qreal(600);
m_scale = qMax(qreal(0.1), qMin(qreal(4), m_scale));
emit scaleChanged(int(m_scale*1000));
}
+#endif
void XFormView::reset()
{
diff --git a/examples/widgets/painting/affine/xform.h b/examples/widgets/painting/affine/xform.h
index fff92733a0..a04381165d 100644
--- a/examples/widgets/painting/affine/xform.h
+++ b/examples/widgets/painting/affine/xform.h
@@ -116,7 +116,9 @@ signals:
protected:
void timerEvent(QTimerEvent *e);
+#ifndef QT_NO_WHEELEVENT
void wheelEvent(QWheelEvent *);
+#endif
private:
QPolygonF ctrlPoints;
diff --git a/examples/widgets/painting/basicdrawing/basicdrawing.pro b/examples/widgets/painting/basicdrawing/basicdrawing.pro
index 52ee0d4402..a7b3cff9cd 100644
--- a/examples/widgets/painting/basicdrawing/basicdrawing.pro
+++ b/examples/widgets/painting/basicdrawing/basicdrawing.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = renderarea.h \
window.h
SOURCES = main.cpp \
@@ -8,5 +10,3 @@ RESOURCES = basicdrawing.qrc
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/painting/basicdrawing
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/painting/composition/composition.pro b/examples/widgets/painting/composition/composition.pro
index 7ff82d789a..0269945ac8 100644
--- a/examples/widgets/painting/composition/composition.pro
+++ b/examples/widgets/painting/composition/composition.pro
@@ -6,7 +6,7 @@ SHARED_FOLDER = ../shared
include($$SHARED_FOLDER/shared.pri)
RESOURCES += composition.qrc
-contains(QT_CONFIG, opengl) {
+qtHaveModule(opengl) {
DEFINES += QT_OPENGL_SUPPORT
QT += opengl
}
diff --git a/examples/widgets/painting/concentriccircles/concentriccircles.pro b/examples/widgets/painting/concentriccircles/concentriccircles.pro
index 9690465d46..844c01a9c2 100644
--- a/examples/widgets/painting/concentriccircles/concentriccircles.pro
+++ b/examples/widgets/painting/concentriccircles/concentriccircles.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = circlewidget.h \
window.h
SOURCES = circlewidget.cpp \
@@ -7,6 +9,3 @@ SOURCES = circlewidget.cpp \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/painting/concentriccircles
INSTALLS += target
-
-QT += widgets
-
diff --git a/examples/widgets/painting/deform/deform.pro b/examples/widgets/painting/deform/deform.pro
index 01dc0a869c..6409aaed96 100644
--- a/examples/widgets/painting/deform/deform.pro
+++ b/examples/widgets/painting/deform/deform.pro
@@ -7,7 +7,7 @@ include($$SHARED_FOLDER/shared.pri)
RESOURCES += deform.qrc
-contains(QT_CONFIG, opengl) {
+qtHaveModule(opengl) {
DEFINES += QT_OPENGL_SUPPORT
QT += opengl
}
diff --git a/examples/widgets/painting/fontsampler/fontsampler.pro b/examples/widgets/painting/fontsampler/fontsampler.pro
index c32fc40572..08dd07bc08 100644
--- a/examples/widgets/painting/fontsampler/fontsampler.pro
+++ b/examples/widgets/painting/fontsampler/fontsampler.pro
@@ -1,3 +1,6 @@
+QT += widgets
+qtHaveModule(printsupport): QT += printsupport
+
FORMS = mainwindowbase.ui
HEADERS = mainwindow.h
SOURCES = main.cpp \
@@ -6,6 +9,3 @@ SOURCES = main.cpp \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/painting/fontsampler
INSTALLS += target
-
-QT += widgets
-!isEmpty(QT.printsupport.name): QT += printsupport
diff --git a/examples/widgets/painting/gradients/gradients.pro b/examples/widgets/painting/gradients/gradients.pro
index a7d6ae68d1..73f3974c62 100644
--- a/examples/widgets/painting/gradients/gradients.pro
+++ b/examples/widgets/painting/gradients/gradients.pro
@@ -6,7 +6,7 @@ SHARED_FOLDER = ../shared
include($$SHARED_FOLDER/shared.pri)
RESOURCES += gradients.qrc
-contains(QT_CONFIG, opengl) {
+qtHaveModule(opengl) {
DEFINES += QT_OPENGL_SUPPORT
QT += opengl
}
diff --git a/examples/widgets/painting/imagecomposition/imagecomposition.pro b/examples/widgets/painting/imagecomposition/imagecomposition.pro
index ce23c601f5..42c70471c1 100644
--- a/examples/widgets/painting/imagecomposition/imagecomposition.pro
+++ b/examples/widgets/painting/imagecomposition/imagecomposition.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = imagecomposer.h
SOURCES = imagecomposer.cpp \
main.cpp
@@ -6,6 +8,3 @@ RESOURCES = imagecomposition.qrc
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/painting/imagecomposition
INSTALLS += target
-
-QT += widgets
-
diff --git a/examples/widgets/painting/painterpaths/painterpaths.pro b/examples/widgets/painting/painterpaths/painterpaths.pro
index 560e84a267..2d2db30739 100644
--- a/examples/widgets/painting/painterpaths/painterpaths.pro
+++ b/examples/widgets/painting/painterpaths/painterpaths.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = renderarea.h \
window.h
SOURCES = main.cpp \
@@ -8,6 +10,3 @@ unix:!mac:!vxworks:!integrity:LIBS += -lm
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/painting/painterpaths
INSTALLS += target
-
-QT += widgets
-
diff --git a/examples/widgets/painting/painting.pro b/examples/widgets/painting/painting.pro
index 145fcdd383..7459dd3e94 100644
--- a/examples/widgets/painting/painting.pro
+++ b/examples/widgets/painting/painting.pro
@@ -12,8 +12,6 @@ SUBDIRS = basicdrawing \
transformations \
fontsampler
-QT += widgets
-
examples_affine.subdir = affine
examples_composition.subdir = composition
examples_deform.subdir = deform
diff --git a/examples/widgets/painting/pathstroke/pathstroke.pro b/examples/widgets/painting/pathstroke/pathstroke.pro
index 197fe22024..8ab3cb9244 100644
--- a/examples/widgets/painting/pathstroke/pathstroke.pro
+++ b/examples/widgets/painting/pathstroke/pathstroke.pro
@@ -7,7 +7,7 @@ include($$SHARED_FOLDER/shared.pri)
RESOURCES += pathstroke.qrc
-contains(QT_CONFIG, opengl) {
+qtHaveModule(opengl) {
DEFINES += QT_OPENGL_SUPPORT
QT += opengl
}
diff --git a/examples/widgets/painting/shared/shared.pri b/examples/widgets/painting/shared/shared.pri
index 6aef1bdd5b..af027e081a 100644
--- a/examples/widgets/painting/shared/shared.pri
+++ b/examples/widgets/painting/shared/shared.pri
@@ -1,6 +1,6 @@
INCLUDEPATH += $$PWD
-contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2) {
+qtHaveModule(opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2) {
DEFINES += QT_OPENGL_SUPPORT
QT += opengl widgets
}
diff --git a/examples/widgets/painting/shared/shared.pro b/examples/widgets/painting/shared/shared.pro
index 2a71c7d487..2756bf75ca 100644
--- a/examples/widgets/painting/shared/shared.pro
+++ b/examples/widgets/painting/shared/shared.pro
@@ -1,17 +1,17 @@
TEMPLATE = lib
CONFIG += static
-contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2) {
+qtHaveModule(opengl) {
DEFINES += QT_OPENGL_SUPPORT
- QT += opengl widgets
+ QT += opengl
}
+QT += widgets
build_all:!build_pass {
CONFIG -= build_all
CONFIG += release
}
TARGET = demo_shared
-QT += widgets
SOURCES += \
arthurstyle.cpp\
diff --git a/examples/widgets/painting/transformations/transformations.pro b/examples/widgets/painting/transformations/transformations.pro
index 72f42046db..3f5398a228 100644
--- a/examples/widgets/painting/transformations/transformations.pro
+++ b/examples/widgets/painting/transformations/transformations.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = renderarea.h \
window.h
SOURCES = main.cpp \
@@ -7,5 +9,3 @@ SOURCES = main.cpp \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/painting/transformations
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/richtext/calendar/calendar.pro b/examples/widgets/richtext/calendar/calendar.pro
index d98b08a368..5adb99aac3 100644
--- a/examples/widgets/richtext/calendar/calendar.pro
+++ b/examples/widgets/richtext/calendar/calendar.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = mainwindow.h
SOURCES = main.cpp \
mainwindow.cpp
@@ -5,5 +7,3 @@ SOURCES = main.cpp \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/richtext/calendar
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/richtext/orderform/orderform.pro b/examples/widgets/richtext/orderform/orderform.pro
index 72ba3a1d25..0eb9da3ae1 100644
--- a/examples/widgets/richtext/orderform/orderform.pro
+++ b/examples/widgets/richtext/orderform/orderform.pro
@@ -1,3 +1,6 @@
+QT += widgets
+qtHaveModule(printsupport): QT += printsupport
+
HEADERS = detailsdialog.h \
mainwindow.h
SOURCES = detailsdialog.cpp \
@@ -7,6 +10,3 @@ SOURCES = detailsdialog.cpp \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/richtext/orderform
INSTALLS += target
-
-QT += widgets
-!isEmpty(QT.printsupport.name): QT += printsupport
diff --git a/examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter.pro b/examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter.pro
index e968c1168a..640f36f9b8 100644
--- a/examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter.pro
+++ b/examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = highlighter.h \
mainwindow.h
SOURCES = highlighter.cpp \
@@ -14,5 +16,3 @@ wince*: {
addFiles.path = .
DEPLOYMENT += addFiles
}
-QT += widgets
-
diff --git a/examples/widgets/richtext/textedit/textedit.pro b/examples/widgets/richtext/textedit/textedit.pro
index a2090231c5..c32bf68f68 100644
--- a/examples/widgets/richtext/textedit/textedit.pro
+++ b/examples/widgets/richtext/textedit/textedit.pro
@@ -1,8 +1,9 @@
+QT += widgets
+qtHaveModule(printsupport): QT += printsupport
+
TEMPLATE = app
TARGET = textedit
-CONFIG += qt warn_on
-
HEADERS = textedit.h
SOURCES = textedit.cpp \
main.cpp
@@ -18,6 +19,3 @@ EXAMPLE_FILES = textedit.qdoc
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/richtext/textedit
INSTALLS += target
-
-QT += widgets
-!isEmpty(QT.printsupport.name): QT += printsupport
diff --git a/examples/widgets/richtext/textedit/textedit.qdoc b/examples/widgets/richtext/textedit/textedit.qdoc
index 18f26dbd1d..070ac22f92 100644
--- a/examples/widgets/richtext/textedit/textedit.qdoc
+++ b/examples/widgets/richtext/textedit/textedit.qdoc
@@ -33,9 +33,8 @@
\brief This example displays a text editor with the user interface written
in pure C++.
- A similar example which uses \link designer-manual.book Qt
- Designer\endlink to produce the user interface is in the \link
- designer-manual.book Qt Designer manual\endlink.
+ A similar example which uses Qt Designer to produce the user
+ interface is in the \l {Qt Designer Manual}.
See \c{$QTDIR/examples/textedit} for the source code.
diff --git a/examples/widgets/scroller/graphicsview/graphicsview.pro b/examples/widgets/scroller/graphicsview/graphicsview.pro
index 07ad81922e..39bdb2bc2c 100644
--- a/examples/widgets/scroller/graphicsview/graphicsview.pro
+++ b/examples/widgets/scroller/graphicsview/graphicsview.pro
@@ -1,7 +1,8 @@
+QT += widgets
+
TEMPLATE = app
SOURCES = main.cpp
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/scroller/graphicsview
INSTALLS += target
-QT += widgets
diff --git a/examples/widgets/statemachine/eventtransitions/eventtransitions.pro b/examples/widgets/statemachine/eventtransitions/eventtransitions.pro
index 7b8ef26eb0..63c2eab5a9 100644
--- a/examples/widgets/statemachine/eventtransitions/eventtransitions.pro
+++ b/examples/widgets/statemachine/eventtransitions/eventtransitions.pro
@@ -1,9 +1,9 @@
+QT += widgets
+
SOURCES = main.cpp
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/statemachine/eventtransitions
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/statemachine/rogue/rogue.pro b/examples/widgets/statemachine/rogue/rogue.pro
index d1f4f5d972..cf9657c7d6 100644
--- a/examples/widgets/statemachine/rogue/rogue.pro
+++ b/examples/widgets/statemachine/rogue/rogue.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = window.h \
movementtransition.h
SOURCES = main.cpp \
@@ -6,6 +8,3 @@ SOURCES = main.cpp \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/statemachine/rogue
INSTALLS += target
-
-QT += widgets
-
diff --git a/examples/widgets/statemachine/statemachine.pro b/examples/widgets/statemachine/statemachine.pro
index 2a539d2e54..926e01cfda 100644
--- a/examples/widgets/statemachine/statemachine.pro
+++ b/examples/widgets/statemachine/statemachine.pro
@@ -3,7 +3,7 @@ SUBDIRS = \
factorial \
pingpong
-!contains(QT_CONFIG, no-widgets) {
+qtHaveModule(widgets) {
SUBDIRS += \
eventtransitions \
rogue \
diff --git a/examples/widgets/statemachine/trafficlight/trafficlight.pro b/examples/widgets/statemachine/trafficlight/trafficlight.pro
index 14d10f5a10..85d9cda504 100644
--- a/examples/widgets/statemachine/trafficlight/trafficlight.pro
+++ b/examples/widgets/statemachine/trafficlight/trafficlight.pro
@@ -1,8 +1,9 @@
+QT += widgets
+
SOURCES = main.cpp
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/statemachine/trafficlight
INSTALLS += target
-QT += widgets
diff --git a/examples/widgets/statemachine/twowaybutton/twowaybutton.pro b/examples/widgets/statemachine/twowaybutton/twowaybutton.pro
index 9562df5919..22d19308ae 100644
--- a/examples/widgets/statemachine/twowaybutton/twowaybutton.pro
+++ b/examples/widgets/statemachine/twowaybutton/twowaybutton.pro
@@ -1,8 +1,9 @@
+QT += widgets
+
SOURCES = main.cpp
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/statemachine/twowaybutton
INSTALLS += target
-QT += widgets
diff --git a/examples/widgets/tools/codecs/codecs.pro b/examples/widgets/tools/codecs/codecs.pro
index 410411d870..7b2baa3ec8 100644
--- a/examples/widgets/tools/codecs/codecs.pro
+++ b/examples/widgets/tools/codecs/codecs.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS += mainwindow.h \
previewform.h
SOURCES += main.cpp \
@@ -10,6 +12,4 @@ EXAMPLE_FILES = encodedfiles
target.path = $$[QT_INSTALL_EXAMPLES]/tools/codecs
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tools/completer/completer.pro b/examples/widgets/tools/completer/completer.pro
index c0fcf8d1fb..b47b7a9057 100644
--- a/examples/widgets/tools/completer/completer.pro
+++ b/examples/widgets/tools/completer/completer.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = fsmodel.h \
mainwindow.h
SOURCES = fsmodel.cpp \
@@ -9,6 +11,4 @@ RESOURCES = completer.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/tools/completer
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tools/customcompleter/customcompleter.pro b/examples/widgets/tools/customcompleter/customcompleter.pro
index 24d973cf82..b8ccc83744 100644
--- a/examples/widgets/tools/customcompleter/customcompleter.pro
+++ b/examples/widgets/tools/customcompleter/customcompleter.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = mainwindow.h \
textedit.h
SOURCES = main.cpp \
@@ -9,6 +11,4 @@ RESOURCES = customcompleter.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/tools/customcompleter
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tools/echoplugin/echoplugin.pro b/examples/widgets/tools/echoplugin/echoplugin.pro
index 685227c6c4..986ba9c9c3 100644
--- a/examples/widgets/tools/echoplugin/echoplugin.pro
+++ b/examples/widgets/tools/echoplugin/echoplugin.pro
@@ -7,5 +7,3 @@ SUBDIRS = echowindow \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/tools/echoplugin
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/tools/echoplugin/echowindow/echowindow.pro b/examples/widgets/tools/echoplugin/echowindow/echowindow.pro
index cd91693ec0..c8dc000678 100644
--- a/examples/widgets/tools/echoplugin/echowindow/echowindow.pro
+++ b/examples/widgets/tools/echoplugin/echowindow/echowindow.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = echowindow.h \
echointerface.h
SOURCES = echowindow.cpp \
@@ -16,6 +18,4 @@ win32 {
target.path = $$[QT_INSTALL_EXAMPLES]/tools/echoplugin
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tools/echoplugin/plugin/plugin.pro b/examples/widgets/tools/echoplugin/plugin/plugin.pro
index a586130b76..235358d52c 100644
--- a/examples/widgets/tools/echoplugin/plugin/plugin.pro
+++ b/examples/widgets/tools/echoplugin/plugin/plugin.pro
@@ -1,6 +1,7 @@
#! [0]
TEMPLATE = lib
CONFIG += plugin
+QT += widgets
INCLUDEPATH += ../echowindow
HEADERS = echoplugin.h
SOURCES = echoplugin.cpp
@@ -13,5 +14,3 @@ EXAMPLE_FILES = echoplugin.json
# install
target.path = $$[QT_INSTALL_EXAMPLES]/tools/echoplugin/plugin
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/tools/i18n/i18n.pro b/examples/widgets/tools/i18n/i18n.pro
index 57514781eb..8095e44b3c 100644
--- a/examples/widgets/tools/i18n/i18n.pro
+++ b/examples/widgets/tools/i18n/i18n.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = languagechooser.h \
mainwindow.h
SOURCES = languagechooser.cpp \
@@ -23,6 +25,4 @@ TRANSLATIONS += translations/i18n_ar.ts \
target.path = $$[QT_INSTALL_EXAMPLES]/tools/i18n
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tools/plugandpaint/plugandpaint.pro b/examples/widgets/tools/plugandpaint/plugandpaint.pro
index ffa408df66..0b20f81a1f 100644
--- a/examples/widgets/tools/plugandpaint/plugandpaint.pro
+++ b/examples/widgets/tools/plugandpaint/plugandpaint.pro
@@ -1,4 +1,6 @@
#! [0]
+QT += widgets
+
HEADERS = interfaces.h \
mainwindow.h \
paintarea.h \
@@ -19,5 +21,3 @@ if(!debug_and_release|build_pass):CONFIG(debug, debug|release) {
# install
target.path = $$[QT_INSTALL_EXAMPLES]/tools/plugandpaint
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/tools/plugandpaintplugins/basictools/basictools.pro b/examples/widgets/tools/plugandpaintplugins/basictools/basictools.pro
index 731034fb3c..aac2edce00 100644
--- a/examples/widgets/tools/plugandpaintplugins/basictools/basictools.pro
+++ b/examples/widgets/tools/plugandpaintplugins/basictools/basictools.pro
@@ -1,6 +1,7 @@
#! [0]
TEMPLATE = lib
CONFIG += plugin static
+QT += widgets
INCLUDEPATH += ../..
HEADERS = basictoolsplugin.h
SOURCES = basictoolsplugin.cpp
@@ -11,5 +12,3 @@ DESTDIR = ../../plugandpaint/plugins
# install
target.path = $$[QT_INSTALL_EXAMPLES]/tools/plugandpaint/plugins
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/tools/plugandpaintplugins/basictools/basictoolsplugin.h b/examples/widgets/tools/plugandpaintplugins/basictools/basictoolsplugin.h
index b5159803f6..3da75252a7 100644
--- a/examples/widgets/tools/plugandpaintplugins/basictools/basictoolsplugin.h
+++ b/examples/widgets/tools/plugandpaintplugins/basictools/basictoolsplugin.h
@@ -58,7 +58,9 @@ class BasicToolsPlugin : public QObject,
public FilterInterface
{
Q_OBJECT
+//! [4]
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.Examples.PlugAndPaint.BrushInterface" FILE "basictools.json")
+//! [4]
Q_INTERFACES(BrushInterface ShapeInterface FilterInterface)
//! [0]
diff --git a/examples/widgets/tools/plugandpaintplugins/extrafilters/extrafilters.pro b/examples/widgets/tools/plugandpaintplugins/extrafilters/extrafilters.pro
index 7a18e49dc1..3280f119cf 100644
--- a/examples/widgets/tools/plugandpaintplugins/extrafilters/extrafilters.pro
+++ b/examples/widgets/tools/plugandpaintplugins/extrafilters/extrafilters.pro
@@ -1,6 +1,7 @@
#! [0]
TEMPLATE = lib
CONFIG += plugin
+QT += widgets
INCLUDEPATH += ../..
HEADERS = extrafiltersplugin.h
SOURCES = extrafiltersplugin.cpp
@@ -11,5 +12,3 @@ DESTDIR = ../../plugandpaint/plugins
# install
target.path = $$[QT_INSTALL_EXAMPLES]/tools/plugandpaint/plugins
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/tools/plugandpaintplugins/plugandpaintplugins.pro b/examples/widgets/tools/plugandpaintplugins/plugandpaintplugins.pro
index 6f077c952e..e15220c621 100644
--- a/examples/widgets/tools/plugandpaintplugins/plugandpaintplugins.pro
+++ b/examples/widgets/tools/plugandpaintplugins/plugandpaintplugins.pro
@@ -1,5 +1,3 @@
TEMPLATE = subdirs
SUBDIRS = basictools \
extrafilters
-
-QT += widgets
diff --git a/examples/widgets/tools/regexp/regexp.pro b/examples/widgets/tools/regexp/regexp.pro
index eead58807f..0d2a9a280c 100644
--- a/examples/widgets/tools/regexp/regexp.pro
+++ b/examples/widgets/tools/regexp/regexp.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = regexpdialog.h
SOURCES = regexpdialog.cpp \
main.cpp
@@ -6,6 +8,4 @@ SOURCES = regexpdialog.cpp \
target.path = $$[QT_INSTALL_EXAMPLES]/tools/regexp
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tools/settingseditor/settingseditor.pro b/examples/widgets/tools/settingseditor/settingseditor.pro
index 9d7c776067..69b8a04c92 100644
--- a/examples/widgets/tools/settingseditor/settingseditor.pro
+++ b/examples/widgets/tools/settingseditor/settingseditor.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = locationdialog.h \
mainwindow.h \
settingstree.h \
@@ -14,6 +16,4 @@ EXAMPLE_FILES = inifiles
target.path = $$[QT_INSTALL_EXAMPLES]/tools/settingseditor
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tools/styleplugin/plugin/plugin.pro b/examples/widgets/tools/styleplugin/plugin/plugin.pro
index 65a41087e6..605e196bd9 100644
--- a/examples/widgets/tools/styleplugin/plugin/plugin.pro
+++ b/examples/widgets/tools/styleplugin/plugin/plugin.pro
@@ -1,6 +1,7 @@
#! [0]
TEMPLATE = lib
CONFIG += plugin
+QT += widgets
HEADERS = simplestyle.h \
simplestyleplugin.h
SOURCES = simplestyle.cpp \
@@ -19,6 +20,3 @@ EXAMPLE_FILES += simplestyle.json
# install
target.path = $$[QT_INSTALL_EXAMPLES]/tools/styleplugin/styles
INSTALLS += target
-
-
-QT += widgets
diff --git a/examples/widgets/tools/styleplugin/styleplugin.pro b/examples/widgets/tools/styleplugin/styleplugin.pro
index 4df48ae6b4..d7129e724b 100644
--- a/examples/widgets/tools/styleplugin/styleplugin.pro
+++ b/examples/widgets/tools/styleplugin/styleplugin.pro
@@ -5,5 +5,3 @@ SUBDIRS = stylewindow \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/tools/styleplugin
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/tools/styleplugin/stylewindow/stylewindow.pro b/examples/widgets/tools/styleplugin/stylewindow/stylewindow.pro
index 3bfcf23bbb..12adce4872 100644
--- a/examples/widgets/tools/styleplugin/stylewindow/stylewindow.pro
+++ b/examples/widgets/tools/styleplugin/stylewindow/stylewindow.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = stylewindow.h
SOURCES = stylewindow.cpp \
main.cpp
@@ -13,5 +15,3 @@ win32 {
# install
target.path = $$[QT_INSTALL_EXAMPLES]/tools/styleplugin
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/tools/tools.pro b/examples/widgets/tools/tools.pro
index aaf4440d23..f08f7fd6d2 100644
--- a/examples/widgets/tools/tools.pro
+++ b/examples/widgets/tools/tools.pro
@@ -14,6 +14,8 @@ SUBDIRS = \
undo \
undoframework
+contains(DEFINES, QT_NO_TRANSLATION): SUBDIRS -= i18n
+
plugandpaint.depends = plugandpaintplugins
# install
diff --git a/examples/widgets/tools/treemodelcompleter/treemodelcompleter.pro b/examples/widgets/tools/treemodelcompleter/treemodelcompleter.pro
index 818f242b48..56e0cee210 100644
--- a/examples/widgets/tools/treemodelcompleter/treemodelcompleter.pro
+++ b/examples/widgets/tools/treemodelcompleter/treemodelcompleter.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = treemodelcompleter.h \
mainwindow.h
SOURCES = treemodelcompleter.cpp \
@@ -9,6 +11,4 @@ RESOURCES = treemodelcompleter.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/tools/treemodelcompleter
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tools/undo/undo.pro b/examples/widgets/tools/undo/undo.pro
index f3ac1256c0..5e0f1d7817 100644
--- a/examples/widgets/tools/undo/undo.pro
+++ b/examples/widgets/tools/undo/undo.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
SOURCES += main.cpp mainwindow.cpp commands.cpp document.cpp
HEADERS += mainwindow.h commands.h document.h
FORMS += mainwindow.ui
@@ -12,5 +14,3 @@ RESOURCES += undo.qrc
# install
target.path = $$[QT_INSTALL_EXAMPLES]/tools/undo
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/tools/undoframework/undoframework.pro b/examples/widgets/tools/undoframework/undoframework.pro
index a9a1b05f39..9cea99f105 100644
--- a/examples/widgets/tools/undoframework/undoframework.pro
+++ b/examples/widgets/tools/undoframework/undoframework.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = commands.h \
diagramitem.h \
diagramscene.h \
@@ -13,6 +15,4 @@ RESOURCES = undoframework.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/tools/undoframework
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tutorials/addressbook-fr/addressbook-fr.pro b/examples/widgets/tutorials/addressbook-fr/addressbook-fr.pro
index 50e6e55ac8..8006039ce3 100644
--- a/examples/widgets/tutorials/addressbook-fr/addressbook-fr.pro
+++ b/examples/widgets/tutorials/addressbook-fr/addressbook-fr.pro
@@ -4,5 +4,4 @@ SUBDIRS = part1 part2 part3 part4 part5 part6 part7
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/addressbook-fr
INSTALLS += target
-QT += widgets
diff --git a/examples/widgets/tutorials/addressbook-fr/part1/part1.pro b/examples/widgets/tutorials/addressbook-fr/part1/part1.pro
index b82f294ed6..aa31f122b8 100644
--- a/examples/widgets/tutorials/addressbook-fr/part1/part1.pro
+++ b/examples/widgets/tutorials/addressbook-fr/part1/part1.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
SOURCES = addressbook.cpp \
main.cpp
HEADERS = addressbook.h
@@ -7,7 +9,5 @@ QMAKE_PROJECT_NAME = abfr_part1
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/addressbook-fr/part1
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tutorials/addressbook-fr/part2/part2.pro b/examples/widgets/tutorials/addressbook-fr/part2/part2.pro
index 1ebe545e85..bfcedda6f7 100644
--- a/examples/widgets/tutorials/addressbook-fr/part2/part2.pro
+++ b/examples/widgets/tutorials/addressbook-fr/part2/part2.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
SOURCES = addressbook.cpp \
main.cpp
HEADERS = addressbook.h
@@ -7,7 +9,5 @@ QMAKE_PROJECT_NAME = abfr_part2
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/addressbook-fr/part2
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tutorials/addressbook-fr/part3/part3.pro b/examples/widgets/tutorials/addressbook-fr/part3/part3.pro
index 04c8417cbe..0990cb5088 100644
--- a/examples/widgets/tutorials/addressbook-fr/part3/part3.pro
+++ b/examples/widgets/tutorials/addressbook-fr/part3/part3.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
SOURCES = addressbook.cpp \
main.cpp
HEADERS = addressbook.h
@@ -7,7 +9,5 @@ QMAKE_PROJECT_NAME = abfr_part3
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/addressbook-fr/part3
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tutorials/addressbook-fr/part4/part4.pro b/examples/widgets/tutorials/addressbook-fr/part4/part4.pro
index 02fdecf210..44ff4bdce9 100644
--- a/examples/widgets/tutorials/addressbook-fr/part4/part4.pro
+++ b/examples/widgets/tutorials/addressbook-fr/part4/part4.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
SOURCES = addressbook.cpp \
main.cpp
HEADERS = addressbook.h
@@ -7,7 +9,5 @@ QMAKE_PROJECT_NAME = abfr_part4
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/addressbook-fr/part4
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tutorials/addressbook-fr/part5/part5.pro b/examples/widgets/tutorials/addressbook-fr/part5/part5.pro
index 20b9549037..10638759a9 100644
--- a/examples/widgets/tutorials/addressbook-fr/part5/part5.pro
+++ b/examples/widgets/tutorials/addressbook-fr/part5/part5.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
SOURCES = addressbook.cpp \
finddialog.cpp \
main.cpp
@@ -9,7 +11,5 @@ QMAKE_PROJECT_NAME = abfr_part5
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/addressbook-fr/part5
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tutorials/addressbook-fr/part6/part6.pro b/examples/widgets/tutorials/addressbook-fr/part6/part6.pro
index 098daca36a..4c7638fd70 100644
--- a/examples/widgets/tutorials/addressbook-fr/part6/part6.pro
+++ b/examples/widgets/tutorials/addressbook-fr/part6/part6.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
SOURCES = addressbook.cpp \
finddialog.cpp \
main.cpp
@@ -9,7 +11,5 @@ QMAKE_PROJECT_NAME = abfr_part6
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/addressbook-fr/part6
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tutorials/addressbook-fr/part7/part7.pro b/examples/widgets/tutorials/addressbook-fr/part7/part7.pro
index 5c1dd33d06..6f56489979 100644
--- a/examples/widgets/tutorials/addressbook-fr/part7/part7.pro
+++ b/examples/widgets/tutorials/addressbook-fr/part7/part7.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
SOURCES = addressbook.cpp \
finddialog.cpp \
main.cpp
@@ -9,7 +11,5 @@ QMAKE_PROJECT_NAME = abfr_part7
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/addressbook-fr/part7
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tutorials/addressbook/addressbook.pro b/examples/widgets/tutorials/addressbook/addressbook.pro
index 5dd9da5c01..d31424998e 100644
--- a/examples/widgets/tutorials/addressbook/addressbook.pro
+++ b/examples/widgets/tutorials/addressbook/addressbook.pro
@@ -4,5 +4,3 @@ SUBDIRS = part1 part2 part3 part4 part5 part6 part7
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/addressbook
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/tutorials/addressbook/part1/part1.pro b/examples/widgets/tutorials/addressbook/part1/part1.pro
index 82746da8e5..826ed1aa77 100644
--- a/examples/widgets/tutorials/addressbook/part1/part1.pro
+++ b/examples/widgets/tutorials/addressbook/part1/part1.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
SOURCES = addressbook.cpp \
main.cpp
HEADERS = addressbook.h
@@ -8,6 +10,4 @@ QMAKE_PROJECT_NAME = ab_part1
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/addressbook/part1
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tutorials/addressbook/part2/part2.pro b/examples/widgets/tutorials/addressbook/part2/part2.pro
index 439b9185a6..0ab172872a 100644
--- a/examples/widgets/tutorials/addressbook/part2/part2.pro
+++ b/examples/widgets/tutorials/addressbook/part2/part2.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
SOURCES = addressbook.cpp \
main.cpp
HEADERS = addressbook.h
@@ -8,6 +10,4 @@ QMAKE_PROJECT_NAME = ab_part2
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/addressbook/part2
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tutorials/addressbook/part3/part3.pro b/examples/widgets/tutorials/addressbook/part3/part3.pro
index fd32f00536..7863a22bf2 100644
--- a/examples/widgets/tutorials/addressbook/part3/part3.pro
+++ b/examples/widgets/tutorials/addressbook/part3/part3.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
SOURCES = addressbook.cpp \
main.cpp
HEADERS = addressbook.h
@@ -8,6 +10,4 @@ QMAKE_PROJECT_NAME = ab_part3
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/addressbook/part3
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tutorials/addressbook/part4/part4.pro b/examples/widgets/tutorials/addressbook/part4/part4.pro
index c5caaa87c1..d71328bb0e 100644
--- a/examples/widgets/tutorials/addressbook/part4/part4.pro
+++ b/examples/widgets/tutorials/addressbook/part4/part4.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
SOURCES = addressbook.cpp \
main.cpp
HEADERS = addressbook.h
@@ -8,6 +10,4 @@ QMAKE_PROJECT_NAME = ab_part4
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/addressbook/part4
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tutorials/addressbook/part5/part5.pro b/examples/widgets/tutorials/addressbook/part5/part5.pro
index e779ad5024..7530900f62 100644
--- a/examples/widgets/tutorials/addressbook/part5/part5.pro
+++ b/examples/widgets/tutorials/addressbook/part5/part5.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
SOURCES = addressbook.cpp \
finddialog.cpp \
main.cpp
@@ -10,6 +12,4 @@ QMAKE_PROJECT_NAME = ab_part5
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/addressbook/part5
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tutorials/addressbook/part6/part6.pro b/examples/widgets/tutorials/addressbook/part6/part6.pro
index dd652985ad..88b7147a3f 100644
--- a/examples/widgets/tutorials/addressbook/part6/part6.pro
+++ b/examples/widgets/tutorials/addressbook/part6/part6.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
SOURCES = addressbook.cpp \
finddialog.cpp \
main.cpp
@@ -10,6 +12,4 @@ QMAKE_PROJECT_NAME = ab_part6
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/addressbook/part6
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tutorials/addressbook/part7/part7.pro b/examples/widgets/tutorials/addressbook/part7/part7.pro
index d63690ee11..ef435222cd 100644
--- a/examples/widgets/tutorials/addressbook/part7/part7.pro
+++ b/examples/widgets/tutorials/addressbook/part7/part7.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
SOURCES = addressbook.cpp \
finddialog.cpp \
main.cpp
@@ -10,6 +12,4 @@ QMAKE_PROJECT_NAME = ab_part7
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/addressbook/part7
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tutorials/gettingStarted/gettingStarted.pro b/examples/widgets/tutorials/gettingStarted/gettingStarted.pro
index b18e6565a6..3e37725410 100644
--- a/examples/widgets/tutorials/gettingStarted/gettingStarted.pro
+++ b/examples/widgets/tutorials/gettingStarted/gettingStarted.pro
@@ -1,5 +1,4 @@
TEMPLATE = subdirs
SUBDIRS += dir_gsqt
-QT += widgets
dir_gsqt.file = gsQt/gsqt.pro
diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/gsqt.pro b/examples/widgets/tutorials/gettingStarted/gsQt/gsqt.pro
index 956d78aa6e..320f3c3ee4 100644
--- a/examples/widgets/tutorials/gettingStarted/gsQt/gsqt.pro
+++ b/examples/widgets/tutorials/gettingStarted/gsQt/gsqt.pro
@@ -5,5 +5,3 @@ SUBDIRS = part1 \
part3 \
part4 \
part5
-
-QT += widgets
diff --git a/examples/widgets/tutorials/modelview/1_readonly/1_readonly.pro b/examples/widgets/tutorials/modelview/1_readonly/1_readonly.pro
index cf066c6b31..51fcbae64d 100644
--- a/examples/widgets/tutorials/modelview/1_readonly/1_readonly.pro
+++ b/examples/widgets/tutorials/modelview/1_readonly/1_readonly.pro
@@ -2,6 +2,8 @@ TARGET = mv_readonly
TEMPLATE = app
+QT += widgets
+
SOURCES += main.cpp \
mymodel.cpp
@@ -12,6 +14,4 @@ HEADERS += mymodel.h
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/modelview/1_readonly
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tutorials/modelview/2_formatting/2_formatting.pro b/examples/widgets/tutorials/modelview/2_formatting/2_formatting.pro
index 057196b7c6..d5d34d6f7f 100644
--- a/examples/widgets/tutorials/modelview/2_formatting/2_formatting.pro
+++ b/examples/widgets/tutorials/modelview/2_formatting/2_formatting.pro
@@ -2,6 +2,8 @@ TARGET = mv_formatting
TEMPLATE = app
+QT += widgets
+
SOURCES += main.cpp \
mymodel.cpp
@@ -11,6 +13,4 @@ HEADERS += mymodel.h
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/modelview/2_formatting
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tutorials/modelview/3_changingmodel/3_changingmodel.pro b/examples/widgets/tutorials/modelview/3_changingmodel/3_changingmodel.pro
index 92a1bbf4e5..0e7e587255 100644
--- a/examples/widgets/tutorials/modelview/3_changingmodel/3_changingmodel.pro
+++ b/examples/widgets/tutorials/modelview/3_changingmodel/3_changingmodel.pro
@@ -2,6 +2,8 @@ TARGET = mv_changingmodel
TEMPLATE = app
+QT += widgets
+
SOURCES += main.cpp \
mymodel.cpp
@@ -11,6 +13,4 @@ HEADERS += mymodel.h
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/modelview/3_changingmodel
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tutorials/modelview/4_headers/4_headers.pro b/examples/widgets/tutorials/modelview/4_headers/4_headers.pro
index 186ea888e0..53effe9b5b 100644
--- a/examples/widgets/tutorials/modelview/4_headers/4_headers.pro
+++ b/examples/widgets/tutorials/modelview/4_headers/4_headers.pro
@@ -2,6 +2,8 @@ TARGET = mv_headers
TEMPLATE = app
+QT += widgets
+
SOURCES += main.cpp \
mymodel.cpp
@@ -11,6 +13,4 @@ HEADERS += mymodel.h
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/modelview/4_headers
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tutorials/modelview/5_edit/5_edit.pro b/examples/widgets/tutorials/modelview/5_edit/5_edit.pro
index b4727580af..9a2c34f977 100644
--- a/examples/widgets/tutorials/modelview/5_edit/5_edit.pro
+++ b/examples/widgets/tutorials/modelview/5_edit/5_edit.pro
@@ -2,6 +2,8 @@ TARGET = mv_edit
TEMPLATE = app
+QT += widgets
+
SOURCES += main.cpp \
mainwindow.cpp \
mymodel.cpp
@@ -13,6 +15,4 @@ HEADERS += mainwindow.h \
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/modelview/5_edit
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tutorials/modelview/6_treeview/6_treeview.pro b/examples/widgets/tutorials/modelview/6_treeview/6_treeview.pro
index af3208f9c8..4a874b205a 100644
--- a/examples/widgets/tutorials/modelview/6_treeview/6_treeview.pro
+++ b/examples/widgets/tutorials/modelview/6_treeview/6_treeview.pro
@@ -1,5 +1,6 @@
TARGET = mv_tree
TEMPLATE = app
+QT += widgets
SOURCES += main.cpp \
mainwindow.cpp
HEADERS += mainwindow.h
@@ -8,6 +9,4 @@ HEADERS += mainwindow.h
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/modelview/6_treeview
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tutorials/modelview/7_selections/7_selections.pro b/examples/widgets/tutorials/modelview/7_selections/7_selections.pro
index 8ab42e97ef..ef412f0aff 100644
--- a/examples/widgets/tutorials/modelview/7_selections/7_selections.pro
+++ b/examples/widgets/tutorials/modelview/7_selections/7_selections.pro
@@ -1,5 +1,6 @@
TARGET = mv_selections
TEMPLATE = app
+QT += widgets
SOURCES += main.cpp \
mainwindow.cpp
HEADERS += mainwindow.h
@@ -8,6 +9,4 @@ HEADERS += mainwindow.h
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/modelview/7_selections
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tutorials/modelview/modelview.pro b/examples/widgets/tutorials/modelview/modelview.pro
index b21fe5afdc..9a5548aa30 100644
--- a/examples/widgets/tutorials/modelview/modelview.pro
+++ b/examples/widgets/tutorials/modelview/modelview.pro
@@ -10,5 +10,3 @@ SUBDIRS = 1_readonly \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/modelview
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/tutorials/threads/clock/clock.pro b/examples/widgets/tutorials/threads/clock/clock.pro
index 9d2687324b..041c02bea8 100644
--- a/examples/widgets/tutorials/threads/clock/clock.pro
+++ b/examples/widgets/tutorials/threads/clock/clock.pro
@@ -1,3 +1,4 @@
+QT += widgets
CONFIG += console
TEMPLATE = app
SOURCES += main.cpp \
@@ -7,6 +8,3 @@ HEADERS += clockthread.h
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/threads/clock
INSTALLS += target
-
-
-QT += widgets
diff --git a/examples/widgets/tutorials/threads/movedobject/movedobject.pro b/examples/widgets/tutorials/threads/movedobject/movedobject.pro
index 3bf40eb49c..b2ea7e5366 100644
--- a/examples/widgets/tutorials/threads/movedobject/movedobject.pro
+++ b/examples/widgets/tutorials/threads/movedobject/movedobject.pro
@@ -1,3 +1,4 @@
+QT += widgets
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
@@ -12,5 +13,3 @@ HEADERS += \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/threads/movedobject
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/tutorials/threads/threads.pro b/examples/widgets/tutorials/threads/threads.pro
index a95eccaaa0..19718d760c 100644
--- a/examples/widgets/tutorials/threads/threads.pro
+++ b/examples/widgets/tutorials/threads/threads.pro
@@ -5,6 +5,4 @@ SUBDIRS = hellothread \
clock \
movedobject
-contains(QT_CONFIG, concurrent): SUBDIRS += helloconcurrent
-
-QT += widgets
+qtHaveModule(concurrent): SUBDIRS += helloconcurrent
diff --git a/examples/widgets/tutorials/widgets/childwidget/childwidget.pro b/examples/widgets/tutorials/widgets/childwidget/childwidget.pro
index 4eeab61be5..a227a68593 100644
--- a/examples/widgets/tutorials/widgets/childwidget/childwidget.pro
+++ b/examples/widgets/tutorials/widgets/childwidget/childwidget.pro
@@ -1,9 +1,9 @@
+QT += widgets
+
SOURCES = main.cpp
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/widgets/childwidget
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tutorials/widgets/nestedlayouts/nestedlayouts.pro b/examples/widgets/tutorials/widgets/nestedlayouts/nestedlayouts.pro
index e362f16713..471a98121e 100644
--- a/examples/widgets/tutorials/widgets/nestedlayouts/nestedlayouts.pro
+++ b/examples/widgets/tutorials/widgets/nestedlayouts/nestedlayouts.pro
@@ -1,9 +1,9 @@
+QT += widgets
+
SOURCES = main.cpp
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/widgets/nestedlayouts
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tutorials/widgets/toplevel/toplevel.pro b/examples/widgets/tutorials/widgets/toplevel/toplevel.pro
index faa91eb0dd..80e2a03ca6 100644
--- a/examples/widgets/tutorials/widgets/toplevel/toplevel.pro
+++ b/examples/widgets/tutorials/widgets/toplevel/toplevel.pro
@@ -1,9 +1,9 @@
+QT += widgets
+
SOURCES = main.cpp
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/widgets/toplevel
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/tutorials/widgets/widgets.pro b/examples/widgets/tutorials/widgets/widgets.pro
index 41cfa1d7f6..4ab34a8f93 100644
--- a/examples/widgets/tutorials/widgets/widgets.pro
+++ b/examples/widgets/tutorials/widgets/widgets.pro
@@ -4,4 +4,3 @@ SUBDIRS = toplevel childwidget windowlayout nestedlayouts
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/widgets
INSTALLS += target
-QT += widgets
diff --git a/examples/widgets/tutorials/widgets/windowlayout/windowlayout.pro b/examples/widgets/tutorials/widgets/windowlayout/windowlayout.pro
index 6fd115591e..87eb7c58a4 100644
--- a/examples/widgets/tutorials/widgets/windowlayout/windowlayout.pro
+++ b/examples/widgets/tutorials/widgets/windowlayout/windowlayout.pro
@@ -1,9 +1,9 @@
+QT += widgets
+
SOURCES = main.cpp
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/widgets/windowlayout
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/widgets.pro b/examples/widgets/widgets.pro
index bdac0bde28..87054cff0d 100644
--- a/examples/widgets/widgets.pro
+++ b/examples/widgets/widgets.pro
@@ -20,3 +20,4 @@ SUBDIRS = \
widgets
contains(DEFINES, QT_NO_CURSOR): SUBDIRS -= mainwindows
+contains(DEFINES, QT_NO_DRAGANDDROP): SUBDIRS -= draganddrop
diff --git a/examples/widgets/widgets/analogclock/analogclock.pro b/examples/widgets/widgets/analogclock/analogclock.pro
index 300c4f8ab4..1c6b736995 100644
--- a/examples/widgets/widgets/analogclock/analogclock.pro
+++ b/examples/widgets/widgets/analogclock/analogclock.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = analogclock.h
SOURCES = analogclock.cpp \
main.cpp
@@ -7,6 +9,3 @@ QMAKE_PROJECT_NAME = widgets_analogclock
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/widgets/analogclock
INSTALLS += target
-
-QT += widgets
-
diff --git a/examples/widgets/widgets/calculator/calculator.pro b/examples/widgets/widgets/calculator/calculator.pro
index 715d450003..5ee6928c7d 100644
--- a/examples/widgets/widgets/calculator/calculator.pro
+++ b/examples/widgets/widgets/calculator/calculator.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = button.h \
calculator.h
SOURCES = button.cpp \
@@ -7,6 +9,3 @@ SOURCES = button.cpp \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/widgets/calculator
INSTALLS += target
-
-QT += widgets
-
diff --git a/examples/widgets/widgets/calendarwidget/calendarwidget.pro b/examples/widgets/widgets/calendarwidget/calendarwidget.pro
index ad586f11f8..a60f10bf36 100644
--- a/examples/widgets/widgets/calendarwidget/calendarwidget.pro
+++ b/examples/widgets/widgets/calendarwidget/calendarwidget.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = window.h
SOURCES = main.cpp \
window.cpp
@@ -5,5 +7,3 @@ SOURCES = main.cpp \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/widgets/calendarwidget
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/widgets/charactermap/charactermap.pro b/examples/widgets/widgets/charactermap/charactermap.pro
index 370338bf46..e9b6bb7c40 100644
--- a/examples/widgets/widgets/charactermap/charactermap.pro
+++ b/examples/widgets/widgets/charactermap/charactermap.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = characterwidget.h \
mainwindow.h
SOURCES = characterwidget.cpp \
@@ -8,6 +10,4 @@ SOURCES = characterwidget.cpp \
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/widgets/charactermap
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/widgets/codeeditor/codeeditor.pro b/examples/widgets/widgets/codeeditor/codeeditor.pro
index 5af4e24322..5618160d17 100644
--- a/examples/widgets/widgets/codeeditor/codeeditor.pro
+++ b/examples/widgets/widgets/codeeditor/codeeditor.pro
@@ -1,9 +1,8 @@
+QT += widgets
+
HEADERS = codeeditor.h
SOURCES = main.cpp \
codeeditor.cpp
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/widgets/codeeditor
INSTALLS += target
-
-QT += widgets
-
diff --git a/examples/widgets/widgets/digitalclock/digitalclock.pro b/examples/widgets/widgets/digitalclock/digitalclock.pro
index 9ded97b48c..4e4bc0f557 100644
--- a/examples/widgets/widgets/digitalclock/digitalclock.pro
+++ b/examples/widgets/widgets/digitalclock/digitalclock.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = digitalclock.h
SOURCES = digitalclock.cpp \
main.cpp
@@ -5,5 +7,3 @@ SOURCES = digitalclock.cpp \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/widgets/digitalclock
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/widgets/groupbox/groupbox.pro b/examples/widgets/widgets/groupbox/groupbox.pro
index 579f0298c6..9167d26d6d 100644
--- a/examples/widgets/widgets/groupbox/groupbox.pro
+++ b/examples/widgets/widgets/groupbox/groupbox.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = window.h
SOURCES = window.cpp \
main.cpp
@@ -6,6 +8,4 @@ SOURCES = window.cpp \
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/widgets/groupbox
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/widgets/icons/icons.pro b/examples/widgets/widgets/icons/icons.pro
index 4227cedadd..7a5256bcac 100644
--- a/examples/widgets/widgets/icons/icons.pro
+++ b/examples/widgets/widgets/icons/icons.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = iconpreviewarea.h \
iconsizespinbox.h \
imagedelegate.h \
@@ -24,6 +26,5 @@ wince*: {
}
DEPLOYMENT += imageFiles
}
-QT += widgets
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/widgets/imageviewer/imageviewer.pro b/examples/widgets/widgets/imageviewer/imageviewer.pro
index 611848b093..a0f9cebbda 100644
--- a/examples/widgets/widgets/imageviewer/imageviewer.pro
+++ b/examples/widgets/widgets/imageviewer/imageviewer.pro
@@ -1,3 +1,6 @@
+QT += widgets
+qtHaveModule(printsupport): QT += printsupport
+
HEADERS = imageviewer.h
SOURCES = imageviewer.cpp \
main.cpp
@@ -10,7 +13,5 @@ INSTALLS += target
wince*: {
DEPLOYMENT_PLUGIN += qjpeg qgif
}
-QT += widgets
-!isEmpty(QT.printsupport.name): QT += printsupport
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/widgets/lineedits/lineedits.pro b/examples/widgets/widgets/lineedits/lineedits.pro
index d8ac14102f..0ab994ea11 100644
--- a/examples/widgets/widgets/lineedits/lineedits.pro
+++ b/examples/widgets/widgets/lineedits/lineedits.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = window.h
SOURCES = main.cpp \
window.cpp
@@ -5,5 +7,3 @@ SOURCES = main.cpp \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/widgets/lineedits
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/widgets/mousebuttons/buttontester.cpp b/examples/widgets/widgets/mousebuttons/buttontester.cpp
index 64910375dc..c64bf76211 100644
--- a/examples/widgets/widgets/mousebuttons/buttontester.cpp
+++ b/examples/widgets/widgets/mousebuttons/buttontester.cpp
@@ -44,30 +44,40 @@
void ButtonTester::mousePressEvent(QMouseEvent *e)
{
int j = ButtonTester::buttonByNumber (e->button());
- QString result = "Mouse Press: raw button=" + QString::number(j) + " Qt=" + enumNameFromValue(e->button());
+ QString result = "Mouse Press: raw button=" + QString::number(j)
+ + " Qt=" + enumNameFromValue(e->button());
+ QString buttonsString = ButtonTester::enumNamesFromMouseButtons(e->buttons());
+ result += "\n heldbuttons " + buttonsString;
qDebug() << result;
this->setText(result);
- if (j == 2) {
- this->repaint();
- }
+ this->repaint();
}
void ButtonTester::mouseReleaseEvent(QMouseEvent *e)
{
int j = ButtonTester::buttonByNumber (e->button());
- QString result = "Mouse Release: raw button=" + QString::number(j) + " Qt=" + enumNameFromValue(e->button());
+ QString result = "Mouse Release: raw button=" + QString::number(j)
+ + " Qt=" + enumNameFromValue(e->button());
+ QString buttonsString = ButtonTester::enumNamesFromMouseButtons(e->buttons());
+ result += "\n heldbuttons " + buttonsString;
qDebug() << result;
this->setText(result);
+ this->repaint();
+
}
void ButtonTester::mouseDoubleClickEvent(QMouseEvent *e)
{
int j = ButtonTester::buttonByNumber (e->button());
- QString result = "Mouse DoubleClick: raw button=" + QString::number(j) + " Qt=" + enumNameFromValue(e->button());
+ QString result = "Mouse DoubleClick: raw button=" + QString::number(j)
+ + " Qt=" + enumNameFromValue(e->button());
+ QString buttonsString = ButtonTester::enumNamesFromMouseButtons(e->buttons());
+ result += "\n heldbuttons" + buttonsString;
qDebug() << result;
this->setText(result);
}
+#ifndef QT_NO_WHEELEVENT
void ButtonTester::wheelEvent (QWheelEvent *e)
{
QString result;
@@ -88,6 +98,7 @@ void ButtonTester::wheelEvent (QWheelEvent *e)
qDebug() << result;
this->setText(result);
}
+#endif
int ButtonTester::buttonByNumber(const Qt::MouseButton button)
{
@@ -170,3 +181,38 @@ QString ButtonTester::enumNameFromValue(const Qt::MouseButton button)
qDebug("QMouseShortcutEntry::addShortcut contained Invalid Qt::MouseButton value");
return "NoButton";
}
+
+QString ButtonTester::enumNamesFromMouseButtons(const Qt::MouseButtons buttons)
+{
+ QString returnText = "";
+ if (buttons == Qt::NoButton) return "NoButton";
+ if (buttons & Qt::LeftButton) returnText += "LeftButton ";
+ if (buttons & Qt::RightButton) returnText += "RightButton ";
+ if (buttons & Qt::MiddleButton) returnText += "MiddleButton ";
+ if (buttons & Qt::BackButton) returnText += "BackButton ";
+ if (buttons & Qt::ForwardButton) returnText += "ForwardButton ";
+ if (buttons & Qt::TaskButton) returnText += "TaskButton ";
+ if (buttons & Qt::ExtraButton4) returnText += "ExtraButton4 ";
+ if (buttons & Qt::ExtraButton5) returnText += "ExtraButton5 ";
+ if (buttons & Qt::ExtraButton6) returnText += "ExtraButton6 ";
+ if (buttons & Qt::ExtraButton7) returnText += "ExtraButton7 ";
+ if (buttons & Qt::ExtraButton8) returnText += "ExtraButton8 ";
+ if (buttons & Qt::ExtraButton9) returnText += "ExtraButton9 ";
+ if (buttons & Qt::ExtraButton10) returnText += "ExtraButton10 ";
+ if (buttons & Qt::ExtraButton11) returnText += "ExtraButton11 ";
+ if (buttons & Qt::ExtraButton12) returnText += "ExtraButton12 ";
+ if (buttons & Qt::ExtraButton13) returnText += "ExtraButton13 ";
+ if (buttons & Qt::ExtraButton14) returnText += "ExtraButton14 ";
+ if (buttons & Qt::ExtraButton15) returnText += "ExtraButton15 ";
+ if (buttons & Qt::ExtraButton16) returnText += "ExtraButton16 ";
+ if (buttons & Qt::ExtraButton17) returnText += "ExtraButton17 ";
+ if (buttons & Qt::ExtraButton18) returnText += "ExtraButton18 ";
+ if (buttons & Qt::ExtraButton19) returnText += "ExtraButton19 ";
+ if (buttons & Qt::ExtraButton20) returnText += "ExtraButton20 ";
+ if (buttons & Qt::ExtraButton21) returnText += "ExtraButton21 ";
+ if (buttons & Qt::ExtraButton22) returnText += "ExtraButton22 ";
+ if (buttons & Qt::ExtraButton23) returnText += "ExtraButton23 ";
+ if (buttons & Qt::ExtraButton24) returnText += "ExtraButton24 ";
+ return returnText;
+}
+
diff --git a/examples/widgets/widgets/mousebuttons/buttontester.h b/examples/widgets/widgets/mousebuttons/buttontester.h
index bb1a7b0335..6db8993486 100644
--- a/examples/widgets/widgets/mousebuttons/buttontester.h
+++ b/examples/widgets/widgets/mousebuttons/buttontester.h
@@ -56,9 +56,12 @@ protected:
void mousePressEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
void mouseDoubleClickEvent(QMouseEvent *event);
+#ifndef QT_NO_WHEELEVENT
void wheelEvent(QWheelEvent * event);
+#endif
int buttonByNumber(const Qt::MouseButton button);
QString enumNameFromValue(const Qt::MouseButton button);
+ QString enumNamesFromMouseButtons(const Qt::MouseButtons buttons);
};
#endif // BUTTONTESTER_H
diff --git a/examples/widgets/widgets/mousebuttons/main.cpp b/examples/widgets/widgets/mousebuttons/main.cpp
index 67bbbb8896..1692ac5432 100644
--- a/examples/widgets/widgets/mousebuttons/main.cpp
+++ b/examples/widgets/widgets/mousebuttons/main.cpp
@@ -48,6 +48,10 @@ int main(int argv, char **args)
ButtonTester *testArea = new ButtonTester;
testArea->setMinimumSize(500, 350);
+
+// For this test, Qt::RightButton behaves like any other button.
+ testArea->setContextMenuPolicy(Qt::NoContextMenu);
+ testArea->setTextInteractionFlags(Qt::TextSelectableByMouse);
testArea->setText("To test your mouse with Qt, press buttons in this area.\nYou may also scroll or tilt your mouse wheel.");
QPushButton *quitButton = new QPushButton("Quit");
diff --git a/examples/widgets/widgets/movie/movie.pro b/examples/widgets/widgets/movie/movie.pro
index d922423373..109e9f411d 100644
--- a/examples/widgets/widgets/movie/movie.pro
+++ b/examples/widgets/widgets/movie/movie.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = movieplayer.h
SOURCES = main.cpp \
movieplayer.cpp
@@ -15,6 +17,4 @@ wince*: {
DEPLOYMENT += addFiles
}
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/widgets/scribble/scribble.pro b/examples/widgets/widgets/scribble/scribble.pro
index 674dccff7e..aff0fb442c 100644
--- a/examples/widgets/widgets/scribble/scribble.pro
+++ b/examples/widgets/widgets/scribble/scribble.pro
@@ -1,3 +1,6 @@
+QT += widgets
+qtHaveModule(printsupport): QT += printsupport
+
HEADERS = mainwindow.h \
scribblearea.h
SOURCES = main.cpp \
@@ -7,6 +10,3 @@ SOURCES = main.cpp \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/widgets/scribble
INSTALLS += target
-
-QT += widgets
-!isEmpty(QT.printsupport.name): QT += printsupport
diff --git a/examples/widgets/widgets/shapedclock/shapedclock.pro b/examples/widgets/widgets/shapedclock/shapedclock.pro
index b5cb9c9076..0fe7f59765 100644
--- a/examples/widgets/widgets/shapedclock/shapedclock.pro
+++ b/examples/widgets/widgets/shapedclock/shapedclock.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = shapedclock.h
SOURCES = shapedclock.cpp \
main.cpp
@@ -5,6 +7,3 @@ SOURCES = shapedclock.cpp \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/widgets/shapedclock
INSTALLS += target
-
-QT += widgets
-
diff --git a/examples/widgets/widgets/sliders/sliders.pro b/examples/widgets/widgets/sliders/sliders.pro
index bdc30b896c..6a0e01287d 100644
--- a/examples/widgets/widgets/sliders/sliders.pro
+++ b/examples/widgets/widgets/sliders/sliders.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = slidersgroup.h \
window.h
SOURCES = main.cpp \
@@ -8,6 +10,4 @@ SOURCES = main.cpp \
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/widgets/sliders
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/widgets/spinboxes/spinboxes.pro b/examples/widgets/widgets/spinboxes/spinboxes.pro
index 55a028c0a5..9638317471 100644
--- a/examples/widgets/widgets/spinboxes/spinboxes.pro
+++ b/examples/widgets/widgets/spinboxes/spinboxes.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = window.h
SOURCES = main.cpp \
window.cpp
@@ -6,6 +8,4 @@ SOURCES = main.cpp \
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/widgets/spinboxes
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/widgets/styles/styles.pro b/examples/widgets/widgets/styles/styles.pro
index f93175997f..598dceef65 100644
--- a/examples/widgets/widgets/styles/styles.pro
+++ b/examples/widgets/widgets/styles/styles.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = norwegianwoodstyle.h \
widgetgallery.h
SOURCES = main.cpp \
@@ -11,6 +13,4 @@ REQUIRES += "contains(styles, windows)"
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/widgets/styles
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/widgets/stylesheet/stylesheet.pro b/examples/widgets/widgets/stylesheet/stylesheet.pro
index 24590ab3dc..01edb0bbd8 100644
--- a/examples/widgets/widgets/stylesheet/stylesheet.pro
+++ b/examples/widgets/widgets/stylesheet/stylesheet.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = mainwindow.h \
stylesheeteditor.h
FORMS = mainwindow.ui \
@@ -11,6 +13,4 @@ SOURCES = main.cpp \
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/widgets/stylesheet
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/widgets/tablet/tablet.pro b/examples/widgets/widgets/tablet/tablet.pro
index 2e74cb847b..6867f92ac8 100644
--- a/examples/widgets/widgets/tablet/tablet.pro
+++ b/examples/widgets/widgets/tablet/tablet.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = mainwindow.h \
tabletcanvas.h \
tabletapplication.h
@@ -10,6 +12,4 @@ SOURCES = mainwindow.cpp \
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/widgets/tablet
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/widgets/widgets/tetrix/tetrix.pro b/examples/widgets/widgets/tetrix/tetrix.pro
index 5dd5342885..bb9f855fb0 100644
--- a/examples/widgets/widgets/tetrix/tetrix.pro
+++ b/examples/widgets/widgets/tetrix/tetrix.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = tetrixboard.h \
tetrixpiece.h \
tetrixwindow.h
@@ -9,6 +11,3 @@ SOURCES = main.cpp \
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/widgets/tetrix
INSTALLS += target
-
-QT += widgets
-
diff --git a/examples/widgets/widgets/tooltips/tooltips.pro b/examples/widgets/widgets/tooltips/tooltips.pro
index 7262a1aece..d14b8295ba 100644
--- a/examples/widgets/widgets/tooltips/tooltips.pro
+++ b/examples/widgets/widgets/tooltips/tooltips.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = shapeitem.h \
sortingbox.h
SOURCES = main.cpp \
@@ -8,5 +10,3 @@ RESOURCES = tooltips.qrc
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/widgets/tooltips
INSTALLS += target
-
-QT += widgets
diff --git a/examples/widgets/widgets/wiggly/wiggly.pro b/examples/widgets/widgets/wiggly/wiggly.pro
index 17371603dc..0e39f18add 100644
--- a/examples/widgets/widgets/wiggly/wiggly.pro
+++ b/examples/widgets/widgets/wiggly/wiggly.pro
@@ -1,4 +1,4 @@
-QT += widgets widgets
+QT += widgets
HEADERS = wigglywidget.h \
dialog.h
diff --git a/examples/widgets/widgets/windowflags/windowflags.pro b/examples/widgets/widgets/windowflags/windowflags.pro
index e96344c33d..250319983a 100644
--- a/examples/widgets/widgets/windowflags/windowflags.pro
+++ b/examples/widgets/widgets/windowflags/windowflags.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = controllerwindow.h \
previewwindow.h
SOURCES = controllerwindow.cpp \
@@ -8,6 +10,4 @@ SOURCES = controllerwindow.cpp \
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/widgets/windowflags
INSTALLS += target
-QT += widgets
-
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/xml/doc/images/xmlstreamexample-filemenu.png b/examples/xml/doc/images/xmlstreamexample-filemenu.png
new file mode 100644
index 0000000000..e074fb7c41
--- /dev/null
+++ b/examples/xml/doc/images/xmlstreamexample-filemenu.png
Binary files differ
diff --git a/examples/xml/doc/images/xmlstreamexample-helpmenu.png b/examples/xml/doc/images/xmlstreamexample-helpmenu.png
new file mode 100644
index 0000000000..0dc4392b94
--- /dev/null
+++ b/examples/xml/doc/images/xmlstreamexample-helpmenu.png
Binary files differ
diff --git a/examples/xml/doc/images/xmlstreamexample-screenshot.png b/examples/xml/doc/images/xmlstreamexample-screenshot.png
new file mode 100644
index 0000000000..bbaa423061
--- /dev/null
+++ b/examples/xml/doc/images/xmlstreamexample-screenshot.png
Binary files differ
diff --git a/examples/xml/doc/src/qxmlstreambookmarks.qdoc b/examples/xml/doc/src/qxmlstreambookmarks.qdoc
new file mode 100644
index 0000000000..dd7708a290
--- /dev/null
+++ b/examples/xml/doc/src/qxmlstreambookmarks.qdoc
@@ -0,0 +1,194 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** 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. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example xml/streambookmarks
+ \title QXmlStream Bookmarks Example
+ \brief Demonstrates how to read and write to XBEL files
+ \ingroup xml-examples
+
+ The QXmlStream Bookmarks example provides a reader for XML Bookmark
+ Exchange Language (XBEL) files using Qt's QXmlStreamReader class
+ for reading, and QXmlStreamWriter class for writing the files.
+
+ \image xmlstreamexample-screenshot.png
+
+ \section1 XbelWriter Class Definition
+
+ The \c XbelWriter class contains a private instance of QXmlStreamWriter,
+ which provides an XML writer with a streaming API. \c XbelWriter also
+ has a reference to the QTreeWidget instance where the bookmark hierarchy
+ is stored.
+
+ \snippet streambookmarks/xbelwriter.h 0
+
+ \section1 XbelWriter Class Implementation
+
+ The \c XbelWriter constructor accepts a \a treeWidget to initialize within
+ its definition. We enable \l{QXmlStreamWriter}'s auto-formatting property
+ to ensure line-breaks and indentations are added automatically to empty
+ sections between elements, increasing readability as the data is split into
+ several lines.
+
+ \snippet streambookmarks/xbelwriter.cpp 0
+
+ The \c writeFile() function accepts a QIODevice object and sets it using
+ \c setDevice(). This function then writes the document type
+ definition(DTD), the start element, the version, and \c{treeWidget}'s
+ top-level items.
+
+ \snippet streambookmarks/xbelwriter.cpp 1
+
+ The \c writeItem() function accepts a QTreeWidgetItem object and writes it
+ to the stream, depending on its \c tagName, which can either be a "folder",
+ "bookmark", or "separator".
+
+ \snippet streambookmarks/xbelwriter.cpp 2
+
+ \section1 XbelReader Class Definition
+
+ The \c XbelReader contains a private instance of QXmlStreamReader, the
+ companion class to QXmlStreamWriter. \c XbelReader also contains a
+ reference to the QTreeWidget that is used to group the bookmarks according
+ to their hierarchy.
+
+ \snippet streambookmarks/xbelreader.h 0
+
+ \section1 XbelReader Class Implementation
+
+ The \c XbelReader constructor accepts a QTreeWidget to initialize the
+ \c treeWidget within its definition. A QStyle object is used to set
+ \c{treeWidget}'s style property. The \c folderIcon is set to QIcon::Normal
+ mode where the pixmap is only displayed when the user is not interacting
+ with the icon. The QStyle::SP_DirClosedIcon, QStyle::SP_DirOpenIcon, and
+ QStyle::SP_FileIcon correspond to standard pixmaps that follow the style
+ of your GUI.
+
+ \snippet streambookmarks/xbelreader.cpp 0
+
+ The \c read() function accepts a QIODevice and sets it using
+ \l{QXmlStreamReader::}{setDevice()}. The actual process of reading only
+ takes place if the file is a valid XBEL 1.0 file. Note that the XML input
+ needs to be well-formed to be accepted by QXmlStreamReader. Otherwise, the
+ \l{QXmlStreamReader::}{raiseError()} function is used to display an error
+ message. Since the XBEL reader is only concerned with reading XML elements,
+ it makes extensive use of the \l{QXmlStreamReader::}{readNextStartElement()}
+ convenience function.
+
+ \snippet streambookmarks/xbelreader.cpp 1
+
+ The \c errorString() function is used if an error occurred, in order to
+ obtain a description of the error complete with line and column number
+ information.
+
+ \snippet streambookmarks/xbelreader.cpp 2
+
+ The \c readXBEL() function reads the name of a startElement and calls
+ the appropriate function to read it, depending on whether if its a
+ "folder", "bookmark" or "separator". Otherwise, it calls
+ \l{QXmlStreamReader::}{skipCurrentElement()}. The Q_ASSERT() macro is used
+ to provide a pre-condition for the function.
+
+ \snippet streambookmarks/xbelreader.cpp 3
+
+ The \c readTitle() function reads the bookmark's title.
+
+ \snippet streambookmarks/xbelreader.cpp 4
+
+ The \c readSeparator() function creates a separator and sets its flags.
+ The text is set to 30 "0xB7", the HEX equivalent for period. The element
+ is then skipped using \l{QXmlStreamReader::}{skipCurrentElement()}.
+
+ \snippet streambookmarks/xbelreader.cpp 5
+
+ \section1 MainWindow Class Definition
+
+ The \c MainWindow class is a subclass of QMainWindow, with a
+ \c File menu and a \c Help menu.
+
+ \snippet streambookmarks/mainwindow.h 0
+
+ \section1 MainWindow Class Implementation
+
+ The \c MainWindow constructor instantiates the QTreeWidget object, \c
+ treeWidget and sets its header with a QStringList object, \c labels.
+ The constructor also invokes \c createActions() and \c createMenus()
+ to set up the menus and their corresponding actions. The \c statusBar()
+ is used to display the message "Ready" and the window's size is fixed
+ to 480x320 pixels.
+
+ \snippet streambookmarks/mainwindow.cpp 0
+
+ The \c open() function enables the user to open an XBEL file using
+ QFileDialog::getOpenFileName(). A warning message is displayed along
+ with the \c fileName and \c errorString if the file cannot be read or
+ if there is a parse error.
+
+ \snippet streambookmarks/mainwindow.cpp 1
+
+ The \c saveAs() function displays a QFileDialog, prompting the user for
+ a \c fileName using QFileDialog::getSaveFileName(). Similar to the
+ \c open() function, this function also displays a warning message if
+ the file cannot be written to.
+
+ \snippet streambookmarks/mainwindow.cpp 2
+
+ The \c about() function displays a QMessageBox with a brief description
+ of the example.
+
+ \snippet streambookmarks/mainwindow.cpp 3
+
+ In order to implement the \c open(), \c saveAs(), \c exit(), \c about()
+ and \c aboutQt() functions, we connect them to QAction objects and
+ add them to the \c fileMenu and \c helpMenu. The connections are as shown
+ below:
+
+ \snippet streambookmarks/mainwindow.cpp 4
+
+ The \c createMenus() function creates the \c fileMenu and \c helpMenu
+ and adds the QAction objects to them in order to create the menu shown
+ in the screenshot below:
+
+ \table
+ \row
+ \li \inlineimage xmlstreamexample-filemenu.png
+ \li \inlineimage xmlstreamexample-helpmenu.png
+ \endtable
+
+ \snippet streambookmarks/mainwindow.cpp 5
+
+ \section1 \c{main()} Function
+
+ The \c main() function instantiates \c MainWindow and invokes the \c show()
+ function.
+
+ \snippet streambookmarks/main.cpp 0
+
+ See the \l{http://pyxml.sourceforge.net/topics/xbel/}
+ {XML Bookmark Exchange Language Resource Page} for more information
+ about XBEL files.
+*/
diff --git a/examples/xml/doc/src/saxbookmarks.qdoc b/examples/xml/doc/src/saxbookmarks.qdoc
index 9ed7611184..d45549bc1e 100644
--- a/examples/xml/doc/src/saxbookmarks.qdoc
+++ b/examples/xml/doc/src/saxbookmarks.qdoc
@@ -28,13 +28,14 @@
/*!
\example saxbookmarks
\title SAX Bookmarks Example
+ \brief Demonstrates how to read XBEL files
+ \ingroup xml-examples
- \brief The SAX Bookmarks example provides a reader for XML Bookmark Exchange Language (XBEL)
- files that uses Qt's SAX-based API to read and parse the files. The DOM Bookmarks
+ This example uses Qt's SAX API to read and parse the files. The DOM Bookmarks
example provides an alternative way to read this type of file.
\image saxbookmarks-example.png
See the \l{XML Bookmark Exchange Language Resource Page} for more
- information about XBEL files.
+ information about XBEL files.
*/
diff --git a/examples/xml/xml.pro b/examples/xml/xml.pro
index 7c7b6f7456..bc8686a475 100644
--- a/examples/xml/xml.pro
+++ b/examples/xml/xml.pro
@@ -2,7 +2,7 @@ TEMPLATE = subdirs
SUBDIRS = htmlinfo \
xmlstreamlint
-!contains(QT_CONFIG, no-widgets) {
+qtHaveModule(widgets) {
SUBDIRS += dombookmarks \
rsslisting \
saxbookmarks \
diff --git a/mkspecs/common/gcc-base-unix.conf b/mkspecs/common/gcc-base-unix.conf
index dc8d7e42cd..dadaecaa29 100644
--- a/mkspecs/common/gcc-base-unix.conf
+++ b/mkspecs/common/gcc-base-unix.conf
@@ -15,6 +15,7 @@ QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB
QMAKE_LFLAGS_SONAME += -Wl,-soname,
QMAKE_LFLAGS_THREAD +=
QMAKE_LFLAGS_RPATH = -Wl,-rpath,
+QMAKE_LFLAGS_RPATHLINK = -Wl,-rpath-link,
# -Bsymbolic-functions (ld) support
QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions
diff --git a/mkspecs/devices/linux-imx6-g++/qeglfshooks_imx6.cpp b/mkspecs/devices/linux-imx6-g++/qeglfshooks_imx6.cpp
index 1ee95f1f24..7a6c1d3fce 100644
--- a/mkspecs/devices/linux-imx6-g++/qeglfshooks_imx6.cpp
+++ b/mkspecs/devices/linux-imx6-g++/qeglfshooks_imx6.cpp
@@ -61,7 +61,7 @@ private:
QEglFSImx6Hooks::QEglFSImx6Hooks()
{
int width, height;
- mNativeDisplay = fbGetDisplay();
+ mNativeDisplay = fbGetDisplayByIndex(0);
fbGetDisplayGeometry(mNativeDisplay, &width, &height);
mScreenSize.setHeight(height);
mScreenSize.setWidth(width);
@@ -76,7 +76,7 @@ EGLNativeWindowType QEglFSImx6Hooks::createNativeWindow(const QSize &size, const
{
Q_UNUSED(format);
- EGLNativeWindowType eglWindow = fbCreateWindow(mNativeDisplay, 0, 1, size.width(), size.height());
+ EGLNativeWindowType eglWindow = fbCreateWindow(mNativeDisplay, 0, 0, size.width(), size.height());
return eglWindow;
}
diff --git a/mkspecs/devices/linux-imx6-g++/qmake.conf b/mkspecs/devices/linux-imx6-g++/qmake.conf
index 67e16f2d29..322a19d05b 100644
--- a/mkspecs/devices/linux-imx6-g++/qmake.conf
+++ b/mkspecs/devices/linux-imx6-g++/qmake.conf
@@ -8,7 +8,7 @@
# /home/tsenyk/qt5/qt5/configure -opensource -confirm-license -make libs -device imx6 \
# -device-option CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi- \
# -sysroot <path-to-your-ltib-install>/rootfs -no-gcc-sysroot \
-# -prefix /usr/local/Trolltech/Qt5-imx6-1
+# -prefix /usr/local/Qt-5.0.0/Qt5-imx6-1
#
# NOTE: currently ltib doesn't produce a proper staging/sysroot-filessystem.
# If gcc's --sysroot is used, the toolchain doesn't find basic binaries (e.g. crt1.o),
diff --git a/mkspecs/devices/linux-tegra2-g++/qmake.conf b/mkspecs/devices/linux-tegra2-g++/qmake.conf
index c480def19c..c846801a10 100644
--- a/mkspecs/devices/linux-tegra2-g++/qmake.conf
+++ b/mkspecs/devices/linux-tegra2-g++/qmake.conf
@@ -4,7 +4,7 @@
# This mkspec is based and tested on the TrimSlice using "Ubuntu Natty (11.04) - l4t.r15.01"-release.
# It might work with other boards and releases as well.
# A typical configure line looks like this:
-# <path-to-qt-src>/configure -opensource -confirm-license -make libs -prefix /usr/local/Trolltech/Qt5-tegra2
+# <path-to-qt-src>/configure -opensource -confirm-license -make libs -prefix /usr/local/Qt-5.0.0/Qt5-tegra2
# -device tegra2 -device-option CROSS_COMPILE=<path-to-crosstoolchain>/bin/arm-none-linux-gnueabi- \
# -sysroot <path-to-rootfs> -no-neon
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
index 9548c5e0ff..63001f3e89 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
@@ -1,3 +1,13 @@
+#
+# W A R N I N G
+# -------------
+#
+# This file is not part of the Qt API. It exists purely as an
+# implementation detail. It may change from version to version
+# without notice, or even be removed.
+#
+# We mean it.
+#
defineReplace(cmakeModuleName) {
_module = $$1
@@ -17,7 +27,7 @@ defineReplace(cmakeModuleList) {
CMAKE_MODULE_NAME = $$cmakeModuleName($${MODULE})
-CMAKE_MODULE_DEPS = $$cmakeModuleList($$eval(QT.$${MODULE}.depends))
+CMAKE_MODULE_DEPS = $$cmakeModuleList($$sort_depends(QT.$${MODULE}.depends, QT.))
CMAKE_PARTIAL_MODULE_DEPS = $$replace(CMAKE_MODULE_DEPS, ";", ";Qt5::")
!isEmpty(CMAKE_PARTIAL_MODULE_DEPS):CMAKE_QT5_MODULE_DEPS = "Qt5::$${CMAKE_PARTIAL_MODULE_DEPS}"
@@ -49,16 +59,16 @@ contains(CMAKE_BIN_DIR, "$${CMAKE_QT_INSTALL_PREFIX_ESCAPED}.*") {
CMAKE_BIN_DIR_IS_ABSOLUTE = True
}
-CMAKE_DATA_DIR = $$[QT_INSTALL_DATA]/ # For the mkspecs
-contains(CMAKE_DATA_DIR, "$${CMAKE_QT_INSTALL_PREFIX_ESCAPED}.*") {
- CMAKE_DATA_DIR = $$replace(CMAKE_DATA_DIR, "$$CMAKE_QT_INSTALL_PREFIX_ESCAPED", )
+CMAKE_ARCHDATA_DIR = $$[QT_INSTALL_ARCHDATA]/ # For the mkspecs
+contains(CMAKE_ARCHDATA_DIR, "$${CMAKE_QT_INSTALL_PREFIX_ESCAPED}.*") {
+ CMAKE_ARCHDATA_DIR = $$replace(CMAKE_ARCHDATA_DIR, "$$CMAKE_QT_INSTALL_PREFIX_ESCAPED", )
} else {
- CMAKE_DATA_DIR_IS_ABSOLUTE = True
+ CMAKE_ARCHDATA_DIR_IS_ABSOLUTE = True
}
static|staticlib:CMAKE_STATIC_TYPE = true
-contains(QT_CONFIG, reduce_relocations):CMAKE_ADD_FPIE_FLAGS = "true"
+unix:contains(QT_CONFIG, reduce_relocations):CMAKE_ADD_FPIE_FLAGS = "true"
CMAKE_MKSPEC = $$[QMAKE_XSPEC]
@@ -155,12 +165,12 @@ if (build_all|CONFIG(release, debug|release)):CMAKE_RELEASE_TYPE = release
INSTALLS += cmake_qt5_module_files
-cmake_config_file.input = $$PWD/../cmake/Qt5BasicConfig.cmake.in
+cmake_config_file.input = $$PWD/data/cmake/Qt5BasicConfig.cmake.in
cmake_config_file.output = $$DESTDIR/cmake/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}Config.cmake
CMAKE_PACKAGE_VERSION = $$eval(QT.$${MODULE}.VERSION)
-cmake_config_version_file.input = $$PWD/../cmake/Qt5ConfigVersion.cmake.in
+cmake_config_version_file.input = $$PWD/data/cmake/Qt5ConfigVersion.cmake.in
cmake_config_version_file.output = $$DESTDIR/cmake/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}ConfigVersion.cmake
!build_pass:QMAKE_SUBSTITUTES += \
diff --git a/mkspecs/features/ctest_testcase.prf b/mkspecs/features/ctest_testcase.prf
index de61ae96cb..93ebd4607d 100644
--- a/mkspecs/features/ctest_testcase.prf
+++ b/mkspecs/features/ctest_testcase.prf
@@ -53,4 +53,6 @@ insignificant_test:!isEmpty(check.commands) {
check.commands = -$${check.commands}
}
+!qtHaveModule(widgets): CONFIG += insignificant_test # QTBUG-28540
+
QMAKE_EXTRA_TARGETS *= check
diff --git a/mkspecs/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
index 36d0495222..36d0495222 100644
--- a/mkspecs/cmake/Qt5BasicConfig.cmake.in
+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
diff --git a/mkspecs/cmake/Qt5ConfigVersion.cmake.in b/mkspecs/features/data/cmake/Qt5ConfigVersion.cmake.in
index e804754912..e804754912 100644
--- a/mkspecs/cmake/Qt5ConfigVersion.cmake.in
+++ b/mkspecs/features/data/cmake/Qt5ConfigVersion.cmake.in
diff --git a/tests/auto/other/headersclean/tst_headersclean.h b/mkspecs/features/data/headersclean/tst_headersclean.cpp.in
index 591689f424..c3aa9a9562 100644
--- a/tests/auto/other/headersclean/tst_headersclean.h
+++ b/mkspecs/features/data/headersclean/tst_headersclean.cpp.in
@@ -39,23 +39,17 @@
**
****************************************************************************/
-#ifndef TST_HEADERSCLEAN_H
-#define TST_HEADERSCLEAN_H
-
#define signals int
#define slots int
#define emit public:;
#define foreach public:;
#define forever public:;
-#include <qt_headersclean_headers.h>
-#include <QObject>
+$${includes}
+#include <QtCore/qglobal.h>
-class tst_HeadersClean: public QObject
+int main(int, char **)
{
- Q_OBJECT
-private Q_SLOTS:
- void initTestCase();
-};
-
-#endif
+ qWarning(\"This is a compile test only\");
+ return 0;
+}
diff --git a/mkspecs/features/dbuscommon.pri b/mkspecs/features/dbuscommon.pri
index fce2d04967..4608fb6ca2 100644
--- a/mkspecs/features/dbuscommon.pri
+++ b/mkspecs/features/dbuscommon.pri
@@ -1,3 +1,14 @@
+#
+# W A R N I N G
+# -------------
+#
+# This file is not part of the Qt API. It exists purely as an
+# implementation detail. It may change from version to version
+# without notice, or even be removed.
+#
+# We mean it.
+#
+
load(moc)
qtPrepareTool(QMAKE_QDBUSXML2CPP, qdbusxml2cpp)
diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf
index 6f3f318e0a..3afab5240e 100644
--- a/mkspecs/features/default_post.prf
+++ b/mkspecs/features/default_post.prf
@@ -1,3 +1,5 @@
+# This file is loaded by qmake right after loading the actual project file.
+
contains(TEMPLATE, ".*(lib|app)"):CONFIG += have_target
!have_target:!force_qt: CONFIG -= qt
@@ -47,12 +49,3 @@ breakpad {
QMAKE_INCDIR += $$QMAKE_INCDIR_POST
QMAKE_LIBDIR += $$QMAKE_LIBDIR_POST
-
-# Let every project have a standard GNU `check' target
-!contains(QMAKE_EXTRA_TARGETS, check) {
- contains(TEMPLATE, subdirs): \
- prepareRecursiveTarget(check)
- else: \
- check.depends = first # `make check' implies build
- QMAKE_EXTRA_TARGETS += check
-}
diff --git a/mkspecs/features/default_pre.prf b/mkspecs/features/default_pre.prf
index 0dd82ee072..b06b9d6cfc 100644
--- a/mkspecs/features/default_pre.prf
+++ b/mkspecs/features/default_pre.prf
@@ -1,2 +1,9 @@
+# This file is loaded by qmake right before each actual project file.
+# Note that evaluating variable assignments from the command line
+# still happens in between these two steps.
+
load(exclusive_builds)
-CONFIG = lex yacc warn_on debug exceptions depend_includepath $$CONFIG
+CONFIG = \
+ lex yacc debug exceptions depend_includepath \
+ testcase_targets import_plugins import_qpa_plugin \
+ $$CONFIG
diff --git a/mkspecs/features/device_config.prf b/mkspecs/features/device_config.prf
index a4dd6253cc..cb1de0b947 100644
--- a/mkspecs/features/device_config.prf
+++ b/mkspecs/features/device_config.prf
@@ -1,3 +1,5 @@
+# This file is loaded by some qmakespecs to get early configuration data.
+
# Load generated qdevice.pri
DEVICE_PRI = $$[QT_HOST_DATA/get]/mkspecs/qdevice.pri
exists($$DEVICE_PRI):include($$DEVICE_PRI)
diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf
index 250f57a265..8bd512844d 100644
--- a/mkspecs/features/moc.prf
+++ b/mkspecs/features/moc.prf
@@ -79,10 +79,7 @@ QMAKE_EXTRA_COMPILERS += moc_source
INCREDIBUILD_XGE += moc_source
#make sure we can include these files
-moc_dir_short = $$MOC_DIR
-contains(QMAKE_HOST.os,Windows):moc_dir_short ~= s,^.:,/,
-contains(moc_dir_short, ^[/\\\\].*):INCLUDEPATH += $$MOC_DIR
-else:INCLUDEPATH += $$OUT_PWD/$$MOC_DIR
+INCLUDEPATH += $$absolute_path($$MOC_DIR, $$OUT_PWD)
#auto depend on moc
unix:!no_mocdepend {
diff --git a/mkspecs/features/qml1_module.prf b/mkspecs/features/qml1_module.prf
index 8bacddc549..33c3e44808 100644
--- a/mkspecs/features/qml1_module.prf
+++ b/mkspecs/features/qml1_module.prf
@@ -1,2 +1,13 @@
+#
+# W A R N I N G
+# -------------
+#
+# This file is not part of the Qt API. It exists purely as an
+# implementation detail. It may change from version to version
+# without notice, or even be removed.
+#
+# We mean it.
+#
+
CONFIG += qml1_target
load(qml_module)
diff --git a/mkspecs/features/qml1_plugin.prf b/mkspecs/features/qml1_plugin.prf
index 2914c78ea3..cb1f0ce267 100644
--- a/mkspecs/features/qml1_plugin.prf
+++ b/mkspecs/features/qml1_plugin.prf
@@ -1,2 +1,13 @@
+#
+# W A R N I N G
+# -------------
+#
+# This file is not part of the Qt API. It exists purely as an
+# implementation detail. It may change from version to version
+# without notice, or even be removed.
+#
+# We mean it.
+#
+
CONFIG += qml1_target
load(qml_plugin)
diff --git a/mkspecs/features/qml_module.prf b/mkspecs/features/qml_module.prf
index a452592c9b..e7d0b386b1 100644
--- a/mkspecs/features/qml_module.prf
+++ b/mkspecs/features/qml_module.prf
@@ -1,3 +1,14 @@
+#
+# W A R N I N G
+# -------------
+#
+# This file is not part of the Qt API. It exists purely as an
+# implementation detail. It may change from version to version
+# without notice, or even be removed.
+#
+# We mean it.
+#
+
equals(TEMPLATE, app): TEMPLATE = aux
isEmpty(TARGETPATH): error("Must set TARGETPATH (QML import name)")
diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf
index c700dda41f..7abd372e49 100644
--- a/mkspecs/features/qml_plugin.prf
+++ b/mkspecs/features/qml_plugin.prf
@@ -1,3 +1,14 @@
+#
+# W A R N I N G
+# -------------
+#
+# This file is not part of the Qt API. It exists purely as an
+# implementation detail. It may change from version to version
+# without notice, or even be removed.
+#
+# We mean it.
+#
+
load(qt_build_config)
TEMPLATE = lib
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
index 586dae3981..9e36b6da16 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -2,17 +2,12 @@ CONFIG *= thread
#handle defines
win32 {
- # ### QT_NODLL and QT_DLL are compatibility, remove before the Qt 5.0 release
contains(QT_CONFIG, shared) {
- DEFINES += QT_DLL
-
# this variable is read by qmake in qmake/generators/win32/msvc_vcproj.cpp
# function VcprojGenerator::initDeploymentTool(), which contains some hardcoded
# library names (the ones that were static in Qt 4)
# it probably doesn't work anymore and should not be in this file
QMAKE_QT_DLL = 1
- } else {
- DEFINES += QT_NODLL
}
}
CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG
@@ -35,40 +30,6 @@ plugin { #Qt plugins
}
}
-QT_PLUGIN_VERIFY = QTPLUGIN DEPLOYMENT_PLUGIN
-for(QT_CURRENT_VERIFY, $$list($$QT_PLUGIN_VERIFY)) {
- for(QTPLUG, $$list($$lower($$unique($$QT_CURRENT_VERIFY)))) {
- # Check if the plugin is known to Qt. We can use this to determine
- # the plugin path. Unknown plugins must rely on the default link path.
- QT_PLUGINPATH = $$eval(QT_PLUGIN.$${QTPLUG}.TYPE)
-
- # Generate the plugin linker line
- target_qt:isEqual(TARGET, QTPLUG) {
- warning($$TARGET cannot have a QTPLUGIN of $$QTPLUG)
- } else {
- QT_LINKAGE = -l$${QTPLUG}$$qtPlatformTargetSuffix()
- }
-
- # Only link against plugin in static builds
- isEqual(QT_CURRENT_VERIFY, QTPLUGIN): {
- !isEmpty(QT_PLUGINPATH): LIBS *= -L$$[QT_INSTALL_PLUGINS/get]/$$QT_PLUGINPATH
- LIBS += $$QT_LINKAGE
- # if the plugin is linked statically there is no need to deploy it
- DEPLOYMENT_PLUGIN -= $$QT_CURRENT_VERIFY
- }
- isEqual(QT_CURRENT_VERIFY, DEPLOYMENT_PLUGIN):shared:wince*: {
- QT_ITEM =
- CONFIG(debug, debug|release): QT_ITEM = $${QTPLUG}d4.dll
- else: QT_ITEM = $${QTPLUG}4.dll
-
- eval(qt_additional_plugin_$${QTPLUG}.files = $$[QT_INSTALL_PLUGINS/get]/$${QT_PLUGINPATH}/$${QT_ITEM})
- eval(qt_additional_plugin_$${QTPLUG}.path = $${QT_PLUGINPATH})
-
- DEPLOYMENT *= qt_additional_plugin_$${QTPLUG}
- }
- }
-}
-
qtestlib {
warning("CONFIG+=qtestlib is deprecated. Use QT+=testlib instead.")
QT += testlib
@@ -110,3 +71,66 @@ qtAddModules(QT_PRIVATE, LIBS_PRIVATE)
wince*:static:gui {
QTLIB += qmenu_wce.res
}
+
+QT_PLUGIN_VERIFY = DEPLOYMENT_PLUGIN
+contains(QT_CONFIG, static) {
+ QT_PLUGIN_VERIFY += QTPLUGIN
+ force_import_plugins|contains(TEMPLATE, .*app) {
+ needs_qpa_plugin:import_qpa_plugin {
+ qpa_minimal_plugin: \
+ QTPLUGIN += qminimal
+ else: \
+ QTPLUGIN += $$QT_DEFAULT_QPA_PLUGIN
+ }
+ import_plugins:!isEmpty(QTPLUGIN) {
+ IMPORT_FILE_CONT = \
+ "// This file is autogenerated by qmake. It imports static plugin classes for" \
+ "// static plugins specified using QTPLUGIN and QT_PLUGIN_CLASS.<plugin> variables." \
+ "$${LITERAL_HASH}include <QtPlugin>"
+ for(IMPORT_PLUG, $$list($$unique(QTPLUGIN))) {
+ PLUG_CLASS = $$eval(QT_PLUGIN.$${IMPORT_PLUG}.CLASS_NAME)
+ !isEmpty(PLUG_CLASS): \
+ IMPORT_FILE_CONT += "Q_IMPORT_PLUGIN($$PLUG_CLASS)"
+ else: \
+ warning("Plugin class name could not be determined for $$IMPORT_PLUG plugin.")
+ }
+ IMPORT_CPP = $$OUT_PWD/$$lower($$basename(TARGET))_plugin_import.cpp
+ write_file($$IMPORT_CPP, IMPORT_FILE_CONT)|error("Aborting.")
+ SOURCES += $$IMPORT_CPP
+ QMAKE_DISTCLEAN += $$IMPORT_CPP
+ }
+ }
+}
+
+for(QT_CURRENT_VERIFY, $$list($$QT_PLUGIN_VERIFY)) {
+ for(QTPLUG, $$list($$lower($$unique($$QT_CURRENT_VERIFY)))) {
+ # Check if the plugin is known to Qt. We can use this to determine
+ # the plugin path. Unknown plugins must rely on the default link path.
+ QT_PLUGINPATH = $$eval(QT_PLUGIN.$${QTPLUG}.TYPE)
+
+ # Generate the plugin linker line
+ target_qt:isEqual(TARGET, QTPLUG) {
+ warning($$TARGET cannot have a QTPLUGIN of $$QTPLUG)
+ } else {
+ QT_LINKAGE = -l$${QTPLUG}$$qtPlatformTargetSuffix()
+ }
+
+ # Only link against plugin in static builds
+ isEqual(QT_CURRENT_VERIFY, QTPLUGIN): {
+ !isEmpty(QT_PLUGINPATH): LIBS *= -L$$[QT_INSTALL_PLUGINS/get]/$$QT_PLUGINPATH
+ LIBS += $$QT_LINKAGE
+ # if the plugin is linked statically there is no need to deploy it
+ DEPLOYMENT_PLUGIN -= $$QT_CURRENT_VERIFY
+ }
+ isEqual(QT_CURRENT_VERIFY, DEPLOYMENT_PLUGIN):shared:wince*: {
+ QT_ITEM =
+ CONFIG(debug, debug|release): QT_ITEM = $${QTPLUG}d4.dll
+ else: QT_ITEM = $${QTPLUG}4.dll
+
+ eval(qt_additional_plugin_$${QTPLUG}.files = $$[QT_INSTALL_PLUGINS/get]/$${QT_PLUGINPATH}/$${QT_ITEM})
+ eval(qt_additional_plugin_$${QTPLUG}.path = $${QT_PLUGINPATH})
+
+ DEPLOYMENT *= qt_additional_plugin_$${QTPLUG}
+ }
+ }
+}
diff --git a/mkspecs/features/qt_build_config.prf b/mkspecs/features/qt_build_config.prf
index 63d6b43c7c..48d6001aa9 100644
--- a/mkspecs/features/qt_build_config.prf
+++ b/mkspecs/features/qt_build_config.prf
@@ -1,3 +1,14 @@
+#
+# W A R N I N G
+# -------------
+#
+# This file is not part of the Qt API. It exists purely as an
+# implementation detail. It may change from version to version
+# without notice, or even be removed.
+#
+# We mean it.
+#
+
!contains(QMAKE_INTERNAL_INCLUDED_FILES, .*qmodule\\.pri) {
QMAKE_QT_MODULE = $$[QT_HOST_DATA/get]/mkspecs/qmodule.pri
!exists($$QMAKE_QT_MODULE)|!include($$QMAKE_QT_MODULE, "", true) {
@@ -28,7 +39,6 @@ mac {
CONFIG += \
create_prl link_prl \
prepare_docs qt_docs_targets \
- qt_example_installs \
no_private_qt_headers_warning QTDIR_build \
# Qt modules get compiled without exceptions enabled by default.
# However, testcases should be still built with exceptions.
diff --git a/mkspecs/features/qt_build_paths.prf b/mkspecs/features/qt_build_paths.prf
index 5f6f08c3db..123c87de3b 100644
--- a/mkspecs/features/qt_build_paths.prf
+++ b/mkspecs/features/qt_build_paths.prf
@@ -1,3 +1,14 @@
+#
+# W A R N I N G
+# -------------
+#
+# This file is not part of the Qt API. It exists purely as an
+# implementation detail. It may change from version to version
+# without notice, or even be removed.
+#
+# We mean it.
+#
+
# Find the module's source root dir.
isEmpty(_QMAKE_CONF_): error("Project has no top-level .qmake.conf file.")
MODULE_PROFILE_DIR = $$dirname(_QMAKE_CONF_)
diff --git a/mkspecs/features/qt_config.prf b/mkspecs/features/qt_config.prf
index 3b2b62e139..061399d78c 100644
--- a/mkspecs/features/qt_config.prf
+++ b/mkspecs/features/qt_config.prf
@@ -1,3 +1,5 @@
+# This file is loaded as one of the last things by all qmakespecs.
+
QMAKE_QT_CONFIG = $$[QT_HOST_DATA/get]/mkspecs/qconfig.pri
!exists($$QMAKE_QT_CONFIG)|!include($$QMAKE_QT_CONFIG, "", true) {
debug(1, "Cannot load qconfig.pri!")
diff --git a/mkspecs/features/qt_docs.prf b/mkspecs/features/qt_docs.prf
index 3eb138b96d..99759c6da1 100644
--- a/mkspecs/features/qt_docs.prf
+++ b/mkspecs/features/qt_docs.prf
@@ -1,3 +1,14 @@
+#
+# W A R N I N G
+# -------------
+#
+# This file is not part of the Qt API. It exists purely as an
+# implementation detail. It may change from version to version
+# without notice, or even be removed.
+#
+# We mean it.
+#
+
!exists($$QMAKE_DOCS): error("Cannot find documentation specification file $$QMAKE_DOCS")
load(qt_build_paths)
@@ -17,7 +28,6 @@ doc_command = $$QDOC $$QMAKE_DOCS
prepare_docs {
prepare_docs.commands += $$doc_command -prepare -no-link-errors
generate_docs.commands += $$doc_command -generate
- html_docs.depends += generate_docs
} else {
html_docs.commands += $$doc_command
}
@@ -28,12 +38,12 @@ prepare_docs {
inst_html_docs.files = $$QMAKE_DOCS_OUTPUTDIR
inst_html_docs.path = $$[QT_INSTALL_DOCS]
- inst_html_docs.CONFIG += no_check_exist directory no_default_install
+ inst_html_docs.CONFIG += no_check_exist directory no_default_install no_build
INSTALLS += inst_html_docs
inst_qch_docs.files = $$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch
inst_qch_docs.path = $$[QT_INSTALL_DOCS]
- inst_qch_docs.CONFIG += no_check_exist no_default_install
+ inst_qch_docs.CONFIG += no_check_exist no_default_install no_build
INSTALLS += inst_qch_docs
install_html_docs.depends = install_inst_html_docs
diff --git a/mkspecs/features/qt_docs_targets.prf b/mkspecs/features/qt_docs_targets.prf
index 0d9f90bce2..89f080cc5e 100644
--- a/mkspecs/features/qt_docs_targets.prf
+++ b/mkspecs/features/qt_docs_targets.prf
@@ -1,37 +1,45 @@
-!contains(QMAKE_EXTRA_TARGETS, docs) {
- contains(TEMPLATE, subdirs) {
- prepare_docs {
- prepareRecursiveTarget(prepare_docs)
- prepareRecursiveTarget(generate_docs)
- html_docs.commands = $(MAKE) -f $(MAKEFILE) prepare_docs && $(MAKE) -f $(MAKEFILE) generate_docs
- } else {
- prepareRecursiveTarget(html_docs)
- }
- prepareRecursiveTarget(qch_docs)
- prepareRecursiveTarget(docs)
- } else {
- # apps and libs only generate docs if QMAKE_DOCS is set
- !isEmpty(QMAKE_DOCS) {
- # backwards compat hack
- load(qt_docs)
- }
- }
- docs.commands = $(MAKE) -f $(MAKEFILE) html_docs && $(MAKE) -f $(MAKEFILE) qch_docs
- QMAKE_EXTRA_TARGETS += html_docs qch_docs docs
- prepare_docs: QMAKE_EXTRA_TARGETS += prepare_docs generate_docs
+#
+# W A R N I N G
+# -------------
+#
+# This file is not part of the Qt API. It exists purely as an
+# implementation detail. It may change from version to version
+# without notice, or even be removed.
+#
+# We mean it.
+#
+
+DOC_TARGETS = \
+ install_html_docs uninstall_html_docs \
+ install_qch_docs uninstall_qch_docs \
+ install_docs uninstall_docs \
+ qch_docs
+
+prepare_docs {
+ DOC_TARGETS += prepare_docs generate_docs
+ html_docs.commands = $(MAKE) -f $(MAKEFILE) prepare_docs && $(MAKE) -f $(MAKEFILE) generate_docs
+ QMAKE_EXTRA_TARGETS += html_docs
+} else {
+ DOC_TARGETS += html_docs
}
-!contains(QMAKE_EXTRA_TARGETS, install_docs) {
- contains(TEMPLATE, subdirs) {
- prepareRecursiveTarget(install_html_docs)
- prepareRecursiveTarget(uninstall_html_docs)
- prepareRecursiveTarget(install_qch_docs)
- prepareRecursiveTarget(uninstall_qch_docs)
- prepareRecursiveTarget(install_docs)
- prepareRecursiveTarget(uninstall_docs)
+docs.commands = $(MAKE) -f $(MAKEFILE) html_docs && $(MAKE) -f $(MAKEFILE) qch_docs
+QMAKE_EXTRA_TARGETS += docs
+
+contains(TEMPLATE, subdirs) {
+ for(inst, DOC_TARGETS): \
+ prepareRecursiveTarget($$inst)
+} else:debug_and_release:!build_pass {
+ sub = $$first(BUILDS)
+ for(inst, DOC_TARGETS) {
+ $${inst}.CONFIG = recursive
+ $${inst}.recurse = $$sub
+ }
+} else {
+ # apps and libs only generate docs if QMAKE_DOCS is set
+ !isEmpty(QMAKE_DOCS) {
+ # backwards compat hack
+ load(qt_docs)
}
- QMAKE_EXTRA_TARGETS += \
- install_html_docs uninstall_html_docs \
- install_qch_docs uninstall_qch_docs \
- install_docs uninstall_docs
}
+QMAKE_EXTRA_TARGETS += $$DOC_TARGETS
diff --git a/mkspecs/features/qt_example_installs.prf b/mkspecs/features/qt_example_installs.prf
index 72f0b141a7..5417469909 100644
--- a/mkspecs/features/qt_example_installs.prf
+++ b/mkspecs/features/qt_example_installs.prf
@@ -1,5 +1,16 @@
+#
+# W A R N I N G
+# -------------
+#
+# This file is not part of the Qt API. It exists purely as an
+# implementation detail. It may change from version to version
+# without notice, or even be removed.
+#
+# We mean it.
+#
+
probase = $$relative_path($$_PRO_FILE_PWD_, $$dirname(_QMAKE_CONF_)/examples)
-!contains(probase, ^\\..*) {
+!isEmpty(probase):!contains(probase, ^\\..*) {
for(ex, EXAMPLE_FILES): \
sourcefiles += $$files($$absolute_path($$ex, $$_PRO_FILE_PWD_))
for(res, RESOURCES) {
@@ -21,6 +32,7 @@ probase = $$relative_path($$_PRO_FILE_PWD_, $$dirname(_QMAKE_CONF_)/examples)
extras = \
$$_PRO_FILE_PWD_/README \
$$files($$_PRO_FILE_PWD_/*.pri) \
+ $$replace(_PRO_FILE_, \\.pro$, .qmlproject) \
$$replace(_PRO_FILE_, \\.pro$, .json) \
$$replace(_PRO_FILE_, \\.pro$, .inf)
for(extra, extras): \
@@ -30,6 +42,10 @@ probase = $$relative_path($$_PRO_FILE_PWD_, $$dirname(_QMAKE_CONF_)/examples)
# Just for Qt Creator
OTHER_FILES += $$sourcefiles
+ for(inst, INSTALLS): \
+ !equals(inst, target):!contains($${inst}.CONFIG, no_check_exist): \
+ for(file, $${inst}.files): \
+ sourcefiles += $$files($$absolute_path($$file, $$_PRO_FILE_PWD_))
sourcefiles += \
$$_PRO_FILE_ $$RC_FILE $$DEF_FILE \
$$SOURCES $$HEADERS $$FORMS $$RESOURCES $$TRANSLATIONS \
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index d73d402b0c..389f2418ad 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
@@ -51,6 +51,13 @@ defineTest(qtProcessModuleFlags) {
export($$1)
}
+# qt module
+defineTest(qtHaveModule) {
+ !isEmpty(QT.$${1}.name): \
+ return(true)
+ return(false)
+}
+
# qt module, UsePrivate flag, libs variable
defineTest(qtAddModule) {
MODULE_NAME = $$eval(QT.$${1}.name)
@@ -63,7 +70,8 @@ defineTest(qtAddModule) {
qtProcessModuleFlags(DEFINES, QT.$${1}.DEFINES)
MODULE_INCLUDES -= $$QMAKE_DEFAULT_INCDIRS
- MODULE_LIBS -= $$QMAKE_DEFAULT_LIBDIRS
+ MODULE_LIBS_ADD = $$MODULE_LIBS
+ MODULE_LIBS_ADD -= $$QMAKE_DEFAULT_LIBDIRS
INCLUDEPATH *= $$MODULE_INCLUDES
auto_use_privates|isEqual(2, UsePrivate) { # Tests function parameter 2 ($$2) being equal to 'UsePrivate'
@@ -100,7 +108,7 @@ defineTest(qtAddModule) {
}
isEmpty(LINKAGE) {
- !isEmpty(MODULE_LIBS): LINKAGE = -L$$MODULE_LIBS
+ !isEmpty(MODULE_LIBS_ADD): LINKAGE = -L$$MODULE_LIBS_ADD
lib =
if(!debug_and_release|build_pass):CONFIG(debug, debug|release) {
win32: lib = $${MODULE_NAME}$${QT_LIBINFIX}d
@@ -115,19 +123,19 @@ defineTest(qtAddModule) {
PRE_TARGETDEPS *= $$MODULE_LIBS/$${QMAKE_PREFIX_STATICLIB}$${lib}.$${QMAKE_EXTENSION_STATICLIB}
# Make sure we can link to uninstalled libraries
- unix:!mac:!isEmpty(QT.$${1}.libs) { # Use unmodified path, so /usr/lib also works
+ !isEmpty(MODULE_LIBS) {
for(rpl, QT.$${1}.rpath_link): \
- QMAKE_LFLAGS *= -Wl,-rpath-link,$$rpl
+ QMAKE_RPATHLINKDIR *= $$rpl
!auto_use_privates:!isEqual(2, UsePrivate): \
for(rpl, QT.$${1}.rpath_link_private): \
- QMAKE_LFLAGS *= -Wl,-rpath-link,$$rpl
+ QMAKE_RPATHLINKDIR *= $$rpl
}
}
# Only link to this module if a libs directory is set, else this is just a module
# to give access to sources or include files, and not for linking.
- !isEmpty(QT.$${1}.libs) { # Use unmodified path, so /usr/lib also works
+ !isEmpty(MODULE_LIBS) {
!isEmpty(QMAKE_LSB) {
- !isEmpty(MODULE_LIBS): QMAKE_LFLAGS *= --lsb-libpath=$$MODULE_LIBS
+ !isEmpty(MODULE_LIBS_ADD): QMAKE_LFLAGS *= --lsb-libpath=$$MODULE_LIBS_ADD
QMAKE_LIBDIR *= /opt/lsb/lib
QMAKE_LFLAGS *= --lsb-shared-libs=$${MODULE_NAME}$${QT_LIBINFIX}
}
@@ -139,6 +147,7 @@ defineTest(qtAddModule) {
export(QMAKE_LFLAGS)
export(QMAKE_LIBDIR)
export(QMAKE_RPATHDIR)
+ export(QMAKE_RPATHLINKDIR)
export(PRE_TARGETDEPS)
return(true)
}
diff --git a/tests/auto/other/headersclean/headersclean.pri b/mkspecs/features/qt_headersclean.prf
index c95380e3b9..4128392997 100644
--- a/tests/auto/other/headersclean/headersclean.pri
+++ b/mkspecs/features/qt_headersclean.prf
@@ -1,9 +1,9 @@
# The headersclean test attempts to ensure all public Qt headers
# abide by various rules.
#
-# To reuse this test outside of the qtbase module,
-# include this .pri and create a qt_headersclean_headers.h which includes
-# the headers you'd like to test.
+# To use this test, create a project which contains nothing else than a
+# QT= line with the modules you want to test (no presence conditionals needed),
+# followed by load(qt_headersclean).
*-g++*: QMAKE_CXXFLAGS += -W -Wall -Wextra -Werror
@@ -33,8 +33,19 @@ QMAKE_CXXFLAGS += -DQT_NO_CAST_TO_ASCII \
-DQT_USE_FAST_OPERATOR_PLUS
TARGET = tst_headersclean
-SOURCES += $$PWD/tst_headersclean.cpp
-HEADERS += $$PWD/tst_headersclean.h
-# qt_headersclean_headers.h should be alongside the .pro file
-INCLUDEPATH += $$_PRO_FILE_PWD_
+includes =
+for(q, QT) {
+ qn = $$eval(QT.$${q}.name)
+ isEmpty(qn): \
+ QT -= $$q
+ else: \
+ includes += "$${LITERAL_HASH}include <$$qn/$$qn>"
+}
+includes = $$join(includes, $$escape_expand(\\n))
+
+testfile.input = $$PWD/data/headersclean/tst_headersclean.cpp.in
+testfile.output = $$OUT_PWD/tst_headersclean.cpp
+QMAKE_SUBSTITUTES += testfile
+
+SOURCES += $$testfile.output
diff --git a/mkspecs/features/qt_installs.prf b/mkspecs/features/qt_installs.prf
index 0e860cccca..cc720ac8c0 100644
--- a/mkspecs/features/qt_installs.prf
+++ b/mkspecs/features/qt_installs.prf
@@ -1,3 +1,14 @@
+#
+# W A R N I N G
+# -------------
+#
+# This file is not part of the Qt API. It exists purely as an
+# implementation detail. It may change from version to version
+# without notice, or even be removed.
+#
+# We mean it.
+#
+
#library
!qt_no_install_library {
win32 {
diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
index eb46481c70..19cdc2a26a 100644
--- a/mkspecs/features/qt_module.prf
+++ b/mkspecs/features/qt_module.prf
@@ -1,3 +1,14 @@
+#
+# W A R N I N G
+# -------------
+#
+# This file is not part of the Qt API. It exists purely as an
+# implementation detail. It may change from version to version
+# without notice, or even be removed.
+#
+# We mean it.
+#
+
!no_qt_module_warning:!contains(QMAKE_INTERNAL_INCLUDED_FILES, .*qmodule\\.pri) {
QMAKE_ACTUAL_PRO_FILE = $$basename(_PRO_FILE_)
isEmpty(QMAKE_ACTUAL_PRO_FILE): QMAKE_ACTUAL_PRO_FILE=.pro
@@ -35,19 +46,15 @@ else: \
MODULE_DEFINES = $$MODULE_DEFINE $$MODULE_DEFINES
load(qt_build_paths)
-
-# This check will be removed soon. Weird indentation to avoid reindenting the code later.
-!isEmpty(MODULE_PRI) {
- !build_pass:warning("$$_PRO_FILE_ still sets MODULE_PRI. Not auto-generating module .pri file.")
- MODULE_PRI = $$absolute_path($$MODULE_PRI, $$_PRO_FILE_PWD_)
- exists($$MODULE_PRI)|error("Specified module pri file $$MODULE_PRI does not exist.")
-} else {
-
MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst/qt_lib_$${MODULE}.pri
!build_pass {
# Create a module .pri file
+ unix:!static: \
+ module_rpath = "QT.$${MODULE}.rpath = $$[QT_INSTALL_LIBS/raw]"
+ else: \
+ module_rpath =
!isEmpty(QT_FOR_PRIVATE) {
contains(QT_FOR_PRIVATE, .*-private$):error("QT_FOR_PRIVATE may not contain *-private.")
module_privdep = "QT.$${MODULE}.private_depends = $$QT_FOR_PRIVATE"
@@ -79,10 +86,9 @@ MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst/qt_lib_$${MODULE}.pri
"QT.$${MODULE}.bins = \$\$QT_MODULE_BIN_BASE" \
"QT.$${MODULE}.includes = $$MODULE_INCLUDES" \
"QT.$${MODULE}.private_includes = $$MODULE_PRIVATE_INCLUDES" \
- "QT.$${MODULE}.sources = $$val_escape(_PRO_FILE_PWD_)" \
"QT.$${MODULE}.libs = \$\$QT_MODULE_LIB_BASE" \
"QT.$${MODULE}.libexecs = \$\$QT_MODULE_LIBEXEC_BASE" \
- "QT.$${MODULE}.rpath = $$[QT_INSTALL_LIBS/raw]" \
+ $$module_rpath \
"QT.$${MODULE}.plugins = \$\$QT_MODULE_PLUGIN_BASE" \
"QT.$${MODULE}.imports = \$\$QT_MODULE_IMPORT_BASE" \
"QT.$${MODULE}.qml = \$\$QT_MODULE_QML_BASE" \
@@ -97,8 +103,6 @@ MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst/qt_lib_$${MODULE}.pri
} # !build_pass
-} # isEmpty(MODULE_PRI)
-
load(qt_module_fwdpri)
INCLUDEPATH *= $$eval(QT.$${MODULE}.includes) $$eval(QT.$${MODULE}.private_includes)
@@ -110,7 +114,6 @@ TEMPLATE = lib
DESTDIR = $$eval(QT.$${MODULE}.libs)
win32:!wince*:exists($$[QT_INSTALL_PREFIX]/.qmake.cache): DLLDESTDIR = $$eval(QT.$${MODULE}.bins)
-CONFIG += qt warn_on depend_includepath
CONFIG += qmake_cache target_qt
QMAKE_DOCS_TARGETDIR = qt$${MODULE}
@@ -181,21 +184,22 @@ load(qt_installs)
unix|win32-g++* {
CONFIG += create_pc
QMAKE_PKGCONFIG_LIBDIR = $$[QT_INSTALL_LIBS/raw]
- QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS/raw]/$$MODULE_INCNAME
- QMAKE_PKGCONFIG_CFLAGS = -I$$[QT_INSTALL_HEADERS/raw]
+ QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS/raw]
+ QMAKE_PKGCONFIG_CFLAGS = -I${includedir}/$$MODULE_INCNAME
QMAKE_PKGCONFIG_DESTDIR = pkgconfig
- include_replace.match = $$[QT_INSTALL_HEADERS/get]
+ !isEmpty(_QMAKE_SUPER_CACHE_): \
+ rplbase = $$dirname(_QMAKE_SUPER_CACHE_)/[^/][^/]*
+ else: \
+ rplbase = $$[QT_INSTALL_PREFIX/get]
+ include_replace.match = $$rplbase/include
include_replace.replace = $$[QT_INSTALL_HEADERS/raw]
- lib_replace.match = $$[QT_INSTALL_LIBS/get]
+ lib_replace.match = $$rplbase/lib
lib_replace.replace = $$[QT_INSTALL_LIBS/raw]
- prefix_replace.match = $$QT_BUILD_TREE
- prefix_replace.replace = $$[QT_INSTALL_PREFIX/raw]
- QMAKE_PKGCONFIG_INSTALL_REPLACE += include_replace lib_replace prefix_replace
+ QMAKE_PKGCONFIG_INSTALL_REPLACE += include_replace lib_replace
}
unix {
CONFIG += create_libtool explicitlib
- QMAKE_PRL_LIBDIR = $$[QT_INSTALL_LIBS/raw] ### XXX
QMAKE_PRL_INSTALL_REPLACE += include_replace lib_replace
QMAKE_LIBTOOL_LIBDIR = $$[QT_INSTALL_LIBS/raw]
QMAKE_LIBTOOL_INSTALL_REPLACE += include_replace lib_replace
diff --git a/mkspecs/features/qt_module_fwdpri.prf b/mkspecs/features/qt_module_fwdpri.prf
index b7270aea59..58b016803e 100644
--- a/mkspecs/features/qt_module_fwdpri.prf
+++ b/mkspecs/features/qt_module_fwdpri.prf
@@ -1,3 +1,14 @@
+#
+# W A R N I N G
+# -------------
+#
+# This file is not part of the Qt API. It exists purely as an
+# implementation detail. It may change from version to version
+# without notice, or even be removed.
+#
+# We mean it.
+#
+
!build_pass {
load(qt_build_paths)
@@ -48,7 +59,6 @@
# Create a forwarding module .pri file
MODULE_FWD_PRI_CONT = \
- "QT_MODULE_BASE = $$MODULE_BASE_DIR" \
"QT_MODULE_BIN_BASE = $$MODULE_BASE_OUTDIR/bin" \
"QT_MODULE_INCLUDE_BASE = $$MODULE_BASE_OUTDIR/include" \
"QT_MODULE_IMPORT_BASE = $$MODULE_BASE_OUTDIR/imports" \
@@ -72,6 +82,7 @@
for(var, $$list(VERSION MAJOR_VERSION MINOR_VERSION PATCH_VERSION \
name depends private_depends module_config CONFIG DEFINES sources \
includes private_includes bins libs libexecs plugins imports qml \
+ rpath_link rpath_link_private \
)):defined(QT.$${MODULE}.$$var, var):cache(QT.$${MODULE}.$$var, transient)
cache(QT_CONFIG, transient)
diff --git a/mkspecs/features/qt_module_headers.prf b/mkspecs/features/qt_module_headers.prf
index 6acff23460..10d3fe3c0b 100644
--- a/mkspecs/features/qt_module_headers.prf
+++ b/mkspecs/features/qt_module_headers.prf
@@ -1,3 +1,14 @@
+#
+# W A R N I N G
+# -------------
+#
+# This file is not part of the Qt API. It exists purely as an
+# implementation detail. It may change from version to version
+# without notice, or even be removed.
+#
+# We mean it.
+#
+
load(qt_build_paths)
!build_pass {
diff --git a/mkspecs/features/qt_parts.prf b/mkspecs/features/qt_parts.prf
index 75fa2966bc..12ba312bcd 100644
--- a/mkspecs/features/qt_parts.prf
+++ b/mkspecs/features/qt_parts.prf
@@ -1,3 +1,14 @@
+#
+# W A R N I N G
+# -------------
+#
+# This file is not part of the Qt API. It exists purely as an
+# implementation detail. It may change from version to version
+# without notice, or even be removed.
+#
+# We mean it.
+#
+
load(qt_build_config)
TEMPLATE = subdirs
diff --git a/mkspecs/features/qt_plugin.prf b/mkspecs/features/qt_plugin.prf
index b84fa47dd1..4861576eba 100644
--- a/mkspecs/features/qt_plugin.prf
+++ b/mkspecs/features/qt_plugin.prf
@@ -1,3 +1,14 @@
+#
+# W A R N I N G
+# -------------
+#
+# This file is not part of the Qt API. It exists purely as an
+# implementation detail. It may change from version to version
+# without notice, or even be removed.
+#
+# We mean it.
+#
+
load(qt_build_paths)
isEmpty(PLUGIN_TYPE): error("PLUGIN_TYPE (plugins/ subdirectory) needs to be defined.")
@@ -20,14 +31,18 @@ contains(QT_CONFIG, c++11):CONFIG += c++11
contains(QT_CONFIG, static):CONFIG += static
else:CONFIG += shared
-!build_pass:static {
- isEmpty(MODULE): MODULE = $$section($$list($$basename(_PRO_FILE_)), ., 0, 0)
+static {
+ isEmpty(MODULE): MODULE = $$basename(TARGET)
MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_plugin_$${MODULE}.pri
- MODULE_PRI_CONT = \
- "QT_PLUGIN.$${MODULE}.TYPE = $$PLUGIN_TYPE"
- write_file($$MODULE_PRI, MODULE_PRI_CONT)|error("Aborting.")
+ !build_pass {
+ MODULE_PRI_CONT = \
+ "QT_PLUGIN.$${MODULE}.TYPE = $$PLUGIN_TYPE" \
+ "QT_PLUGIN.$${MODULE}.CLASS_NAME = $$PLUGIN_CLASS_NAME"
+
+ write_file($$MODULE_PRI, MODULE_PRI_CONT)|error("Aborting.")
+ }
pritarget.path = $$[QT_HOST_DATA]/mkspecs/modules
pritarget.files = $$MODULE_PRI
diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf
index 3510582c8e..16db6c7972 100644
--- a/mkspecs/features/qt_tool.prf
+++ b/mkspecs/features/qt_tool.prf
@@ -1,9 +1,20 @@
+#
+# W A R N I N G
+# -------------
+#
+# This file is not part of the Qt API. It exists purely as an
+# implementation detail. It may change from version to version
+# without notice, or even be removed.
+#
+# We mean it.
+#
+
TEMPLATE = app
load(qt_build_paths)
DESTDIR = $$MODULE_BASE_OUTDIR/bin
-CONFIG += qt warn_on console
+CONFIG += console
isEmpty(QMAKE_INFO_PLIST): CONFIG -= app_bundle
host_build {
diff --git a/mkspecs/features/resolve_target.prf b/mkspecs/features/resolve_target.prf
index 455dd3b985..c60faf22c0 100644
--- a/mkspecs/features/resolve_target.prf
+++ b/mkspecs/features/resolve_target.prf
@@ -1,3 +1,14 @@
+#
+# W A R N I N G
+# -------------
+#
+# This file is not part of the Qt API. It exists purely as an
+# implementation detail. It may change from version to version
+# without notice, or even be removed.
+#
+# We mean it.
+#
+
QMAKE_RESOLVED_TARGET = $$absolute_path($$DESTDIR, $$OUT_PWD)/
win32 {
diff --git a/mkspecs/features/resources.prf b/mkspecs/features/resources.prf
index dfded30e28..ed44d9c308 100644
--- a/mkspecs/features/resources.prf
+++ b/mkspecs/features/resources.prf
@@ -1,7 +1,6 @@
qtPrepareTool(QMAKE_RCC, rcc)
isEmpty(RCC_DIR):RCC_DIR = .
-isEmpty(QMAKE_RESOURCE_PREFIX):QMAKE_RESOURCE_PREFIX = /tmp/
isEmpty(QMAKE_MOD_RCC):QMAKE_MOD_RCC = qrc
resource_combine {
diff --git a/mkspecs/features/simd.prf b/mkspecs/features/simd.prf
index 6d729a66a7..b430e59ff0 100644
--- a/mkspecs/features/simd.prf
+++ b/mkspecs/features/simd.prf
@@ -1,3 +1,14 @@
+#
+# W A R N I N G
+# -------------
+#
+# This file is not part of the Qt API. It exists purely as an
+# implementation detail. It may change from version to version
+# without notice, or even be removed.
+#
+# We mean it.
+#
+
# Get the SIMD flags
load(qt_build_config)
diff --git a/mkspecs/features/spec_post.prf b/mkspecs/features/spec_post.prf
index a58690e8a6..46a512bf17 100644
--- a/mkspecs/features/spec_post.prf
+++ b/mkspecs/features/spec_post.prf
@@ -1,3 +1,9 @@
+# This file is loaded by qmake right after loading the qmakespec.
+# Afterwards, the project's .qmake.conf and .qmake.cache are loaded
+# (if present).
+# Note that up to this point, nothing specific to a particular SUBDIRS
+# project or build pass can be done.
+
isEmpty(MAKEFILE_GENERATOR):error("Qmake spec does not set MAKEFILE_GENERATOR.")
isEmpty(QMAKE_PLATFORM) {
isEmpty(TARGET_PLATFORM) {
diff --git a/mkspecs/features/spec_pre.prf b/mkspecs/features/spec_pre.prf
index 14e3ac90de..844fa35579 100644
--- a/mkspecs/features/spec_pre.prf
+++ b/mkspecs/features/spec_pre.prf
@@ -1,3 +1,7 @@
+# This file is loaded by qmake right before loading the qmakespec.
+# At this point, the built-in variables have been set up and the project's
+# .qmake.super was read (if present).
+
QMAKE_DIR_SEP = $$DIR_SEPARATOR
QMAKE_DIRLIST_SEP = $$DIRLIST_SEPARATOR
diff --git a/mkspecs/features/testcase_targets.prf b/mkspecs/features/testcase_targets.prf
new file mode 100644
index 0000000000..e9b107735a
--- /dev/null
+++ b/mkspecs/features/testcase_targets.prf
@@ -0,0 +1,9 @@
+
+# Let every project have a standard GNU `check' target
+!contains(QMAKE_EXTRA_TARGETS, check) {
+ contains(TEMPLATE, subdirs): \
+ prepareRecursiveTarget(check)
+ else: \
+ check.depends = first # `make check' implies build
+ QMAKE_EXTRA_TARGETS += check
+}
diff --git a/mkspecs/features/uic.prf b/mkspecs/features/uic.prf
index a98c62676c..36ec185f7b 100644
--- a/mkspecs/features/uic.prf
+++ b/mkspecs/features/uic.prf
@@ -1,33 +1,19 @@
qtPrepareTool(QMAKE_UIC, uic)
isEmpty(UI_DIR):UI_DIR = .
-isEmpty(UI_SOURCES_DIR):UI_SOURCES_DIR = $$UI_DIR
-isEmpty(UI_HEADERS_DIR):UI_HEADERS_DIR = $$UI_DIR
isEmpty(QMAKE_MOD_UIC):QMAKE_MOD_UIC = ui_
-# Allow FORMS3 to contain old UIC3 forms, while FORMS contains new
-# UIC files in the same project. However, if CONFIG+=uic3 and no
-# FORMS3 is defined, FORMS may only contain old UIC3 files.
+uic.commands = $$QMAKE_UIC ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
+uic.depend_command = "$$QMAKE_UIC" -d "${QMAKE_FILE_IN}"
+uic.output = $$UI_DIR/$${QMAKE_MOD_UIC}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
+uic.input = FORMS
+uic.variable_out = GENERATED_FILES
+uic.CONFIG += no_link target_predeps
+uic.name = UIC ${QMAKE_FILE_IN}
+silent:uic.commands = @echo uic ${QMAKE_FILE_IN} && $$uic.commands
+QMAKE_EXTRA_COMPILERS += uic
+INCREDIBUILD_XGE += uic
-!uic3|!isEmpty(FORMS3) {
- # If we have CONFIG+=uic3 and no FORMS3, then don't do this step,
- # as UIC3 files don't need a ui_<formname>.h file
-
- uic.commands = $$QMAKE_UIC ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
- uic.depend_command = "$$QMAKE_UIC" -d "${QMAKE_FILE_IN}"
- uic.output = $$UI_HEADERS_DIR/$${QMAKE_MOD_UIC}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
- uic.input = FORMS
- uic.variable_out = GENERATED_FILES
- uic.CONFIG += no_link target_predeps
- uic.name = UIC ${QMAKE_FILE_IN}
- silent:uic.commands = @echo uic ${QMAKE_FILE_IN} && $$uic.commands
- QMAKE_EXTRA_COMPILERS += uic
- INCREDIBUILD_XGE += uic
-}
-
-!isEmpty(FORMS)|!isEmpty(FORMS3) {
- ui_dir_short = $$UI_HEADERS_DIR
- contains(QMAKE_HOST.os,Windows):ui_dir_short ~= s,^.:,/,
- contains(ui_dir_short, ^[/\\\\].*):INCLUDEPATH += $$UI_HEADERS_DIR
- else:INCLUDEPATH += $$OUT_PWD/$$UI_HEADERS_DIR
+!isEmpty(FORMS) {
+ INCLUDEPATH += $$absolute_path($$UI_DIR, $$OUT_PWD)
}
diff --git a/mkspecs/features/win32/thread.prf b/mkspecs/features/win32/thread.prf
deleted file mode 100644
index fc832a0990..0000000000
--- a/mkspecs/features/win32/thread.prf
+++ /dev/null
@@ -1,22 +0,0 @@
-CONFIG -= thread_off
-
-# #### These need to go
-debug {
- contains(DEFINES, QT_DLL) {
- QMAKE_CFLAGS += $$QMAKE_CFLAGS_MT_DLLDBG
- QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_MT_DLLDBG
- } else {
- QMAKE_CFLAGS += $$QMAKE_CFLAGS_MT_DBG
- QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_MT_DBG
- }
-} else {
- contains(DEFINES, QT_DLL) {
- QMAKE_CFLAGS += $$QMAKE_CFLAGS_MT_DLL
- QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_MT_DLL
- } else {
- QMAKE_CFLAGS += $$QMAKE_CFLAGS_MT
- QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_MT
- }
-}
-
-QMAKE_LIBS += $$QMAKE_LIBS_RTMT
diff --git a/mkspecs/features/win32/thread_off.prf b/mkspecs/features/win32/thread_off.prf
deleted file mode 100644
index 436a2c8166..0000000000
--- a/mkspecs/features/win32/thread_off.prf
+++ /dev/null
@@ -1,2 +0,0 @@
-CONFIG -= thread
-QMAKE_LIBS += $$QMAKE_LIBS_RT
diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32
index f560cf8cb1..222acfa9a6 100644
--- a/qmake/Makefile.win32
+++ b/qmake/Makefile.win32
@@ -14,11 +14,11 @@ QMKSRC = $(SOURCE_PATH)\qmake
#
!if "$(QMAKESPEC)" == "win32-icc"
CXX = icl
-LINK = link
+LINKER = link
CFLAGS = /Zc:forScope
!else
CXX = cl
-LINK = link
+LINKER = link
!endif
#
@@ -49,7 +49,7 @@ CXXFLAGS = $(CFLAGS)
LFLAGS =
LIBS = ole32.lib advapi32.lib
-LINKQMAKE = $(LINK) $(LFLAGS) -OUT:qmake.exe $(OBJS) $(QTOBJS) $(LIBS)
+LINKQMAKE = $(LINKER) $(LFLAGS) -OUT:qmake.exe $(OBJS) $(QTOBJS) $(LIBS)
ADDCLEAN = vc60.pdb vc70.pdb qmake.pdb qmake.ilk
!ELSE
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp
index c538814ac4..00db664e7d 100644
--- a/qmake/generators/mac/pbuilder_pbx.cpp
+++ b/qmake/generators/mac/pbuilder_pbx.cpp
@@ -1180,10 +1180,6 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
<< "\t\t\t\t" << writeSettings("SECTORDER_FLAGS", ProStringList()) << ";" << "\n"
<< "\t\t\t\t" << writeSettings("WARNING_CFLAGS", ProStringList()) << ";" << "\n"
<< "\t\t\t\t" << writeSettings("PREBINDING", ProStringList((project->isEmpty("QMAKE_DO_PREBINDING") ? "NO" : "YES")), SettingsNoQuote) << ";" << "\n";
- if(!project->isEmpty("PRECOMPILED_HEADER")) {
- t << "\t\t\t\t" << writeSettings("GCC_PRECOMPILE_PREFIX_HEADER", "YES") << ";" << "\n"
- << "\t\t\t\t" << writeSettings("GCC_PREFIX_HEADER", escapeFilePath(project->first("PRECOMPILED_HEADER"))) << ";" << "\n";
- }
if((project->first("TEMPLATE") == "app" && project->isActiveConfig("app_bundle")) ||
(project->first("TEMPLATE") == "lib" && !project->isActiveConfig("staticlib") &&
project->isActiveConfig("lib_bundle"))) {
@@ -1250,8 +1246,6 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
t << "\t\t\t\t" << writeSettings("DYLIB_COMPATIBILITY_VERSION", project->first("COMPAT_VERSION")) << ";" << "\n";
if(!project->isEmpty("QMAKE_MACOSX_DEPLOYMENT_TARGET"))
t << "\t\t\t\t" << writeSettings("MACOSX_DEPLOYMENT_TARGET", project->first("QMAKE_MACOSX_DEPLOYMENT_TARGET")) << ";" << "\n";
- if (!project->isEmpty("OBJECTS_DIR"))
- t << "\t\t\t\t" << writeSettings("OBJROOT", fixForOutput(project->first("OBJECTS_DIR").toQString())) << ";" << "\n";
if(project->first("TEMPLATE") == "app") {
t << "\t\t\t\t" << writeSettings("PRODUCT_NAME", fixForOutput(project->first("QMAKE_ORIG_TARGET").toQString())) << ";" << "\n";
} else {
@@ -1393,6 +1387,10 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
<< "\t\t\t" << "buildSettings = {" << "\n";
for (QMap<QString, QString>::Iterator set_it = settings.begin(); set_it != settings.end(); ++set_it)
t << "\t\t\t\t" << writeSettings(set_it.key(), set_it.value()) << ";\n";
+ if (!project->isEmpty("PRECOMPILED_HEADER")) {
+ t << "\t\t\t\t" << writeSettings("GCC_PRECOMPILE_PREFIX_HEADER", "YES") << ";" << "\n"
+ << "\t\t\t\t" << writeSettings("GCC_PREFIX_HEADER", escapeFilePath(project->first("PRECOMPILED_HEADER"))) << ";" << "\n";
+ }
if (buildConfigGroups.at(i) == QLatin1String("PROJECT")) {
t << "\t\t\t\t" << writeSettings("HEADER_SEARCH_PATHS", fixListForOutput("INCLUDEPATH") + ProStringList(fixForOutput(specdir())), SettingsAsList, 5) << ";" << "\n"
<< "\t\t\t\t" << writeSettings("LIBRARY_SEARCH_PATHS", fixListForOutput("QMAKE_PBX_LIBPATHS"), SettingsAsList, 5) << ";" << "\n"
@@ -1429,6 +1427,8 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
const ProStringList &archs = project->values("QT_ARCH");
if (!archs.isEmpty())
t << "\t\t\t\t" << writeSettings("ARCHS", archs) << ";" << "\n";
+ if (!project->isEmpty("OBJECTS_DIR"))
+ t << "\t\t\t\t" << writeSettings("OBJROOT", escapeFilePath(project->first("OBJECTS_DIR").toQString())) << ";" << "\n";
} else {
if (project->first("TEMPLATE") == "app") {
t << "\t\t\t\t" << writeSettings("PRODUCT_NAME", fixForOutput(project->first("QMAKE_ORIG_TARGET").toQString())) << ";" << "\n";
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 22772f8392..0456d6bab3 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -2192,11 +2192,6 @@ MakefileGenerator::writeStubMakefile(QTextStream &t)
bool
MakefileGenerator::writeMakefile(QTextStream &t)
{
- QString ofile = Option::fixPathToTargetOS(Option::output.fileName());
- if (ofile.lastIndexOf(Option::dir_sep) != -1)
- ofile.remove(0, ofile.lastIndexOf(Option::dir_sep) +1);
- t << "MAKEFILE = " << ofile << endl << endl;
-
t << "####### Compile" << endl << endl;
writeObj(t, "SOURCES");
writeObj(t, "GENERATED_SOURCES");
@@ -2257,6 +2252,10 @@ MakefileGenerator::writeHeader(QTextStream &t)
t << "# Command: " << build_args().replace("$(QMAKE)", var("QMAKE_QMAKE")) << endl;
t << "#############################################################################" << endl;
t << endl;
+ QString ofile = Option::fixPathToTargetOS(Option::output.fileName());
+ if (ofile.lastIndexOf(Option::dir_sep) != -1)
+ ofile.remove(0, ofile.lastIndexOf(Option::dir_sep) +1);
+ t << "MAKEFILE = " << ofile << endl << endl;
}
QList<MakefileGenerator::SubTarget*>
@@ -2415,10 +2414,6 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
t << "include " << (*qeui_it) << endl;
if (!(flags & SubTargetSkipDefaultVariables)) {
- QString ofile = Option::fixPathToTargetOS(Option::output.fileName());
- if(ofile.lastIndexOf(Option::dir_sep) != -1)
- ofile.remove(0, ofile.lastIndexOf(Option::dir_sep) +1);
- t << "MAKEFILE = " << ofile << endl;
/* Calling Option::fixPathToTargetOS() is necessary for MinGW/MSYS, which requires
* back-slashes to be turned into slashes. */
t << "QMAKE = " << var("QMAKE_QMAKE") << endl;
diff --git a/qmake/generators/projectgenerator.cpp b/qmake/generators/projectgenerator.cpp
index 46cfe72258..f6cf39e9e9 100644
--- a/qmake/generators/projectgenerator.cpp
+++ b/qmake/generators/projectgenerator.cpp
@@ -363,7 +363,6 @@ ProjectGenerator::writeMakefile(QTextStream &t)
t << getWritableVar("TARGET_ASSIGN")
<< getWritableVar("CONFIG", false)
<< getWritableVar("CONFIG_REMOVE", false)
- << getWritableVar("DEPENDPATH")
<< getWritableVar("INCLUDEPATH") << endl;
t << "# Input" << "\n";
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index 82fd47f2ec..8a1a29c2c7 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -170,6 +170,13 @@ UnixMakefileGenerator::init()
project->values("QMAKE_LFLAGS") += var("QMAKE_LFLAGS_RPATH") + escapeFilePath(QFileInfo(rpathdirs[i].toQString()).absoluteFilePath());
}
}
+ if (!project->isEmpty("QMAKE_RPATHLINKDIR")) {
+ const ProStringList &rpathdirs = project->values("QMAKE_RPATHLINKDIR");
+ for (int i = 0; i < rpathdirs.size(); ++i) {
+ if (!project->isEmpty("QMAKE_LFLAGS_RPATHLINK"))
+ project->values("QMAKE_LFLAGS") += var("QMAKE_LFLAGS_RPATHLINK") + escapeFilePath(QFileInfo(rpathdirs[i].toQString()).absoluteFilePath());
+ }
+ }
if(project->isActiveConfig("GNUmake") && !project->isEmpty("QMAKE_CFLAGS_DEPS"))
include_deps = true; //do not generate deps
diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
index 7990986fd8..1665e23f40 100644
--- a/qmake/generators/win32/mingw_make.cpp
+++ b/qmake/generators/win32/mingw_make.cpp
@@ -343,7 +343,7 @@ void MingwMakefileGenerator::writeLibsPart(QTextStream &t)
if(project->isActiveConfig("staticlib") && project->first("TEMPLATE") == "lib") {
t << "LIB = " << var("QMAKE_LIB") << endl;
} else {
- t << "LINK = " << var("QMAKE_LINK") << endl;
+ t << "LINKER = " << var("QMAKE_LINK") << endl;
t << "LFLAGS = " << var("QMAKE_LFLAGS") << endl;
t << "LIBS = "
<< var("QMAKE_LIBS").replace(QRegExp("(\\slib|^lib)")," -l") << ' '
@@ -405,7 +405,7 @@ void MingwMakefileGenerator::writeBuildRulesPart(QTextStream &t)
t << "\n\t" << objectsLinkLine << " " ;
}
} else if (project->first("TEMPLATE") != "aux") {
- t << "\n\t" << "$(LINK) $(LFLAGS) -o $(DESTDIR_TARGET) " << objectsLinkLine << " " << " $(LIBS)";
+ t << "\n\t" << "$(LINKER) $(LFLAGS) -o $(DESTDIR_TARGET) " << objectsLinkLine << " " << " $(LIBS)";
}
if(!project->isEmpty("QMAKE_POST_LINK"))
t << "\n\t" <<var("QMAKE_POST_LINK");
@@ -416,14 +416,23 @@ void MingwMakefileGenerator::writeRcFilePart(QTextStream &t)
{
const QString rc_file = fileFixify(project->first("RC_FILE").toQString());
- QString incPathStr = fileInfo(rc_file).path();
- if (incPathStr != "." && QDir::isRelativePath(incPathStr))
- incPathStr.prepend("./");
+ ProStringList rcIncPaths = project->values("RC_INCLUDEPATH");
+ rcIncPaths.prepend(fileInfo(rc_file).path());
+ QString incPathStr;
+ for (int i = 0; i < rcIncPaths.count(); ++i) {
+ const ProString &path = rcIncPaths.at(i);
+ if (path.isEmpty())
+ continue;
+ incPathStr += QStringLiteral(" --include-dir=");
+ if (path != "." && QDir::isRelativePath(path.toQString()))
+ incPathStr += "./";
+ incPathStr += escapeFilePath(path);
+ }
if (!rc_file.isEmpty()) {
t << escapeDependencyPath(var("RES_FILE")) << ": " << rc_file << "\n\t"
<< var("QMAKE_RC") << " -i " << rc_file << " -o " << var("RES_FILE")
- << " --include-dir=" << incPathStr << " $(DEFINES)" << endl << endl;
+ << incPathStr << " $(DEFINES)" << endl << endl;
}
}
diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp
index d982d8bcf0..d899c707d4 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -409,6 +409,7 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t)
manifest = escapeFilePath(fileFixify(manifest));
}
+ const QString resourceId = (templateName == "app") ? "1" : "2";
const bool incrementalLinking = project->values("QMAKE_LFLAGS").toQStringList().filter(QRegExp("(/|-)INCREMENTAL:NO")).isEmpty();
if (incrementalLinking) {
// Link a resource that contains the manifest without modifying the exe/dll after linking.
@@ -418,7 +419,8 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t)
QString manifest_bak = escapeFilePath(target + "_manifest.bak");
project->values("QMAKE_CLEAN") << manifest_rc << manifest_res;
- t << "\n\techo 1 /* CREATEPROCESS_MANIFEST_RESOURCE_ID */ 24 /* RT_MANIFEST */ "
+ t << "\n\techo " << resourceId
+ << " /* CREATEPROCESS_MANIFEST_RESOURCE_ID */ 24 /* RT_MANIFEST */ "
<< cQuoted(unescapeFilePath(manifest)) << ">" << manifest_rc;
if (generateManifest) {
@@ -441,7 +443,8 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t)
// directly embed the manifest in the executable after linking
t << "\n\t";
writeLinkCommand(t, extraLFlags);
- t << "\n\t" << "mt.exe /nologo /manifest " << manifest << " /outputresource:$(DESTDIR_TARGET);1";
+ t << "\n\t" << "mt.exe /nologo /manifest " << manifest
+ << " /outputresource:$(DESTDIR_TARGET);" << resourceId;
}
} else {
t << "\n\t";
@@ -462,7 +465,7 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t)
void NmakeMakefileGenerator::writeLinkCommand(QTextStream &t, const QString &extraFlags, const QString &extraInlineFileContent)
{
- t << "$(LINK) $(LFLAGS)";
+ t << "$(LINKER) $(LFLAGS)";
if (!extraFlags.isEmpty())
t << ' ' << extraFlags;
t << " /OUT:$(DESTDIR_TARGET) @<<\n"
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp
index 739e423b8c..0d67fcac85 100644
--- a/qmake/generators/win32/msvc_objectmodel.cpp
+++ b/qmake/generators/win32/msvc_objectmodel.cpp
@@ -2408,6 +2408,16 @@ void VCProjectWriter::write(XmlOutput &xml, VCProjectSingleConfig &tool)
outputFilter(tempProj, xml, "TranslationFiles");
outputFilter(tempProj, xml, "FormFiles");
outputFilter(tempProj, xml, "ResourceFiles");
+
+ QSet<QString> extraCompilersInProject;
+ for (int i = 0; i < tool.ExtraCompilersFiles.count(); ++i) {
+ const QString &compilerName = tool.ExtraCompilersFiles.at(i).Name;
+ if (!extraCompilersInProject.contains(compilerName)) {
+ extraCompilersInProject += compilerName;
+ tempProj.ExtraCompilers += compilerName;
+ }
+ }
+
for (int x = 0; x < tempProj.ExtraCompilers.count(); ++x) {
outputFilter(tempProj, xml, tempProj.ExtraCompilers.at(x));
}
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index 1e3f66a9c0..9f14b61f49 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -1072,6 +1072,17 @@ void VcprojGenerator::initResourceTool()
VCConfiguration &conf = vcProject.Configuration;
conf.resource.PreprocessorDefinitions = conf.compiler.PreprocessorDefinitions;
+ foreach (const ProString &path, project->values("RC_INCLUDEPATH")) {
+ QString fixedPath = fileFixify(path.toQString());
+ if (fileInfo(fixedPath).isRelative()) {
+ if (fixedPath == QStringLiteral("."))
+ fixedPath = QStringLiteral("$(ProjectDir)");
+ else
+ fixedPath.prepend(QStringLiteral("$(ProjectDir)\\"));
+ }
+ conf.resource.AdditionalIncludeDirectories << escapeFilePath(fixedPath);
+ }
+
// We need to add _DEBUG for the debug version of the project, since the normal compiler defines
// do not contain it. (The compiler defines this symbol automatically, which is wy we don't need
// to add it for the compiler) However, the resource tool does not do this.
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index 2fb1fb952b..bda035e023 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -453,6 +453,7 @@ void Win32MakefileGenerator::processRcFileVar()
ts << "\t\t\t\tVALUE \"LegalCopyright\", \"" << copyright << "\\0\"" << endl;
ts << "\t\t\t\tVALUE \"OriginalFilename\", \"" << originalName << "\\0\"" << endl;
ts << "\t\t\t\tVALUE \"ProductName\", \"" << productName << "\\0\"" << endl;
+ ts << "\t\t\t\tVALUE \"ProductVersion\", \"" << versionString << "\\0\"" << endl;
ts << "\t\t\tEND" << endl;
ts << "\t\tEND" << endl;
ts << "\t\tBLOCK \"VarFileInfo\"" << endl;
@@ -461,10 +462,6 @@ void Win32MakefileGenerator::processRcFileVar()
<< QString("0x%1").arg(rcLang, 4, 16, QLatin1Char('0'))
<< ", " << QString("%1").arg(rcCodePage, 4) << endl;
ts << "\t\tEND" << endl;
- ts << "\t\tBLOCK \"VarFileInfo\"" << endl;
- ts << "\t\tBEGIN" << endl;
- ts << "\t\t\tVALUE \"Translation\", 0x409, 1200" << endl;
- ts << "\t\tEND" << endl;
ts << "\tEND" << endl;
ts << "/* End of Version info */" << endl;
ts << endl;
@@ -744,7 +741,7 @@ void Win32MakefileGenerator::writeLibsPart(QTextStream &t)
t << "LIBAPP = " << var("QMAKE_LIB") << endl;
t << "LIBFLAGS = " << var("QMAKE_LIBFLAGS") << endl;
} else {
- t << "LINK = " << var("QMAKE_LINK") << endl;
+ t << "LINKER = " << var("QMAKE_LINK") << endl;
t << "LFLAGS = " << var("QMAKE_LFLAGS") << endl;
t << "LIBS = " << var("QMAKE_LIBS") << " " << var("QMAKE_LIBS_PRIVATE") << endl;
}
@@ -782,8 +779,20 @@ void Win32MakefileGenerator::writeRcFilePart(QTextStream &t)
// use these defines in the .rc file itself. Also, we need to add the _DEBUG define manually
// since the compiler defines this symbol by itself, and we use it in the automatically
// created rc file when VERSION is define the .pro file.
+
+ const ProStringList rcIncPaths = project->values("RC_INCLUDEPATH");
+ QString incPathStr;
+ for (int i = 0; i < rcIncPaths.count(); ++i) {
+ const ProString &path = rcIncPaths.at(i);
+ if (path.isEmpty())
+ continue;
+ incPathStr += QStringLiteral(" /i ");
+ incPathStr += escapeFilePath(path);
+ }
+
t << res_file << ": " << rc_file << "\n\t"
- << var("QMAKE_RC") << (project->isActiveConfig("debug") ? " -D_DEBUG" : "") << " $(DEFINES) -fo " << res_file << " " << rc_file;
+ << var("QMAKE_RC") << (project->isActiveConfig("debug") ? " -D_DEBUG" : "")
+ << " $(DEFINES)" << incPathStr << " -fo " << res_file << " " << rc_file;
t << endl << endl;
}
}
diff --git a/qmake/library/proitems.h b/qmake/library/proitems.h
index cb6a7dfcfe..1aa0c2b610 100644
--- a/qmake/library/proitems.h
+++ b/qmake/library/proitems.h
@@ -126,14 +126,14 @@ public:
int compare(const ProString &sub, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return toQStringRef().compare(sub.toQStringRef(), cs); }
int compare(const QString &sub, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return toQStringRef().compare(sub, cs); }
int compare(const char *sub, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return toQStringRef().compare(QLatin1String(sub), cs); }
- bool startsWith(const ProString &sub) const { return toQStringRef().startsWith(sub.toQStringRef()); }
- bool startsWith(const QString &sub) const { return toQStringRef().startsWith(sub); }
- bool startsWith(const char *sub) const { return toQStringRef().startsWith(QLatin1String(sub)); }
- bool startsWith(QChar c) const { return toQStringRef().startsWith(c); }
- bool endsWith(const ProString &sub) const { return toQStringRef().endsWith(sub.toQStringRef()); }
- bool endsWith(const QString &sub) const { return toQStringRef().endsWith(sub); }
- bool endsWith(const char *sub) const { return toQStringRef().endsWith(QLatin1String(sub)); }
- bool endsWith(QChar c) const { return toQStringRef().endsWith(c); }
+ bool startsWith(const ProString &sub, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return toQStringRef().startsWith(sub.toQStringRef(), cs); }
+ bool startsWith(const QString &sub, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return toQStringRef().startsWith(sub, cs); }
+ bool startsWith(const char *sub, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return toQStringRef().startsWith(QLatin1String(sub), cs); }
+ bool startsWith(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return toQStringRef().startsWith(c, cs); }
+ bool endsWith(const ProString &sub, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return toQStringRef().endsWith(sub.toQStringRef(), cs); }
+ bool endsWith(const QString &sub, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return toQStringRef().endsWith(sub, cs); }
+ bool endsWith(const char *sub, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return toQStringRef().endsWith(QLatin1String(sub), cs); }
+ bool endsWith(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return toQStringRef().endsWith(c, cs); }
int indexOf(const QString &s, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return toQStringRef().indexOf(s, from, cs); }
int indexOf(const char *s, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return toQStringRef().indexOf(QLatin1String(s), from, cs); }
int indexOf(QChar c, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return toQStringRef().indexOf(c, from, cs); }
@@ -143,8 +143,8 @@ public:
bool contains(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return indexOf(s, 0, cs) >= 0; }
bool contains(const char *s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return indexOf(QLatin1String(s), 0, cs) >= 0; }
bool contains(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return indexOf(c, 0, cs) >= 0; }
- int toInt(bool *ok = 0) const { return toQString().toInt(ok); } // XXX optimize
- short toShort(bool *ok = 0) const { return toQString().toShort(ok); } // XXX optimize
+ int toInt(bool *ok = 0, int base = 10) const { return toQString().toInt(ok, base); } // XXX optimize
+ short toShort(bool *ok = 0, int base = 10) const { return toQString().toShort(ok, base); } // XXX optimize
static uint hash(const QChar *p, int n);
diff --git a/qmake/project.h b/qmake/project.h
index e3b2925ccf..c07b6e6e46 100644
--- a/qmake/project.h
+++ b/qmake/project.h
@@ -95,12 +95,18 @@ private:
static bool boolRet(VisitReturn vr);
};
+/*!
+ * For variables that are supposed to contain a single int,
+ * this method returns the numeric value.
+ * Only the first value of the variable is taken into account.
+ * The string representation is assumed to look like a C int literal.
+ */
inline int QMakeProject::intValue(const ProKey &v, int defaultValue) const
{
const ProString &str = first(v);
if (!str.isEmpty()) {
bool ok;
- int i = str.toInt(&ok);
+ int i = str.toInt(&ok, 0);
if (ok)
return i;
}
diff --git a/qmake/property.cpp b/qmake/property.cpp
index d9e861c2e6..bbd4734622 100644
--- a/qmake/property.cpp
+++ b/qmake/property.cpp
@@ -105,7 +105,7 @@ QMakeProperty::~QMakeProperty()
void QMakeProperty::initSettings()
{
if(!settings) {
- settings = new QSettings(QSettings::UserScope, "Trolltech", "QMake");
+ settings = new QSettings(QSettings::UserScope, "QtProject", "QMake");
settings->setFallbacksEnabled(false);
}
}
diff --git a/qmake/qmake.pri b/qmake/qmake.pri
index 1bf603e874..aff0a9efda 100644
--- a/qmake/qmake.pri
+++ b/qmake/qmake.pri
@@ -1,5 +1,3 @@
-CONFIG += depend_includepath
-
SKIP_DEPENDS += qconfig.h qmodules.h
DEFINES += QT_NO_TEXTCODEC QT_NO_LIBRARY QT_NO_COMPRESS QT_NO_UNICODETABLES \
QT_NO_GEOM_VARIANT QT_NO_DATASTREAM
diff --git a/src/3rdparty/angle/include/KHR/khrplatform.h b/src/3rdparty/angle/include/KHR/khrplatform.h
index 8ec0d199ff..56c676c77b 100644
--- a/src/3rdparty/angle/include/KHR/khrplatform.h
+++ b/src/3rdparty/angle/include/KHR/khrplatform.h
@@ -221,10 +221,17 @@ typedef signed char khronos_int8_t;
typedef unsigned char khronos_uint8_t;
typedef signed short int khronos_int16_t;
typedef unsigned short int khronos_uint16_t;
+#ifdef _WIN64
+typedef signed long long int khronos_intptr_t;
+typedef unsigned long long int khronos_uintptr_t;
+typedef signed long long int khronos_ssize_t;
+typedef unsigned long long int khronos_usize_t;
+#else
typedef signed long int khronos_intptr_t;
typedef unsigned long int khronos_uintptr_t;
typedef signed long int khronos_ssize_t;
typedef unsigned long int khronos_usize_t;
+#endif
#if KHRONOS_SUPPORT_FLOAT
/*
diff --git a/src/3rdparty/angle/src/libEGL/libEGL_mingw32.def b/src/3rdparty/angle/src/libEGL/libEGL_mingw32.def
new file mode 100644
index 0000000000..8128e7c4f0
--- /dev/null
+++ b/src/3rdparty/angle/src/libEGL/libEGL_mingw32.def
@@ -0,0 +1,36 @@
+LIBRARY libEGL
+EXPORTS
+ eglBindAPI@4 @14
+ eglBindTexImage@12 @20
+ eglChooseConfig@20 @7
+ eglCopyBuffers@12 @33
+ eglCreateContext@16 @23
+ eglCreatePbufferFromClientBuffer@20 @18
+ eglCreatePbufferSurface@12 @10
+ eglCreatePixmapSurface@16 @11
+ eglCreateWindowSurface@16 @9
+ eglDestroyContext@8 @24
+ eglDestroySurface@8 @12
+ eglGetConfigAttrib@16 @8
+ eglGetConfigs@16 @6
+ eglGetCurrentContext@0 @26
+ eglGetCurrentDisplay@0 @28
+ eglGetCurrentSurface@4 @27
+ eglGetDisplay@4 @2
+ eglGetError@0 @1
+ eglGetProcAddress@4 @34
+ eglInitialize@12 @3
+ eglMakeCurrent@16 @25
+ eglQueryAPI@0 @15
+ eglQueryContext@16 @29
+ eglQueryString@8 @5
+ eglQuerySurface@16 @13
+ eglReleaseTexImage@12 @21
+ eglReleaseThread@0 @17
+ eglSurfaceAttrib@16 @19
+ eglSwapBuffers@8 @32
+ eglSwapInterval@8 @22
+ eglTerminate@4 @4
+ eglWaitClient@0 @16
+ eglWaitGL@0 @30
+ eglWaitNative@4 @31
diff --git a/src/3rdparty/angle/src/libEGL/libEGLd_mingw32.def b/src/3rdparty/angle/src/libEGL/libEGLd_mingw32.def
new file mode 100644
index 0000000000..1c72413f89
--- /dev/null
+++ b/src/3rdparty/angle/src/libEGL/libEGLd_mingw32.def
@@ -0,0 +1,36 @@
+LIBRARY libEGLd
+EXPORTS
+ eglBindAPI@4 @14
+ eglBindTexImage@12 @20
+ eglChooseConfig@20 @7
+ eglCopyBuffers@12 @33
+ eglCreateContext@16 @23
+ eglCreatePbufferFromClientBuffer@20 @18
+ eglCreatePbufferSurface@12 @10
+ eglCreatePixmapSurface@16 @11
+ eglCreateWindowSurface@16 @9
+ eglDestroyContext@8 @24
+ eglDestroySurface@8 @12
+ eglGetConfigAttrib@16 @8
+ eglGetConfigs@16 @6
+ eglGetCurrentContext@0 @26
+ eglGetCurrentDisplay@0 @28
+ eglGetCurrentSurface@4 @27
+ eglGetDisplay@4 @2
+ eglGetError@0 @1
+ eglGetProcAddress@4 @34
+ eglInitialize@12 @3
+ eglMakeCurrent@16 @25
+ eglQueryAPI@0 @15
+ eglQueryContext@16 @29
+ eglQueryString@8 @5
+ eglQuerySurface@16 @13
+ eglReleaseTexImage@12 @21
+ eglReleaseThread@0 @17
+ eglSurfaceAttrib@16 @19
+ eglSwapBuffers@8 @32
+ eglSwapInterval@8 @22
+ eglTerminate@4 @4
+ eglWaitClient@0 @16
+ eglWaitGL@0 @30
+ eglWaitNative@4 @31
diff --git a/src/3rdparty/angle/src/libGLESv2/libGLESv2_mingw32.def b/src/3rdparty/angle/src/libGLESv2/libGLESv2_mingw32.def
new file mode 100644
index 0000000000..dc5900854a
--- /dev/null
+++ b/src/3rdparty/angle/src/libGLESv2/libGLESv2_mingw32.def
@@ -0,0 +1,182 @@
+LIBRARY libGLESv2
+EXPORTS
+ glActiveTexture@4 @1
+ glAttachShader@8 @2
+ glBindAttribLocation@12 @3
+ glBindBuffer@8 @4
+ glBindFramebuffer@8 @5
+ glBindRenderbuffer@8 @6
+ glBindTexture@8 @7
+ glBlendColor@16 @8
+ glBlendEquation@4 @9
+ glBlendEquationSeparate@8 @10
+ glBlendFunc@8 @11
+ glBlendFuncSeparate@16 @12
+ glBufferData@16 @13
+ glBufferSubData@16 @14
+ glCheckFramebufferStatus@4 @15
+ glClear@4 @16
+ glClearColor@16 @17
+ glClearDepthf@4 @18
+ glClearStencil@4 @19
+ glColorMask@16 @20
+ glCompileShader@4 @21
+ glCompressedTexImage2D@32 @22
+ glCompressedTexSubImage2D@36 @23
+ glCopyTexImage2D@32 @24
+ glCopyTexSubImage2D@32 @25
+ glCreateProgram@0 @26
+ glCreateShader@4 @27
+ glCullFace@4 @28
+ glDeleteBuffers@8 @29
+ glDeleteFramebuffers@8 @30
+ glDeleteProgram@4 @32
+ glDeleteRenderbuffers@8 @33
+ glDeleteShader@4 @34
+ glDeleteTextures@8 @31
+ glDepthFunc@4 @36
+ glDepthMask@4 @37
+ glDepthRangef@8 @38
+ glDetachShader@8 @35
+ glDisable@4 @39
+ glDisableVertexAttribArray@4 @40
+ glDrawArrays@12 @41
+ glDrawElements@16 @42
+ glEnable@4 @43
+ glEnableVertexAttribArray@4 @44
+ glFinish@0 @45
+ glFlush@0 @46
+ glFramebufferRenderbuffer@16 @47
+ glFramebufferTexture2D@20 @48
+ glFrontFace@4 @49
+ glGenBuffers@8 @50
+ glGenFramebuffers@8 @52
+ glGenRenderbuffers@8 @53
+ glGenTextures@8 @54
+ glGenerateMipmap@4 @51
+ glGetActiveAttrib@28 @55
+ glGetActiveUniform@28 @56
+ glGetAttachedShaders@16 @57
+ glGetAttribLocation@8 @58
+ glGetBooleanv@8 @59
+ glGetBufferParameteriv@12 @60
+ glGetError@0 @61
+ glGetFloatv@8 @62
+ glGetFramebufferAttachmentParameteriv@16 @63
+ glGetIntegerv@8 @64
+ glGetProgramInfoLog@16 @66
+ glGetProgramiv@12 @65
+ glGetRenderbufferParameteriv@12 @67
+ glGetShaderInfoLog@16 @69
+ glGetShaderPrecisionFormat@16 @70
+ glGetShaderSource@16 @71
+ glGetShaderiv@12 @68
+ glGetString@4 @72
+ glGetTexParameterfv@12 @73
+ glGetTexParameteriv@12 @74
+ glGetUniformLocation@8 @77
+ glGetUniformfv@12 @75
+ glGetUniformiv@12 @76
+ glGetVertexAttribPointerv@12 @80
+ glGetVertexAttribfv@12 @78
+ glGetVertexAttribiv@12 @79
+ glHint@8 @81
+ glIsBuffer@4 @82
+ glIsEnabled@4 @83
+ glIsFramebuffer@4 @84
+ glIsProgram@4 @85
+ glIsRenderbuffer@4 @86
+ glIsShader@4 @87
+ glIsTexture@4 @88
+ glLineWidth@4 @89
+ glLinkProgram@4 @90
+ glPixelStorei@8 @91
+ glPolygonOffset@8 @92
+ glReadPixels@28 @93
+ glReleaseShaderCompiler@0 @94
+ glRenderbufferStorage@16 @95
+ glSampleCoverage@8 @96
+ glScissor@16 @97
+ glShaderBinary@20 @98
+ glShaderSource@16 @99
+ glStencilFunc@12 @100
+ glStencilFuncSeparate@16 @101
+ glStencilMask@4 @102
+ glStencilMaskSeparate@8 @103
+ glStencilOp@12 @104
+ glStencilOpSeparate@16 @105
+ glTexImage2D@36 @106
+ glTexParameterf@12 @107
+ glTexParameterfv@12 @108
+ glTexParameteri@12 @109
+ glTexParameteriv@12 @110
+ glTexSubImage2D@36 @111
+ glUniform1f@8 @112
+ glUniform1fv@12 @113
+ glUniform1i@8 @114
+ glUniform1iv@12 @115
+ glUniform2f@12 @116
+ glUniform2fv@12 @117
+ glUniform2i@12 @118
+ glUniform2iv@12 @119
+ glUniform3f@16 @120
+ glUniform3fv@12 @121
+ glUniform3i@16 @122
+ glUniform3iv@12 @123
+ glUniform4f@20 @124
+ glUniform4fv@12 @125
+ glUniform4i@20 @126
+ glUniform4iv@12 @127
+ glUniformMatrix2fv@16 @128
+ glUniformMatrix3fv@16 @129
+ glUniformMatrix4fv@16 @130
+ glUseProgram@4 @131
+ glValidateProgram@4 @132
+ glVertexAttrib1f@8 @133
+ glVertexAttrib1fv@8 @134
+ glVertexAttrib2f@12 @135
+ glVertexAttrib2fv@8 @136
+ glVertexAttrib3f@16 @137
+ glVertexAttrib3fv@8 @138
+ glVertexAttrib4f@20 @139
+ glVertexAttrib4fv@8 @140
+ glVertexAttribPointer@24 @141
+ glViewport@16 @142
+
+ ; Extensions
+ glTexImage3DOES@40 @143
+ glBlitFramebufferANGLE@40 @149
+ glRenderbufferStorageMultisampleANGLE@20 @150
+ glDeleteFencesNV@8 @151
+ glFinishFenceNV@4 @152
+ glGenFencesNV@8 @153
+ glGetFenceivNV@12 @154
+ glIsFenceNV@4 @155
+ glSetFenceNV@8 @156
+ glTestFenceNV@4 @157
+ glGetTranslatedShaderSourceANGLE@16 @159
+ glTexStorage2DEXT@20 @160
+ glGetGraphicsResetStatusEXT@0 @161
+ glReadnPixelsEXT@32 @162
+ glGetnUniformfvEXT@16 @163
+ glGetnUniformivEXT@16 @164
+ glGenQueriesEXT@8 @165
+ glDeleteQueriesEXT@8 @166
+ glIsQueryEXT@4 @167
+ glBeginQueryEXT@8 @168
+ glEndQueryEXT@4 @169
+ glGetQueryivEXT@12 @170
+ glGetQueryObjectuivEXT@12 @171
+ glVertexAttribDivisorANGLE@8 @172
+ glDrawArraysInstancedANGLE@16 @173
+ glDrawElementsInstancedANGLE@20 @174
+ glProgramBinaryOES@16 @175
+ glGetProgramBinaryOES@20 @176
+
+ ; EGL dependencies
+ glCreateContext @144 NONAME
+ glDestroyContext @145 NONAME
+ glMakeCurrent @146 NONAME
+ glGetCurrentContext @147 NONAME
+ glGetProcAddress@4 @148 NONAME
+ glBindTexImage@4 @158 NONAME
diff --git a/src/3rdparty/angle/src/libGLESv2/libGLESv2d_mingw32.def b/src/3rdparty/angle/src/libGLESv2/libGLESv2d_mingw32.def
new file mode 100644
index 0000000000..610e5e1173
--- /dev/null
+++ b/src/3rdparty/angle/src/libGLESv2/libGLESv2d_mingw32.def
@@ -0,0 +1,182 @@
+LIBRARY libGLESv2d
+EXPORTS
+ glActiveTexture@4 @1
+ glAttachShader@8 @2
+ glBindAttribLocation@12 @3
+ glBindBuffer@8 @4
+ glBindFramebuffer@8 @5
+ glBindRenderbuffer@8 @6
+ glBindTexture@8 @7
+ glBlendColor@16 @8
+ glBlendEquation@4 @9
+ glBlendEquationSeparate@8 @10
+ glBlendFunc@8 @11
+ glBlendFuncSeparate@16 @12
+ glBufferData@16 @13
+ glBufferSubData@16 @14
+ glCheckFramebufferStatus@4 @15
+ glClear@4 @16
+ glClearColor@16 @17
+ glClearDepthf@4 @18
+ glClearStencil@4 @19
+ glColorMask@16 @20
+ glCompileShader@4 @21
+ glCompressedTexImage2D@32 @22
+ glCompressedTexSubImage2D@36 @23
+ glCopyTexImage2D@32 @24
+ glCopyTexSubImage2D@32 @25
+ glCreateProgram@0 @26
+ glCreateShader@4 @27
+ glCullFace@4 @28
+ glDeleteBuffers@8 @29
+ glDeleteFramebuffers@8 @30
+ glDeleteProgram@4 @32
+ glDeleteRenderbuffers@8 @33
+ glDeleteShader@4 @34
+ glDeleteTextures@8 @31
+ glDepthFunc@4 @36
+ glDepthMask@4 @37
+ glDepthRangef@8 @38
+ glDetachShader@8 @35
+ glDisable@4 @39
+ glDisableVertexAttribArray@4 @40
+ glDrawArrays@12 @41
+ glDrawElements@16 @42
+ glEnable@4 @43
+ glEnableVertexAttribArray@4 @44
+ glFinish@0 @45
+ glFlush@0 @46
+ glFramebufferRenderbuffer@16 @47
+ glFramebufferTexture2D@20 @48
+ glFrontFace@4 @49
+ glGenBuffers@8 @50
+ glGenFramebuffers@8 @52
+ glGenRenderbuffers@8 @53
+ glGenTextures@8 @54
+ glGenerateMipmap@4 @51
+ glGetActiveAttrib@28 @55
+ glGetActiveUniform@28 @56
+ glGetAttachedShaders@16 @57
+ glGetAttribLocation@8 @58
+ glGetBooleanv@8 @59
+ glGetBufferParameteriv@12 @60
+ glGetError@0 @61
+ glGetFloatv@8 @62
+ glGetFramebufferAttachmentParameteriv@16 @63
+ glGetIntegerv@8 @64
+ glGetProgramInfoLog@16 @66
+ glGetProgramiv@12 @65
+ glGetRenderbufferParameteriv@12 @67
+ glGetShaderInfoLog@16 @69
+ glGetShaderPrecisionFormat@16 @70
+ glGetShaderSource@16 @71
+ glGetShaderiv@12 @68
+ glGetString@4 @72
+ glGetTexParameterfv@12 @73
+ glGetTexParameteriv@12 @74
+ glGetUniformLocation@8 @77
+ glGetUniformfv@12 @75
+ glGetUniformiv@12 @76
+ glGetVertexAttribPointerv@12 @80
+ glGetVertexAttribfv@12 @78
+ glGetVertexAttribiv@12 @79
+ glHint@8 @81
+ glIsBuffer@4 @82
+ glIsEnabled@4 @83
+ glIsFramebuffer@4 @84
+ glIsProgram@4 @85
+ glIsRenderbuffer@4 @86
+ glIsShader@4 @87
+ glIsTexture@4 @88
+ glLineWidth@4 @89
+ glLinkProgram@4 @90
+ glPixelStorei@8 @91
+ glPolygonOffset@8 @92
+ glReadPixels@28 @93
+ glReleaseShaderCompiler@0 @94
+ glRenderbufferStorage@16 @95
+ glSampleCoverage@8 @96
+ glScissor@16 @97
+ glShaderBinary@20 @98
+ glShaderSource@16 @99
+ glStencilFunc@12 @100
+ glStencilFuncSeparate@16 @101
+ glStencilMask@4 @102
+ glStencilMaskSeparate@8 @103
+ glStencilOp@12 @104
+ glStencilOpSeparate@16 @105
+ glTexImage2D@36 @106
+ glTexParameterf@12 @107
+ glTexParameterfv@12 @108
+ glTexParameteri@12 @109
+ glTexParameteriv@12 @110
+ glTexSubImage2D@36 @111
+ glUniform1f@8 @112
+ glUniform1fv@12 @113
+ glUniform1i@8 @114
+ glUniform1iv@12 @115
+ glUniform2f@12 @116
+ glUniform2fv@12 @117
+ glUniform2i@12 @118
+ glUniform2iv@12 @119
+ glUniform3f@16 @120
+ glUniform3fv@12 @121
+ glUniform3i@16 @122
+ glUniform3iv@12 @123
+ glUniform4f@20 @124
+ glUniform4fv@12 @125
+ glUniform4i@20 @126
+ glUniform4iv@12 @127
+ glUniformMatrix2fv@16 @128
+ glUniformMatrix3fv@16 @129
+ glUniformMatrix4fv@16 @130
+ glUseProgram@4 @131
+ glValidateProgram@4 @132
+ glVertexAttrib1f@8 @133
+ glVertexAttrib1fv@8 @134
+ glVertexAttrib2f@12 @135
+ glVertexAttrib2fv@8 @136
+ glVertexAttrib3f@16 @137
+ glVertexAttrib3fv@8 @138
+ glVertexAttrib4f@20 @139
+ glVertexAttrib4fv@8 @140
+ glVertexAttribPointer@24 @141
+ glViewport@16 @142
+
+ ; Extensions
+ glTexImage3DOES@40 @143
+ glBlitFramebufferANGLE@40 @149
+ glRenderbufferStorageMultisampleANGLE@20 @150
+ glDeleteFencesNV@8 @151
+ glFinishFenceNV@4 @152
+ glGenFencesNV@8 @153
+ glGetFenceivNV@12 @154
+ glIsFenceNV@4 @155
+ glSetFenceNV@8 @156
+ glTestFenceNV@4 @157
+ glGetTranslatedShaderSourceANGLE@16 @159
+ glTexStorage2DEXT@20 @160
+ glGetGraphicsResetStatusEXT@0 @161
+ glReadnPixelsEXT@32 @162
+ glGetnUniformfvEXT@16 @163
+ glGetnUniformivEXT@16 @164
+ glGenQueriesEXT@8 @165
+ glDeleteQueriesEXT@8 @166
+ glIsQueryEXT@4 @167
+ glBeginQueryEXT@8 @168
+ glEndQueryEXT@4 @169
+ glGetQueryivEXT@12 @170
+ glGetQueryObjectuivEXT@12 @171
+ glVertexAttribDivisorANGLE@8 @172
+ glDrawArraysInstancedANGLE@16 @173
+ glDrawElementsInstancedANGLE@20 @174
+ glProgramBinaryOES@16 @175
+ glGetProgramBinaryOES@20 @176
+
+ ; EGL dependencies
+ glCreateContext @144 NONAME
+ glDestroyContext @145 NONAME
+ glMakeCurrent @146 NONAME
+ glGetCurrentContext @147 NONAME
+ glGetProcAddress@4 @148 NONAME
+ glBindTexImage@4 @158 NONAME
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-arabic.c b/src/3rdparty/harfbuzz/src/harfbuzz-arabic.c
index d478f0484c..5e7d7f0706 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-arabic.c
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-arabic.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies)
*
* This is part of HarfBuzz, an OpenType Layout engine library.
*
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-external.h b/src/3rdparty/harfbuzz/src/harfbuzz-external.h
index 8daf8a69e9..0c0db2045f 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-external.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-external.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies)
*
* This is part of HarfBuzz, an OpenType Layout engine library.
*
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-global.h b/src/3rdparty/harfbuzz/src/harfbuzz-global.h
index d4e6b466b6..fedff7acc0 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-global.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-global.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies)
* Copyright (C) 2007 Red Hat, Inc.
*
* This is part of HarfBuzz, an OpenType Layout engine library.
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-greek.c b/src/3rdparty/harfbuzz/src/harfbuzz-greek.c
index 353685861f..0da2fa7cc8 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-greek.c
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-greek.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies)
*
* This is part of HarfBuzz, an OpenType Layout engine library.
*
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-hangul.c b/src/3rdparty/harfbuzz/src/harfbuzz-hangul.c
index 6f89ed6b0b..e78ff38b9f 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-hangul.c
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-hangul.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies)
*
* This is part of HarfBuzz, an OpenType Layout engine library.
*
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-hebrew.c b/src/3rdparty/harfbuzz/src/harfbuzz-hebrew.c
index b5431a53e7..ecf4cd1fbd 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-hebrew.c
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-hebrew.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies)
*
* This is part of HarfBuzz, an OpenType Layout engine library.
*
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-impl.c b/src/3rdparty/harfbuzz/src/harfbuzz-impl.c
index ddbf36be0e..9c55c8e261 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-impl.c
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-impl.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 1998-2004 David Turner and Werner Lemberg
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies)
* Copyright (C) 2007 Red Hat, Inc.
*
* This is part of HarfBuzz, an OpenType Layout engine library.
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp b/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp
index 0dcddc4f7d..976e419fd4 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies)
*
* This is part of HarfBuzz, an OpenType Layout engine library.
*
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-khmer.c b/src/3rdparty/harfbuzz/src/harfbuzz-khmer.c
index 1f3c7e2bce..6a49a3380d 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-khmer.c
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-khmer.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies)
*
* This is part of HarfBuzz, an OpenType Layout engine library.
*
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-myanmar.c b/src/3rdparty/harfbuzz/src/harfbuzz-myanmar.c
index b18b83054d..75c28440eb 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-myanmar.c
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-myanmar.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies)
*
* This is part of HarfBuzz, an OpenType Layout engine library.
*
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper-all.cpp b/src/3rdparty/harfbuzz/src/harfbuzz-shaper-all.cpp
index 2dae501305..b32c78f458 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper-all.cpp
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper-all.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies)
*
* This is part of HarfBuzz, an OpenType Layout engine library.
*
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper-private.h b/src/3rdparty/harfbuzz/src/harfbuzz-shaper-private.h
index e62c896e8e..fca36c8716 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper-private.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper-private.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies)
*
* This is part of HarfBuzz, an OpenType Layout engine library.
*
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp
index 093e8aed94..2f1b7fe807 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies)
*
* This is part of HarfBuzz, an OpenType Layout engine library.
*
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h
index e2891d047e..41782c4411 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies)
*
* This is part of HarfBuzz, an OpenType Layout engine library.
*
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-stream.c b/src/3rdparty/harfbuzz/src/harfbuzz-stream.c
index 2d9638f6b6..1afe604f02 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-stream.c
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-stream.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2005 David Turner
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies)
* Copyright (C) 2007 Red Hat, Inc.
*
* This is part of HarfBuzz, an OpenType Layout engine library.
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-stream.h b/src/3rdparty/harfbuzz/src/harfbuzz-stream.h
index cfbfb1c4fe..9bcd9d7e3a 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-stream.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-stream.h
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2005 David Turner
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies)
*
* This is part of HarfBuzz, an OpenType Layout engine library.
*
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-thai.c b/src/3rdparty/harfbuzz/src/harfbuzz-thai.c
index f62a1b7159..dc436c784a 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-thai.c
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-thai.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies)
*
* This is part of HarfBuzz, an OpenType Layout engine library.
*
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-tibetan.c b/src/3rdparty/harfbuzz/src/harfbuzz-tibetan.c
index c3570974b3..242fd6fd47 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-tibetan.c
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-tibetan.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies)
*
* This is part of HarfBuzz, an OpenType Layout engine library.
*
diff --git a/src/3rdparty/harfbuzz/tests/shaping/harfbuzz-qt.cpp b/src/3rdparty/harfbuzz/tests/shaping/harfbuzz-qt.cpp
index 924a97da27..7b6df736e8 100644
--- a/src/3rdparty/harfbuzz/tests/shaping/harfbuzz-qt.cpp
+++ b/src/3rdparty/harfbuzz/tests/shaping/harfbuzz-qt.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies)
*
* This is part of HarfBuzz, an OpenType Layout engine library.
*
diff --git a/src/3rdparty/harfbuzz/tests/shaping/main.cpp b/src/3rdparty/harfbuzz/tests/shaping/main.cpp
index 29ff7b3e1b..302d0a00e8 100644
--- a/src/3rdparty/harfbuzz/tests/shaping/main.cpp
+++ b/src/3rdparty/harfbuzz/tests/shaping/main.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies)
*
* This is part of HarfBuzz, an OpenType Layout engine library.
*
diff --git a/src/3rdparty/iaccessible2/iaccessible2.pri b/src/3rdparty/iaccessible2/iaccessible2.pri
index 954f4c9e7c..b3cdfa9356 100644
--- a/src/3rdparty/iaccessible2/iaccessible2.pri
+++ b/src/3rdparty/iaccessible2/iaccessible2.pri
@@ -40,8 +40,12 @@ SOURCES += $${MIDL_GENERATED}/Accessible2_i.c \
$${MIDL_GENERATED}/AccessibleText_i.c \
$${MIDL_GENERATED}/AccessibleValue_i.c
-SOURCES += $${MIDL_GENERATED}/IA2TypeLibrary_i.c \
- $${MIDL_GENERATED}/dlldata.c
+SOURCES += $${MIDL_GENERATED}/IA2TypeLibrary_i.c
+
+# Do not add dlldata.c when building accessibility into a static library, as the COM entry points
+# defined there can cause duplicate symbol errors when linking into a binary that also defines
+# such entry points, e.g. anything linked against QtAxServer.
+!static: SOURCES += $${MIDL_GENERATED}/dlldata.c
HEADERS += $${MIDL_GENERATED}/Accessible2.h \
$${MIDL_GENERATED}/AccessibleAction.h \
diff --git a/src/angle/README.qt b/src/angle/README.qt
index a8888604cc..ce5b6332bc 100644
--- a/src/angle/README.qt
+++ b/src/angle/README.qt
@@ -29,6 +29,11 @@ Since we build debug and release versions
the .def files (libEGLd.def) must be created as copies
with the LIBRARY name entry adapted.
+MinGW-w64 32-bit requires function exports in the .def files
+to be decorated. Modified versions of the .def files are created as
+<library>_mingw32.def. The decorated names of each function can be found
+using the nm command to list the symbols in libEGL.o and libGLESv2.o.
+
Using a custom ANGLE
-------------------------------------------------------------
Qt supports building a version of ANGLE other than the one that
diff --git a/src/angle/patches/0007-ANGLE-Fix-typedefs-for-Win64.patch b/src/angle/patches/0007-ANGLE-Fix-typedefs-for-Win64.patch
new file mode 100644
index 0000000000..ed744bbbd9
--- /dev/null
+++ b/src/angle/patches/0007-ANGLE-Fix-typedefs-for-Win64.patch
@@ -0,0 +1,38 @@
+From cf01d1953de652910734d0e01b032da99194590d Mon Sep 17 00:00:00 2001
+From: Jonathan Liu <net147@gmail.com>
+Date: Tue, 18 Dec 2012 00:37:11 +1100
+Subject: [PATCH] ANGLE: Fix typedefs for Win64
+
+The long int type is incorrect for Windows 64-bit as LLP64 is used
+there.
+
+Change-Id: If4ccf49d6bb0cd7ba4ff2997cebfdbe5e7e9711c
+---
+ src/3rdparty/angle/include/KHR/khrplatform.h | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/3rdparty/angle/include/KHR/khrplatform.h b/src/3rdparty/angle/include/KHR/khrplatform.h
+index 8ec0d19..56c676c 100644
+--- a/src/3rdparty/angle/include/KHR/khrplatform.h
++++ b/src/3rdparty/angle/include/KHR/khrplatform.h
+@@ -221,10 +221,17 @@ typedef signed char khronos_int8_t;
+ typedef unsigned char khronos_uint8_t;
+ typedef signed short int khronos_int16_t;
+ typedef unsigned short int khronos_uint16_t;
++#ifdef _WIN64
++typedef signed long long int khronos_intptr_t;
++typedef unsigned long long int khronos_uintptr_t;
++typedef signed long long int khronos_ssize_t;
++typedef unsigned long long int khronos_usize_t;
++#else
+ typedef signed long int khronos_intptr_t;
+ typedef unsigned long int khronos_uintptr_t;
+ typedef signed long int khronos_ssize_t;
+ typedef unsigned long int khronos_usize_t;
++#endif
+
+ #if KHRONOS_SUPPORT_FLOAT
+ /*
+--
+1.8.0.1
+
diff --git a/src/angle/src/libEGL/libEGL.pro b/src/angle/src/libEGL/libEGL.pro
index 524e3a9b59..6f3bc25cfb 100644
--- a/src/angle/src/libEGL/libEGL.pro
+++ b/src/angle/src/libEGL/libEGL.pro
@@ -24,7 +24,10 @@ SOURCES += \
$$ANGLE_DIR/src/libEGL/main.cpp \
$$ANGLE_DIR/src/libEGL/Surface.cpp
-msvc:DEF_FILE = $$ANGLE_DIR/src/libEGL/$${TARGET}.def
+!static {
+ DEF_FILE = $$ANGLE_DIR/src/libEGL/$${TARGET}.def
+ win32-g++*:equals(QT_ARCH, i386): DEF_FILE = $$ANGLE_DIR/src/libEGL/$${TARGET}_mingw32.def
+}
load(qt_installs)
diff --git a/src/angle/src/libGLESv2/libGLESv2.pro b/src/angle/src/libGLESv2/libGLESv2.pro
index f4cbfd0494..2412a01b82 100644
--- a/src/angle/src/libGLESv2/libGLESv2.pro
+++ b/src/angle/src/libGLESv2/libGLESv2.pro
@@ -1,6 +1,5 @@
TEMPLATE = lib
TARGET = $$qtLibraryTarget(libGLESv2)
-DEPENDPATH += . shaders
CONFIG += simd
include(../common/common.pri)
@@ -67,7 +66,10 @@ SOURCES += \
SSE2_SOURCES += $$ANGLE_DIR/src/libGLESv2/TextureSSE2.cpp
-msvc:DEF_FILE = $$ANGLE_DIR/src/libGLESv2/$${TARGET}.def
+!static {
+ DEF_FILE = $$ANGLE_DIR/src/libGLESv2/$${TARGET}.def
+ win32-g++*:equals(QT_ARCH, i386): DEF_FILE = $$ANGLE_DIR/src/libGLESv2/$${TARGET}_mingw32.def
+}
float_converter.target = float_converter
float_converter.commands = python $$ANGLE_DIR/src/libGLESv2/Float16ToFloat32.py \
diff --git a/src/concurrent/doc/qtconcurrent.qdocconf b/src/concurrent/doc/qtconcurrent.qdocconf
index 30fdcad847..442f69372c 100644
--- a/src/concurrent/doc/qtconcurrent.qdocconf
+++ b/src/concurrent/doc/qtconcurrent.qdocconf
@@ -3,21 +3,21 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
project = QtConcurrent
description = Qt Concurrent Reference Documentation
url = http://qt-project.org/doc/qtconcurrent
-version = 5.0.0
+version = 5.0.1
examplesinstallpath = qtconcurrent
qhp.projects = QtConcurrent
qhp.QtConcurrent.file = qtconcurrent.qhp
-qhp.QtConcurrent.namespace = org.qt-project.qtconcurrent.500
+qhp.QtConcurrent.namespace = org.qt-project.qtconcurrent.501
qhp.QtConcurrent.virtualFolder = qtconcurrent
qhp.QtConcurrent.indexTitle = Qt Concurrent
qhp.QtConcurrent.indexRoot =
-qhp.QtConcurrent.filterAttributes = qtconcurrent 5.0.0 qtrefdoc
-qhp.QtConcurrent.customFilters.Qt.name = QtConcurrent 5.0.0
-qhp.QtConcurrent.customFilters.Qt.filterAttributes = qtconcurrent 5.0.0
+qhp.QtConcurrent.filterAttributes = qtconcurrent 5.0.1 qtrefdoc
+qhp.QtConcurrent.customFilters.Qt.name = QtConcurrent 5.0.1
+qhp.QtConcurrent.customFilters.Qt.filterAttributes = qtconcurrent 5.0.1
qhp.QtConcurrent.subprojects = classes
qhp.QtConcurrent.subprojects.classes.title = C++ Classes
diff --git a/src/concurrent/qtconcurrentfunctionwrappers.h b/src/concurrent/qtconcurrentfunctionwrappers.h
index 59a29d4653..734aa2a06d 100644
--- a/src/concurrent/qtconcurrentfunctionwrappers.h
+++ b/src/concurrent/qtconcurrentfunctionwrappers.h
@@ -43,6 +43,7 @@
#define QTCONCURRENT_FUNCTIONWRAPPERS_H
#include <QtConcurrent/qtconcurrentcompilertest.h>
+#include <QtCore/QStringList>
#ifndef QT_NO_CONCURRENT
diff --git a/src/corelib/Qt5CTestMacros.cmake b/src/corelib/Qt5CTestMacros.cmake
index fc39c708f3..c5d10c9b5b 100644
--- a/src/corelib/Qt5CTestMacros.cmake
+++ b/src/corelib/Qt5CTestMacros.cmake
@@ -1,4 +1,7 @@
-
+#
+# W A R N I N G
+# -------------
+#
# This file is not part of the Qt API. It exists purely as an
# implementation detail. This file, and its contents may change from version to
# version without notice, or even be removed.
diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in
index 0df27039d0..06ff6dc831 100644
--- a/src/corelib/Qt5CoreConfigExtras.cmake.in
+++ b/src/corelib/Qt5CoreConfigExtras.cmake.in
@@ -43,10 +43,10 @@ set(Qt5Core_QMAKE_EXECUTABLE Qt5::qmake)
set(Qt5Core_MOC_EXECUTABLE Qt5::moc)
set(Qt5Core_RCC_EXECUTABLE Qt5::rcc)
-!!IF isEmpty(CMAKE_DATA_DIR_IS_ABSOLUTE)
-list(APPEND Qt5Core_INCLUDE_DIRS \"${_qt5_corelib_install_prefix}/mkspecs/$${CMAKE_MKSPEC}\")
+!!IF isEmpty(CMAKE_ARCHDATA_DIR_IS_ABSOLUTE)
+list(APPEND Qt5Core_INCLUDE_DIRS \"${_qt5_corelib_install_prefix}/$${CMAKE_ARCHDATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\")
!!ELSE
-list(APPEND Qt5Core_INCLUDE_DIRS \"$${CMAKE_DATA_DIR}mkspecs/$${CMAKE_MKSPEC}\")
+list(APPEND Qt5Core_INCLUDE_DIRS \"$${CMAKE_ARCHDATA_DIR}mkspecs/$${CMAKE_MKSPEC}\")
!!ENDIF
!!IF !isEmpty(CMAKE_ADD_FPIE_FLAGS)
diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro
index 46c771e6a5..f95ee545c0 100644
--- a/src/corelib/corelib.pro
+++ b/src/corelib/corelib.pro
@@ -6,6 +6,7 @@ MODULE = core # not corelib, as per project file
MODULE_CONFIG = moc resources
!isEmpty(QT_NAMESPACE): MODULE_DEFINES = QT_NAMESPACE=$$QT_NAMESPACE
+CONFIG += $$MODULE_CONFIG
DEFINES += QT_NO_USING_NAMESPACE
win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x67000000
irix-cc*:QMAKE_CXXFLAGS += -no_prelink -ptused
@@ -40,7 +41,6 @@ mac|darwin {
}
LIBS_PRIVATE += -framework CoreFoundation
}
-mac:lib_bundle:DEFINES += QT_NO_DEBUG_PLUGIN_CHECK
win32:DEFINES-=QT_NO_CAST_TO_ASCII
DEFINES += $$MODULE_DEFINES
@@ -50,29 +50,11 @@ QMAKE_DYNAMIC_LIST_FILE = $$PWD/QtCore.dynlist
contains(DEFINES,QT_EVAL):include(eval.pri)
-load(moc)
-load(resources)
+HOST_BINS = $$[QT_HOST_BINS]
+host_bins.name = host_bins
+host_bins.variable = HOST_BINS
-moc_dir.name = moc_location
-moc_dir.variable = QMAKE_MOC
-
-rcc_dir.name = rcc_location
-rcc_dir.variable = QMAKE_RCC
-
-QMAKE_PKGCONFIG_VARIABLES += moc_dir rcc_dir
-
-# These are aliens, but Linguist installs no own module, and it fits here best.
-
-qtPrepareTool(QMAKE_LUPDATE, lupdate)
-qtPrepareTool(QMAKE_LRELEASE, lrelease)
-
-lupdate_dir.name = lupdate_location
-lupdate_dir.variable = QMAKE_LUPDATE
-
-lrelease_dir.name = lrelease_location
-lrelease_dir.variable = QMAKE_LRELEASE
-
-QMAKE_PKGCONFIG_VARIABLES += lupdate_dir lrelease_dir
+QMAKE_PKGCONFIG_VARIABLES += host_bins
ctest_macros_file.input = $$PWD/Qt5CTestMacros.cmake
ctest_macros_file.output = $$DESTDIR/cmake/Qt5Core/Qt5CTestMacros.cmake
diff --git a/src/corelib/doc/qtcore.qdocconf b/src/corelib/doc/qtcore.qdocconf
index 2151d95f65..61c9d2bc00 100644
--- a/src/corelib/doc/qtcore.qdocconf
+++ b/src/corelib/doc/qtcore.qdocconf
@@ -3,21 +3,21 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
project = QtCore
description = Qt Core Reference Documentation
url = http://qt-project.org/doc/qtcore
-version = 5.0.0
+version = 5.0.1
examplesinstallpath = core
qhp.projects = QtCore
qhp.QtCore.file = qtcore.qhp
-qhp.QtCore.namespace = org.qt-project.qtcore.500
+qhp.QtCore.namespace = org.qt-project.qtcore.501
qhp.QtCore.virtualFolder = qtcore
qhp.QtCore.indexTitle = Qt Core
qhp.QtCore.indexRoot =
-qhp.QtCore.filterAttributes = qtcore 5.0.0 qtrefdoc
-qhp.QtCore.customFilters.Qt.name = QtCore 5.0.0
-qhp.QtCore.customFilters.Qt.filterAttributes = qtcore 5.0.0
+qhp.QtCore.filterAttributes = qtcore 5.0.1 qtrefdoc
+qhp.QtCore.customFilters.Qt.name = QtCore 5.0.1
+qhp.QtCore.customFilters.Qt.filterAttributes = qtcore 5.0.1
qhp.QtCore.subprojects = classes
qhp.QtCore.subprojects.classes.title = C++ Classes
qhp.QtCore.subprojects.classes.indexTitle = Qt Core C++ Classes
@@ -26,7 +26,7 @@ qhp.QtCore.subprojects.classes.sortPages = true
tagfile = ../../../doc/qtcore/qtcore.tags
-depends += qtgui qtwidgets qtnetwork qtdoc qtquick
+depends += qtgui qtwidgets qtnetwork qtdoc qtquick qtlinguist qtdesigner
headerdirs += ..
@@ -35,6 +35,8 @@ sourcedirs += ..
exampledirs += \
../ \
snippets \
- ../../../examples/threads
+ ../../../examples/threads/ \
+ ../../../examples/tools/ \
+ ../../../examples/widgets/widgets/analogclock
imagedirs += images
diff --git a/src/corelib/doc/snippets/code/doc_src_plugins-howto.cpp b/src/corelib/doc/snippets/code/doc_src_plugins-howto.cpp
index ca6e64a90e..a86441c822 100644
--- a/src/corelib/doc/snippets/code/doc_src_plugins-howto.cpp
+++ b/src/corelib/doc/snippets/code/doc_src_plugins-howto.cpp
@@ -65,20 +65,3 @@ QStyle *MyStylePlugin::create(const QString &key)
//! [2]
QApplication::setStyle(QStyleFactory::create("MyStyle"));
//! [2]
-
-
-//! [4]
-#include <QApplication>
-#include <QtPlugin>
-
-Q_IMPORT_PLUGIN(qjpeg)
-Q_IMPORT_PLUGIN(qgif)
-Q_IMPORT_PLUGIN(qkrcodecs)
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
- ...
- return app.exec();
-}
-//! [4]
diff --git a/src/corelib/doc/snippets/code/doc_src_plugins-howto.pro b/src/corelib/doc/snippets/code/doc_src_plugins-howto.pro
index 20d5f7e41b..b33db7942f 100644
--- a/src/corelib/doc/snippets/code/doc_src_plugins-howto.pro
+++ b/src/corelib/doc/snippets/code/doc_src_plugins-howto.pro
@@ -42,9 +42,20 @@
CONFIG += release
#! [3]
+#! [4]
+CONFIG += qpa_minimal_plugin
+#! [4]
#! [5]
QTPLUGIN += qjpeg \
qgif \
qkrcodecs
#! [5]
+
+#! [6]
+CONFIG -= import_qpa_plugin
+#! [6]
+
+#! [7]
+CONFIG -= import_plugins
+#! [7]
diff --git a/src/corelib/doc/snippets/code/src_corelib_io_qsettings.cpp b/src/corelib/doc/snippets/code/src_corelib_io_qsettings.cpp
index ab54033ef3..d3dde5be66 100644
--- a/src/corelib/doc/snippets/code/src_corelib_io_qsettings.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_io_qsettings.cpp
@@ -82,7 +82,7 @@ settings.value("HKEY_CURRENT_USER\\MySoft\\Star Runner\\Galaxy\\Default"); // re
//! [7]
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QSettings settings("grenoullelogique.fr", "Squash");
#else
QSettings settings("Grenoulle Logique", "Squash");
diff --git a/src/corelib/doc/snippets/code/src_corelib_kernel_qobject.cpp b/src/corelib/doc/snippets/code/src_corelib_kernel_qobject.cpp
index c462083328..1735efbfde 100644
--- a/src/corelib/doc/snippets/code/src_corelib_kernel_qobject.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_kernel_qobject.cpp
@@ -377,7 +377,7 @@ Q_PROPERTY(type name
[DESIGNABLE bool]
[SCRIPTABLE bool]
[STORED bool]
- [USER bool]
+ [USER bool]
[CONSTANT]
[FINAL])
//! [36]
diff --git a/src/corelib/doc/snippets/code/src_corelib_tools_qbytearray.cpp b/src/corelib/doc/snippets/code/src_corelib_tools_qbytearray.cpp
index 71c6fbd80f..eef026af75 100644
--- a/src/corelib/doc/snippets/code/src_corelib_tools_qbytearray.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_tools_qbytearray.cpp
@@ -251,7 +251,7 @@ ba.lastIndexOf("X"); // returns -1
//! [25]
-QByteArray url("ftp://ftp.qt.nokia.com/");
+QByteArray url("ftp://ftp.qt-project.org/");
if (url.startsWith("ftp:"))
...
//! [25]
diff --git a/examples/linguist/hellotr/main.cpp b/src/corelib/doc/snippets/hellotrmain.cpp
index 12433f8414..fdb034c241 100644
--- a/examples/linguist/hellotr/main.cpp
+++ b/src/corelib/doc/snippets/hellotrmain.cpp
@@ -38,33 +38,20 @@
**
****************************************************************************/
-#include <QApplication>
-#include <QPushButton>
//! [0]
-#include <QTranslator>
-//! [0]
-
-//! [1] //! [2]
int main(int argc, char *argv[])
-//! [1] //! [3] //! [4]
{
QApplication app(argc, argv);
-//! [3]
-//! [5]
QTranslator translator;
-//! [5] //! [6]
translator.load("hellotr_la");
-//! [6] //! [7]
app.installTranslator(&translator);
-//! [4] //! [7]
-//! [8]
QPushButton hello(QPushButton::tr("Hello world!"));
-//! [8]
hello.resize(100, 30);
hello.show();
return app.exec();
}
-//! [2]
+//! [0]
+
diff --git a/src/corelib/doc/src/custom-types.qdoc b/src/corelib/doc/src/custom-types.qdoc
new file mode 100644
index 0000000000..95987ec014
--- /dev/null
+++ b/src/corelib/doc/src/custom-types.qdoc
@@ -0,0 +1,165 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** 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. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page custom-types.html
+ \title Creating Custom Qt Types
+ \brief How to create and register new types with Qt.
+
+ \ingroup best-practices
+
+ \tableofcontents
+
+ \section1 Overview
+
+ When creating user interfaces with Qt, particularly those with specialized controls and
+ features, developers sometimes need to create new data types that can be used alongside
+ or in place of Qt's existing set of value types.
+
+ Standard types such as QSize, QColor and QString can all be stored in QVariant objects,
+ used as the types of properties in QObject-based classes, and emitted in signal-slot
+ communication.
+
+ In this document, we take a custom type and describe how to integrate it into Qt's object
+ model so that it can be stored in the same way as standard Qt types. We then show how to
+ register the custom type to allow it to be used in signals and slots connections.
+
+ \section1 Creating a Custom Type
+
+ Before we begin, we need to ensure that the custom type we are creating meets all the
+ requirements imposed by QMetaType. In other words, it must provide:
+
+ \list
+ \li a public default constructor,
+ \li a public copy constructor, and
+ \li a public destructor.
+ \endlist
+
+ The following \c Message class definition includes these members:
+
+ \snippet customtype/message.h custom type definition
+
+ The class also provides a constructor for normal use and two public member functions
+ that are used to obtain the private data.
+
+ \section1 Declaring the Type with QMetaType
+
+ The \c Message class only needs a suitable implementation in order to be usable.
+ However, Qt's type system will not be able to understand how to store, retrieve
+ and serialize instances of this class without some assistance. For example, we
+ will be unable to store \c Message values in QVariant.
+
+ The class in Qt responsible for custom types is QMetaType. To make the type known
+ to this class, we invoke the Q_DECLARE_METATYPE() macro on the class in the header
+ file where it is defined:
+
+ \snippet customtype/message.h custom type meta-type declaration
+
+ This now makes it possible for \c Message values to be stored in QVariant objects
+ and retrieved later. See the \l{Custom Type Example} for code that demonstrates
+ this.
+
+ The Q_DECLARE_METATYPE() macro also makes it possible for these values to be used as
+ arguments to signals, but \e{only in direct signal-slot connections}.
+ To make the custom type generally usable with the signals and slots mechanism, we
+ need to perform some extra work.
+
+ \section1 Creating and Destroying Custom Objects
+
+ Although the declaration in the previous section makes the type available for use
+ in direct signal-slot connections, it cannot be used for queued signal-slot
+ connections, such as those that are made between objects in different threads.
+ This is because the meta-object system does not know how to handle creation and
+ destruction of objects of the custom type at run-time.
+
+ To enable creation of objects at run-time, call the qRegisterMetaType() template
+ function to register it with the meta-object system. This also makes the type
+ available for queued signal-slot communication as long as you call it before you
+ make the first connection that uses the type.
+
+ The \l{Queued Custom Type Example} declares a \c Block class which is registered
+ in the \c{main.cpp} file:
+
+ \snippet queuedcustomtype/main.cpp main start
+ \dots
+ \snippet queuedcustomtype/main.cpp register meta-type for queued communications
+ \dots
+ \snippet queuedcustomtype/main.cpp main finish
+
+ This type is later used in a signal-slot connection in the \c{window.cpp} file:
+
+ \snippet queuedcustomtype/window.cpp Window constructor start
+ \dots
+ \snippet queuedcustomtype/window.cpp connecting signal with custom type
+ \dots
+ \snippet queuedcustomtype/window.cpp Window constructor finish
+
+ If a type is used in a queued connection without being registered, a warning will be
+ printed at the console; for example:
+
+ \code
+ QObject::connect: Cannot queue arguments of type 'Block'
+ (Make sure 'Block' is registered using qRegisterMetaType().)
+ \endcode
+
+ \section1 Making the Type Printable
+
+ It is often quite useful to make a custom type printable for debugging purposes,
+ as in the following code:
+
+ \snippet customtype/main.cpp printing a custom type
+
+ This is achieved by creating a streaming operator for the type, which is often
+ defined in the header file for that type:
+
+ \snippet customtype/message.h custom type streaming operator
+
+ The implementation for the \c Message type in the \l{Custom Type Example}
+ goes to some effort to make the printable representation as readable as
+ possible:
+
+ \snippet customtype/message.cpp custom type streaming operator
+
+ The output sent to the debug stream can, of course, be made as simple or as
+ complicated as you like. Note that the value returned by this function is
+ the QDebug object itself, though this is often obtained by calling the
+ maybeSpace() member function of QDebug that pads out the stream with space
+ characters to make it more readable.
+
+ \section1 Further Reading
+
+ The Q_DECLARE_METATYPE() macro and qRegisterMetaType() function documentation
+ contain more detailed information about their uses and limitations.
+
+ The \l{Custom Type Example}{Custom Type},
+ \l{Custom Type Sending Example}{Custom Type Sending}
+ and \l{Queued Custom Type Example}{Queued Custom Type} examples show how to
+ implement a custom type with the features outlined in this document.
+
+ The \l{Debugging Techniques} document provides an overview of the debugging
+ mechanisms discussed above.
+*/
diff --git a/src/corelib/doc/src/implicit-sharing.qdoc b/src/corelib/doc/src/implicit-sharing.qdoc
index 39ba702d55..baed85fb18 100644
--- a/src/corelib/doc/src/implicit-sharing.qdoc
+++ b/src/corelib/doc/src/implicit-sharing.qdoc
@@ -135,7 +135,7 @@
\warning Do not copy an implicitly shared container (QMap,
QVector, etc.) while you are iterating over it using an non-const
- \l{STL-style iterator}.
+ \l{STL-style iterators}{STL-style iterator}.
\keyword implicitly shared classes
\annotatedlist shared
diff --git a/src/corelib/doc/src/json.qdoc b/src/corelib/doc/src/json.qdoc
index ff06b48008..109102f190 100644
--- a/src/corelib/doc/src/json.qdoc
+++ b/src/corelib/doc/src/json.qdoc
@@ -99,8 +99,6 @@
A valid JSON document is either an array or an object, so a document always starts
with a square or curly bracket.
- JSON support in Qt consists of a set of 4 classes.
-
\section1 The JSON Classes
diff --git a/src/corelib/doc/src/objectmodel/object.qdoc b/src/corelib/doc/src/objectmodel/object.qdoc
index 47f56372de..edf5673da0 100644
--- a/src/corelib/doc/src/objectmodel/object.qdoc
+++ b/src/corelib/doc/src/objectmodel/object.qdoc
@@ -47,7 +47,7 @@
properties}
\li powerful \l{The Event System}{events and event filters}
\li contextual \l{i18n}{string translation for internationalization}
- \li sophisticated interval driven \l timers that make it possible
+ \li sophisticated interval driven \l {Timers}{timers} that make it possible
to elegantly integrate many tasks in an event-driven GUI
\li hierarchical and queryable \l{Object Trees & Ownership}{object
trees} that organize object ownership in a natural way
@@ -56,6 +56,7 @@
pointers which become dangling pointers when their objects are destroyed
\li a \l{metaobjects.html#qobjectcast}{dynamic cast} that works across
library boundaries.
+ \li support for \l{Creating Custom Qt Types}{custom type} creation.
\endlist
Many of these Qt features are implemented with standard C++
diff --git a/src/corelib/doc/src/objectmodel/properties.qdoc b/src/corelib/doc/src/objectmodel/properties.qdoc
index 4ea52050b8..d818d1154c 100644
--- a/src/corelib/doc/src/objectmodel/properties.qdoc
+++ b/src/corelib/doc/src/objectmodel/properties.qdoc
@@ -89,8 +89,8 @@
\li The \c DESIGNABLE attribute indicates whether the property
should be visible in the property editor of GUI design tool (e.g.,
- \l {Qt Designer}). Most properties are \c DESIGNABLE (default
- true). Instead of true or false, you can specify a boolean
+ \l {Qt Designer Manual}{Qt Designer}). Most properties are \c DESIGNABLE
+ (default true). Instead of true or false, you can specify a boolean
member function.
\li The \c SCRIPTABLE attribute indicates whether this property
diff --git a/src/corelib/doc/src/plugins-howto.qdoc b/src/corelib/doc/src/plugins-howto.qdoc
index 332b92596b..d94bf2eadc 100644
--- a/src/corelib/doc/src/plugins-howto.qdoc
+++ b/src/corelib/doc/src/plugins-howto.qdoc
@@ -266,18 +266,22 @@
\row \li \c qsqltds \li SQL driver \li Sybase Adaptive Server (TDS)
\endtable
- To link statically against those plugins, you need to use the
- Q_IMPORT_PLUGIN() macro in your application and you need to add
+ To link statically against those plugins, you need to add
the required plugins to your build using \c QTPLUGIN.
- For example, in your \c main.cpp:
-
- \snippet code/doc_src_plugins-howto.cpp 4
+ Q_IMPORT_PLUGIN() macros are also needed in application code,
+ but those are automatically generated by qmake and added to
+ your application project.
In the \c .pro file for your application, you need the following
entry:
\snippet code/doc_src_plugins-howto.pro 5
+ If you do not want all plugins added to QTPLUGIN to be automatically
+ linked, remove \c import_plugins from the \c CONFIG variable:
+
+ \snippet code/doc_src_plugins-howto.pro 7
+
It is also possible to create your own static plugins, by
following these steps:
@@ -296,6 +300,17 @@
to make sure that the \c{QT_STATICPLUGIN} preprocessor macro is
defined.
+ The default Qt platform adaptation plugin is automatically added to QTPLUGIN
+ in static builds. If you want to add the minimal plugin instead, add \c qpa_minimal_plugin
+ to \c CONFIG:
+
+ \snippet code/doc_src_plugins-howto.pro 4
+
+ If you want neither the default nor the minimal QPA plugin to be linked automatically,
+ remove \c import_qpa_plugin from \c CONFIG:
+
+ \snippet code/doc_src_plugins-howto.pro 6
+
\section1 Deploying and Debugging Plugins
The \l{Deploying Plugins} document covers the process of deploying
diff --git a/src/corelib/doc/src/statemachine.qdoc b/src/corelib/doc/src/statemachine.qdoc
index b241b4aff4..e23b911f85 100644
--- a/src/corelib/doc/src/statemachine.qdoc
+++ b/src/corelib/doc/src/statemachine.qdoc
@@ -45,7 +45,7 @@
The State Machine framework provides classes for creating and executing
state graphs. The concepts and notation are based on those from Harel's
- \l{Statecharts: A visual formalism for complex systems}{Statecharts}, which
+ \l{http://www.wisdom.weizmann.ac.il/~dharel/SCANNED.PAPERS/Statecharts.pdf}{Statecharts: A visual formalism for complex systems}, which
is also the basis of UML state diagrams. The semantics of state machine
execution are based on \l{State Chart XML: State Machine Notation for
Control Abstraction}{State Chart XML (SCXML)}.
diff --git a/src/corelib/doc/src/threads-basics.qdoc b/src/corelib/doc/src/threads-basics.qdoc
index 501edb6ecf..ea804f2d6d 100644
--- a/src/corelib/doc/src/threads-basics.qdoc
+++ b/src/corelib/doc/src/threads-basics.qdoc
@@ -244,18 +244,18 @@
code that generates another thread which says hello in that thread and then
exits.
- \snippet tutorials/threads/hellothread/hellothread.h 1
+ \snippet ../widgets/tutorials/threads/hellothread/hellothread.h 1
We derive a class from QThread and reimplement the \l{QThread::}{run()}
method.
- \snippet tutorials/threads/hellothread/hellothread.cpp 1
+ \snippet ../widgets/tutorials/threads/hellothread/hellothread.cpp 1
The run method contains the code that will be run in a separate thread. In
this example, a message containing the thread ID will be printed.
QThread::start() will call the method in another thread.
- \snippet tutorials/threads/hellothread/main.cpp 1
+ \snippet ../widgets/tutorials/threads/hellothread/main.cpp 1
To start the thread, our thread object needs to be instantiated. The
\l{QThread::}{start()} method creates a new thread and calls the
@@ -453,7 +453,7 @@
another thread needs to be placed in the reimplemented QRunnable::run()
method.
- \snippet tutorials/threads/hellothreadpool/hellothreadpool.cpp 1
+ \snippet ../widgets/tutorials/threads/hellothreadpool/hellothreadpool.cpp 1
We instantiate Work in main(), locate the global thread pool and use the
QThreadPool::start() method. Now the thread pool runs our worker in another
@@ -463,7 +463,7 @@
\section2 Example 2: Using QtConcurrent
- \snippet tutorials/threads/helloconcurrent/helloconcurrent.cpp 1
+ \snippet ../widgets/tutorials/threads/helloconcurrent/helloconcurrent.cpp 1
We write a global function hello() to implement the work. QtConcurrent::run()
is used to run the function in another thread. The result is a QFuture.
@@ -499,17 +499,17 @@
Communication from the GUI to the worker thread is shown in the next
example.
- \snippet tutorials/threads/clock/main.cpp 1
+ \snippet ../widgets/tutorials/threads/clock/main.cpp 1
We've connected the \c clockThread with the label. The connection must be a
queued signal-slot connection because we want to put the call in the event
loop.
- \snippet tutorials/threads/clock/clockthread.h 1
+ \snippet ../widgets/tutorials/threads/clock/clockthread.h 1
We have derived a class from QThread and declared the \c sendTime() signal.
- \snippet tutorials/threads/clock/clockthread.cpp 1
+ \snippet ../widgets/tutorials/threads/clock/clockthread.cpp 1
The trickiest part of this example is that the timer is connected to its
slot via a direct connection. A default connection would produce a queued
@@ -541,7 +541,7 @@
The \c Thread class's code is short but somewhat involved, so we only show
how to use the class.
- \snippet tutorials/threads/movedobject/main.cpp 1
+ \snippet ../widgets/tutorials/threads/movedobject/main.cpp 1
QMetaObject::invokeMethod() calls a slot via the event loop. The worker
object's methods should not be called directly after the object has been
diff --git a/src/corelib/doc/src/threads.qdoc b/src/corelib/doc/src/threads.qdoc
index 9b8fe527d2..bcabfc3c8c 100644
--- a/src/corelib/doc/src/threads.qdoc
+++ b/src/corelib/doc/src/threads.qdoc
@@ -74,10 +74,10 @@
to threading see our Recommended Reading list:
\list
- \li \l{Threads Primer: A Guide to Multithreaded Programming}
- \li \l{Thread Time: The Multithreaded Programming Guide}
- \li \l{Pthreads Programming: A POSIX Standard for Better Multiprocessing}
- \li \l{Win32 Multithreaded Programming}
+ \li \l {http://www.amazon.com/Threads-Primer-Guide-Multithreaded-Programming/dp/0134436989}{Threads Primer: A Guide to Multithreaded Programming}
+ \li \l {http://www.amazon.com/Thread-Time-MultiThreaded-Programming-Guide/dp/0131900676}{Thread Time: The Multithreaded Programming Guide}
+ \li \l {http://www.amazon.com/Pthreads-Programming-Standard-Multiprocessing-Nutshell/dp/1565921151a}{Pthreads Programming: A POSIX Standard for Better Multiprocessing}
+ \li \l {http://www.amazon.com/WIN32-Multithreaded-Programming-Aaron-Cohen/dp/1565922964}{Win32 Multithreaded Programming}
\endlist
\section1 The Threading Classes
diff --git a/src/corelib/doc/src/timers.qdoc b/src/corelib/doc/src/timers.qdoc
new file mode 100644
index 0000000000..eddb600559
--- /dev/null
+++ b/src/corelib/doc/src/timers.qdoc
@@ -0,0 +1,123 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** 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. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page timers.html
+ \title Timers
+ \brief How to use Qt timers in your application.
+
+ \ingroup best-practices
+
+ QObject, the base class of all Qt objects, provides the basic
+ timer support in Qt. With QObject::startTimer(), you start a
+ timer with an interval in milliseconds as argument. The function
+ returns a unique integer timer ID. The timer will now fire at
+ regular intervals until you explicitly call QObject::killTimer()
+ with the timer ID.
+
+ For this mechanism to work, the application must run in an event
+ loop. You start an event loop with QApplication::exec(). When a
+ timer fires, the application sends a QTimerEvent, and the flow of
+ control leaves the event loop until the timer event is processed.
+ This implies that a timer cannot fire while your application is
+ busy doing something else. In other words: the accuracy of timers
+ depends on the granularity of your application.
+
+ In multithreaded applications, you can use the timer mechanism in
+ any thread that has an event loop. To start an event loop from a
+ non-GUI thread, use QThread::exec(). Qt uses the object's
+ \l{QObject::thread()}{thread affinity} to determine which thread
+ will deliver the QTimerEvent. Because of this, you must start and
+ stop all timers in the object's thread; it is not possible to
+ start timers for objects in another thread.
+
+ The upper limit for the interval value is determined by the number
+ of milliseconds that can be specified in a signed integer
+ (in practice, this is a period of just over 24 days). The accuracy
+ depends on the underlying operating system. Windows 2000 has 15
+ millisecond accuracy; other systems that we have tested can handle
+ 1 millisecond intervals.
+
+ The main API for the timer functionality is QTimer. That class
+ provides regular timers that emit a signal when the timer fires, and
+ inherits QObject so that it fits well into the ownership structure
+ of most GUI programs. The normal way of using it is like this:
+
+ \snippet timers/timers.cpp 0
+ \snippet timers/timers.cpp 1
+ \snippet timers/timers.cpp 2
+
+ The QTimer object is made into a child of this widget so that,
+ when this widget is deleted, the timer is deleted too.
+ Next, its \l{QTimer::}{timeout()} signal is connected to the slot
+ that will do the work, it is started with a value of 1000
+ milliseconds, indicating that it will time out every second.
+
+ QTimer also provides a static function for single-shot timers.
+ For example:
+
+ \snippet timers/timers.cpp 3
+
+ 200 milliseconds (0.2 seconds) after this line of code is
+ executed, the \c updateCaption() slot will be called.
+
+ For QTimer to work, you must have an event loop in your
+ application; that is, you must call QCoreApplication::exec()
+ somewhere. Timer events will be delivered only while the event
+ loop is running.
+
+ In multithreaded applications, you can use QTimer in any thread
+ that has an event loop. To start an event loop from a non-GUI
+ thread, use QThread::exec(). Qt uses the timer's
+ \l{QObject::thread()}{thread affinity} to determine which thread
+ will emit the \l{QTimer::}{timeout()} signal. Because of this, you
+ must start and stop the timer in its thread; it is not possible to
+ start a timer from another thread.
+
+ The \l{widgets/analogclock}{Analog Clock} example shows how to use
+ QTimer to redraw a widget at regular intervals. From \c{AnalogClock}'s
+ implementation:
+
+ \snippet analogclock.cpp 0
+ \snippet analogclock.cpp 2
+ \snippet analogclock.cpp 3
+ \snippet analogclock.cpp 4
+ \snippet analogclock.cpp 5
+ \snippet analogclock.cpp 6
+ \dots
+ \snippet analogclock.cpp 7
+
+ Every second, QTimer will call the QWidget::update() slot to
+ refresh the clock's display.
+
+ If you already have a QObject subclass and want an easy
+ optimization, you can use QBasicTimer instead of QTimer. With
+ QBasicTimer, you must reimplement
+ \l{QObject::timerEvent()}{timerEvent()} in your QObject subclass
+ and handle the timeout there. The \l{widgets/wiggly}{Wiggly}
+ example shows how to use QBasicTimer.
+*/
diff --git a/src/corelib/global/qconfig-minimal.h b/src/corelib/global/qconfig-minimal.h
index 28cb8fbede..6a21492827 100644
--- a/src/corelib/global/qconfig-minimal.h
+++ b/src/corelib/global/qconfig-minimal.h
@@ -40,9 +40,6 @@
****************************************************************************/
/* Data structures */
-#ifndef QT_NO_QUUID_STRING
-# define QT_NO_QUUID_STRING
-#endif
#ifndef QT_NO_TEXTDATE
# define QT_NO_TEXTDATE
#endif
diff --git a/src/corelib/global/qconfig-nacl.h b/src/corelib/global/qconfig-nacl.h
index d5172aac29..9dac73ea93 100644
--- a/src/corelib/global/qconfig-nacl.h
+++ b/src/corelib/global/qconfig-nacl.h
@@ -46,9 +46,6 @@
#define QT_FONTS_ARE_RESOURCES
/* Data structures */
-#ifndef QT_NO_QUUID_STRING
-# define QT_NO_QUUID_STRING
-#endif
#ifndef QT_NO_TEXTDATE
# define QT_NO_TEXTDATE
#endif
diff --git a/src/corelib/global/qconfig-small.h b/src/corelib/global/qconfig-small.h
index 9d72cd5d4c..405521c338 100644
--- a/src/corelib/global/qconfig-small.h
+++ b/src/corelib/global/qconfig-small.h
@@ -39,11 +39,6 @@
**
****************************************************************************/
-/* Data structures */
-#ifndef QT_NO_QUUID_STRING
-# define QT_NO_QUUID_STRING
-#endif
-
/* Dialogs */
#ifndef QT_NO_COLORDIALOG
# define QT_NO_COLORDIALOG
diff --git a/src/corelib/global/qfeatures.h b/src/corelib/global/qfeatures.h
index 26d92592cb..a63d3a3b3d 100644
--- a/src/corelib/global/qfeatures.h
+++ b/src/corelib/global/qfeatures.h
@@ -91,9 +91,6 @@
// QHostInfo
//#define QT_NO_HOSTINFO
-// QImageIOPlugin
-//#define QT_NO_IMAGEFORMATPLUGIN
-
// BMP Image Format
//#define QT_NO_IMAGEFORMAT_BMP
@@ -157,9 +154,6 @@
// Properties
//#define QT_NO_PROPERTIES
-// Universally Unique Identifier Convertion
-//#define QT_NO_QUUID_STRING
-
// Resize Handler
//#define QT_NO_RESIZEHANDLER
diff --git a/src/corelib/global/qfeatures.txt b/src/corelib/global/qfeatures.txt
index 941150351a..ad1ca5a6d5 100644
--- a/src/corelib/global/qfeatures.txt
+++ b/src/corelib/global/qfeatures.txt
@@ -141,13 +141,6 @@ Name: QInputContext
SeeAlso: ???
# Data structures
-Feature: QUUID_STRING
-Description: Supports convertion between UUID and strings.
-Section: Data structures
-Requires:
-Name: Universally Unique Identifier Convertion
-SeeAlso: ???
-
Feature: TEXTDATE
Description: Supports month and day names in dates.
Section: Data structures
@@ -767,7 +760,7 @@ SeeAlso: ???
Feature: IMAGEFORMATPLUGIN
Description: Supports writing an image format plugin.
Section: Images
-Requires:
+Requires: LIBRARY
Name: QImageIOPlugin
SeeAlso: ???
diff --git a/src/corelib/global/qflags.h b/src/corelib/global/qflags.h
index 3edbef3bd6..cbd7185a92 100644
--- a/src/corelib/global/qflags.h
+++ b/src/corelib/global/qflags.h
@@ -39,10 +39,11 @@
**
****************************************************************************/
+#include <QtCore/qglobal.h>
+
#ifndef QFLAGS_H
#define QFLAGS_H
-#include <QtCore/qglobal.h>
#include <QtCore/qtypeinfo.h>
#include <QtCore/qtypetraits.h>
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index c1501db33d..3881b166b1 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -2513,26 +2513,6 @@ int qrand()
*/
/*!
- \macro TRUE
- \relates <QtGlobal>
- \obsolete
-
- Synonym for \c true.
-
- \sa FALSE
-*/
-
-/*!
- \macro FALSE
- \relates <QtGlobal>
- \obsolete
-
- Synonym for \c false.
-
- \sa TRUE
-*/
-
-/*!
\macro QABS(n)
\relates <QtGlobal>
\obsolete
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 60b90dc70f..48cc477d51 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -45,11 +45,11 @@
#include <stddef.h>
-#define QT_VERSION_STR "5.0.0"
+#define QT_VERSION_STR "5.0.1"
/*
QT_VERSION is (major << 16) + (minor << 8) + patch.
*/
-#define QT_VERSION 0x050000
+#define QT_VERSION 0x050001
/*
can be used like #if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0))
*/
@@ -436,17 +436,6 @@ typedef QIntegerForSizeof<void*>::Unsigned quintptr;
typedef QIntegerForSizeof<void*>::Signed qptrdiff;
typedef qptrdiff qintptr;
-/*
- Constant bool values
-*/
-
-#ifndef QT_LINUXBASE /* the LSB defines TRUE and FALSE for us */
-# ifndef TRUE
-# define TRUE true
-# define FALSE false
-# endif
-#endif
-
/* moc compats (signals/slots) */
#ifndef QT_MOC_COMPAT
# define QT_MOC_COMPAT
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index e4ff7eece4..339cedb57e 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -83,7 +83,6 @@ static bool isFatal(QtMsgType msgType)
/*!
\class QMessageLogContext
\inmodule QtCore
- \relates <QtGlobal>
\brief The QMessageLogContext class provides additional information about a log message.
\since 5.0
@@ -96,7 +95,6 @@ static bool isFatal(QtMsgType msgType)
/*!
\class QMessageLogger
\inmodule QtCore
- \relates <QtGlobal>
\brief The QMessageLogger class generates log messages.
\since 5.0
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 363c5206b0..0b0d089ba5 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -406,7 +406,7 @@
\value BevelJoin The triangular notch between the two lines is filled.
\value RoundJoin A circular arc between the two lines is filled.
\value SvgMiterJoin A miter join corresponding to the definition of
- a miter join in the \l{SVG 1.2 Tiny} specification.
+ a miter join in the \l{http://www.w3.org/TR/SVGMobile12/}{SVG 1.2 Tiny} specification.
\omitvalue MPenJoinStyle
\sa QPen
@@ -1721,7 +1721,9 @@
\value ScrollBarAlwaysOff QAbstractScrollArea never shows a scroll bar.
- \value ScrollBarAlwaysOn QAbstractScrollArea always shows a scroll bar.
+ \value ScrollBarAlwaysOn QAbstractScrollArea always shows a scroll bar. This
+ property is ignored on systems with transient scroll bars (e.g., on Mac from
+ version 10.7).
(The modes for the horizontal and vertical scroll bars are
independent.)
diff --git a/src/corelib/global/qsysinfo.h b/src/corelib/global/qsysinfo.h
index 275b899662..867acd4d60 100644
--- a/src/corelib/global/qsysinfo.h
+++ b/src/corelib/global/qsysinfo.h
@@ -39,11 +39,11 @@
**
****************************************************************************/
+#include <QtCore/qglobal.h>
+
#ifndef QSYSINFO_H
#define QSYSINFO_H
-#include <QtCore/qglobal.h>
-
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
diff --git a/src/corelib/global/qtypeinfo.h b/src/corelib/global/qtypeinfo.h
index a4b12feae3..68df50a2af 100644
--- a/src/corelib/global/qtypeinfo.h
+++ b/src/corelib/global/qtypeinfo.h
@@ -39,11 +39,11 @@
**
****************************************************************************/
+#include <QtCore/qglobal.h>
+
#ifndef QTYPEINFO_H
#define QTYPEINFO_H
-#include <QtCore/qglobal.h>
-
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
diff --git a/src/corelib/global/qtypetraits.h b/src/corelib/global/qtypetraits.h
index 0183f33738..54b48667b4 100644
--- a/src/corelib/global/qtypetraits.h
+++ b/src/corelib/global/qtypetraits.h
@@ -102,11 +102,12 @@
// - Use Qt macros for long long type differences on Windows.
// - Enclose in QtPrivate namespace.
+#include "QtCore/qglobal.h"
+
#ifndef QTYPETRAITS_H
#define QTYPETRAITS_H
#include <utility> // For pair
-#include "QtCore/qglobal.h"
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
diff --git a/src/corelib/io/qabstractfileengine.cpp b/src/corelib/io/qabstractfileengine.cpp
index 1841619400..d7cf7e3f15 100644
--- a/src/corelib/io/qabstractfileengine.cpp
+++ b/src/corelib/io/qabstractfileengine.cpp
@@ -155,7 +155,7 @@ QAbstractFileEngineHandler::~QAbstractFileEngineHandler()
}
/*
- \ìnternal
+ \internal
Handles calls to custom file engine handlers.
*/
diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp
index d19ab695ea..bd2ca4c325 100644
--- a/src/corelib/io/qprocess_win.cpp
+++ b/src/corelib/io/qprocess_win.cpp
@@ -82,7 +82,8 @@ static void qt_create_pipe(Q_PIPE *pipe, bool isInputPipe)
forever {
// ### The user must make sure to call qsrand() to make the pipe names less predictable.
// ### Replace the call to qrand() with a secure version, once we have it in Qt.
- swprintf(pipeName, L"\\\\.\\pipe\\qt-%X", qrand());
+ _snwprintf(pipeName, sizeof(pipeName) / sizeof(pipeName[0]),
+ L"\\\\.\\pipe\\qt-%X", qrand());
DWORD dwPipeFlags = PIPE_TYPE_BYTE | PIPE_WAIT;
if (QSysInfo::windowsVersion() >= QSysInfo::WV_VISTA)
diff --git a/src/corelib/io/qstandardpaths.h b/src/corelib/io/qstandardpaths.h
index d9d572db08..cfd2b52e9b 100644
--- a/src/corelib/io/qstandardpaths.h
+++ b/src/corelib/io/qstandardpaths.h
@@ -51,8 +51,6 @@ QT_BEGIN_NAMESPACE
#ifndef QT_NO_STANDARDPATHS
-class QStringList;
-
class Q_CORE_EXPORT QStandardPaths
{
public:
diff --git a/src/corelib/io/qstandardpaths_unix.cpp b/src/corelib/io/qstandardpaths_unix.cpp
index 3fb36589d2..932ae6b6cc 100644
--- a/src/corelib/io/qstandardpaths_unix.cpp
+++ b/src/corelib/io/qstandardpaths_unix.cpp
@@ -127,6 +127,7 @@ QString QStandardPaths::writableLocation(StandardLocation type)
return QString();
}
}
+ qWarning("QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '%s'", qPrintable(xdgRuntimeDir));
}
// "The directory MUST be owned by the user"
QFileInfo fileInfo(xdgRuntimeDir);
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index a7a722bc46..2a439b3a7c 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -114,7 +114,7 @@
QUrl is capable of detecting many errors in URLs while parsing it or when
components of the URL are set with individual setter methods (like
setScheme(), setHost() or setPath()). If the parsing or setter function is
- succesful, any previously recorded error conditions will be discarded.
+ successful, any previously recorded error conditions will be discarded.
By default, QUrl setter methods operate in QUrl::TolerantMode, which means
they accept some common mistakes and mis-representation of data. An
@@ -363,6 +363,7 @@ public:
enum ErrorCode {
// the high byte of the error code matches the Section
+ // the first item in each value must be the generic "Invalid xxx Error"
InvalidSchemeError = Scheme << 8,
InvalidUserNameError = UserName << 8,
@@ -410,6 +411,9 @@ public:
void clearError();
void setError(ErrorCode errorCode, const QString &source, int supplement = -1);
ErrorCode validityError(QString *source = 0, int *position = 0) const;
+ bool validateComponent(Section section, const QString &input, int begin, int end);
+ bool validateComponent(Section section, const QString &input)
+ { return validateComponent(section, input, 0, uint(input.length())); }
// no QString scheme() const;
void appendAuthority(QString &appendTo, QUrl::FormattingOptions options, Section appendingTo) const;
@@ -895,58 +899,72 @@ inline void QUrlPrivate::setAuthority(const QString &auth, int from, int end, QU
{
sectionIsPresent &= ~Authority;
sectionIsPresent |= Host;
- if (from == end) {
- userName.clear();
- password.clear();
- host.clear();
- port = -1;
- return;
- }
- int userInfoIndex = auth.indexOf(QLatin1Char('@'), from);
- if (uint(userInfoIndex) < uint(end)) {
- setUserInfo(auth, from, userInfoIndex);
- from = userInfoIndex + 1;
- }
+ // we never actually _loop_
+ while (from != end) {
+ int userInfoIndex = auth.indexOf(QLatin1Char('@'), from);
+ if (uint(userInfoIndex) < uint(end)) {
+ setUserInfo(auth, from, userInfoIndex);
+ if (mode == QUrl::StrictMode && !validateComponent(UserInfo, auth, from, userInfoIndex))
+ break;
+ from = userInfoIndex + 1;
+ }
- int colonIndex = auth.lastIndexOf(QLatin1Char(':'), end - 1);
- if (colonIndex < from)
- colonIndex = -1;
+ int colonIndex = auth.lastIndexOf(QLatin1Char(':'), end - 1);
+ if (colonIndex < from)
+ colonIndex = -1;
- if (uint(colonIndex) < uint(end)) {
- if (auth.at(from).unicode() == '[') {
- // check if colonIndex isn't inside the "[...]" part
- int closingBracket = auth.indexOf(QLatin1Char(']'), from);
- if (uint(closingBracket) > uint(colonIndex))
- colonIndex = -1;
+ if (uint(colonIndex) < uint(end)) {
+ if (auth.at(from).unicode() == '[') {
+ // check if colonIndex isn't inside the "[...]" part
+ int closingBracket = auth.indexOf(QLatin1Char(']'), from);
+ if (uint(closingBracket) > uint(colonIndex))
+ colonIndex = -1;
+ }
}
- }
- if (colonIndex == end - 1) {
- // found a colon but no digits after it
- setError(PortEmptyError, auth, colonIndex + 1);
- } else if (uint(colonIndex) < uint(end)) {
- unsigned long x = 0;
- for (int i = colonIndex + 1; i < end; ++i) {
- ushort c = auth.at(i).unicode();
- if (c >= '0' && c <= '9') {
- x *= 10;
- x += c - '0';
+ if (colonIndex == end - 1) {
+ // found a colon but no digits after it
+ setError(PortEmptyError, auth, colonIndex + 1);
+ } else if (uint(colonIndex) < uint(end)) {
+ unsigned long x = 0;
+ for (int i = colonIndex + 1; i < end; ++i) {
+ ushort c = auth.at(i).unicode();
+ if (c >= '0' && c <= '9') {
+ x *= 10;
+ x += c - '0';
+ } else {
+ x = ulong(-1); // x != ushort(x)
+ break;
+ }
+ }
+ if (x == ushort(x)) {
+ port = ushort(x);
} else {
- x = ulong(-1); // x != ushort(x)
- break;
+ setError(InvalidPortError, auth, colonIndex + 1);
+ if (mode == QUrl::StrictMode)
+ break;
}
- }
- if (x == ushort(x)) {
- port = ushort(x);
} else {
- setError(InvalidPortError, auth, colonIndex + 1);
+ port = -1;
+ }
+
+ setHost(auth, from, qMin<uint>(end, colonIndex), mode);
+ if (mode == QUrl::StrictMode && !validateComponent(Host, auth, from, qMin<uint>(end, colonIndex))) {
+ // clear host too
+ sectionIsPresent &= ~Authority;
+ break;
}
- } else {
- port = -1;
- }
- setHost(auth, from, qMin<uint>(end, colonIndex), mode);
+ // success
+ return;
+ }
+ // clear all sections but host
+ sectionIsPresent &= ~Authority | Host;
+ userName.clear();
+ password.clear();
+ host.clear();
+ port = -1;
}
inline void QUrlPrivate::setUserInfo(const QString &userInfo, int from, int end)
@@ -1297,61 +1315,18 @@ inline void QUrlPrivate::parse(const QString &url, QUrl::ParsingMode parsingMode
if (error || parsingMode == QUrl::TolerantMode)
return;
- // The parsing so far was tolerant of errors, so the StrictMode
- // parsing is actually implemented here, as an extra post-check.
- // We only execute it if we haven't found any errors so far.
+ // The parsing so far was partially tolerant of errors, except for the
+ // scheme parser (which is always strict) and the authority (which was
+ // executed in strict mode).
+ // If we haven't found any errors so far, continue the strict-mode parsing
+ // from the path component onwards.
- // What we need to look out for, that the regular parser tolerates:
- // - percent signs not followed by two hex digits
- // - forbidden characters, which should always appear encoded
- // '"' / '<' / '>' / '\' / '^' / '`' / '{' / '|' / '}' / BKSP
- // control characters
- // - delimiters not allowed in certain positions
- // . scheme: parser is already strict
- // . user info: gen-delims (except for ':') disallowed
- // . host: parser is stricter than the standard
- // . port: parser is stricter than the standard
- // . path: all delimiters allowed
- // . fragment: all delimiters allowed
- // . query: all delimiters allowed
- // We would only need to check the user-info. However, the presence
- // of the disallowed gen-delims changes the parsing, so we don't
- // actually need to do anything
- static const char forbidden[] = "\"<>\\^`{|}\x7F";
- for (uint i = 0; i < uint(len); ++i) {
- register uint uc = data[i];
- if (uc >= 0x80)
- continue;
-
- if ((uc == '%' && (uint(len) < i + 2 || !isHex(data[i + 1]) || !isHex(data[i + 2])))
- || uc <= 0x20 || strchr(forbidden, uc)) {
- // found an error
- ErrorCode errorCode;
-
- // where are we?
- if (i > uint(hash)) {
- errorCode = InvalidFragmentError;
- } else if (i > uint(question)) {
- errorCode = InvalidQueryError;
- } else if (i > uint(pathStart)) {
- // pathStart is never -1
- errorCode = InvalidPathError;
- } else {
- // It must be in the authority, since the scheme is strict.
- // Since the port and hostname parsers are also strict,
- // the error can only have happened in the user info.
- int pos = url.indexOf(QLatin1Char(':'), hierStart);
- if (i > uint(pos)) {
- errorCode = InvalidPasswordError;
- } else {
- errorCode = InvalidUserNameError;
- }
- }
-
- setError(errorCode, url, i);
- return;
- }
- }
+ if (!validateComponent(Path, url, pathStart, hierEnd))
+ return;
+ if (uint(question) < uint(hash) && !validateComponent(Query, url, question + 1, qMin<uint>(hash, len)))
+ return;
+ if (hash != -1)
+ validateComponent(Fragment, url, hash + 1, len);
}
/*
@@ -1519,6 +1494,67 @@ inline QUrlPrivate::ErrorCode QUrlPrivate::validityError(QString *source, int *p
return NoError;
}
+bool QUrlPrivate::validateComponent(QUrlPrivate::Section section, const QString &input,
+ int begin, int end)
+{
+ // What we need to look out for, that the regular parser tolerates:
+ // - percent signs not followed by two hex digits
+ // - forbidden characters, which should always appear encoded
+ // '"' / '<' / '>' / '\' / '^' / '`' / '{' / '|' / '}' / BKSP
+ // control characters
+ // - delimiters not allowed in certain positions
+ // . scheme: parser is already strict
+ // . user info: gen-delims except ":" disallowed ("/" / "?" / "#" / "[" / "]" / "@")
+ // . host: parser is stricter than the standard
+ // . port: parser is stricter than the standard
+ // . path: all delimiters allowed
+ // . fragment: all delimiters allowed
+ // . query: all delimiters allowed
+ static const char forbidden[] = "\"<>\\^`{|}\x7F";
+ static const char forbiddenUserInfo[] = ":/?#[]@";
+
+ Q_ASSERT(section != Authority && section != Hierarchy && section != FullUrl);
+
+ const ushort *const data = reinterpret_cast<const ushort *>(input.constData());
+ for (uint i = uint(begin); i < uint(end); ++i) {
+ register uint uc = data[i];
+ if (uc >= 0x80)
+ continue;
+
+ bool error = false;
+ if ((uc == '%' && (uint(end) < i + 2 || !isHex(data[i + 1]) || !isHex(data[i + 2])))
+ || uc <= 0x20 || strchr(forbidden, uc)) {
+ // found an error
+ error = true;
+ } else if (section & UserInfo) {
+ if (section == UserInfo && strchr(forbiddenUserInfo + 1, uc))
+ error = true;
+ else if (section != UserInfo && strchr(forbiddenUserInfo, uc))
+ error = true;
+ }
+
+ if (!error)
+ continue;
+
+ ErrorCode errorCode = ErrorCode(int(section) << 8);
+ if (section == UserInfo) {
+ // is it the user name or the password?
+ errorCode = InvalidUserNameError;
+ for (uint j = uint(begin); j < i; ++j)
+ if (data[j] == ':') {
+ errorCode = InvalidPasswordError;
+ break;
+ }
+ }
+
+ setError(errorCode, input, i);
+ return false;
+ }
+
+ // no errors
+ return true;
+}
+
#if 0
inline void QUrlPrivate::validate() const
{
@@ -1954,6 +1990,10 @@ void QUrl::setUserInfo(const QString &userInfo, ParsingMode mode)
// QUrlPrivate::setUserInfo cleared almost everything
// but it leaves the UserName bit set
d->sectionIsPresent &= ~QUrlPrivate::UserInfo;
+ } else if (mode == StrictMode && !d->validateComponent(QUrlPrivate::UserInfo, userInfo)) {
+ d->sectionIsPresent &= ~QUrlPrivate::UserInfo;
+ d->userName.clear();
+ d->password.clear();
}
}
@@ -2010,10 +2050,11 @@ void QUrl::setUserName(const QString &userName, ParsingMode mode)
mode = TolerantMode;
}
-
d->setUserName(data, 0, data.length());
if (userName.isNull())
d->sectionIsPresent &= ~QUrlPrivate::UserName;
+ else if (mode == StrictMode && !d->validateComponent(QUrlPrivate::UserName, userName))
+ d->userName.clear();
}
/*!
@@ -2105,6 +2146,8 @@ void QUrl::setPassword(const QString &password, ParsingMode mode)
d->setPassword(data, 0, data.length());
if (password.isNull())
d->sectionIsPresent &= ~QUrlPrivate::Password;
+ else if (mode == StrictMode && !d->validateComponent(QUrlPrivate::Password, password))
+ d->password.clear();
}
/*!
@@ -2354,6 +2397,9 @@ void QUrl::setPath(const QString &path, ParsingMode mode)
// optimized out, since there is no path delimiter
// if (path.isNull())
// d->sectionIsPresent &= ~QUrlPrivate::Path;
+// else
+ if (mode == StrictMode && !d->validateComponent(QUrlPrivate::Path, path))
+ d->path.clear();
}
/*!
@@ -2474,6 +2520,8 @@ void QUrl::setQuery(const QString &query, ParsingMode mode)
d->setQuery(data, 0, data.length());
if (query.isNull())
d->sectionIsPresent &= ~QUrlPrivate::Query;
+ else if (mode == StrictMode && !d->validateComponent(QUrlPrivate::Query, query))
+ d->query.clear();
}
/*!
@@ -2835,6 +2883,8 @@ void QUrl::setFragment(const QString &fragment, ParsingMode mode)
d->setFragment(data, 0, data.length());
if (fragment.isNull())
d->sectionIsPresent &= ~QUrlPrivate::Fragment;
+ else if (mode == StrictMode && !d->validateComponent(QUrlPrivate::Fragment, fragment))
+ d->fragment.clear();
}
/*!
@@ -3812,7 +3862,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\list
\li qt.nokia.com becomes http://qt.nokia.com
- \li ftp.qt.nokia.com becomes ftp://ftp.qt.nokia.com
+ \li ftp.qt-project.org becomes ftp://ftp.qt-project.org
\li hostname becomes http://hostname
\li /home/user/test.html becomes file:///home/user/test.html
\endlist
@@ -3828,12 +3878,11 @@ QUrl QUrl::fromUserInput(const QString &userInput)
QUrl url = QUrl(trimmedString, QUrl::TolerantMode);
QUrl urlPrepended = QUrl(QStringLiteral("http://") + trimmedString, QUrl::TolerantMode);
- // Check the most common case of a valid url with scheme and host
+ // Check the most common case of a valid url with a scheme
// We check if the port would be valid by adding the scheme to handle the case host:port
// where the host would be interpretted as the scheme
if (url.isValid()
&& !url.scheme().isEmpty()
- && (!url.host().isEmpty() || !url.path().isEmpty())
&& urlPrepended.port() == -1)
return adjustFtpPath(url);
diff --git a/src/corelib/itemmodels/qabstractitemmodel.cpp b/src/corelib/itemmodels/qabstractitemmodel.cpp
index e2361e11f9..db1db9aaed 100644
--- a/src/corelib/itemmodels/qabstractitemmodel.cpp
+++ b/src/corelib/itemmodels/qabstractitemmodel.cpp
@@ -1437,7 +1437,7 @@ QAbstractItemModel::~QAbstractItemModel()
For example:
- \snippet itemviews/simpledommodel/dommodel.cpp 2
+ \snippet ../widgets/itemviews/simpledommodel/dommodel.cpp 2
\note When implementing a table based model, columnCount() should return 0
when the parent is valid.
diff --git a/src/corelib/itemmodels/qabstractproxymodel.cpp b/src/corelib/itemmodels/qabstractproxymodel.cpp
index 715a186b97..0175a0f2fa 100644
--- a/src/corelib/itemmodels/qabstractproxymodel.cpp
+++ b/src/corelib/itemmodels/qabstractproxymodel.cpp
@@ -124,6 +124,10 @@ QAbstractProxyModel::~QAbstractProxyModel()
/*!
Sets the given \a sourceModel to be processed by the proxy model.
+
+ Subclasses should call beginResetModel() at the beginning of the method,
+ disconnect from the old model, call this method, connect to the new model,
+ and call endResetModel().
*/
void QAbstractProxyModel::setSourceModel(QAbstractItemModel *sourceModel)
{
diff --git a/src/corelib/itemmodels/qsortfilterproxymodel.cpp b/src/corelib/itemmodels/qsortfilterproxymodel.cpp
index 6ab32a9366..857054558f 100644
--- a/src/corelib/itemmodels/qsortfilterproxymodel.cpp
+++ b/src/corelib/itemmodels/qsortfilterproxymodel.cpp
@@ -1616,7 +1616,7 @@ void QSortFilterProxyModelPrivate::_q_sourceColumnsMoved(
QSortFilterProxyModel and reimplementing lessThan(), which is
used to compare items. For example:
- \snippet itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp 5
+ \snippet ../widgets/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp 5
(This code snippet comes from the
\l{itemviews/customsortfiltermodel}{Custom Sort/Filter Model}
@@ -1659,7 +1659,7 @@ void QSortFilterProxyModelPrivate::_q_sourceColumnsMoved(
the \l{QSortFilterProxyModel::filterKeyColumn}{filterKeyColumn} property
and performs filtering on columns 0, 1, and 2:
- \snippet itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp 3
+ \snippet ../widgets/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp 3
(This code snippet comes from the
\l{itemviews/customsortfiltermodel}{Custom Sort/Filter Model}
diff --git a/src/corelib/json/qjsonarray.cpp b/src/corelib/json/qjsonarray.cpp
index 0cd436a3b9..a669a5533d 100644
--- a/src/corelib/json/qjsonarray.cpp
+++ b/src/corelib/json/qjsonarray.cpp
@@ -535,7 +535,7 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
/*! \fn QJsonArray::iterator QJsonArray::begin()
- Returns an \l{STL-style iterator} pointing to the first item in
+ Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first item in
the array.
\sa constBegin(), end()
@@ -548,7 +548,7 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
/*! \fn QJsonArray::const_iterator QJsonArray::constBegin() const
- Returns a const \l{STL-style iterator} pointing to the first item
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item
in the array.
\sa begin(), constEnd()
@@ -556,7 +556,7 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
/*! \fn QJsonArray::iterator QJsonArray::end()
- Returns an \l{STL-style iterator} pointing to the imaginary item
+ Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item
after the last item in the array.
\sa begin(), constEnd()
@@ -569,7 +569,7 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
/*! \fn QJsonArray::const_iterator QJsonArray::constEnd() const
- Returns a const \l{STL-style iterator} pointing to the imaginary
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary
item after the last item in the array.
\sa constBegin(), end()
diff --git a/src/corelib/json/qjsonobject.cpp b/src/corelib/json/qjsonobject.cpp
index 728bbbd0ec..1bdd872e78 100644
--- a/src/corelib/json/qjsonobject.cpp
+++ b/src/corelib/json/qjsonobject.cpp
@@ -390,13 +390,14 @@ QJsonValue QJsonObject::take(const QString &key)
if (!keyExists)
return QJsonValue(QJsonValue::Undefined);
- QJsonPrivate::Entry *e = o->entryAt(index);
+ QJsonValue v(d, o, o->entryAt(index)->value);
+ detach();
o->removeItems(index, 1);
++d->compactionCounter;
if (d->compactionCounter > 32u && d->compactionCounter >= unsigned(o->length) / 2u)
compact();
- return QJsonValue(d, o, e->value);
+ return v;
}
/*!
@@ -525,7 +526,7 @@ QJsonObject::const_iterator QJsonObject::constFind(const QString &key) const
/*! \fn QJsonObject::iterator QJsonObject::begin()
- Returns an \l{STL-style iterator} pointing to the first item in
+ Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first item in
the object.
\sa constBegin(), end()
@@ -538,7 +539,7 @@ QJsonObject::const_iterator QJsonObject::constFind(const QString &key) const
/*! \fn QJsonObject::const_iterator QJsonObject::constBegin() const
- Returns a const \l{STL-style iterator} pointing to the first item
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item
in the object.
\sa begin(), constEnd()
@@ -546,7 +547,7 @@ QJsonObject::const_iterator QJsonObject::constFind(const QString &key) const
/*! \fn QJsonObject::iterator QJsonObject::end()
- Returns an \l{STL-style iterator} pointing to the imaginary item
+ Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item
after the last item in the object.
\sa begin(), constEnd()
@@ -559,7 +560,7 @@ QJsonObject::const_iterator QJsonObject::constFind(const QString &key) const
/*! \fn QJsonObject::const_iterator QJsonObject::constEnd() const
- Returns a const \l{STL-style iterator} pointing to the imaginary
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary
item after the last item in the object.
\sa constBegin(), end()
diff --git a/src/corelib/kernel/qeventdispatcher_blackberry.cpp b/src/corelib/kernel/qeventdispatcher_blackberry.cpp
index 2252b73ad4..69b4a8b172 100644
--- a/src/corelib/kernel/qeventdispatcher_blackberry.cpp
+++ b/src/corelib/kernel/qeventdispatcher_blackberry.cpp
@@ -132,7 +132,7 @@ static int bpsIOHandler(int fd, int io_events, void *data)
}
// post unblock event to our thread; in this callback the bps channel is
- // guarenteed to be the same that was active when bps_add_fd was called
+ // guaranteed to be the same that was active when bps_add_fd was called
result = bps_push_event(event);
if (result != BPS_SUCCESS) {
qWarning("QEventDispatcherBlackberryPrivate::QEventDispatcherBlackberry: bps_push_event() failed");
diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h
index 06d325f383..09c641e4a3 100644
--- a/src/corelib/kernel/qmetatype.h
+++ b/src/corelib/kernel/qmetatype.h
@@ -252,7 +252,8 @@ public:
IsEnumeration = 0x10,
SharedPointerToQObject = 0x20,
WeakPointerToQObject = 0x40,
- TrackingPointerToQObject = 0x80
+ TrackingPointerToQObject = 0x80,
+ WasDeclaredAsMetaType = 0x100
};
Q_DECLARE_FLAGS(TypeFlags, TypeFlag)
@@ -563,12 +564,19 @@ namespace QtPrivate {
| (Q_IS_ENUM(T) ? QMetaType::IsEnumeration : 0)
};
};
+
+ template<typename T, bool defined>
+ struct MetaTypeDefinedHelper
+ {
+ enum DefinedType { Defined = defined };
+ };
}
template <typename T>
int qRegisterNormalizedMetaType(const QT_PREPEND_NAMESPACE(QByteArray) &normalizedTypeName
#ifndef qdoc
, T * dummy = 0
+ , typename QtPrivate::MetaTypeDefinedHelper<T, QMetaTypeId2<T>::Defined && !QMetaTypeId2<T>::IsBuiltIn>::DefinedType defined = QtPrivate::MetaTypeDefinedHelper<T, QMetaTypeId2<T>::Defined && !QMetaTypeId2<T>::IsBuiltIn>::Defined
#endif
)
{
@@ -580,6 +588,10 @@ int qRegisterNormalizedMetaType(const QT_PREPEND_NAMESPACE(QByteArray) &normaliz
return QMetaType::registerNormalizedTypedef(normalizedTypeName, typedefOf);
QMetaType::TypeFlags flags(QtPrivate::QMetaTypeTypeFlags<T>::Flags);
+
+ if (defined)
+ flags |= QMetaType::WasDeclaredAsMetaType;
+
return QMetaType::registerNormalizedType(normalizedTypeName,
QtMetaTypePrivate::QMetaTypeFunctionHelper<T>::Delete,
QtMetaTypePrivate::QMetaTypeFunctionHelper<T>::Create,
@@ -594,6 +606,7 @@ template <typename T>
int qRegisterMetaType(const char *typeName
#ifndef qdoc
, T * dummy = 0
+ , typename QtPrivate::MetaTypeDefinedHelper<T, QMetaTypeId2<T>::Defined && !QMetaTypeId2<T>::IsBuiltIn>::DefinedType defined = QtPrivate::MetaTypeDefinedHelper<T, QMetaTypeId2<T>::Defined && !QMetaTypeId2<T>::IsBuiltIn>::Defined
#endif
)
{
@@ -602,7 +615,7 @@ int qRegisterMetaType(const char *typeName
#else
QT_PREPEND_NAMESPACE(QByteArray) normalizedTypeName = QMetaObject::normalizedType(typeName);
#endif
- return qRegisterNormalizedMetaType<T>(normalizedTypeName, dummy);
+ return qRegisterNormalizedMetaType<T>(normalizedTypeName, dummy, defined);
}
#ifndef QT_NO_DATASTREAM
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 9d0854f3a9..9091b5579e 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -1945,7 +1945,7 @@ void QObject::deleteLater()
is available.
Example:
- \snippet mainwindows/sdi/mainwindow.cpp implicit tr context
+ \snippet ../widgets/mainwindows/sdi/mainwindow.cpp implicit tr context
\dots
If the same \a sourceText is used in different roles within the
@@ -3864,9 +3864,9 @@ QDebug operator<<(QDebug dbg, const QObject *o) {
Example:
- \snippet tools/plugandpaintplugins/basictools/basictoolsplugin.h 1
+ \snippet ../widgets/tools/plugandpaintplugins/basictools/basictoolsplugin.h 1
\dots
- \snippet tools/plugandpaintplugins/basictools/basictoolsplugin.h 3
+ \snippet ../widgets/tools/plugandpaintplugins/basictools/basictoolsplugin.h 3
See the \l{tools/plugandpaintplugins/basictools}{Plug & Paint
Basic Tools} example for details.
@@ -4293,6 +4293,16 @@ bool QObject::disconnect(const QMetaObject::Connection &connection)
if (c->next)
c->next->prev = c->prev;
c->receiver = 0;
+
+ // destroy the QSlotObject, if possible
+ if (c->isSlotObject) {
+ c->slotObj->destroyIfLastRef();
+ c->isSlotObject = false;
+ }
+
+ const_cast<QMetaObject::Connection &>(connection).d_ptr = 0;
+ c->deref(); // has been removed from the QMetaObject::Connection object
+
// disconnectNotify() not called (the signal index is unknown).
return true;
diff --git a/src/corelib/kernel/qtimer.cpp b/src/corelib/kernel/qtimer.cpp
index 9dea666363..9126d7ea17 100644
--- a/src/corelib/kernel/qtimer.cpp
+++ b/src/corelib/kernel/qtimer.cpp
@@ -62,9 +62,9 @@ QT_BEGIN_NAMESPACE
Example for a one second (1000 millisecond) timer (from the
\l{widgets/analogclock}{Analog Clock} example):
- \snippet widgets/analogclock/analogclock.cpp 4
- \snippet widgets/analogclock/analogclock.cpp 5
- \snippet widgets/analogclock/analogclock.cpp 6
+ \snippet ../widgets/widgets/analogclock/analogclock.cpp 4
+ \snippet ../widgets/widgets/analogclock/analogclock.cpp 5
+ \snippet ../widgets/widgets/analogclock/analogclock.cpp 6
From then on, the \c update() slot is called every second.
diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp
index f934202cf6..58e4f202d5 100644
--- a/src/corelib/kernel/qtranslator.cpp
+++ b/src/corelib/kernel/qtranslator.cpp
@@ -343,10 +343,10 @@ public:
The most common use of QTranslator is to: load a translation
file, install it using QCoreApplication::installTranslator(), and use
- it via QObject::tr(). Here's the \c main() function from the
- \l{linguist/hellotr}{Hello tr()} example:
+ it via QObject::tr(). Here's an example \c main() function using the
+ QTranslator:
- \snippet linguist/hellotr/main.cpp 2
+ \snippet hellotrmain.cpp 0
Note that the translator must be created \e before the
application's widgets.
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp
index 9ff9d10bf0..26deeba6a2 100644
--- a/src/corelib/kernel/qvariant.cpp
+++ b/src/corelib/kernel/qvariant.cpp
@@ -341,11 +341,9 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
*str = v_cast<QUrl>(d)->toString();
break;
#endif
-#ifndef QT_NO_QUUID_STRING
case QVariant::Uuid:
*str = v_cast<QUuid>(d)->toString();
break;
-#endif
default:
return false;
}
@@ -722,11 +720,9 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
#endif
case QVariant::Uuid:
switch (d->type) {
-#ifndef QT_NO_QUUID_STRING
case QVariant::String:
*static_cast<QUuid *>(result) = QUuid(*v_cast<QString>(d));
break;
-#endif
default:
return false;
}
diff --git a/src/corelib/kernel/qwineventnotifier.h b/src/corelib/kernel/qwineventnotifier.h
index d5e4d0f7e3..291d953e58 100644
--- a/src/corelib/kernel/qwineventnotifier.h
+++ b/src/corelib/kernel/qwineventnotifier.h
@@ -42,12 +42,9 @@
#ifndef QWINEVENTNOTIFIER_H
#define QWINEVENTNOTIFIER_H
-#if 0
-// inform syncqt
-#pragma qt_no_master_include
-#endif
-
#include "QtCore/qobject.h"
+
+#ifdef Q_OS_WIN
#include "QtCore/qt_windows.h"
QT_BEGIN_HEADER
@@ -88,4 +85,6 @@ QT_END_NAMESPACE
QT_END_HEADER
+#endif // Q_OS_WIN
+
#endif // QWINEVENTNOTIFIER_H
diff --git a/src/corelib/mimetypes/qmimedatabase.cpp b/src/corelib/mimetypes/qmimedatabase.cpp
index 5acc290475..f3705476c3 100644
--- a/src/corelib/mimetypes/qmimedatabase.cpp
+++ b/src/corelib/mimetypes/qmimedatabase.cpp
@@ -604,18 +604,4 @@ QList<QMimeType> QMimeDatabase::allMimeTypes() const
\value MatchContent The file content is used to look for a match
*/
-/*!
- \fn QMimeType QMimeDatabase::mimeTypeForNameAndData(const QString &fileName, QIODevice *device) const
- \obsolete
-
- This function is replaced by \l mimeTypeForFileNameAndData()
-*/
-
-/*!
- \fn QMimeType QMimeDatabase::mimeTypeForNameAndData(const QString &fileName, const QByteArray &data) const
- \obsolete
-
- This function is replaced by \l mimeTypeForFileNameAndData()
-*/
-
QT_END_NAMESPACE
diff --git a/src/corelib/plugin/qfactoryloader.cpp b/src/corelib/plugin/qfactoryloader.cpp
index 75652b0902..aeb78e88b4 100644
--- a/src/corelib/plugin/qfactoryloader.cpp
+++ b/src/corelib/plugin/qfactoryloader.cpp
@@ -126,9 +126,30 @@ void QFactoryLoader::update()
QStringList plugins = QDir(path).entryList(QDir::Files);
QLibraryPrivate *library = 0;
+
+#ifdef Q_OS_MAC
+ // Loading both the debug and release version of the cocoa plugins causes the objective-c runtime
+ // to print "duplicate class definitions" warnings. Detect if QFactoryLoader is about to load both,
+ // skip one of them (below).
+ //
+ // ### FIXME find a proper solution
+ //
+ const bool isLoadingDebugAndReleaseCocoa = plugins.contains("libqcocoa_debug.dylib") && plugins.contains("libqcocoa.dylib");
+#endif
for (int j = 0; j < plugins.count(); ++j) {
QString fileName = QDir::cleanPath(path + QLatin1Char('/') + plugins.at(j));
+#ifdef Q_OS_MAC
+ if (isLoadingDebugAndReleaseCocoa) {
+#ifdef QT_DEBUG
+ if (fileName.contains(QStringLiteral("libqcocoa.dylib")))
+ continue; // Skip release plugin in debug mode
+#else
+ if (fileName.contains(QStringLiteral("libqcocoa_debug.dylib")))
+ continue; // Skip debug plugin in release mode
+#endif
+ }
+#endif
if (qt_debug_component()) {
qDebug() << "QFactoryLoader::QFactoryLoader() looking at" << fileName;
}
diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp
index 26692ca3d4..8d2e890d87 100644
--- a/src/corelib/plugin/qlibrary.cpp
+++ b/src/corelib/plugin/qlibrary.cpp
@@ -73,7 +73,7 @@ QT_BEGIN_NAMESPACE
# define QLIBRARY_AS_DEBUG true
#endif
-#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
+#if defined(Q_OS_UNIX)
// We don't use separate debug and release libs on UNIX, so we want
// to allow loading plugins, regardless of how they were built.
# define QT_NO_DEBUG_PLUGIN_CHECK
diff --git a/src/corelib/plugin/qlibrary_p.h b/src/corelib/plugin/qlibrary_p.h
index 337c43acb9..8465d5cf06 100644
--- a/src/corelib/plugin/qlibrary_p.h
+++ b/src/corelib/plugin/qlibrary_p.h
@@ -92,6 +92,8 @@ public:
QFunctionPointer resolve(const char *);
static QLibraryPrivate *findOrCreate(const QString &fileName, const QString &version = QString());
+ static QStringList suffixes_sys(const QString &fullVersion);
+ static QStringList prefixes_sys();
static QVector<QStaticPlugin> staticPlugins();
diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp
index 2ef6f80466..35d8197306 100644
--- a/src/corelib/plugin/qlibrary_unix.cpp
+++ b/src/corelib/plugin/qlibrary_unix.cpp
@@ -80,6 +80,60 @@ static QString qdlerror()
return err ? QLatin1Char('(') + QString::fromLocal8Bit(err) + QLatin1Char(')'): QString();
}
+QStringList QLibraryPrivate::suffixes_sys(const QString& fullVersion)
+{
+ QStringList suffixes;
+#if defined(Q_OS_HPUX)
+ // according to
+ // http://docs.hp.com/en/B2355-90968/linkerdifferencesiapa.htm
+
+ // In PA-RISC (PA-32 and PA-64) shared libraries are suffixed
+ // with .sl. In IPF (32-bit and 64-bit), the shared libraries
+ // are suffixed with .so. For compatibility, the IPF linker
+ // also supports the .sl suffix.
+
+ // But since we don't know if we are built on HPUX or HPUXi,
+ // we support both .sl (and .<version>) and .so suffixes but
+ // .so is preferred.
+# if defined(__ia64)
+ if (!fullVersion.isEmpty()) {
+ suffixes << QString::fromLatin1(".so.%1").arg(fullVersion);
+ } else {
+ suffixes << QLatin1String(".so");
+ }
+# endif
+ if (!fullVersion.isEmpty()) {
+ suffixes << QString::fromLatin1(".sl.%1").arg(fullVersion);
+ suffixes << QString::fromLatin1(".%1").arg(fullVersion);
+ } else {
+ suffixes << QLatin1String(".sl");
+ }
+#elif defined(Q_OS_AIX)
+ suffixes << ".a";
+
+#else
+ if (!fullVersion.isEmpty()) {
+ suffixes << QString::fromLatin1(".so.%1").arg(fullVersion);
+ } else {
+ suffixes << QLatin1String(".so");
+ }
+#endif
+# ifdef Q_OS_MAC
+ if (!fullVersion.isEmpty()) {
+ suffixes << QString::fromLatin1(".%1.bundle").arg(fullVersion);
+ suffixes << QString::fromLatin1(".%1.dylib").arg(fullVersion);
+ } else {
+ suffixes << QLatin1String(".bundle") << QLatin1String(".dylib");
+ }
+#endif
+ return suffixes;
+}
+
+QStringList QLibraryPrivate::prefixes_sys()
+{
+ return QStringList() << QLatin1String("lib");
+}
+
bool QLibraryPrivate::load_sys()
{
QString attempt;
@@ -96,50 +150,8 @@ bool QLibraryPrivate::load_sys()
QStringList suffixes;
QStringList prefixes;
if (pluginState != IsAPlugin) {
- prefixes << QLatin1String("lib");
-#if defined(Q_OS_HPUX)
- // according to
- // http://docs.hp.com/en/B2355-90968/linkerdifferencesiapa.htm
-
- // In PA-RISC (PA-32 and PA-64) shared libraries are suffixed
- // with .sl. In IPF (32-bit and 64-bit), the shared libraries
- // are suffixed with .so. For compatibility, the IPF linker
- // also supports the .sl suffix.
-
- // But since we don't know if we are built on HPUX or HPUXi,
- // we support both .sl (and .<version>) and .so suffixes but
- // .so is preferred.
-# if defined(__ia64)
- if (!fullVersion.isEmpty()) {
- suffixes << QString::fromLatin1(".so.%1").arg(fullVersion);
- } else {
- suffixes << QLatin1String(".so");
- }
-# endif
- if (!fullVersion.isEmpty()) {
- suffixes << QString::fromLatin1(".sl.%1").arg(fullVersion);
- suffixes << QString::fromLatin1(".%1").arg(fullVersion);
- } else {
- suffixes << QLatin1String(".sl");
- }
-#elif defined(Q_OS_AIX)
- suffixes << ".a";
-
-#else
- if (!fullVersion.isEmpty()) {
- suffixes << QString::fromLatin1(".so.%1").arg(fullVersion);
- } else {
- suffixes << QLatin1String(".so");
- }
-#endif
-# ifdef Q_OS_MAC
- if (!fullVersion.isEmpty()) {
- suffixes << QString::fromLatin1(".%1.bundle").arg(fullVersion);
- suffixes << QString::fromLatin1(".%1.dylib").arg(fullVersion);
- } else {
- suffixes << QLatin1String(".bundle") << QLatin1String(".dylib");
- }
-#endif
+ prefixes = prefixes_sys();
+ suffixes = suffixes_sys(fullVersion);
}
int dlFlags = 0;
#if defined(QT_HPUX_LD)
diff --git a/src/corelib/plugin/qlibrary_win.cpp b/src/corelib/plugin/qlibrary_win.cpp
index 27796aedc1..ef3816a804 100644
--- a/src/corelib/plugin/qlibrary_win.cpp
+++ b/src/corelib/plugin/qlibrary_win.cpp
@@ -57,6 +57,17 @@ QT_BEGIN_NAMESPACE
extern QString qt_error_string(int code);
+QStringList QLibraryPrivate::suffixes_sys(const QString& fullVersion)
+{
+ Q_UNUSED(fullVersion);
+ return QStringList() << ".dll";
+}
+
+QStringList QLibraryPrivate::prefixes_sys()
+{
+ return QStringList();
+}
+
bool QLibraryPrivate::load_sys()
{
//avoid 'Bad Image' message box
diff --git a/src/corelib/plugin/qpluginloader.cpp b/src/corelib/plugin/qpluginloader.cpp
index 31d9fda858..c16a340dbe 100644
--- a/src/corelib/plugin/qpluginloader.cpp
+++ b/src/corelib/plugin/qpluginloader.cpp
@@ -42,6 +42,7 @@
#include "qplatformdefs.h"
#include "qplugin.h"
+#include "qcoreapplication.h"
#include "qpluginloader.h"
#include <qfileinfo.h>
#include "qlibrary_p.h"
@@ -250,14 +251,52 @@ bool QPluginLoader::isLoaded() const
return d && d->pHnd && d->instance;
}
+static QString locatePlugin(const QString& fileName)
+{
+ QStringList prefixes = QLibraryPrivate::prefixes_sys();
+ prefixes.prepend(QString());
+ QStringList suffixes = QLibraryPrivate::suffixes_sys(QString());
+ suffixes.prepend(QString());
+
+ // Split up "subdir/filename"
+ const int slash = fileName.lastIndexOf('/');
+ const QString baseName = fileName.mid(slash + 1);
+ const QString basePath = fileName.left(slash + 1); // keep the '/'
+
+ const bool debug = qt_debug_component();
+
+ QStringList paths = QCoreApplication::libraryPaths();
+ paths.prepend(QStringLiteral("./")); // search in current dir first
+ foreach (const QString &path, paths) {
+ foreach (const QString &prefix, prefixes) {
+ foreach (const QString &suffix, suffixes) {
+ const QString fn = path + QLatin1Char('/') + basePath + prefix + baseName + suffix;
+ if (debug)
+ qDebug() << "Trying..." << fn;
+ if (QFileInfo(fn).isFile())
+ return fn;
+ }
+ }
+ }
+ if (debug)
+ qDebug() << fileName << "not found";
+ return QString();
+}
+
/*!
\property QPluginLoader::fileName
\brief the file name of the plugin
- To be loadable, the file's suffix must be a valid suffix for a
- loadable library in accordance with the platform, e.g. \c .so on
- Unix, \c .dylib on Mac OS X, and \c .dll on Windows. The suffix
- can be verified with QLibrary::isLibrary().
+ We recommend omitting the file's suffix in the file name, since
+ QPluginLoader will automatically look for the file with the appropriate
+ suffix (see QLibrary::isLibrary()).
+
+ When loading the plugin, QPluginLoader searches in the current directory and
+ in all plugin locations specified by QCoreApplication::libraryPaths(),
+ unless the file name has an absolute path. After loading the plugin
+ successfully, fileName() returns the fully-qualified file name of
+ the plugin, including the full path to the plugin if one was given
+ in the constructor or passed to setFileName().
If the file name does not exist, it will not be set. This property
will then contain an empty string.
@@ -277,7 +316,12 @@ void QPluginLoader::setFileName(const QString &fileName)
did_load = false;
}
- QString fn = QFileInfo(fileName).canonicalFilePath();
+ QFileInfo fi(fileName);
+ QString fn;
+ if (fi.isAbsolute())
+ fn = fi.canonicalFilePath();
+ else
+ fn = locatePlugin(fileName);
d = QLibraryPrivate::findOrCreate(fn);
d->loadHints = lh;
diff --git a/src/corelib/plugin/quuid.cpp b/src/corelib/plugin/quuid.cpp
index c1ebc57cf6..f9a9666de3 100644
--- a/src/corelib/plugin/quuid.cpp
+++ b/src/corelib/plugin/quuid.cpp
@@ -50,7 +50,6 @@
#endif
QT_BEGIN_NAMESPACE
-#ifndef QT_NO_QUUID_STRING
template <class Char, class Integral>
void _q_toHex(Char *&dst, Integral value)
{
@@ -134,7 +133,6 @@ bool _q_uuidFromHex(const Char *&src, uint &d1, ushort &d2, ushort &d3, uchar (&
return true;
}
-#endif
#ifndef QT_BOOTSTRAPPED
static QUuid createFromName(const QUuid &ns, const QByteArray &baseData, QCryptographicHash::Algorithm algorithm, int version)
@@ -341,7 +339,6 @@ static QUuid createFromName(const QUuid &ns, const QByteArray &baseData, QCrypto
\snippet code/src_corelib_plugin_quuid.cpp 0
*/
-#ifndef QT_NO_QUUID_STRING
/*!
Creates a QUuid object from the string \a text, which must be
formatted as five hex fields separated by '-', e.g.,
@@ -422,8 +419,6 @@ QUuid::QUuid(const QByteArray &text)
}
}
-#endif
-
/*!
\since 5.0
\fn QUuid QUuid::createUuidV3(const QUuid &ns, const QByteArray &baseData);
@@ -527,7 +522,7 @@ QUuid QUuid::fromRfc4122(const QByteArray &bytes)
Returns true if this QUuid and the \a other QUuid are different;
otherwise returns false.
*/
-#ifndef QT_NO_QUUID_STRING
+
/*!
Returns the string representation of this QUuid. The string is
formatted as five hex fields separated by '-' and enclosed in
@@ -617,7 +612,6 @@ QByteArray QUuid::toByteArray() const
return result;
}
-#endif
/*!
Returns the binary representation of this QUuid. The byte array is in big
@@ -1016,12 +1010,7 @@ QUuid QUuid::createUuid()
*/
QDebug operator<<(QDebug dbg, const QUuid &id)
{
-#ifndef QT_NO_QUUID_STRING
dbg.nospace() << "QUuid(" << id.toString() << ')';
-#else
- Q_UNUSED(id)
- dbg.nospace() << "QUuid(QT_NO_QUUID_STRING)";
-#endif
return dbg.space();
}
#endif
diff --git a/src/corelib/plugin/quuid.h b/src/corelib/plugin/quuid.h
index ba475ac33b..d1b56002f3 100644
--- a/src/corelib/plugin/quuid.h
+++ b/src/corelib/plugin/quuid.h
@@ -115,13 +115,11 @@ public:
}
#endif
-#ifndef QT_NO_QUUID_STRING
QUuid(const QString &);
QUuid(const char *);
QString toString() const;
QUuid(const QByteArray &);
QByteArray toByteArray() const;
-#endif
QByteArray toRfc4122() const;
static QUuid fromRfc4122(const QByteArray &);
bool isNull() const;
@@ -193,7 +191,6 @@ public:
#ifndef QT_BOOTSTRAPPED
static QUuid createUuidV3(const QUuid &ns, const QByteArray &baseData);
static QUuid createUuidV5(const QUuid &ns, const QByteArray &baseData);
-#ifndef QT_NO_QUUID_STRING
static inline QUuid createUuidV3(const QUuid &ns, const QString &baseData)
{
return QUuid::createUuidV3(ns, baseData.toUtf8());
@@ -205,7 +202,6 @@ public:
}
#endif
-#endif
QUuid::Variant variant() const;
QUuid::Version version() const;
diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp
index bf33500676..0d0bb45738 100644
--- a/src/corelib/statemachine/qstatemachine.cpp
+++ b/src/corelib/statemachine/qstatemachine.cpp
@@ -86,17 +86,15 @@ QT_BEGIN_NAMESPACE
\ingroup statemachine
QStateMachine is based on the concepts and notation of
- \l{Statecharts: A visual formalism for complex
- systems}{Statecharts}. QStateMachine is part of \l{The State
- Machine Framework}.
+ \l{http://www.wisdom.weizmann.ac.il/~dharel/SCANNED.PAPERS/Statecharts.pdf}{Statecharts}.
+ QStateMachine is part of \l{The State Machine Framework}.
A state machine manages a set of states (classes that inherit from
QAbstractState) and transitions (descendants of
QAbstractTransition) between those states; these states and
transitions define a state graph. Once a state graph has been
built, the state machine can execute it. QStateMachine's
- execution algorithm is based on the \l{State Chart XML: State
- Machine Notation for Control Abstraction}{State Chart XML (SCXML)}
+ execution algorithm is based on the \l{http://www.w3.org/TR/scxml/}{State Chart XML (SCXML)}
algorithm. The framework's \l{The State Machine
Framework}{overview} gives several state graphs and the code to
build them.
diff --git a/src/corelib/thread/qatomic.cpp b/src/corelib/thread/qatomic.cpp
index 87f1d84d4d..ef74ac40e8 100644
--- a/src/corelib/thread/qatomic.cpp
+++ b/src/corelib/thread/qatomic.cpp
@@ -53,12 +53,6 @@
The QAtomicInt class provides atomic reference counting, test-and-set, fetch-and-store,
and fetch-and-add for integers.
- \section1 Non-atomic convenience operators
-
- For convenience, QAtomicInt provides integer comparison, cast, and
- assignment operators. Note that a combination of these operators
- is \e not an atomic operation.
-
\section1 The Atomic API
\section2 Reference counting
@@ -222,6 +216,44 @@
this QAtomicInt.
*/
+/*!
+ \fn int QAtomicInt::load() const
+
+ Atomically loads the value of this QAtomicInt using relaxed memory
+ ordering. The value is not modified in any way, but note that there's no
+ guarantee that it remains so.
+
+ \sa store(), loadAcquire()
+*/
+
+/*!
+ \fn int QAtomicInt::loadAcquire() const
+
+ Atomically loads the value of this QAtomicInt using the "Acquire" memory
+ ordering. The value is not modified in any way, but note that there's no
+ guarantee that it remains so.
+
+ \sa store(), load()
+*/
+
+/*!
+ \fn void QAtomicInt::store(int newValue)
+
+ Atomically stores the \a newValue value into this atomic type, using
+ relaxed memory ordering.
+
+ \sa storeRelease(), load()
+*/
+
+/*!
+ \fn void QAtomicInt::storeRelease(int newValue)
+
+ Atomically stores the \a newValue value into this atomic type, using
+ the "Release" memory ordering.
+
+ \sa store(), load()
+*/
+
/*! \fn bool QAtomicInt::isReferenceCountingNative()
Returns true if reference counting is implemented using atomic
@@ -610,12 +642,6 @@
An \e atomic operation is a complex operation that completes without interruption.
The QAtomicPointer class provides atomic test-and-set, fetch-and-store, and fetch-and-add for pointers.
- \section1 Non-atomic convenience operators
-
- For convenience, QAtomicPointer provides pointer comparison, cast,
- dereference, and assignment operators. Note that these operators
- are \e not atomic.
-
\section1 The Atomic API
\section2 Memory ordering
@@ -762,6 +788,44 @@
this QAtomicPointer.
*/
+/*!
+ \fn T *QAtomicPointer::load() const
+
+ Atomically loads the value of this QAtomicPointer using relaxed memory
+ ordering. The value is not modified in any way, but note that there's no
+ guarantee that it remains so.
+
+ \sa store(), loadAcquire()
+*/
+
+/*!
+ \fn T *QAtomicPointer::loadAcquire() const
+
+ Atomically loads the value of this QAtomicPointerusing the "Acquire" memory
+ ordering. The value is not modified in any way, but note that there's no
+ guarantee that it remains so.
+
+ \sa store(), load()
+*/
+
+/*!
+ \fn void QAtomicPointer::store(T *newValue)
+
+ Atomically stores the \a newValue value into this atomic type, using
+ relaxed memory ordering.
+
+ \sa storeRelease(), load()
+*/
+
+/*!
+ \fn void QAtomicPointer::storeRelease(T *newValue)
+
+ Atomically stores the \a newValue value into this atomic type, using
+ the "Release" memory ordering.
+
+ \sa store(), load()
+*/
+
/*! \fn bool QAtomicPointer::isTestAndSetNative()
Returns true if test-and-set is implemented using atomic processor
diff --git a/src/corelib/thread/qatomic.h b/src/corelib/thread/qatomic.h
index 076cfba159..10001802ba 100644
--- a/src/corelib/thread/qatomic.h
+++ b/src/corelib/thread/qatomic.h
@@ -82,6 +82,11 @@ public:
}
#ifdef qdoc
+ int load() const;
+ int loadAcquire() const;
+ void store(int newValue);
+ void storeRelease(int newValue);
+
static Q_DECL_CONSTEXPR bool isReferenceCountingNative();
static Q_DECL_CONSTEXPR bool isReferenceCountingWaitFree();
@@ -139,6 +144,11 @@ public:
}
#ifdef qdoc
+ T *load() const;
+ T *loadAcquire() const;
+ void store(T *newValue);
+ void storeRelease(T *newValue);
+
static Q_DECL_CONSTEXPR bool isTestAndSetNative();
static Q_DECL_CONSTEXPR bool isTestAndSetWaitFree();
diff --git a/src/corelib/thread/qbasicatomic.h b/src/corelib/thread/qbasicatomic.h
index 4177ddbd39..70b69827c2 100644
--- a/src/corelib/thread/qbasicatomic.h
+++ b/src/corelib/thread/qbasicatomic.h
@@ -39,11 +39,11 @@
**
****************************************************************************/
+#include <QtCore/qatomic.h>
+
#ifndef QBASICATOMIC_H
#define QBASICATOMIC_H
-#include <QtCore/qglobal.h>
-
#if defined(QT_MOC) || defined(QT_BUILD_QMAKE) || defined(QT_RCC) || defined(QT_UIC) || defined(QT_BOOTSTRAPPED)
# include <QtCore/qatomic_bootstrap.h>
diff --git a/src/corelib/thread/qfuture.qdoc b/src/corelib/thread/qfuture.qdoc
index b67d711536..6ba5d564cf 100644
--- a/src/corelib/thread/qfuture.qdoc
+++ b/src/corelib/thread/qfuture.qdoc
@@ -328,7 +328,7 @@
/*! \fn QFuture::const_iterator QFuture::begin() const
- Returns a const \l{STL-style iterator} pointing to the first result in the
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first result in the
future.
\sa constBegin(), end()
@@ -336,7 +336,7 @@
/*! \fn QFuture::const_iterator QFuture::end() const
- Returns a const \l{STL-style iterator} pointing to the imaginary result
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary result
after the last result in the future.
\sa begin(), constEnd()
@@ -344,7 +344,7 @@
/*! \fn QFuture::const_iterator QFuture::constBegin() const
- Returns a const \l{STL-style iterator} pointing to the first result in the
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first result in the
future.
\sa begin(), constEnd()
@@ -352,7 +352,7 @@
/*! \fn QFuture::const_iterator QFuture::constEnd() const
- Returns a const \l{STL-style iterator} pointing to the imaginary result
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary result
after the last result in the future.
\sa constBegin(), end()
diff --git a/src/corelib/thread/qmutex.cpp b/src/corelib/thread/qmutex.cpp
index 3815ce16a7..97a5e5738c 100644
--- a/src/corelib/thread/qmutex.cpp
+++ b/src/corelib/thread/qmutex.cpp
@@ -394,7 +394,7 @@ bool QBasicMutex::isRecursive()
to wait on the mutex. There are two tricks to keep in mind:
We don't want to increment waiters after we checked no threads are waiting
(waiters == 0). That's why we atomically set the BigNumber flag on waiters when
- we check waiters. Similarily, if waiters is decremented right after we checked,
+ we check waiters. Similarly, if waiters is decremented right after we checked,
the mutex would be unlocked (d->wakeUp() has (or will) be called), but there is
no thread waiting. This is only happening if there was a timeout in tryLock at the
same time as the mutex is unlocked. So when there was a timeout, we set the
@@ -531,7 +531,7 @@ void QBasicMutex::unlockInternal() Q_DECL_NOTHROW
QMutexPrivate *d = reinterpret_cast<QMutexPrivate *>(copy);
- // If no one is waiting for the lock anymore, we shoud reset d to 0x0.
+ // If no one is waiting for the lock anymore, we should reset d to 0x0.
// Using fetchAndAdd, we atomically check that waiters was equal to 0, and add a flag
// to the waiters variable (BigNumber). That way, we avoid the race in which waiters is
// incremented right after we checked, because we won't increment waiters if is
diff --git a/src/corelib/thread/qmutex_linux.cpp b/src/corelib/thread/qmutex_linux.cpp
index 4f70014acb..94aec0ede0 100644
--- a/src/corelib/thread/qmutex_linux.cpp
+++ b/src/corelib/thread/qmutex_linux.cpp
@@ -187,7 +187,7 @@ bool lockInternal_helper(QBasicAtomicPointer<QMutexData> &d_ptr, int timeout = -
struct timespec ts, *pts = 0;
QElapsedTimer elapsedTimer;
checkElapsedTimerIsTrivial();
- if (IsTimed) {
+ if (IsTimed && timeout > 0) {
ts.tv_sec = timeout / 1000;
ts.tv_nsec = (timeout % 1000) * 1000 * 1000;
elapsedTimer.start();
@@ -206,7 +206,7 @@ bool lockInternal_helper(QBasicAtomicPointer<QMutexData> &d_ptr, int timeout = -
ts.tv_sec = xtimeout / Q_INT64_C(1000) / 1000 / 1000;
ts.tv_nsec = xtimeout % (Q_INT64_C(1000) * 1000 * 1000);
}
- if (IsTimed)
+ if (IsTimed && timeout > 0)
pts = &ts;
// successfully set the waiting bit, now sleep
@@ -232,7 +232,6 @@ void QBasicMutex::lockInternal() Q_DECL_NOTHROW
bool QBasicMutex::lockInternal(int timeout) Q_DECL_NOTHROW
{
Q_ASSERT(!isRecursive());
- Q_ASSERT(timeout >= 0);
return lockInternal_helper<true>(d_ptr, timeout);
}
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp
index b80653c07e..3b8a3f383b 100644
--- a/src/corelib/thread/qthread_unix.cpp
+++ b/src/corelib/thread/qthread_unix.cpp
@@ -392,10 +392,7 @@ int QThread::idealThreadCount() Q_DECL_NOTHROW
{
int cores = -1;
-#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
- // Mac OS X
- cores = MPProcessorsScheduled();
-#elif defined(Q_OS_HPUX)
+#if defined(Q_OS_HPUX)
// HP-UX
struct pst_dynamic psd;
if (pstat_getdynamic(&psd, sizeof(psd), 1, 0) == -1) {
@@ -405,7 +402,7 @@ int QThread::idealThreadCount() Q_DECL_NOTHROW
cores = (int)psd.psd_proc_cnt;
}
#elif defined(Q_OS_BSD4)
- // FreeBSD, OpenBSD, NetBSD, BSD/OS
+ // FreeBSD, OpenBSD, NetBSD, BSD/OS, Mac OS X
size_t len = sizeof(cores);
int mib[2];
mib[0] = CTL_HW;
diff --git a/src/corelib/thread/qwaitcondition.qdoc b/src/corelib/thread/qwaitcondition.qdoc
index e3a526d7f8..f0649c605a 100644
--- a/src/corelib/thread/qwaitcondition.qdoc
+++ b/src/corelib/thread/qwaitcondition.qdoc
@@ -38,7 +38,7 @@
QWaitCondition allows a thread to tell other threads that some
sort of condition has been met. One or many threads can block
waiting for a QWaitCondition to set a condition with wakeOne() or
- wakeAll(). Use wakeOne() to wake one randomly selected condition or
+ wakeAll(). Use wakeOne() to wake one randomly selected thread or
wakeAll() to wake them all.
For example, let's suppose that we have three tasks that should
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index feda8f441d..3685a8938a 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -3585,7 +3585,8 @@ QByteArray QByteArray::toBase64() const
Sets the byte array to the printed value of \a n in base \a base (10
by default) and returns a reference to the byte array. The \a base can
- be any value between 2 and 36.
+ be any value between 2 and 36. For bases other than 10, n is treated
+ as an unsigned integer.
Example:
\snippet code/src_corelib_tools_qbytearray.cpp 40
@@ -3623,7 +3624,7 @@ QByteArray QByteArray::toBase64() const
\sa toLongLong()
*/
-QByteArray &QByteArray::setNum(qlonglong n, int base)
+static char *qulltoa2(char *p, qulonglong n, int base)
{
#if defined(QT_CHECK_RANGE)
if (base < 2 || base > 36) {
@@ -3631,8 +3632,31 @@ QByteArray &QByteArray::setNum(qlonglong n, int base)
base = 10;
}
#endif
- QLocale locale(QLocale::C);
- *this = locale.d->longLongToString(n, -1, base).toLatin1();
+ const char b = 'a' - 10;
+ do {
+ const int c = n % base;
+ n /= base;
+ *--p = c + (c < 10 ? '0' : b);
+ } while (n);
+
+ return p;
+}
+
+QByteArray &QByteArray::setNum(qlonglong n, int base)
+{
+ const int buffsize = 66; // big enough for MAX_ULLONG in base 2
+ char buff[buffsize];
+ char *p;
+
+ if (n < 0 && base == 10) {
+ p = qulltoa2(buff + buffsize, qulonglong(-(1 + n)) + 1, base);
+ *--p = '-';
+ } else {
+ p = qulltoa2(buff + buffsize, qulonglong(n), base);
+ }
+
+ clear();
+ append(p, buffsize - (p - buff));
return *this;
}
@@ -3644,14 +3668,12 @@ QByteArray &QByteArray::setNum(qlonglong n, int base)
QByteArray &QByteArray::setNum(qulonglong n, int base)
{
-#if defined(QT_CHECK_RANGE)
- if (base < 2 || base > 36) {
- qWarning("QByteArray::setNum: Invalid base %d", base);
- base = 10;
- }
-#endif
- QLocale locale(QLocale::C);
- *this = locale.d->unsLongLongToString(n, -1, base).toLatin1();
+ const int buffsize = 66; // big enough for MAX_ULLONG in base 2
+ char buff[buffsize];
+ char *p = qulltoa2(buff + buffsize, n, base);
+
+ clear();
+ append(p, buffsize - (p - buff));
return *this;
}
diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h
index 50e52a1ca7..860869e9c3 100644
--- a/src/corelib/tools/qbytearray.h
+++ b/src/corelib/tools/qbytearray.h
@@ -581,11 +581,11 @@ inline QByteArray &QByteArray::replace(const char *before, const char *after)
{ return replace(before, qstrlen(before), after, qstrlen(after)); }
inline QByteArray &QByteArray::setNum(short n, int base)
-{ return setNum(qlonglong(n), base); }
+{ return base == 10 ? setNum(qlonglong(n), base) : setNum(qulonglong(ushort(n)), base); }
inline QByteArray &QByteArray::setNum(ushort n, int base)
{ return setNum(qulonglong(n), base); }
inline QByteArray &QByteArray::setNum(int n, int base)
-{ return setNum(qlonglong(n), base); }
+{ return base == 10 ? setNum(qlonglong(n), base) : setNum(qulonglong(uint(n)), base); }
inline QByteArray &QByteArray::setNum(uint n, int base)
{ return setNum(qulonglong(n), base); }
inline QByteArray &QByteArray::setNum(float n, char f, int prec)
diff --git a/src/corelib/tools/qelapsedtimer_unix.cpp b/src/corelib/tools/qelapsedtimer_unix.cpp
index 5dc18ce99f..b8f2180a5b 100644
--- a/src/corelib/tools/qelapsedtimer_unix.cpp
+++ b/src/corelib/tools/qelapsedtimer_unix.cpp
@@ -69,7 +69,7 @@ QT_BEGIN_NAMESPACE
* http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap02.html#tag_02_01_06 )
*
* The macro _POSIX_MONOTONIC_CLOCK can therefore assume the following values:
- * -1 monotonic clock is never supported on this sytem
+ * -1 monotonic clock is never supported on this system
* 0 monotonic clock might be supported, runtime check is needed
* >1 (such as 200809L) monotonic clock is always supported
*
diff --git a/src/corelib/tools/qharfbuzz_p.h b/src/corelib/tools/qharfbuzz_p.h
index 9efbdcb692..8b73b1d507 100644
--- a/src/corelib/tools/qharfbuzz_p.h
+++ b/src/corelib/tools/qharfbuzz_p.h
@@ -54,8 +54,7 @@
#define QHARFBUZZ_P_H
#include <QtCore/qchar.h>
-
-#include <harfbuzz-shaper.h>
+#include <private/harfbuzz-shaper.h>
QT_BEGIN_NAMESPACE
diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp
index 3fab2f68e6..eca66d75b0 100644
--- a/src/corelib/tools/qhash.cpp
+++ b/src/corelib/tools/qhash.cpp
@@ -1261,7 +1261,7 @@ void QHashData::checkSanity()
/*! \fn QHash::iterator QHash::begin()
- Returns an \l{STL-style iterator} pointing to the first item in
+ Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first item in
the hash.
\sa constBegin(), end()
@@ -1275,7 +1275,7 @@ void QHashData::checkSanity()
/*! \fn QHash::const_iterator QHash::cbegin() const
\since 5.0
- Returns a const \l{STL-style iterator} pointing to the first item
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item
in the hash.
\sa begin(), cend()
@@ -1283,7 +1283,7 @@ void QHashData::checkSanity()
/*! \fn QHash::const_iterator QHash::constBegin() const
- Returns a const \l{STL-style iterator} pointing to the first item
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item
in the hash.
\sa begin(), constEnd()
@@ -1291,7 +1291,7 @@ void QHashData::checkSanity()
/*! \fn QHash::iterator QHash::end()
- Returns an \l{STL-style iterator} pointing to the imaginary item
+ Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item
after the last item in the hash.
\sa begin(), constEnd()
@@ -1304,7 +1304,7 @@ void QHashData::checkSanity()
/*! \fn QHash::const_iterator QHash::constEnd() const
- Returns a const \l{STL-style iterator} pointing to the imaginary
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary
item after the last item in the hash.
\sa constBegin(), end()
@@ -1313,7 +1313,7 @@ void QHashData::checkSanity()
/*! \fn QHash::const_iterator QHash::cend() const
\since 5.0
- Returns a const \l{STL-style iterator} pointing to the imaginary
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary
item after the last item in the hash.
\sa cbegin(), end()
diff --git a/src/corelib/tools/qlinkedlist.cpp b/src/corelib/tools/qlinkedlist.cpp
index 025d48b595..0c5894f150 100644
--- a/src/corelib/tools/qlinkedlist.cpp
+++ b/src/corelib/tools/qlinkedlist.cpp
@@ -320,7 +320,7 @@ const QLinkedListData QLinkedListData::shared_null = {
/*! \fn QLinkedList::iterator QLinkedList::begin()
- Returns an \l{STL-style iterator} pointing to the first item in
+ Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first item in
the list.
\sa constBegin(), end()
@@ -334,7 +334,7 @@ const QLinkedListData QLinkedListData::shared_null = {
/*! \fn QLinkedList::const_iterator QLinkedList::cbegin() const
\since 5.0
- Returns a const \l{STL-style iterator} pointing to the first item
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item
in the list.
\sa begin(), cend()
@@ -342,7 +342,7 @@ const QLinkedListData QLinkedListData::shared_null = {
/*! \fn QLinkedList::const_iterator QLinkedList::constBegin() const
- Returns a const \l{STL-style iterator} pointing to the first item
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item
in the list.
\sa begin(), constEnd()
@@ -350,7 +350,7 @@ const QLinkedListData QLinkedListData::shared_null = {
/*! \fn QLinkedList::iterator QLinkedList::end()
- Returns an \l{STL-style iterator} pointing to the imaginary item
+ Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item
after the last item in the list.
\sa begin(), constEnd()
@@ -364,7 +364,7 @@ const QLinkedListData QLinkedListData::shared_null = {
/*! \fn QLinkedList::const_iterator QLinkedList::cend() const
\since 5.0
- Returns a const \l{STL-style iterator} pointing to the imaginary
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary
item after the last item in the list.
\sa cbegin(), end()
@@ -372,7 +372,7 @@ const QLinkedListData QLinkedListData::shared_null = {
/*! \fn QLinkedList::const_iterator QLinkedList::constEnd() const
- Returns a const \l{STL-style iterator} pointing to the imaginary
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary
item after the last item in the list.
\sa constBegin(), end()
diff --git a/src/corelib/tools/qlist.cpp b/src/corelib/tools/qlist.cpp
index 4f26b25fec..f31b184f81 100644
--- a/src/corelib/tools/qlist.cpp
+++ b/src/corelib/tools/qlist.cpp
@@ -915,7 +915,7 @@ void **QListData::erase(void **xi)
/*! \fn QList::iterator QList::begin()
- Returns an \l{STL-style iterator} pointing to the first item in
+ Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first item in
the list.
\sa constBegin(), end()
@@ -929,7 +929,7 @@ void **QListData::erase(void **xi)
/*! \fn QList::const_iterator QList::cbegin() const
\since 5.0
- Returns a const \l{STL-style iterator} pointing to the first item
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item
in the list.
\sa begin(), cend()
@@ -937,7 +937,7 @@ void **QListData::erase(void **xi)
/*! \fn QList::const_iterator QList::constBegin() const
- Returns a const \l{STL-style iterator} pointing to the first item
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item
in the list.
\sa begin(), constEnd()
@@ -945,7 +945,7 @@ void **QListData::erase(void **xi)
/*! \fn QList::iterator QList::end()
- Returns an \l{STL-style iterator} pointing to the imaginary item
+ Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item
after the last item in the list.
\sa begin(), constEnd()
@@ -959,7 +959,7 @@ void **QListData::erase(void **xi)
/*! \fn QList::const_iterator QList::cend() const
\since 5.0
- Returns a const \l{STL-style iterator} pointing to the imaginary
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary
item after the last item in the list.
\sa cbegin(), end()
@@ -967,7 +967,7 @@ void **QListData::erase(void **xi)
/*! \fn QList::const_iterator QList::constEnd() const
- Returns a const \l{STL-style iterator} pointing to the imaginary
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary
item after the last item in the list.
\sa constBegin(), end()
diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h
index f5858bf22a..0d4c10fecd 100644
--- a/src/corelib/tools/qlist.h
+++ b/src/corelib/tools/qlist.h
@@ -368,7 +368,7 @@ Q_INLINE_TEMPLATE void QList<T>::node_construct(Node *n, const T &t)
else *reinterpret_cast<T*>(n) = t;
#else
// This is always safe, but penaltizes unoptimized builds a lot.
- else ::memcpy(n, &t, sizeof(T));
+ else ::memcpy(n, static_cast<const void *>(&t), sizeof(T));
#endif
}
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index 4b4c94872e..582ae9ebef 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -2240,16 +2240,23 @@ QLocale::MeasurementSystem QLocale::measurementSystem() const
*/
Qt::LayoutDirection QLocale::textDirection() const
{
- Language lang = language();
- if (lang == QLocale::Arabic ||
- lang == QLocale::Hebrew ||
- lang == QLocale::Persian ||
- lang == QLocale::Pashto ||
- lang == QLocale::Urdu ||
- lang == QLocale::Syriac ||
- lang == QLocale::Divehi)
+ switch (language()) {
+ case QLocale::Arabic:
+ case QLocale::Hebrew:
+ case QLocale::Persian:
+ case QLocale::Pashto:
+ case QLocale::Urdu:
+ case QLocale::Syriac:
+ case QLocale::Divehi:
return Qt::RightToLeft;
-
+ case QLocale::Punjabi:
+ case QLocale::Uzbek:
+ if (script() == QLocale::ArabicScript)
+ return Qt::RightToLeft;
+ // fall through
+ default:
+ break;
+ }
return Qt::LeftToRight;
}
diff --git a/src/corelib/tools/qlocale.h b/src/corelib/tools/qlocale.h
index 6b6beeff0a..c9cb31d03b 100644
--- a/src/corelib/tools/qlocale.h
+++ b/src/corelib/tools/qlocale.h
@@ -67,6 +67,7 @@ class Q_CORE_EXPORT QLocale
Q_GADGET
Q_ENUMS(Language)
Q_ENUMS(Country)
+ Q_ENUMS(MeasurementSystem)
friend class QString;
friend class QByteArray;
friend class QIntValidator;
diff --git a/src/corelib/tools/qlocale.qdoc b/src/corelib/tools/qlocale.qdoc
index a31e089eca..43d2b3ade6 100644
--- a/src/corelib/tools/qlocale.qdoc
+++ b/src/corelib/tools/qlocale.qdoc
@@ -450,6 +450,7 @@
\value Cambodia
\value Cameroon
\value Canada
+ \value CanaryIslands
\value CapeVerde
\value CaymanIslands
\value CentralAfricanRepublic
@@ -457,6 +458,7 @@
\value Chile
\value China
\value ChristmasIsland
+ \value ClippertonIsland
\value CocosIslands
\value Colombia
\value Comoros
@@ -503,6 +505,7 @@
\value Guadeloupe
\value Guam
\value Guatemala
+ \value Guernsey
\value Guinea
\value GuineaBissau
\value Guyana
@@ -647,7 +650,7 @@
\value Vanuatu
\value VaticanCityState
\value Venezuela
- \value VietNam
+ \value Vietnam
\value BritishVirginIslands
\value UnitedStatesVirginIslands
\value WallisAndFutunaIslands
@@ -718,7 +721,7 @@
\value SinhalaScript
\value SyriacScript
\value YiScript
- \value VaiiScript
+ \value VaiScript
\omitvalue LastScript
\sa script(), scriptToString(), languageToString()
diff --git a/src/corelib/tools/qmap.cpp b/src/corelib/tools/qmap.cpp
index 7c33d60750..9f6b5f3f4f 100644
--- a/src/corelib/tools/qmap.cpp
+++ b/src/corelib/tools/qmap.cpp
@@ -811,7 +811,7 @@ void QMapDataBase::freeData(QMapDataBase *d)
/*! \fn QMap::iterator QMap::begin()
- Returns an \l{STL-style iterator} pointing to the first item in
+ Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first item in
the map.
\sa constBegin(), end()
@@ -825,7 +825,7 @@ void QMapDataBase::freeData(QMapDataBase *d)
/*! \fn QMap::const_iterator QMap::cbegin() const
\since 5.0
- Returns a const \l{STL-style iterator} pointing to the first item
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item
in the map.
\sa begin(), cend()
@@ -833,7 +833,7 @@ void QMapDataBase::freeData(QMapDataBase *d)
/*! \fn QMap::const_iterator QMap::constBegin() const
- Returns a const \l{STL-style iterator} pointing to the first item
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item
in the map.
\sa begin(), constEnd()
@@ -841,7 +841,7 @@ void QMapDataBase::freeData(QMapDataBase *d)
/*! \fn QMap::iterator QMap::end()
- Returns an \l{STL-style iterator} pointing to the imaginary item
+ Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item
after the last item in the map.
\sa begin(), constEnd()
@@ -855,7 +855,7 @@ void QMapDataBase::freeData(QMapDataBase *d)
/*! \fn QMap::const_iterator QMap::cend() const
\since 5.0
- Returns a const \l{STL-style iterator} pointing to the imaginary
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary
item after the last item in the map.
\sa cbegin(), end()
@@ -863,7 +863,7 @@ void QMapDataBase::freeData(QMapDataBase *d)
/*! \fn QMap::const_iterator QMap::constEnd() const
- Returns a const \l{STL-style iterator} pointing to the imaginary
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary
item after the last item in the map.
\sa constBegin(), end()
diff --git a/src/corelib/tools/qregexp.cpp b/src/corelib/tools/qregexp.cpp
index 4d73fc7478..e441d5320b 100644
--- a/src/corelib/tools/qregexp.cpp
+++ b/src/corelib/tools/qregexp.cpp
@@ -3920,7 +3920,7 @@ static void invalidateEngine(QRegExpPrivate *priv)
\value Wildcard This provides a simple pattern matching syntax
similar to that used by shells (command interpreters) for "file
- globbing". See \l{Wildcard Matching}.
+ globbing". See \l{QRegExp wildcard matching}.
\value WildcardUnix This is similar to Wildcard but with the
behavior of a Unix shell. The wildcard characters can be escaped
@@ -4150,7 +4150,7 @@ QRegExp::PatternSyntax QRegExp::patternSyntax() const
QRegExp::RegExp.
Setting \a syntax to QRegExp::Wildcard enables simple shell-like
- \l{wildcard matching}. For example, \b{r*.txt} matches the
+ \l{QRegExp wildcard matching}. For example, \b{r*.txt} matches the
string \c{readme.txt} in wildcard mode, but does not match
\c{readme}.
diff --git a/src/corelib/tools/qset.qdoc b/src/corelib/tools/qset.qdoc
index 6649d5ba69..dc07f482f9 100644
--- a/src/corelib/tools/qset.qdoc
+++ b/src/corelib/tools/qset.qdoc
@@ -330,7 +330,7 @@
/*! \fn QSet::const_iterator QSet::begin() const
- Returns a const \l{STL-style iterator} positioned at the first
+ Returns a const \l{STL-style iterators}{STL-style iterator} positioned at the first
item in the set.
\sa constBegin(), end()
@@ -340,14 +340,14 @@
\since 4.2
\overload
- Returns a non-const \l{STL-style iterator} positioned at the first
+ Returns a non-const \l{STL-style iterators}{STL-style iterator} positioned at the first
item in the set.
*/
/*! \fn QSet::const_iterator QSet::cbegin() const
\since 5.0
- Returns a const \l{STL-style iterator} positioned at the first
+ Returns a const \l{STL-style iterators}{STL-style iterator} positioned at the first
item in the set.
\sa begin(), cend()
@@ -355,7 +355,7 @@
/*! \fn QSet::const_iterator QSet::constBegin() const
- Returns a const \l{STL-style iterator} positioned at the first
+ Returns a const \l{STL-style iterators}{STL-style iterator} positioned at the first
item in the set.
\sa begin(), constEnd()
@@ -363,7 +363,7 @@
/*! \fn QSet::const_iterator QSet::end() const
- Returns a const \l{STL-style iterator} positioned at the imaginary
+ Returns a const \l{STL-style iterators}{STL-style iterator} positioned at the imaginary
item after the last item in the set.
\sa constEnd(), begin()
@@ -373,14 +373,14 @@
\since 4.2
\overload
- Returns a non-const \l{STL-style iterator} pointing to the
+ Returns a non-const \l{STL-style iterators}{STL-style iterator} pointing to the
imaginary item after the last item in the set.
*/
/*! \fn QSet::const_iterator QSet::cend() const
\since 5.0
- Returns a const \l{STL-style iterator} pointing to the imaginary
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary
item after the last item in the set.
\sa cbegin(), end()
@@ -388,7 +388,7 @@
/*! \fn QSet::const_iterator QSet::constEnd() const
- Returns a const \l{STL-style iterator} pointing to the imaginary
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary
item after the last item in the set.
\sa constBegin(), end()
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index 34a8cbe4c8..6db4fed0f8 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -840,7 +840,7 @@ const QString::Null QString::null = { };
/*! \fn QString::iterator QString::begin()
- Returns an \l{STL-style iterator} pointing to the first character in
+ Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first character in
the string.
\sa constBegin(), end()
@@ -854,7 +854,7 @@ const QString::Null QString::null = { };
/*! \fn QString::const_iterator QString::cbegin() const
\since 5.0
- Returns a const \l{STL-style iterator} pointing to the first character
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first character
in the string.
\sa begin(), cend()
@@ -862,7 +862,7 @@ const QString::Null QString::null = { };
/*! \fn QString::const_iterator QString::constBegin() const
- Returns a const \l{STL-style iterator} pointing to the first character
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first character
in the string.
\sa begin(), constEnd()
@@ -870,7 +870,7 @@ const QString::Null QString::null = { };
/*! \fn QString::iterator QString::end()
- Returns an \l{STL-style iterator} pointing to the imaginary character
+ Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary character
after the last character in the string.
\sa begin(), constEnd()
@@ -884,7 +884,7 @@ const QString::Null QString::null = { };
/*! \fn QString::const_iterator QString::cend() const
\since 5.0
- Returns a const \l{STL-style iterator} pointing to the imaginary
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary
item after the last item in the list.
\sa cbegin(), end()
@@ -892,7 +892,7 @@ const QString::Null QString::null = { };
/*! \fn QString::const_iterator QString::constEnd() const
- Returns a const \l{STL-style iterator} pointing to the imaginary
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary
item after the last item in the list.
\sa constBegin(), end()
diff --git a/src/corelib/tools/qunicodetools.cpp b/src/corelib/tools/qunicodetools.cpp
index 8bafb692ca..f83e2b5911 100644
--- a/src/corelib/tools/qunicodetools.cpp
+++ b/src/corelib/tools/qunicodetools.cpp
@@ -44,7 +44,8 @@
#include "qunicodetables_p.h"
#include "qvarlengtharray.h"
-#include "qharfbuzz_p.h"
+#include <private/harfbuzz-shaper.h>
+#include <private/qharfbuzz_p.h>
#define FLAG(x) (1 << (x))
diff --git a/src/corelib/tools/qvarlengtharray.qdoc b/src/corelib/tools/qvarlengtharray.qdoc
index 452bc0a598..0481373f2d 100644
--- a/src/corelib/tools/qvarlengtharray.qdoc
+++ b/src/corelib/tools/qvarlengtharray.qdoc
@@ -483,7 +483,7 @@
/*! \fn QVarLengthArray::iterator QVarLengthArray::begin()
\since 4.8
- Returns an \l{STL-style iterator} pointing to the first item in
+ Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first item in
the array.
\sa constBegin(), end()
@@ -497,7 +497,7 @@
/*! \fn QVarLengthArray::const_iterator QVarLengthArray::cbegin() const
\since 5.0
- Returns a const \l{STL-style iterator} pointing to the first item
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item
in the array.
\sa begin(), cend()
@@ -506,7 +506,7 @@
/*! \fn QVarLengthArray::const_iterator QVarLengthArray::constBegin() const
\since 4.8
- Returns a const \l{STL-style iterator} pointing to the first item
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item
in the array.
\sa begin(), constEnd()
@@ -515,7 +515,7 @@
/*! \fn QVarLengthArray::iterator QVarLengthArray::end()
\since 4.8
- Returns an \l{STL-style iterator} pointing to the imaginary item
+ Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item
after the last item in the array.
\sa begin(), constEnd()
@@ -530,7 +530,7 @@
/*! \fn QVarLengthArray::const_iterator QVarLengthArray::cend() const
\since 5.0
- Returns a const \l{STL-style iterator} pointing to the imaginary
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary
item after the last item in the array.
\sa cbegin(), end()
@@ -539,7 +539,7 @@
/*! \fn QVarLengthArray::const_iterator QVarLengthArray::constEnd() const
\since 4.8
- Returns a const \l{STL-style iterator} pointing to the imaginary
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary
item after the last item in the array.
\sa constBegin(), end()
diff --git a/src/corelib/tools/qvector.cpp b/src/corelib/tools/qvector.cpp
index f33bb930c2..ab8127159f 100644
--- a/src/corelib/tools/qvector.cpp
+++ b/src/corelib/tools/qvector.cpp
@@ -636,7 +636,7 @@
/*! \fn QVector::iterator QVector::begin()
- Returns an \l{STL-style iterator} pointing to the first item in
+ Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first item in
the vector.
\sa constBegin(), end()
@@ -650,7 +650,7 @@
/*! \fn QVector::const_iterator QVector::cbegin() const
\since 5.0
- Returns a const \l{STL-style iterator} pointing to the first item
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item
in the vector.
\sa begin(), cend()
@@ -658,7 +658,7 @@
/*! \fn QVector::const_iterator QVector::constBegin() const
- Returns a const \l{STL-style iterator} pointing to the first item
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item
in the vector.
\sa begin(), constEnd()
@@ -666,7 +666,7 @@
/*! \fn QVector::iterator QVector::end()
- Returns an \l{STL-style iterator} pointing to the imaginary item
+ Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item
after the last item in the vector.
\sa begin(), constEnd()
@@ -680,7 +680,7 @@
/*! \fn QVector::const_iterator QVector::cend() const
\since 5.0
- Returns a const \l{STL-style iterator} pointing to the imaginary
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary
item after the last item in the vector.
\sa cbegin(), end()
@@ -688,7 +688,7 @@
/*! \fn QVector::const_iterator QVector::constEnd() const
- Returns a const \l{STL-style iterator} pointing to the imaginary
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary
item after the last item in the vector.
\sa constBegin(), end()
diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri
index 88a59f5f77..564aff9ab9 100644
--- a/src/corelib/tools/tools.pri
+++ b/src/corelib/tools/tools.pri
@@ -133,7 +133,6 @@ pcre {
}
DEFINES += HB_EXPORT=Q_CORE_EXPORT
-INCLUDEPATH += ../3rdparty/harfbuzz/src
HEADERS += ../3rdparty/harfbuzz/src/harfbuzz.h
SOURCES += ../3rdparty/harfbuzz/src/harfbuzz-buffer.c \
../3rdparty/harfbuzz/src/harfbuzz-gdef.c \
@@ -146,8 +145,6 @@ SOURCES += ../3rdparty/harfbuzz/src/harfbuzz-buffer.c \
tools/qharfbuzz.cpp
HEADERS += tools/qharfbuzz_p.h
-private_headers.files += ../3rdparty/harfbuzz/src/*.h
-
INCLUDEPATH += ../3rdparty/md5 \
../3rdparty/md4
diff --git a/src/dbus/doc/images/qurl-ftppath.png b/src/dbus/doc/images/qurl-ftppath.png
new file mode 100644
index 0000000000..d88df4922b
--- /dev/null
+++ b/src/dbus/doc/images/qurl-ftppath.png
Binary files differ
diff --git a/src/dbus/doc/qtdbus.qdocconf b/src/dbus/doc/qtdbus.qdocconf
index 20b327f9fb..7a58dada63 100644
--- a/src/dbus/doc/qtdbus.qdocconf
+++ b/src/dbus/doc/qtdbus.qdocconf
@@ -14,9 +14,12 @@ exampledirs += ../../../examples/dbus \
headerdirs += ..
imagedirs += images
-sourcedirs += ..
+sourcedirs += .. \
+ ../../../examples/dbus/doc/src
excludedirs += ../../../examples/widgets/doc
+examplesinstallpath = dbus
+
depends += qtcore
# The following parameters are for creating a qhp file, the qhelpgenerator
@@ -33,15 +36,16 @@ qhp.qtdbus.file = qtdbus.qhp
# Namespace for the output file. This namespace is used to distinguish between
# different documentation files in Creator/Assistant.
-qhp.qtdbus.namespace = org.qt-project.qtdbus.500
+qhp.qtdbus.namespace = org.qt-project.qtdbus.501
# Title for the package, will be the main title for the package in
# Assistant/Creator.
-qhp.qtdbus.indexTitle = Qt Script Documentation
+qhp.qtdbus.indexTitle = Qt D-Bus
# Only update the name of the project for the next variables.
qhp.qtdbus.virtualFolder = qtdbus
qhp.qtdbus.subprojects = classes
-qhp.qtdbus.subprojects.classes.title = Qt D-Bus C++ Classes
+qhp.qtdbus.subprojects.classes.title = C++ Classes
+qhp.qtdbus.subprojects.classes.indexTitle = Qt D-Bus C++ Classes
qhp.qtdbus.subprojects.classes.selectors = class fake:headerfile
qhp.qtdbus.subprojects.classes.sortPages = true
diff --git a/src/dbus/qdbusxmlparser.cpp b/src/dbus/qdbusxmlparser.cpp
index 315b4a2e24..c2c1b8daff 100644
--- a/src/dbus/qdbusxmlparser.cpp
+++ b/src/dbus/qdbusxmlparser.cpp
@@ -59,7 +59,8 @@
QT_BEGIN_NAMESPACE
-static bool parseArg(const QXmlStreamAttributes &attributes, QDBusIntrospection::Argument &argData)
+static bool parseArg(const QXmlStreamAttributes &attributes, QDBusIntrospection::Argument &argData,
+ QDBusIntrospection::Interface *ifaceData)
{
const QString argType = attributes.value(QLatin1String("type")).toString();
@@ -72,10 +73,21 @@ static bool parseArg(const QXmlStreamAttributes &attributes, QDBusIntrospection:
argData.name = attributes.value(QLatin1String("name")).toString();
argData.type = argType;
+ ifaceData->introspection += QLatin1String(" <arg");
+ if (attributes.hasAttribute(QLatin1String("direction"))) {
+ const QString direction = attributes.value(QLatin1String("direction")).toString();
+ ifaceData->introspection += QLatin1String(" direction=\"") + direction + QLatin1String("\"");
+ }
+ ifaceData->introspection += QLatin1String(" type=\"") + argData.type + QLatin1String("\"");
+ if (!argData.name.isEmpty())
+ ifaceData->introspection += QLatin1String(" name=\"") + argData.name + QLatin1String("\"");
+ ifaceData->introspection += QLatin1String("/>\n");
+
return ok;
}
-static bool parseAnnotation(const QXmlStreamReader &xml, QDBusIntrospection::Annotations &annotations)
+static bool parseAnnotation(const QXmlStreamReader &xml, QDBusIntrospection::Annotations &annotations,
+ QDBusIntrospection::Interface *ifaceData, bool interfaceAnnotation = false)
{
Q_ASSERT(xml.isStartElement() && xml.name() == QLatin1String("annotation"));
@@ -87,12 +99,16 @@ static bool parseAnnotation(const QXmlStreamReader &xml, QDBusIntrospection::Ann
qPrintable(name));
return false;
}
- annotations.insert(name, attributes.value(QLatin1String("value")).toString());
+ const QString value = attributes.value(QLatin1String("value")).toString();
+ annotations.insert(name, value);
+ if (!interfaceAnnotation)
+ ifaceData->introspection += QLatin1String(" ");
+ ifaceData->introspection += QLatin1String(" <annotation value=\"") + value + QLatin1String("\" name=\"") + name + QLatin1String("\"/>\n");
return true;
}
static bool parseProperty(QXmlStreamReader &xml, QDBusIntrospection::Property &propertyData,
- const QString &ifaceName)
+ QDBusIntrospection::Interface *ifaceData)
{
Q_ASSERT(xml.isStartElement() && xml.name() == QLatin1String("property"));
@@ -100,7 +116,7 @@ static bool parseProperty(QXmlStreamReader &xml, QDBusIntrospection::Property &p
const QString propertyName = attributes.value(QLatin1String("name")).toString();
if (!QDBusUtil::isValidMemberName(propertyName)) {
qDBusParserError("Invalid D-BUS member name '%s' found in interface '%s' while parsing introspection",
- qPrintable(propertyName), qPrintable(ifaceName));
+ qPrintable(propertyName), qPrintable(ifaceData->name));
xml.skipCurrentElement();
return false;
}
@@ -112,7 +128,7 @@ static bool parseProperty(QXmlStreamReader &xml, QDBusIntrospection::Property &p
if (!QDBusUtil::isValidSingleSignature(propertyData.type)) {
// cannot be!
qDBusParserError("Invalid D-BUS type signature '%s' found in property '%s.%s' while parsing introspection",
- qPrintable(propertyData.type), qPrintable(ifaceName),
+ qPrintable(propertyData.type), qPrintable(ifaceData->name),
qPrintable(propertyName));
}
@@ -125,18 +141,28 @@ static bool parseProperty(QXmlStreamReader &xml, QDBusIntrospection::Property &p
propertyData.access = QDBusIntrospection::Property::ReadWrite;
else {
qDBusParserError("Invalid D-BUS property access '%s' found in property '%s.%s' while parsing introspection",
- qPrintable(access), qPrintable(ifaceName),
+ qPrintable(access), qPrintable(ifaceData->name),
qPrintable(propertyName));
return false; // invalid one!
}
- while (xml.readNextStartElement()) {
- if (xml.name() == QLatin1String("annotation")) {
- parseAnnotation(xml, propertyData.annotations);
- } else if (xml.prefix().isEmpty()) {
- qDBusParserError() << "Unknown element" << xml.name() << "while checking for annotations";
- }
- xml.skipCurrentElement();
+ ifaceData->introspection += QLatin1String(" <property access=\"") + access + QLatin1String("\" type=\"") + propertyData.type + QLatin1String("\" name=\"") + propertyName + QLatin1String("\"");
+
+ if (!xml.readNextStartElement()) {
+ ifaceData->introspection += QLatin1String("/>\n");
+ } else {
+ ifaceData->introspection += QLatin1String(">\n");
+
+ do {
+ if (xml.name() == QLatin1String("annotation")) {
+ parseAnnotation(xml, propertyData.annotations, ifaceData);
+ } else if (xml.prefix().isEmpty()) {
+ qDBusParserError() << "Unknown element" << xml.name() << "while checking for annotations";
+ }
+ xml.skipCurrentElement();
+ } while (xml.readNextStartElement());
+
+ ifaceData->introspection += QLatin1String(" </property>\n");
}
if (!xml.isEndElement() || xml.name() != QLatin1String("property")) {
@@ -148,7 +174,7 @@ static bool parseProperty(QXmlStreamReader &xml, QDBusIntrospection::Property &p
}
static bool parseMethod(QXmlStreamReader &xml, QDBusIntrospection::Method &methodData,
- const QString &ifaceName)
+ QDBusIntrospection::Interface *ifaceData)
{
Q_ASSERT(xml.isStartElement() && xml.name() == QLatin1String("method"));
@@ -156,35 +182,44 @@ static bool parseMethod(QXmlStreamReader &xml, QDBusIntrospection::Method &metho
const QString methodName = attributes.value(QLatin1String("name")).toString();
if (!QDBusUtil::isValidMemberName(methodName)) {
qDBusParserError("Invalid D-BUS member name '%s' found in interface '%s' while parsing introspection",
- qPrintable(methodName), qPrintable(ifaceName));
+ qPrintable(methodName), qPrintable(ifaceData->name));
return false;
}
methodData.name = methodName;
+ ifaceData->introspection += QLatin1String(" <method name=\"") + methodName + QLatin1String("\"");
QDBusIntrospection::Arguments outArguments;
QDBusIntrospection::Arguments inArguments;
QDBusIntrospection::Annotations annotations;
- while (xml.readNextStartElement()) {
- if (xml.name() == QLatin1String("annotation")) {
- parseAnnotation(xml, annotations);
- } else if (xml.name() == QLatin1String("arg")) {
- const QXmlStreamAttributes attributes = xml.attributes();
- const QString direction = attributes.value(QLatin1String("direction")).toString();
- QDBusIntrospection::Argument argument;
- if (!attributes.hasAttribute(QLatin1String("direction"))
- || direction == QLatin1String("in")) {
- parseArg(attributes, argument);
- inArguments << argument;
- } else if (direction == QLatin1String("out")) {
- parseArg(attributes, argument);
- outArguments << argument;
+ if (!xml.readNextStartElement()) {
+ ifaceData->introspection += QLatin1String("/>\n");
+ } else {
+ ifaceData->introspection += QLatin1String(">\n");
+
+ do {
+ if (xml.name() == QLatin1String("annotation")) {
+ parseAnnotation(xml, annotations, ifaceData);
+ } else if (xml.name() == QLatin1String("arg")) {
+ const QXmlStreamAttributes attributes = xml.attributes();
+ const QString direction = attributes.value(QLatin1String("direction")).toString();
+ QDBusIntrospection::Argument argument;
+ if (!attributes.hasAttribute(QLatin1String("direction"))
+ || direction == QLatin1String("in")) {
+ parseArg(attributes, argument, ifaceData);
+ inArguments << argument;
+ } else if (direction == QLatin1String("out")) {
+ parseArg(attributes, argument, ifaceData);
+ outArguments << argument;
+ }
+ } else if (xml.prefix().isEmpty()) {
+ qDBusParserError() << "Unknown element" << xml.name() << "while checking for method arguments";
}
- } else if (xml.prefix().isEmpty()) {
- qDBusParserError() << "Unknown element" << xml.name() << "while checking for method arguments";
- }
- xml.skipCurrentElement();
+ xml.skipCurrentElement();
+ } while (xml.readNextStartElement());
+
+ ifaceData->introspection += QLatin1String(" </method>\n");
}
methodData.inputArgs = inArguments;
@@ -196,7 +231,7 @@ static bool parseMethod(QXmlStreamReader &xml, QDBusIntrospection::Method &metho
static bool parseSignal(QXmlStreamReader &xml, QDBusIntrospection::Signal &signalData,
- const QString &ifaceName)
+ QDBusIntrospection::Interface *ifaceData)
{
Q_ASSERT(xml.isStartElement() && xml.name() == QLatin1String("signal"));
@@ -205,31 +240,39 @@ static bool parseSignal(QXmlStreamReader &xml, QDBusIntrospection::Signal &signa
if (!QDBusUtil::isValidMemberName(signalName)) {
qDBusParserError("Invalid D-BUS member name '%s' found in interface '%s' while parsing introspection",
- qPrintable(signalName), qPrintable(ifaceName));
+ qPrintable(signalName), qPrintable(ifaceData->name));
return false;
}
signalData.name = signalName;
-
+ ifaceData->introspection += QLatin1String(" <signal name=\"") + signalName + QLatin1String("\"");
QDBusIntrospection::Arguments arguments;
QDBusIntrospection::Annotations annotations;
- while (xml.readNextStartElement()) {
- if (xml.name() == QLatin1String("annotation")) {
- parseAnnotation(xml, annotations);
- } else if (xml.name() == QLatin1String("arg")) {
- const QXmlStreamAttributes attributes = xml.attributes();
- QDBusIntrospection::Argument argument;
- if (!attributes.hasAttribute(QLatin1String("direction")) ||
- attributes.value(QLatin1String("direction")) == QLatin1String("out")) {
- parseArg(attributes, argument);
- arguments << argument;
+ if (!xml.readNextStartElement()) {
+ ifaceData->introspection += QLatin1String("/>\n");
+ } else {
+ ifaceData->introspection += QLatin1String(">\n");
+
+ do {
+ if (xml.name() == QLatin1String("annotation")) {
+ parseAnnotation(xml, annotations, ifaceData);
+ } else if (xml.name() == QLatin1String("arg")) {
+ const QXmlStreamAttributes attributes = xml.attributes();
+ QDBusIntrospection::Argument argument;
+ if (!attributes.hasAttribute(QLatin1String("direction")) ||
+ attributes.value(QLatin1String("direction")) == QLatin1String("out")) {
+ parseArg(attributes, argument, ifaceData);
+ arguments << argument;
+ }
+ } else {
+ qDBusParserError() << "Unknown element" << xml.name() << "while checking for signal arguments";
}
- } else {
- qDBusParserError() << "Unknown element" << xml.name() << "while checking for signal arguments";
- }
- xml.skipCurrentElement();
+ xml.skipCurrentElement();
+ } while (xml.readNextStartElement());
+
+ ifaceData->introspection += QLatin1String(" </signal>\n");
}
signalData.outputArgs = arguments;
@@ -252,22 +295,23 @@ static void readInterface(QXmlStreamReader &xml, QDBusIntrospection::Object *obj
QDBusIntrospection::Interface *ifaceData = new QDBusIntrospection::Interface;
ifaceData->name = ifaceName;
+ ifaceData->introspection += QLatin1String(" <interface name=\"") + ifaceName + QLatin1String("\">\n");
while (xml.readNextStartElement()) {
if (xml.name() == QLatin1String("method")) {
QDBusIntrospection::Method methodData;
- if (parseMethod(xml, methodData, ifaceName))
+ if (parseMethod(xml, methodData, ifaceData))
ifaceData->methods.insert(methodData.name, methodData);
} else if (xml.name() == QLatin1String("signal")) {
QDBusIntrospection::Signal signalData;
- if (parseSignal(xml, signalData, ifaceName))
+ if (parseSignal(xml, signalData, ifaceData))
ifaceData->signals_.insert(signalData.name, signalData);
} else if (xml.name() == QLatin1String("property")) {
QDBusIntrospection::Property propertyData;
- if (parseProperty(xml, propertyData, ifaceName))
+ if (parseProperty(xml, propertyData, ifaceData))
ifaceData->properties.insert(propertyData.name, propertyData);
} else if (xml.name() == QLatin1String("annotation")) {
- parseAnnotation(xml, ifaceData->annotations);
+ parseAnnotation(xml, ifaceData->annotations, ifaceData, true);
xml.skipCurrentElement(); // skip over annotation object
} else {
if (xml.prefix().isEmpty()) {
@@ -277,6 +321,8 @@ static void readInterface(QXmlStreamReader &xml, QDBusIntrospection::Object *obj
}
}
+ ifaceData->introspection += QLatin1String(" </interface>");
+
interfaces->insert(ifaceName, QSharedDataPointer<QDBusIntrospection::Interface>(ifaceData));
if (!xml.isEndElement() || xml.name() != QLatin1String("interface")) {
diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp
index 28a3afbbf0..a32f771bd0 100644
--- a/src/gui/accessible/qaccessible.cpp
+++ b/src/gui/accessible/qaccessible.cpp
@@ -56,6 +56,8 @@
QT_BEGIN_NAMESPACE
+#ifndef QT_NO_ACCESSIBILITY
+
/*!
\class QAccessible
\brief The QAccessible class provides enums and static functions
@@ -440,23 +442,19 @@ QAccessible::RootObjectHandler QAccessible::rootObjectHandler = 0;
static bool accessibility_active = false;
static bool cleanupAdded = false;
-#ifndef QT_NO_ACCESSIBILITY
static QPlatformAccessibility *platformAccessibility()
{
QPlatformIntegration *pfIntegration = QGuiApplicationPrivate::platformIntegration();
return pfIntegration ? pfIntegration->accessibility() : 0;
}
-#endif
/*!
\internal
*/
void QAccessible::cleanup()
{
-#ifndef QT_NO_ACCESSIBILITY
if (QPlatformAccessibility *pfAccessibility = platformAccessibility())
pfAccessibility->cleanup();
-#endif
}
static void qAccessibleCleanup()
@@ -617,10 +615,8 @@ QAccessibleInterface *QAccessible::queryAccessibleInterface(QObject *object)
mo = mo->superClass();
}
-#ifndef QT_NO_ACCESSIBILITY
if (object == qApp)
return new QAccessibleApplication;
-#endif
return 0;
}
@@ -660,10 +656,8 @@ void QAccessible::setRootObject(QObject *object)
return;
}
-#ifndef QT_NO_ACCESSIBILITY
if (QPlatformAccessibility *pfAccessibility = platformAccessibility())
pfAccessibility->setRootObject(object);
-#endif
}
/*!
@@ -695,10 +689,8 @@ void QAccessible::updateAccessibility(QAccessibleEvent *event)
if (!isActive())
return;
-#ifndef QT_NO_ACCESSIBILITY
if (QPlatformAccessibility *pfAccessibility = platformAccessibility())
pfAccessibility->notifyAccessibilityUpdate(event);
-#endif
}
#if QT_DEPRECATED_SINCE(5, 0)
@@ -1552,5 +1544,7 @@ QDebug operator<<(QDebug d, const QAccessibleEvent &ev)
#endif
+#endif // QT_NO_ACCESSIBILITY
+
QT_END_NAMESPACE
diff --git a/src/gui/accessible/qaccessible.h b/src/gui/accessible/qaccessible.h
index 5f61634ba2..5bcf9e7d0d 100644
--- a/src/gui/accessible/qaccessible.h
+++ b/src/gui/accessible/qaccessible.h
@@ -57,6 +57,7 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+#ifndef QT_NO_ACCESSIBILITY
class QAccessibleInterface;
class QAccessibleEvent;
@@ -676,6 +677,8 @@ inline void QAccessible::updateAccessibility(QObject *object, int child, Event r
}
#endif
+#endif // QT_NO_ACCESSIBILITY
+
QT_END_NAMESPACE
QT_END_HEADER
diff --git a/src/gui/accessible/qaccessible2.cpp b/src/gui/accessible/qaccessible2.cpp
index 7f871f9c5a..f21c74e74f 100644
--- a/src/gui/accessible/qaccessible2.cpp
+++ b/src/gui/accessible/qaccessible2.cpp
@@ -439,6 +439,19 @@ QString QAccessibleTextInterface::textAtOffset(int offset, QAccessible2::Boundar
*/
/*!
+ \fn QVariant QAccessibleValueInterface::minimumStepSize() const
+
+ Returns the minimum step size for the accessible.
+ This is the smalles increment that makes sense when changing the value.
+ When programatically changing the value it should always be a multiple
+ of the minimum step size.
+
+ Some tools use this value even when the setCurrentValue does not
+ perform any action. Progress bars for example are read-only but
+ should return their range divided by 100.
+*/
+
+/*!
\class QAccessibleImageInterface
\inmodule QtGui
\ingroup accessibility
diff --git a/src/gui/accessible/qaccessible2.h b/src/gui/accessible/qaccessible2.h
index 6006e7846c..04c9091a79 100644
--- a/src/gui/accessible/qaccessible2.h
+++ b/src/gui/accessible/qaccessible2.h
@@ -117,6 +117,7 @@ public:
virtual void setCurrentValue(const QVariant &value) = 0;
virtual QVariant maximumValue() const = 0;
virtual QVariant minimumValue() const = 0;
+ virtual QVariant minimumStepSize() const = 0;
};
class Q_GUI_EXPORT QAccessibleTableCellInterface
diff --git a/src/gui/accessible/qaccessibleobject.cpp b/src/gui/accessible/qaccessibleobject.cpp
index bc108980cf..2bd5a00afb 100644
--- a/src/gui/accessible/qaccessibleobject.cpp
+++ b/src/gui/accessible/qaccessibleobject.cpp
@@ -165,6 +165,8 @@ QAccessibleInterface *QAccessibleObject::childAt(int x, int y) const
Q_ASSERT(childIface);
if (childIface->rect().contains(x,y)) {
return childIface;
+ } else {
+ delete childIface;
}
}
return 0;
diff --git a/src/gui/doc/qtgui.qdocconf b/src/gui/doc/qtgui.qdocconf
index cf324ad8ac..a46aa9b3d1 100644
--- a/src/gui/doc/qtgui.qdocconf
+++ b/src/gui/doc/qtgui.qdocconf
@@ -3,25 +3,25 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
project = QtGui
description = Qt GUI Reference Documentation
url = http://qt-project.org/doc/qtgui
-version = 5.0.0
+version = 5.0.1
examplesinstallpath = gui
qhp.projects = QtGui
qhp.QtGui.file = qtgui.qhp
-qhp.QtGui.namespace = org.qt-project.qtgui.500
+qhp.QtGui.namespace = org.qt-project.qtgui.501
qhp.QtGui.virtualFolder = qtgui
qhp.QtGui.indexTitle = Qt GUI
qhp.QtGui.indexRoot =
-qhp.QtGui.filterAttributes = qtgui 5.0.0 qtrefdoc
-qhp.QtGui.customFilters.Qt.name = Qtgui 5.0.0
-qhp.QtGui.customFilters.Qt.filterAttributes = qtgui 5.0.0
+qhp.QtGui.filterAttributes = qtgui 5.0.1 qtrefdoc
+qhp.QtGui.customFilters.Qt.name = Qtgui 5.0.1
+qhp.QtGui.customFilters.Qt.filterAttributes = qtgui 5.0.1
qhp.QtGui.subprojects = classes
qhp.QtGui.subprojects.classes.title = C++ Classes
-qhp.QtGui.subprojects.classes.indexTitle = Qt GUI C++ Classes
+qhp.QtGui.subprojects.classes.indexTitle = Qt GUI C++ API
qhp.QtGui.subprojects.classes.selectors = class fake:headerfile
qhp.QtGui.subprojects.classes.sortPages = true
@@ -40,9 +40,10 @@ depends += \
headerdirs += ..
sourcedirs += .. \
- ../../../examples/gui/doc
+ ../../../examples/gui/doc/src
exampledirs += ../../../examples/gui \
snippets
-imagedirs += images
+imagedirs += images \
+ ../../../examples/gui/doc/images
diff --git a/src/gui/doc/src/dnd.qdoc b/src/gui/doc/src/dnd.qdoc
index a4eb77469b..ad48d7b5c7 100644
--- a/src/gui/doc/src/dnd.qdoc
+++ b/src/gui/doc/src/dnd.qdoc
@@ -41,9 +41,11 @@
\tableofcontents
This document describes the basic drag and drop mechanism and
- 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
+ outlines the approach used to enable it in custom controls. Drag
+ and drop operations are also supported by many of Qt's controls,
+ such as the item views and graphics view framework, as well as
+ editing controls for Qt Widgets and Qt Quick. More information
+ about item views and graphics view is available in
\l{Using drag and drop with item views} and \l{Graphics View
Framework}.
@@ -56,22 +58,31 @@
\section1 Configuration
- The QApplication object provides some properties that are related
+ The QStyleHints object provides some properties that are related
to drag and drop operations:
\list
- \li \l{QApplication::startDragTime} describes the amount of time in
+ \li \l{QStyleHints::startDragTime()} describes the amount of time in
milliseconds that the user must hold down a mouse button over an
object before a drag will begin.
- \li \l{QApplication::startDragDistance} indicates how far the user has to
+ \li \l{QStyleHints::startDragDistance()} indicates how far the user has to
move the mouse while holding down a mouse button before the movement
- will be interpreted as dragging. Use of high values for this quantity
- prevents accidental dragging when the user only meant to click on an
- object.
+ will be interpreted as dragging.
+ \li \l{QStyleHints::startDragVelocity()} indicates how fast (in pixels/second)
+ the user has to move the mouse to start a drag. A value of \c 0 means
+ that there is no such limit.
\endlist
- These quantities provide sensible default values for you to use if you
- provide drag and drop support in your widgets.
+ These quantities provide sensible default values that are compliant with
+ the underlying windowing system for you to use if you
+ provide drag and drop support in your controls.
+
+ \section1 Drag and Drop in Qt Quick
+
+ The rest of the document focuses mainly on how to implement drag and drop
+ in C++. For using drag and drop inside a Qt Quick scene, please read the
+ documentation for the Qt Quick \l{Drag}, \l{DragEvent} and \l{DropArea} items.
+ There is also an example \l{quick/draganddrop}{available}.
\section1 Dragging
@@ -335,7 +346,7 @@
the clipboard. To access this, you need to obtain a QClipboard object
from the QApplication object:
- \snippet widgets/charactermap/mainwindow.cpp 3
+ \snippet ../widgets/widgets/charactermap/mainwindow.cpp 3
The QMimeData class is used to represent data that is transferred to and
from the clipboard. To put data on the clipboard, you can use the
@@ -350,7 +361,7 @@
For example, we can copy the contents of a QLineEdit to the clipboard
with the following code:
- \snippet widgets/charactermap/mainwindow.cpp 11
+ \snippet ../widgets/widgets/charactermap/mainwindow.cpp 11
Data with different MIME types can also be put on the clipboard.
Construct a QMimeData object and set data with setData() function in
diff --git a/src/gui/doc/src/richtext.qdoc b/src/gui/doc/src/richtext.qdoc
index b4ba4ba6c4..448c42631b 100644
--- a/src/gui/doc/src/richtext.qdoc
+++ b/src/gui/doc/src/richtext.qdoc
@@ -851,7 +851,7 @@
\contentspage richtext.html Contents
\previouspage Common Rich Text Editing Tasks
- Qt's text widgets are able to display rich text, specified using a subset of \l{HTML 4}
+ Qt's text widgets are able to display rich text, specified using a subset of \l {http://www.w3.org/TR/html401/}{HTML 4}
markup. Widgets that use QTextDocument, such as QLabel and QTextEdit, are able to display
rich text specified in this way.
@@ -863,7 +863,7 @@
setting a label's \l{QLabel::}{text} property with the string \c{"<b>Hello</b> <i>Qt!</i>"}
will result in the label displaying text like this: \b{Hello} \e{Qt!}
- When HTML markup is used for text, Qt follows the rules defined by the \l{HTML 4}
+ When HTML markup is used for text, Qt follows the rules defined by the \l{http://www.w3.org/TR/html401/}{HTML 4}
specification. This includes default properties for text layout, such as the
direction of the text flow (left-to-right) which can be changed by applying the
\l{#Block Attributes}{\c dir} attribute to blocks of text.
diff --git a/src/gui/gui.pro b/src/gui/gui.pro
index 301d704e2e..058cfe92ec 100644
--- a/src/gui/gui.pro
+++ b/src/gui/gui.pro
@@ -1,6 +1,8 @@
TARGET = QtGui
QT = core-private
-MODULE_CONFIG = opengl
+
+MODULE_CONFIG = needs_qpa_plugin
+contains(QT_CONFIG, opengl.*):MODULE_CONFIG += opengl
DEFINES += QT_NO_USING_NAMESPACE
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index c40ca1545a..dbc33719e2 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -4213,6 +4213,7 @@ QImage QImage::mirrored(bool horizontal, bool vertical) const
result.d->colortable = d->colortable;
result.d->has_alpha_clut = d->has_alpha_clut;
+ result.d->devicePixelRatio = d->devicePixelRatio;
if (depth() == 1)
w = (w+7)/8;
diff --git a/src/gui/image/qimageiohandler.cpp b/src/gui/image/qimageiohandler.cpp
index 8ec2dea431..36757a6f34 100644
--- a/src/gui/image/qimageiohandler.cpp
+++ b/src/gui/image/qimageiohandler.cpp
@@ -514,6 +514,8 @@ int QImageIOHandler::nextImageDelay() const
return 0;
}
+#ifndef QT_NO_IMAGEFORMATPLUGIN
+
/*!
Constructs an image plugin with the given \a parent. This is
invoked automatically by the moc generated code that exports the plugin.
@@ -554,4 +556,6 @@ QImageIOPlugin::~QImageIOPlugin()
\sa keys()
*/
+#endif // QT_NO_IMAGEFORMATPLUGIN
+
QT_END_NAMESPACE
diff --git a/src/gui/image/qimageiohandler.h b/src/gui/image/qimageiohandler.h
index 62f7ba1163..1f94099478 100644
--- a/src/gui/image/qimageiohandler.h
+++ b/src/gui/image/qimageiohandler.h
@@ -114,6 +114,8 @@ private:
Q_DISABLE_COPY(QImageIOHandler)
};
+#ifndef QT_NO_IMAGEFORMATPLUGIN
+
#define QImageIOHandlerFactoryInterface_iid "org.qt-project.Qt.QImageIOHandlerFactoryInterface"
class Q_GUI_EXPORT QImageIOPlugin : public QObject
@@ -136,6 +138,8 @@ public:
Q_DECLARE_OPERATORS_FOR_FLAGS(QImageIOPlugin::Capabilities)
+#endif // QT_NO_IMAGEFORMATPLUGIN
+
QT_END_NAMESPACE
QT_END_HEADER
diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp
index a27a7710f6..7e6d937c9f 100644
--- a/src/gui/image/qimagereader.cpp
+++ b/src/gui/image/qimagereader.cpp
@@ -151,7 +151,7 @@
QT_BEGIN_NAMESPACE
-#ifndef QT_NO_LIBRARY
+#ifndef QT_NO_IMAGEFORMATPLUGIN
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QImageIOHandlerFactoryInterface_iid, QLatin1String("/imageformats")))
#endif
@@ -223,23 +223,23 @@ static QImageIOHandler *createReadHandlerHelper(QIODevice *device,
QByteArray form = format.toLower();
QImageIOHandler *handler = 0;
+ QByteArray suffix;
-#ifndef QT_NO_LIBRARY
+#ifndef QT_NO_IMAGEFORMATPLUGIN
typedef QMultiMap<int, QString> PluginKeyMap;
// check if we have plugins that support the image format
QFactoryLoader *l = loader();
const PluginKeyMap keyMap = l->keyMap();
-#endif
- QByteArray suffix;
#ifdef QIMAGEREADER_DEBUG
qDebug() << "QImageReader::createReadHandler( device =" << (void *)device << ", format =" << format << "),"
<< keyMap.values().size() << "plugins available: " << keyMap.values();
#endif
-#ifndef QT_NO_LIBRARY
int suffixPluginIndex = -1;
+#endif // QT_NO_IMAGEFORMATPLUGIN
+
if (device && format.isEmpty() && autoDetectImageFormat && !ignoresFormatAndExtension) {
// if there's no format, see if \a device is a file, and if so, find
// the file suffix and find support for that format among our plugins.
@@ -249,6 +249,7 @@ static QImageIOHandler *createReadHandlerHelper(QIODevice *device,
qDebug() << "QImageReader::createReadHandler: device is a file:" << file->fileName();
#endif
if (!(suffix = QFileInfo(file->fileName()).suffix().toLower().toLatin1()).isEmpty()) {
+#ifndef QT_NO_IMAGEFORMATPLUGIN
const int index = keyMap.key(QString::fromLatin1(suffix), -1);
if (index != -1) {
#ifdef QIMAGEREADER_DEBUG
@@ -257,17 +258,17 @@ static QImageIOHandler *createReadHandlerHelper(QIODevice *device,
#endif
suffixPluginIndex = index;
}
+#endif // QT_NO_IMAGEFORMATPLUGIN
}
}
}
-#endif // QT_NO_LIBRARY
QByteArray testFormat = !form.isEmpty() ? form : suffix;
if (ignoresFormatAndExtension)
testFormat = QByteArray();
-#ifndef QT_NO_LIBRARY
+#ifndef QT_NO_IMAGEFORMATPLUGIN
if (suffixPluginIndex != -1) {
// check if the plugin that claims support for this format can load
// from this device with this format.
@@ -322,7 +323,7 @@ static QImageIOHandler *createReadHandlerHelper(QIODevice *device,
device->seek(pos);
}
-#endif // QT_NO_LIBRARY
+#endif // QT_NO_IMAGEFORMATPLUGIN
// if we don't have a handler yet, check if we have built-in support for
// the format
@@ -369,7 +370,7 @@ static QImageIOHandler *createReadHandlerHelper(QIODevice *device,
#endif
}
-#ifndef QT_NO_LIBRARY
+#ifndef QT_NO_IMAGEFORMATPLUGIN
if (!handler && (autoDetectImageFormat || ignoresFormatAndExtension)) {
// check if any of our plugins recognize the file from its contents.
const qint64 pos = device ? device->pos() : 0;
@@ -389,7 +390,7 @@ static QImageIOHandler *createReadHandlerHelper(QIODevice *device,
if (device && !device->isSequential())
device->seek(pos);
}
-#endif // QT_NO_LIBRARY
+#endif // QT_NO_IMAGEFORMATPLUGIN
if (!handler && (autoDetectImageFormat || ignoresFormatAndExtension)) {
// check if any of our built-in handlers recognize the file from its
@@ -1235,7 +1236,7 @@ bool QImageReader::read(QImage *image)
}
// successful read; check for "@2x" file name suffix and set device pixel ratio.
- if (QFileInfo(fileName()).baseName().endsWith("@2x")) {
+ if (QFileInfo(fileName()).baseName().endsWith(QLatin1String("@2x"))) {
image->setDevicePixelRatio(2.0);
}
@@ -1429,7 +1430,7 @@ QByteArray QImageReader::imageFormat(QIODevice *device)
return format;
}
-#ifndef QT_NO_LIBRARY
+#ifndef QT_NO_IMAGEFORMATPLUGIN
void supportedImageHandlerFormats(QFactoryLoader *loader,
QImageIOPlugin::Capability cap,
QSet<QByteArray> *result);
@@ -1471,9 +1472,9 @@ QList<QByteArray> QImageReader::supportedImageFormats()
for (int i = 0; i < _qt_NumFormats; ++i)
formats << _qt_BuiltInFormats[i].extension;
-#ifndef QT_NO_LIBRARY
+#ifndef QT_NO_IMAGEFORMATPLUGIN
supportedImageHandlerFormats(loader(), QImageIOPlugin::CanRead, &formats);
-#endif // QT_NO_LIBRARY
+#endif // QT_NO_IMAGEFORMATPLUGIN
QList<QByteArray> sortedFormats;
for (QSet<QByteArray>::ConstIterator it = formats.constBegin(); it != formats.constEnd(); ++it)
diff --git a/src/gui/image/qimagewriter.cpp b/src/gui/image/qimagewriter.cpp
index 8e5fd5faec..6085a0e465 100644
--- a/src/gui/image/qimagewriter.cpp
+++ b/src/gui/image/qimagewriter.cpp
@@ -124,7 +124,7 @@
QT_BEGIN_NAMESPACE
-#ifndef QT_NO_LIBRARY
+#ifndef QT_NO_IMAGEFORMATPLUGIN
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QImageIOHandlerFactoryInterface_iid, QLatin1String("/imageformats")))
#endif
@@ -136,7 +136,7 @@ static QImageIOHandler *createWriteHandlerHelper(QIODevice *device,
QByteArray suffix;
QImageIOHandler *handler = 0;
-#ifndef QT_NO_LIBRARY
+#ifndef QT_NO_IMAGEFORMATPLUGIN
typedef QMultiMap<int, QString> PluginKeyMap;
// check if any plugins can write the image
@@ -151,7 +151,7 @@ static QImageIOHandler *createWriteHandlerHelper(QIODevice *device,
// this allows plugins to override our built-in handlers.
if (QFile *file = qobject_cast<QFile *>(device)) {
if (!(suffix = QFileInfo(file->fileName()).suffix().toLower().toLatin1()).isEmpty()) {
-#ifndef QT_NO_LIBRARY
+#ifndef QT_NO_IMAGEFORMATPLUGIN
const int index = keyMap.key(QString::fromLatin1(suffix), -1);
if (index != -1)
suffixPluginIndex = index;
@@ -162,7 +162,7 @@ static QImageIOHandler *createWriteHandlerHelper(QIODevice *device,
QByteArray testFormat = !form.isEmpty() ? form : suffix;
-#ifndef QT_NO_LIBRARY
+#ifndef QT_NO_IMAGEFORMATPLUGIN
if (suffixPluginIndex != -1) {
// when format is missing, check if we can find a plugin for the
// suffix.
@@ -173,7 +173,7 @@ static QImageIOHandler *createWriteHandlerHelper(QIODevice *device,
handler = plugin->create(device, suffix);
}
}
-#endif // QT_NO_LIBRARY
+#endif // QT_NO_IMAGEFORMATPLUGIN
// check if any built-in handlers can write the image
if (!handler && !testFormat.isEmpty()) {
@@ -214,7 +214,7 @@ static QImageIOHandler *createWriteHandlerHelper(QIODevice *device,
}
}
-#ifndef QT_NO_LIBRARY
+#ifndef QT_NO_IMAGEFORMATPLUGIN
if (!testFormat.isEmpty()) {
const int keyCount = keyMap.keys().size();
for (int i = 0; i < keyCount; ++i) {
@@ -226,7 +226,7 @@ static QImageIOHandler *createWriteHandlerHelper(QIODevice *device,
}
}
}
-#endif // QT_NO_LIBRARY
+#endif // QT_NO_IMAGEFORMATPLUGIN
if (!handler)
return 0;
@@ -655,7 +655,7 @@ bool QImageWriter::supportsOption(QImageIOHandler::ImageOption option) const
}
-#ifndef QT_NO_LIBRARY
+#ifndef QT_NO_IMAGEFORMATPLUGIN
void supportedImageHandlerFormats(QFactoryLoader *loader,
QImageIOPlugin::Capability cap,
QSet<QByteArray> *result)
@@ -677,7 +677,7 @@ void supportedImageHandlerFormats(QFactoryLoader *loader,
result->insert(key);
}
}
-#endif // QT_NO_LIBRARY
+#endif // QT_NO_IMAGEFORMATPLUGIN
/*!
Returns the list of image formats supported by QImageWriter.
@@ -729,9 +729,9 @@ QList<QByteArray> QImageWriter::supportedImageFormats()
formats << "gif";
#endif
-#ifndef QT_NO_LIBRARY
+#ifndef QT_NO_IMAGEFORMATPLUGIN
supportedImageHandlerFormats(loader(), QImageIOPlugin::CanWrite, &formats);
-#endif // QT_NO_LIBRARY
+#endif // QT_NO_IMAGEFORMATPLUGIN
QList<QByteArray> sortedFormats;
for (QSet<QByteArray>::ConstIterator it = formats.constBegin(); it != formats.constEnd(); ++it)
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index fb14490a24..72e95c996c 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -60,6 +60,7 @@
#include <QtCore/private/qthread_p.h>
#include <QtCore/qdir.h>
#include <QtDebug>
+#include "qaccessible.h"
#include <qpalette.h>
#include <qscreen.h>
#include "qsessionmanager.h"
@@ -1065,7 +1066,8 @@ QGuiApplicationPrivate::~QGuiApplicationPrivate()
QPixmapCache::clear();
- delete platform_theme;
+ delete platform_theme;
+ platform_theme = 0;
delete platform_integration;
platform_integration = 0;
delete m_gammaTables.load();
@@ -1183,6 +1185,9 @@ QPlatformNativeInterface *QGuiApplication::platformNativeInterface()
*/
int QGuiApplication::exec()
{
+#ifndef QT_NO_ACCESSIBILITY
+ QAccessible::setRootObject(qApp);
+#endif
return QCoreApplication::exec();
}
diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp
index 66baa3db95..83e7b30a52 100644
--- a/src/gui/kernel/qkeysequence.cpp
+++ b/src/gui/kernel/qkeysequence.cpp
@@ -349,7 +349,7 @@ void Q_GUI_EXPORT qt_set_sequence_auto_mnemonic(bool b) { qt_sequence_no_mnemoni
\section1 GNU Emacs Style Key Sequences
- Key sequences similar to those used in \l{GNU Emacs}, allowing up to four
+ Key sequences similar to those used in \l{http://www.gnu.org/software/emacs/}{GNU Emacs}, allowing up to four
key codes, can be created by using the multiple argument constructor,
or by passing a human-readable string of comma-separated key sequences.
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp
index d2de6aa125..f16f29718d 100644
--- a/src/gui/kernel/qopenglcontext.cpp
+++ b/src/gui/kernel/qopenglcontext.cpp
@@ -121,7 +121,7 @@ QMutex QOpenGLContextPrivate::makeCurrentTrackerMutex;
\l{OpenGL documentation}.
For an example of how to use QOpenGLContext see the
- \l{gui/openglwindow}{OpenGL Window} example.
+ \l{OpenGL Window Example}{OpenGL Window} example.
\section1 Thread affinity
diff --git a/src/gui/kernel/qplatformcursor.h b/src/gui/kernel/qplatformcursor.h
index 138c5fdb58..babb91d9fd 100644
--- a/src/gui/kernel/qplatformcursor.h
+++ b/src/gui/kernel/qplatformcursor.h
@@ -92,7 +92,9 @@ public:
// input methods
virtual void pointerEvent(const QMouseEvent & event) { Q_UNUSED(event); }
+#ifndef QT_NO_CURSOR
virtual void changeCursor(QCursor * windowCursor, QWindow * window) = 0;
+#endif
virtual QPoint pos() const;
virtual void setPos(const QPoint &pos);
diff --git a/src/gui/kernel/qplatformdialoghelper.cpp b/src/gui/kernel/qplatformdialoghelper.cpp
index 79f1bd1b49..0ef08227a4 100644
--- a/src/gui/kernel/qplatformdialoghelper.cpp
+++ b/src/gui/kernel/qplatformdialoghelper.cpp
@@ -205,7 +205,7 @@ QColorDialogStaticData::QColorDialogStaticData() : customSet(false)
void QColorDialogStaticData::readSettings()
{
#ifndef QT_NO_SETTINGS
- const QSettings settings(QSettings::UserScope, QStringLiteral("Trolltech"));
+ const QSettings settings(QSettings::UserScope, QStringLiteral("QtProject"));
for (int i = 0; i < int(CustomColorCount); ++i) {
const QVariant v = settings.value(QStringLiteral("Qt/customColors/") + QString::number(i));
if (v.isValid())
@@ -218,7 +218,7 @@ void QColorDialogStaticData::writeSettings() const
{
#ifndef QT_NO_SETTINGS
if (!customSet) {
- QSettings settings(QSettings::UserScope, QStringLiteral("Trolltech"));
+ QSettings settings(QSettings::UserScope, QStringLiteral("QtProject"));
for (int i = 0; i < int(CustomColorCount); ++i)
settings.setValue(QStringLiteral("Qt/customColors/") + QString::number(i), customRgb[i]);
}
diff --git a/src/gui/kernel/qplatformnativeinterface.cpp b/src/gui/kernel/qplatformnativeinterface.cpp
index 925b2ad3de..cf487b2235 100644
--- a/src/gui/kernel/qplatformnativeinterface.cpp
+++ b/src/gui/kernel/qplatformnativeinterface.cpp
@@ -100,6 +100,12 @@ QPlatformNativeInterface::NativeResourceForContextFunction QPlatformNativeInterf
return 0;
}
+QPlatformNativeInterface::NativeResourceForScreenFunction QPlatformNativeInterface::nativeResourceFunctionForScreen(const QByteArray &resource)
+{
+ Q_UNUSED(resource);
+ return 0;
+}
+
QPlatformNativeInterface::NativeResourceForWindowFunction QPlatformNativeInterface::nativeResourceFunctionForWindow(const QByteArray &resource)
{
Q_UNUSED(resource);
diff --git a/src/gui/kernel/qplatformnativeinterface.h b/src/gui/kernel/qplatformnativeinterface.h
index cbf997bec4..8dd661f67e 100644
--- a/src/gui/kernel/qplatformnativeinterface.h
+++ b/src/gui/kernel/qplatformnativeinterface.h
@@ -78,10 +78,12 @@ public:
typedef void * (*NativeResourceForIntegrationFunction)();
typedef void * (*NativeResourceForContextFunction)(QOpenGLContext *context);
+ typedef void * (*NativeResourceForScreenFunction)(QScreen *screen);
typedef void * (*NativeResourceForWindowFunction)(QWindow *window);
typedef void * (*NativeResourceForBackingStoreFunction)(QBackingStore *backingStore);
virtual NativeResourceForIntegrationFunction nativeResourceFunctionForIntegration(const QByteArray &resource);
virtual NativeResourceForContextFunction nativeResourceFunctionForContext(const QByteArray &resource);
+ virtual NativeResourceForScreenFunction nativeResourceFunctionForScreen(const QByteArray &resource);
virtual NativeResourceForWindowFunction nativeResourceFunctionForWindow(const QByteArray &resource);
virtual NativeResourceForBackingStoreFunction nativeResourceFunctionForBackingStore(const QByteArray &resource);
diff --git a/src/gui/kernel/qplatformwindow.cpp b/src/gui/kernel/qplatformwindow.cpp
index 25b863c9a3..82547b04ec 100644
--- a/src/gui/kernel/qplatformwindow.cpp
+++ b/src/gui/kernel/qplatformwindow.cpp
@@ -247,7 +247,12 @@ void QPlatformWindow::setParent(const QPlatformWindow *parent)
}
/*!
- Reimplement to set the window title to \a title
+ Reimplement to set the window title to \a title.
+
+ The implementation might want to append the application display name to
+ the window title, like Windows and Linux do.
+
+ \sa QGuiApplication::applicationDisplayName()
*/
void QPlatformWindow::setWindowTitle(const QString &title) { Q_UNUSED(title); }
@@ -331,31 +336,6 @@ void QPlatformWindow::handleContentOrientationChange(Qt::ScreenOrientation orien
}
/*!
- Request a different orientation of the platform window.
-
- This tells the window manager how the window wants to be rotated in order
- to be displayed, and how input events should be translated.
-
- As an example, a portrait compositor might rotate the window by 90 degrees,
- if the window is in landscape. It will also rotate input coordinates from
- portrait to landscape such that top right in portrait gets mapped to top
- left in landscape.
-
- If the implementation doesn't support the requested orientation it should
- signal this by returning an actual supported orientation.
-
- If the implementation doesn't support rotating the window at all it should
- return Qt::PrimaryOrientation, this is also the default value.
-
- \sa QWindow::requestWindowOrientation()
-*/
-Qt::ScreenOrientation QPlatformWindow::requestWindowOrientation(Qt::ScreenOrientation orientation)
-{
- Q_UNUSED(orientation);
- return Qt::PrimaryOrientation;
-}
-
-/*!
Reimplement this function in subclass to return the device pixel ratio
for the window. This is the ratio between physical pixels
and device-independent pixels.
@@ -469,9 +449,6 @@ bool QPlatformWindow::frameStrutEventsEnabled() const
QPlatformWindow is also the way QPA defines how native child windows should be supported
through the setParent function.
- The only way to retrieve a QPlatformOpenGLContext in QPA is by calling the glContext() function
- on QPlatformWindow.
-
\section1 Implementation Aspects
\list 1
diff --git a/src/gui/kernel/qplatformwindow.h b/src/gui/kernel/qplatformwindow.h
index 607c8e4035..5d7323ae2b 100644
--- a/src/gui/kernel/qplatformwindow.h
+++ b/src/gui/kernel/qplatformwindow.h
@@ -115,7 +115,6 @@ public:
virtual void requestActivateWindow();
virtual void handleContentOrientationChange(Qt::ScreenOrientation orientation);
- virtual Qt::ScreenOrientation requestWindowOrientation(Qt::ScreenOrientation orientation);
virtual qreal devicePixelRatio() const;
diff --git a/src/gui/kernel/qshortcutmap.cpp b/src/gui/kernel/qshortcutmap.cpp
index 43f37a900f..839cbf37e7 100644
--- a/src/gui/kernel/qshortcutmap.cpp
+++ b/src/gui/kernel/qshortcutmap.cpp
@@ -679,7 +679,7 @@ void QShortcutMap::dispatchEvent(QKeyEvent *e)
#if defined(DEBUG_QSHORTCUTMAP)
qDebug().nospace()
<< "QShortcutMap::dispatchEvent(): Sending QShortcutEvent(\""
- << (QString)next->keyseq << "\", " << next->id << ", "
+ << next->keyseq.toString() << "\", " << next->id << ", "
<< (bool)(enabledShortcuts>1) << ") to object(" << next->owner << ')';
#endif
QShortcutEvent se(next->keyseq, next->id, enabledShortcuts>1);
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index aaf2b25ad4..b6d592e050 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -89,23 +89,16 @@ QT_BEGIN_NAMESPACE
buffers to support double and triple buffering, as well as depth and stencil
buffers. To release a window's memory resources, call the destroy() function.
- \section1 Window and content orientation
-
- QWindow has reportContentOrientationChange() and
- requestWindowOrientation() that can be used to specify the
- layout of the window contents in relation to the screen. The
- window orientation determines the actual buffer layout of the
- window, and the windowing system uses this value to rotate the
- window before it ends up on the display, and to ensure that input
- coordinates are in the correct coordinate space relative to the
- application.
-
- On the other hand, the content orientation is simply a hint to the
- windowing system about which orientation the window contents are in.
- It's useful when you wish to keep the same buffer layout, but rotate
- the contents instead, especially when doing rotation animations
- between different orientations. The windowing system might use this
- value to determine the layout of system popups or dialogs.
+ \section1 Content orientation
+
+ QWindow has reportContentOrientationChange() that can be used to specify
+ the layout of the window contents in relation to the screen. The content
+ orientation is simply a hint to the windowing system about which
+ orientation the window contents are in. It's useful when you wish to keep
+ the same window size, but rotate the contents instead, especially when
+ doing rotation animations between different orientations. The windowing
+ system might use this value to determine the layout of system popups or
+ dialogs.
\section1 Visibility and Windowing system exposure.
@@ -661,9 +654,11 @@ void QWindow::lower()
void QWindow::setOpacity(qreal level)
{
Q_D(QWindow);
- if (d->platformWindow) {
+ if (level == d->opacity) // #fixme: Add property for 5.1
+ return;
+ d->opacity = level;
+ if (d->platformWindow)
d->platformWindow->setOpacity(level);
- }
}
/*!
@@ -743,8 +738,6 @@ bool QWindow::isActive() const
to compute the necessary transform.
The default value is Qt::PrimaryOrientation
-
- \sa requestOrientation(), QScreen::orientation()
*/
void QWindow::reportContentOrientationChange(Qt::ScreenOrientation orientation)
{
@@ -766,46 +759,6 @@ Qt::ScreenOrientation QWindow::contentOrientation() const
}
/*!
- Requests the given window \a orientation.
-
- The window \a orientation specifies how the window should be rotated
- by the window manager in order to be displayed. Input events will
- be correctly mapped to the given \a orientation.
-
- The return value is false if the system doesn't support the given
- \a orientation (for example when requesting a portrait orientation
- on a device that only handles landscape buffers, typically a desktop
- system).
-
- If the return value is false, call \l orientation() to get the actual
- supported orientation.
-
- \sa orientation(), reportContentOrientationChange(), QScreen::orientation()
-*/
-bool QWindow::requestOrientation(Qt::ScreenOrientation orientation)
-{
- Q_D(QWindow);
- if (!d->platformWindow)
- create();
- Q_ASSERT(d->platformWindow);
- d->windowOrientation = d->platformWindow->requestWindowOrientation(orientation);
- return d->windowOrientation == orientation;
-}
-
-/*!
- Returns the actual window orientation.
-
- The default value is Qt::PrimaryOrientation.
-
- \sa requestOrientation()
-*/
-Qt::ScreenOrientation QWindow::orientation() const
-{
- Q_D(const QWindow);
- return d->windowOrientation;
-}
-
-/*!
Returns the ratio between physical pixels and device-independent pixels
for the window. This value is dependent on the screen the window is on,
and may change when the window is moved.
@@ -983,11 +936,59 @@ void QWindow::setMinimumSize(const QSize &size)
emit minimumHeightChanged(d->minimumSize.height());
}
+/*!
+ \property QWindow::x
+ \brief the x position of the window's geometry
+*/
+void QWindow::setX(int arg)
+{
+ if (x() != arg)
+ setGeometry(QRect(arg, y(), width(), height()));
+}
+
+/*!
+ \property QWindow::y
+ \brief the y position of the window's geometry
+*/
+void QWindow::setY(int arg)
+{
+ if (y() != arg)
+ setGeometry(QRect(x(), arg, width(), height()));
+}
+
+/*!
+ \property QWindow::width
+ \brief the width of the window's geometry
+*/
+void QWindow::setWidth(int arg)
+{
+ if (width() != arg)
+ setGeometry(QRect(x(), y(), arg, height()));
+}
+
+/*!
+ \property QWindow::height
+ \brief the height of the window's geometry
+*/
+void QWindow::setHeight(int arg)
+{
+ if (height() != arg)
+ setGeometry(QRect(x(), y(), width(), arg));
+}
+
+/*!
+ \property QWindow::minimumWidth
+ \brief the minimum width of the window's geometry
+*/
void QWindow::setMinimumWidth(int w)
{
setMinimumSize(QSize(w, minimumHeight()));
}
+/*!
+ \property QWindow::minimumHeight
+ \brief the minimum height of the window's geometry
+*/
void QWindow::setMinimumHeight(int h)
{
setMinimumSize(QSize(minimumWidth(), h));
@@ -1016,11 +1017,19 @@ void QWindow::setMaximumSize(const QSize &size)
emit maximumHeightChanged(d->maximumSize.height());
}
+/*!
+ \property QWindow::maximumWidth
+ \brief the maximum width of the window's geometry
+*/
void QWindow::setMaximumWidth(int w)
{
setMaximumSize(QSize(w, maximumHeight()));
}
+/*!
+ \property QWindow::maximumHeight
+ \brief the maximum height of the window's geometry
+*/
void QWindow::setMaximumHeight(int h)
{
setMaximumSize(QSize(maximumWidth(), h));
@@ -1069,13 +1078,15 @@ void QWindow::setSizeIncrement(const QSize &size)
}
/*!
- \fn void QWindow::setGeometry(int posx, int posy, int w, int h)
-
Sets the geometry of the window, excluding its window frame, to a
rectangle constructed from \a posx, \a posy, \a w and \a h.
\sa geometry()
*/
+void QWindow::setGeometry(int posx, int posy, int w, int h)
+{
+ setGeometry(QRect(posx, posy, w, h));
+}
/*!
\brief Sets the geometry of the window, excluding its window frame, to \a rect.
@@ -1107,46 +1118,6 @@ void QWindow::setGeometry(const QRect &rect)
}
/*!
- \property QWindow::x
- \brief the x position of the window's geometry
-*/
-
-/*!
- \property QWindow::y
- \brief the y position of the window's geometry
-*/
-
-/*!
- \property QWindow::width
- \brief the width of the window's geometry
-*/
-
-/*!
- \property QWindow::height
- \brief the height of the window's geometry
-*/
-
-/*!
- \property QWindow::minimumWidth
- \brief the minimum width of the window's geometry
-*/
-
-/*!
- \property QWindow::minimumHeight
- \brief the minimum height of the window's geometry
-*/
-
-/*!
- \property QWindow::maximumWidth
- \brief the maximum width of the window's geometry
-*/
-
-/*!
- \property QWindow::maximumHeight
- \brief the maximum height of the window's geometry
-*/
-
-/*!
Returns the geometry of the window, excluding its window frame.
\sa frameMargins(), frameGeometry()
@@ -1221,18 +1192,24 @@ void QWindow::setFramePosition(const QPoint &point)
}
/*!
- \fn void QWindow::setPosition(const QPoint &pt)
\brief set the position of the window on the desktop to \a pt
\sa position()
*/
+void QWindow::setPosition(const QPoint &pt)
+{
+ setGeometry(QRect(pt, size()));
+}
/*!
- \fn void QWindow::setPosition(int posx, int posy)
\brief set the position of the window on the desktop to \a posx, \a posy
\sa position()
*/
+void QWindow::setPosition(int posx, int posy)
+{
+ setPosition(QPoint(posx, posy));
+}
/*!
\fn QPoint QWindow::position() const
@@ -1249,13 +1226,15 @@ void QWindow::setFramePosition(const QPoint &point)
*/
/*!
- \fn void QWindow::resize(int w, int h)
-
set the size of the window, excluding any window frame, to a QSize
constructed from width \a w and height \a h
\sa size(), geometry()
*/
+void QWindow::resize(int w, int h)
+{
+ resize(QSize(w, h));
+}
/*!
\brief set the size of the window, excluding any window frame, to \a newSize
diff --git a/src/gui/kernel/qwindow.h b/src/gui/kernel/qwindow.h
index 229275d7c7..c1a8e7971a 100644
--- a/src/gui/kernel/qwindow.h
+++ b/src/gui/kernel/qwindow.h
@@ -113,35 +113,6 @@ class Q_GUI_EXPORT QWindow : public QObject, public QSurface
Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged)
Q_PROPERTY(Qt::ScreenOrientation contentOrientation READ contentOrientation WRITE reportContentOrientationChange NOTIFY contentOrientationChanged)
- // ------------------------------------------------------------------------
- // Temporary backwards-compatibility properties to be removed ASAP
- Q_PROPERTY(QString windowTitle READ windowTitle WRITE setWindowTitle)
- Q_PROPERTY(QString windowFilePath READ windowFilePath WRITE setWindowFilePath)
- Q_PROPERTY(QIcon windowIcon READ windowIcon WRITE setWindowIcon)
- Q_PROPERTY(Qt::WindowModality windowModality READ windowModality WRITE setWindowModality NOTIFY windowModalityChanged)
-
-public:
-
- Qt::WindowModality windowModality() const { return modality(); }
- void setWindowModality(Qt::WindowModality wm) { setModality(wm); }
- void setWindowFlags(Qt::WindowFlags f) { setFlags(f); }
- Qt::WindowFlags windowFlags() const { return flags(); }
- Qt::WindowType windowType() const { return type(); }
- QString windowTitle() const { return title(); }
- void requestActivateWindow() { requestActivate(); }
- bool requestWindowOrientation(Qt::ScreenOrientation o) { return requestOrientation(o); }
- Qt::ScreenOrientation windowOrientation() const { return orientation(); }
- void setWindowFilePath(const QString &fp) { setFilePath(fp); }
- QString windowFilePath() const { return filePath(); }
- void setWindowIcon(const QIcon &i) { setIcon(i); }
- QIcon windowIcon() const { return icon(); }
- void setWindowTitle(const QString &t) { setTitle(t); }
-
-Q_SIGNALS:
- void windowModalityChanged(Qt::WindowModality windowModality);
- // End of temporary backwards-compatibility properties
- // ------------------------------------------------------------------------
-
public:
explicit QWindow(QScreen *screen = 0);
@@ -186,9 +157,6 @@ public:
qreal devicePixelRatio() const;
- bool requestOrientation(Qt::ScreenOrientation orientation);
- Qt::ScreenOrientation orientation() const;
-
Qt::WindowState windowState() const;
void setWindowState(Qt::WindowState state);
@@ -204,10 +172,10 @@ public:
bool isExposed() const;
- int minimumWidth() const { return minimumSize().width(); }
- int minimumHeight() const { return minimumSize().height(); }
- int maximumWidth() const { return maximumSize().width(); }
- int maximumHeight() const { return maximumSize().height(); }
+ inline int minimumWidth() const { return minimumSize().width(); }
+ inline int minimumHeight() const { return minimumSize().height(); }
+ inline int maximumWidth() const { return maximumSize().width(); }
+ inline int maximumHeight() const { return maximumSize().height(); }
QSize minimumSize() const;
QSize maximumSize() const;
@@ -219,7 +187,7 @@ public:
void setBaseSize(const QSize &size);
void setSizeIncrement(const QSize &size);
- void setGeometry(int posx, int posy, int w, int h) { setGeometry(QRect(posx, posy, w, h)); }
+ void setGeometry(int posx, int posy, int w, int h);
void setGeometry(const QRect &rect);
QRect geometry() const;
@@ -237,18 +205,11 @@ public:
inline QSize size() const { return geometry().size(); }
inline QPoint position() const { return geometry().topLeft(); }
- inline void setPosition(const QPoint &pt) { setGeometry(QRect(pt, size())); }
- inline void setPosition(int posx, int posy) { setPosition(QPoint(posx, posy)); }
-
-// Temporary backwards-compatible accessors for the benefit of Declarative
-// to be removed ASAP
- inline void setFramePos(const QPoint &pt) { setFramePosition(pt); }
- inline void setPos(const QPoint &pt) { setPosition(pt); }
- inline void setPos(int posx, int posy) { setPosition(posx, posy); }
-// end of temporary accessors
+ void setPosition(const QPoint &pt);
+ void setPosition(int posx, int posy);
void resize(const QSize &newSize);
- inline void resize(int w, int h) { resize(QSize(w, h)); }
+ void resize(int w, int h);
void setFilePath(const QString &filePath);
QString filePath() const;
@@ -295,29 +256,10 @@ public Q_SLOTS:
void setTitle(const QString &);
- void setX(int arg)
- {
- if (x() != arg)
- setGeometry(QRect(arg, y(), width(), height()));
- }
-
- void setY(int arg)
- {
- if (y() != arg)
- setGeometry(QRect(x(), arg, width(), height()));
- }
-
- void setWidth(int arg)
- {
- if (width() != arg)
- setGeometry(QRect(x(), y(), arg, height()));
- }
-
- void setHeight(int arg)
- {
- if (height() != arg)
- setGeometry(QRect(x(), y(), width(), arg));
- }
+ void setX(int arg);
+ void setY(int arg);
+ void setWidth(int arg);
+ void setHeight(int arg);
void setMinimumWidth(int w);
void setMinimumHeight(int h);
diff --git a/src/gui/kernel/qwindow_p.h b/src/gui/kernel/qwindow_p.h
index fcc5540185..305888d02c 100644
--- a/src/gui/kernel/qwindow_p.h
+++ b/src/gui/kernel/qwindow_p.h
@@ -89,7 +89,7 @@ public:
, receivedExpose(false)
, positionPolicy(WindowFrameExclusive)
, contentOrientation(Qt::PrimaryOrientation)
- , windowOrientation(Qt::PrimaryOrientation)
+ , opacity(qreal(1.0))
, minimumSize(0, 0)
, maximumSize(QWINDOWSIZE_MAX, QWINDOWSIZE_MAX)
, modality(Qt::NonModal)
@@ -136,7 +136,7 @@ public:
bool receivedExpose;
PositionPolicy positionPolicy;
Qt::ScreenOrientation contentOrientation;
- Qt::ScreenOrientation windowOrientation;
+ qreal opacity;
QSize minimumSize;
QSize maximumSize;
diff --git a/src/gui/math3d/qmatrix4x4.cpp b/src/gui/math3d/qmatrix4x4.cpp
index 4e35d49118..e0f401bc10 100644
--- a/src/gui/math3d/qmatrix4x4.cpp
+++ b/src/gui/math3d/qmatrix4x4.cpp
@@ -45,6 +45,8 @@
#include <QtGui/qmatrix.h>
#include <QtGui/qtransform.h>
+#include <cmath>
+
QT_BEGIN_NAMESPACE
#ifndef QT_NO_MATRIX4X4
@@ -1456,27 +1458,29 @@ void QMatrix4x4::frustum(float left, float right, float bottom, float top, float
/*!
Multiplies this matrix by another that applies a perspective
- projection. The field of view will be \a angle degrees within
- a window with a given \a aspect ratio. The projection will
- have the specified \a nearPlane and \a farPlane clipping planes.
+ projection. The vertical field of view will be \a verticalAngle degrees
+ within a window with a given \a aspectRatio that determines the horizontal
+ field of view.
+ The projection will have the specified \a nearPlane and \a farPlane clipping
+ planes which are the distances from the viewer to the corresponding planes.
\sa ortho(), frustum()
*/
-void QMatrix4x4::perspective(float angle, float aspect, float nearPlane, float farPlane)
+void QMatrix4x4::perspective(float verticalAngle, float aspectRatio, float nearPlane, float farPlane)
{
// Bail out if the projection volume is zero-sized.
- if (nearPlane == farPlane || aspect == 0.0f)
+ if (nearPlane == farPlane || aspectRatio == 0.0f)
return;
// Construct the projection.
QMatrix4x4 m(1);
- float radians = (angle / 2.0f) * M_PI / 180.0f;
+ float radians = (verticalAngle / 2.0f) * M_PI / 180.0f;
float sine = sinf(radians);
if (sine == 0.0f)
return;
float cotan = cosf(radians) / sine;
float clip = farPlane - nearPlane;
- m.m[0][0] = cotan / aspect;
+ m.m[0][0] = cotan / aspectRatio;
m.m[1][0] = 0.0f;
m.m[2][0] = 0.0f;
m.m[3][0] = 0.0f;
diff --git a/src/gui/math3d/qmatrix4x4.h b/src/gui/math3d/qmatrix4x4.h
index bbad04b8b1..df98f0291a 100644
--- a/src/gui/math3d/qmatrix4x4.h
+++ b/src/gui/math3d/qmatrix4x4.h
@@ -146,7 +146,7 @@ public:
void ortho(const QRectF& rect);
void ortho(float left, float right, float bottom, float top, float nearPlane, float farPlane);
void frustum(float left, float right, float bottom, float top, float nearPlane, float farPlane);
- void perspective(float angle, float aspect, float nearPlane, float farPlane);
+ void perspective(float verticalAngle, float aspectRatio, float nearPlane, float farPlane);
#ifndef QT_NO_VECTOR3D
void lookAt(const QVector3D& eye, const QVector3D& center, const QVector3D& up);
#endif
diff --git a/src/gui/math3d/qquaternion.cpp b/src/gui/math3d/qquaternion.cpp
index 3f39fa43c3..2ccdd315d3 100644
--- a/src/gui/math3d/qquaternion.cpp
+++ b/src/gui/math3d/qquaternion.cpp
@@ -45,6 +45,8 @@
#include <QtCore/qvariant.h>
#include <QtCore/qdebug.h>
+#include <cmath>
+
QT_BEGIN_NAMESPACE
#ifndef QT_NO_QUATERNION
diff --git a/src/gui/opengl/opengl.pri b/src/gui/opengl/opengl.pri
index c241354e9c..2256f201d2 100644
--- a/src/gui/opengl/opengl.pri
+++ b/src/gui/opengl/opengl.pri
@@ -46,5 +46,3 @@ contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles2) {
opengl/qtriangulator.cpp
}
-
-#INCLUDEPATH += ../3rdparty/harfbuzz/src
diff --git a/src/gui/opengl/qopenglpaintdevice.cpp b/src/gui/opengl/qopenglpaintdevice.cpp
index b2ffac69ca..79e692b8cf 100644
--- a/src/gui/opengl/qopenglpaintdevice.cpp
+++ b/src/gui/opengl/qopenglpaintdevice.cpp
@@ -63,11 +63,47 @@ QT_BEGIN_NAMESPACE
\ingroup painting-3D
+ The QOpenGLPaintDevice uses the current QOpenGL context to render
+ QPainter draw commands. It requires OpenGL (ES) 2.0 support or
+ higher.
+
+ \section1 Performance
+
+ The QOpenGLPaintDevice is almost always hardware accelerated and
+ has the potential of being much faster than software
+ rasterization. However, it is more sensitive to state changes, and
+ therefore requires the drawing commands to be carefully ordered to
+ achieve optimal performance.
+
+ \section1 Antialiasing and Quality
+
+ Antialiasing in the OpenGL paint engine is done using
+ multisampling. Most hardware require significantly more memory to
+ do multisampling and the resulting quality is not on par with the
+ quality of the software paint engine. The OpenGL paint engine's
+ strenght lies in its performance, not its visual rendering
+ quality.
+
+ \section1 State Changes
+
When painting to a QOpenGLPaintDevice using QPainter, the state of
- the current OpenGL context will be altered by the paint engine to reflect
- its needs. Applications should not rely upon the OpenGL state being reset
- to its original conditions, particularly the current shader program,
- OpenGL viewport, texture units, and drawing modes.
+ the current OpenGL context will be altered by the paint engine to
+ reflect its needs. Applications should not rely upon the OpenGL
+ state being reset to its original conditions, particularly the
+ current shader program, OpenGL viewport, texture units, and
+ drawing modes.
+
+ \section1 Mixing QPainter and OpenGL
+
+ When intermixing QPainter and OpenGL, it is important to notify
+ QPainter that the OpenGL state may have been cluttered so it can
+ restore its internal state. This is acheived by calling \l
+ QPainter::beginNativePainting() before starting the OpenGL
+ rendering and calling \l QPainter::endNativePainting() after
+ finishing.
+
+ \sa {OpenGL Window Example}
+
*/
class QOpenGLPaintDevicePrivate
diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp
index 72ca7ad8a8..e7d68f6df8 100644
--- a/src/gui/painting/qcolor.cpp
+++ b/src/gui/painting/qcolor.cpp
@@ -503,7 +503,7 @@ QString QColor::name() const
\li #RRGGBB
\li #RRRGGGBBB
\li #RRRRGGGGBBBB
- \li A name from the list of colors defined in the list of \l{SVG color keyword names}
+ \li A name from the list of colors defined in the list of \l{http://www.w3.org/TR/SVG/types.html#ColorKeywords}{SVG color keyword names}
provided by the World Wide Web Consortium; for example, "steelblue" or "gainsboro".
These color names work on all platforms. Note that these color names are \e not the
same as defined by the Qt::GlobalColor enums, e.g. "green" and Qt::green does not
diff --git a/src/gui/painting/qdrawhelper_ssse3.cpp b/src/gui/painting/qdrawhelper_ssse3.cpp
index 09e0516dcb..9f80c70fcc 100644
--- a/src/gui/painting/qdrawhelper_ssse3.cpp
+++ b/src/gui/painting/qdrawhelper_ssse3.cpp
@@ -60,7 +60,7 @@ inline static void blend_pixel(quint32 &dst, const quint32 src)
shift (4, 8, 12). Checking the alignment inside the loop is unfortunatelly way too slow.
*/
#define BLENDING_LOOP(palignrOffset, length)\
- for (; x < length-3; x += 4) { \
+ for (; x-minusOffsetToAlignSrcOn16Bytes < length-7; x += 4) { \
const __m128i srcVectorLastLoaded = _mm_load_si128((__m128i *)&src[x - minusOffsetToAlignSrcOn16Bytes + 4]);\
const __m128i srcVector = _mm_alignr_epi8(srcVectorLastLoaded, srcVectorPrevLoaded, palignrOffset); \
const __m128i srcVectorAlpha = _mm_and_si128(srcVector, alphaMask); \
diff --git a/src/gui/painting/qmath_p.h b/src/gui/painting/qmath_p.h
index c710ee462a..bc7bb320b7 100644
--- a/src/gui/painting/qmath_p.h
+++ b/src/gui/painting/qmath_p.h
@@ -61,6 +61,7 @@ QT_BEGIN_NAMESPACE
static const qreal Q_PI = qreal(3.14159265358979323846); // pi
static const qreal Q_2PI = qreal(6.28318530717958647693); // 2*pi
static const qreal Q_PI2 = qreal(1.57079632679489661923); // pi/2
+static const qreal Q_MM_PER_INCH = 25.4;
inline int qIntSqrtInt(int v)
{
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 46648fe297..0e9129f8c0 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -4588,7 +4588,7 @@ void QSpanData::setupMatrix(const QTransform &matrix, int bilin)
txop = inv.type();
bilinear = bilin;
- const bool affine = !m13 && !m23;
+ const bool affine = inv.isAffine();
fast_matrix = affine
&& m11 * m11 + m21 * m21 < 1e4
&& m12 * m12 + m22 * m22 < 1e4
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index e87e6eb83b..5714645728 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -273,27 +273,15 @@ struct QtFontFoundry
QtFontStyle *QtFontFoundry::style(const QtFontStyle::Key &key, const QString &styleName, bool create)
{
int pos = 0;
- if (count) {
- // if styleName for searching first if possible
- if (!styleName.isEmpty()) {
- for (; pos < count; pos++) {
- if (styles[pos]->styleName == styleName)
- return styles[pos];
- }
- }
- int low = 0;
- int high = count;
- pos = count / 2;
- while (high > low) {
+ for (; pos < count; pos++) {
+ bool hasStyleName = !styleName.isEmpty(); // search styleName first if available
+ if (hasStyleName && !styles[pos]->styleName.isEmpty()) {
+ if (styles[pos]->styleName == styleName)
+ return styles[pos];
+ } else {
if (styles[pos]->key == key)
return styles[pos];
- if (styles[pos]->key < key)
- low = pos + 1;
- else
- high = pos;
- pos = (high + low) / 2;
}
- pos = low;
}
if (!create)
return 0;
@@ -308,7 +296,6 @@ QtFontStyle *QtFontFoundry::style(const QtFontStyle::Key &key, const QString &st
QtFontStyle *style = new QtFontStyle(key);
style->styleName = styleName;
- memmove(styles + pos + 1, styles + pos, (count-pos)*sizeof(QtFontStyle *));
styles[pos] = style;
count++;
return styles[pos];
@@ -594,7 +581,7 @@ QtFontFamily *QFontDatabasePrivate::family(const QString &f, bool create)
if (res < 0)
pos++;
- // qDebug("adding family %s at %d total=%d", f.latin1(), pos, count);
+ // qDebug() << "adding family " << f.toLatin1() << " at " << pos << " total=" << count;
if (!(count % 8)) {
QtFontFamily **newFamilies = (QtFontFamily **)
realloc(families,
diff --git a/src/gui/text/qfontdatabase_qpa.cpp b/src/gui/text/qfontdatabase_qpa.cpp
index 366f995790..70a8af0b66 100644
--- a/src/gui/text/qfontdatabase_qpa.cpp
+++ b/src/gui/text/qfontdatabase_qpa.cpp
@@ -52,7 +52,8 @@
QT_BEGIN_NAMESPACE
-Q_GUI_EXPORT void qt_registerFont(const QString &familyName, const QString &foundryname, int weight,
+Q_GUI_EXPORT void qt_registerFont(const QString &familyName, const QString &stylename,
+ const QString &foundryname, int weight,
QFont::Style style, int stretch, bool antialiased,
bool scalable, int pixelSize, bool fixedPitch,
const QSupportedWritingSystems &writingSystems, void *handle)
@@ -75,7 +76,7 @@ Q_GUI_EXPORT void qt_registerFont(const QString &familyName, const QString &fou
}
QtFontFoundry *foundry = f->foundry(foundryname, true);
- QtFontStyle *fontStyle = foundry->style(styleKey, QString(), true);
+ QtFontStyle *fontStyle = foundry->style(styleKey, stylename, true);
fontStyle->smoothScalable = scalable;
fontStyle->antialiased = antialiased;
QtFontSize *size = fontStyle->pixelSize(pixelSize ? pixelSize : SMOOTH_SCALABLE, true);
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp
index b9a7e69c9d..aa9879882b 100644
--- a/src/gui/text/qfontengine_ft.cpp
+++ b/src/gui/text/qfontengine_ft.cpp
@@ -588,6 +588,16 @@ static void convertRGBToARGB_V(const uchar *src, uint *dst, int width, int heigh
}
}
+static void convertGRAYToARGB(const uchar *src, uint *dst, int width, int height, int src_pitch) {
+ for (int y = 0; y < height; ++y) {
+ int readpos = (y * src_pitch);
+ int writepos = (y * width);
+ for (int x = 0; x < width; ++x) {
+ dst[writepos + x] = (0xFF << 24) + (src[readpos + x] << 16) + (src[readpos + x] << 8) + src[readpos + x];
+ }
+ }
+}
+
static void convoluteBitmap(const uchar *src, uchar *dst, int width, int height, int pitch)
{
// convolute the bitmap with a triangle filter to get rid of color fringes
@@ -1016,7 +1026,7 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph,
bitmap.rows = info.height*vfactor;
bitmap.width = hpixels;
bitmap.pitch = format == Format_Mono ? (((info.width + 31) & ~31) >> 3) : ((bitmap.width + 3) & ~3);
- if (!hsubpixel && vfactor == 1)
+ if (!hsubpixel && vfactor == 1 && format != Format_A32)
bitmap.buffer = glyph_buffer;
else
bitmap.buffer = new uchar[bitmap.rows*bitmap.pitch];
@@ -1047,6 +1057,8 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph,
delete [] convoluted;
} else if (vfactor != 1) {
convertRGBToARGB_V(bitmap.buffer, (uint *)glyph_buffer, info.width, info.height, bitmap.pitch, subpixelType != QFontEngineFT::Subpixel_VRGB, true);
+ } else if (format == Format_A32 && bitmap.pixel_mode == FT_PIXEL_MODE_GRAY) {
+ convertGRAYToARGB(bitmap.buffer, (uint *)glyph_buffer, info.width, info.height, bitmap.pitch);
}
if (bitmap.buffer != glyph_buffer)
diff --git a/src/gui/text/qplatformfontdatabase.cpp b/src/gui/text/qplatformfontdatabase.cpp
index f3e573e313..903b1e4c3d 100644
--- a/src/gui/text/qplatformfontdatabase.cpp
+++ b/src/gui/text/qplatformfontdatabase.cpp
@@ -47,7 +47,8 @@
QT_BEGIN_NAMESPACE
-extern void qt_registerFont(const QString &familyname, const QString &foundryname, int weight,
+extern void qt_registerFont(const QString &familyname, const QString &stylename,
+ const QString &foundryname, int weight,
QFont::Style style, int stretch, bool antialiased,
bool scalable, int pixelSize, bool fixedPitch,
const QSupportedWritingSystems &writingSystems, void *hanlde);
@@ -89,7 +90,7 @@ void QPlatformFontDatabase::registerQPF2Font(const QByteArray &dataArray, void *
}
}
QFont::Stretch stretch = QFont::Unstretched;
- registerFont(fontName,QString(),fontWeight,fontStyle,stretch,true,false,pixelSize,false,writingSystems,handle);
+ registerFont(fontName,QString(),QString(),fontWeight,fontStyle,stretch,true,false,pixelSize,false,writingSystems,handle);
}
} else {
qDebug() << "header verification of QPF2 font failed. maybe it is corrupt?";
@@ -117,7 +118,8 @@ void QPlatformFontDatabase::registerQPF2Font(const QByteArray &dataArray, void *
\sa registerQPF2Font()
*/
-void QPlatformFontDatabase::registerFont(const QString &familyname, const QString &foundryname, QFont::Weight weight,
+void QPlatformFontDatabase::registerFont(const QString &familyname, const QString &stylename,
+ const QString &foundryname, QFont::Weight weight,
QFont::Style style, QFont::Stretch stretch, bool antialiased,
bool scalable, int pixelSize, bool fixedPitch,
const QSupportedWritingSystems &writingSystems, void *usrPtr)
@@ -125,7 +127,7 @@ void QPlatformFontDatabase::registerFont(const QString &familyname, const QStrin
if (scalable)
pixelSize = 0;
- qt_registerFont(familyname, foundryname, weight, style,
+ qt_registerFont(familyname, stylename, foundryname, weight, style,
stretch, antialiased, scalable, pixelSize,
fixedPitch, writingSystems, usrPtr);
}
diff --git a/src/gui/text/qplatformfontdatabase.h b/src/gui/text/qplatformfontdatabase.h
index fe7782be8f..7d9834fa37 100644
--- a/src/gui/text/qplatformfontdatabase.h
+++ b/src/gui/text/qplatformfontdatabase.h
@@ -116,7 +116,8 @@ public:
//callback
static void registerQPF2Font(const QByteArray &dataArray, void *handle);
- static void registerFont(const QString &familyname, const QString &foundryname, QFont::Weight weight,
+ static void registerFont(const QString &familyname, const QString &stylename,
+ const QString &foundryname, QFont::Weight weight,
QFont::Style style, QFont::Stretch stretch, bool antialiased,
bool scalable, int pixelSize, bool fixedPitch,
const QSupportedWritingSystems &writingSystems, void *handle);
diff --git a/src/gui/text/text.pri b/src/gui/text/text.pri
index face6f248f..436b7c7aec 100644
--- a/src/gui/text/text.pri
+++ b/src/gui/text/text.pri
@@ -85,5 +85,3 @@ SOURCES += \
HEADERS += \
text/qplatformfontdatabase.h
-
-INCLUDEPATH += ../3rdparty/harfbuzz/src
diff --git a/src/gui/util/qdesktopservices.cpp b/src/gui/util/qdesktopservices.cpp
index ca284eecd5..94a3343164 100644
--- a/src/gui/util/qdesktopservices.cpp
+++ b/src/gui/util/qdesktopservices.cpp
@@ -250,6 +250,8 @@ void QDesktopServices::unsetUrlHandler(const QString &scheme)
/*!
\enum QDesktopServices::StandardLocation
\since 4.4
+ \obsolete
+ Use QStandardPaths::StandardLocation
This enum describes the different locations that can be queried by
QDesktopServices::storageLocation and QDesktopServices::displayName.
diff --git a/src/network/access/qnetworkcookie.cpp b/src/network/access/qnetworkcookie.cpp
index bfc439ef74..f07516c3fd 100644
--- a/src/network/access/qnetworkcookie.cpp
+++ b/src/network/access/qnetworkcookie.cpp
@@ -90,9 +90,9 @@ QT_BEGIN_NAMESPACE
This class implements cookies as described by the
\l{Netscape Cookie Specification}{initial cookie specification by
- Netscape}, which is somewhat similar to the \l{RFC 2109} specification,
+ Netscape}, which is somewhat similar to the \l{http://www.rfc-editor.org/rfc/rfc2109.txt}{RFC 2109} specification,
plus the \l{Mitigating Cross-site Scripting With HTTP-only Cookies}
- {"HttpOnly" extension}. The more recent \l{RFC 2965} specification
+ {"HttpOnly" extension}. The more recent \l{http://www.rfc-editor.org/rfc/rfc2965.txt}{RFC 2965} specification
(which uses the Set-Cookie2 header) is not supported.
\sa QNetworkCookieJar, QNetworkRequest, QNetworkReply
diff --git a/src/network/access/qnetworkreplyhttpimpl_p.h b/src/network/access/qnetworkreplyhttpimpl_p.h
index 956d5c207f..54a4333dcf 100644
--- a/src/network/access/qnetworkreplyhttpimpl_p.h
+++ b/src/network/access/qnetworkreplyhttpimpl_p.h
@@ -119,7 +119,9 @@ public:
Q_PRIVATE_SLOT(d_func(), void replySslErrors(const QList<QSslError> &, bool *, QList<QSslError> *))
Q_PRIVATE_SLOT(d_func(), void replySslConfigurationChanged(const QSslConfiguration&))
#endif
+#ifndef QT_NO_NETWORKPROXY
Q_PRIVATE_SLOT(d_func(), void proxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *auth))
+#endif
Q_PRIVATE_SLOT(d_func(), void resetUploadDataSlot(bool *r))
Q_PRIVATE_SLOT(d_func(), void wantUploadDataSlot(qint64))
diff --git a/src/network/doc/images/network-examples.png b/src/network/doc/images/network-examples.png
new file mode 100644
index 0000000000..15dfba850a
--- /dev/null
+++ b/src/network/doc/images/network-examples.png
Binary files differ
diff --git a/src/network/doc/qtnetwork.qdocconf b/src/network/doc/qtnetwork.qdocconf
index 17aa5e4251..702338e224 100644
--- a/src/network/doc/qtnetwork.qdocconf
+++ b/src/network/doc/qtnetwork.qdocconf
@@ -3,21 +3,21 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
project = QtNetwork
description = Qt Network Reference Documentation
url = http://qt-project.org/doc/qtnetwork
-version = 5.0.0
+version = 5.0.1
examplesinstallpath = network
qhp.projects = QtNetwork
qhp.QtNetwork.file = qtnetwork.qhp
-qhp.QtNetwork.namespace = org.qt-project.qtnetwork.500
+qhp.QtNetwork.namespace = org.qt-project.qtnetwork.501
qhp.QtNetwork.virtualFolder = qtnetwork
qhp.QtNetwork.indexTitle = Qt Network
qhp.QtNetwork.indexRoot =
-qhp.QtNetwork.filterAttributes = qtnetwork 5.0.0 qtrefdoc
-qhp.QtNetwork.customFilters.Qt.name = QtNetwork 5.0.0
-qhp.QtNetwork.customFilters.Qt.filterAttributes = qtnetwork 5.0.0
+qhp.QtNetwork.filterAttributes = qtnetwork 5.0.1 qtrefdoc
+qhp.QtNetwork.customFilters.Qt.name = QtNetwork 5.0.1
+qhp.QtNetwork.customFilters.Qt.filterAttributes = qtnetwork 5.0.1
qhp.QtNetwork.subprojects = classes
qhp.QtNetwork.subprojects.classes.title = C++ Classes
diff --git a/src/network/doc/snippets/code/src_network_access_qftp.cpp b/src/network/doc/snippets/code/src_network_access_qftp.cpp
index 77f5ee2df2..4fa81efd84 100644
--- a/src/network/doc/snippets/code/src_network_access_qftp.cpp
+++ b/src/network/doc/snippets/code/src_network_access_qftp.cpp
@@ -40,13 +40,13 @@
//! [0]
QFtp *ftp = new QFtp(parent);
-ftp->connectToHost("ftp.qt.nokia.com");
+ftp->connectToHost("ftp.qt-project.org");
ftp->login();
//! [0]
//! [1]
-ftp->connectToHost("ftp.qt.nokia.com"); // id == 1
+ftp->connectToHost("ftp.qt-project.org"); // id == 1
ftp->login(); // id == 2
ftp->cd("qt"); // id == 3
ftp->get("INSTALL"); // id == 4
diff --git a/src/network/doc/src/examples.qdoc b/src/network/doc/src/examples.qdoc
new file mode 100644
index 0000000000..1d3b83ae80
--- /dev/null
+++ b/src/network/doc/src/examples.qdoc
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** 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. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \group examples-network
+ \ingroup all-examples
+ \title Network Examples
+ \brief How to do network programming in Qt.
+
+ \image network-examples.png
+
+ Qt is provided with an extensive set of network classes to support both
+ client-based and server side network programming.
+
+ These examples demonstrate the fundamental aspects of network programming
+ with Qt.
+
+*/
+
+/*
+ \list
+ \li \l{network/blockingfortuneclient}{Blocking Fortune Client}\raisedaster
+ \li \l{network/broadcastreceiver}{Broadcast Receiver}
+ \li \l{network/broadcastsender}{Broadcast Sender}
+ \li \l{network/download}{Download}
+ \li \l{network/downloadmanager}{Download Manager}
+ \li \l{network/network-chat}{Network Chat}
+ \li \l{network/fortuneclient}{Fortune Client}\raisedaster
+ \li \l{network/fortuneserver}{Fortune Server}\raisedaster
+ \li \l{network/qftp}{FTP}\raisedaster
+ \li \l{network/http}{HTTP}
+ \li \l{network/loopback}{Loopback}
+ \li \l{network/threadedfortuneserver}{Threaded Fortune Server}\raisedaster
+ \li \l{network/torrent}{Torrent}
+ \li \l{network/googlesuggest}{Google Suggest}
+ \li \l{network/bearercloud}{Bearer Cloud}\raisedaster
+ \li \l{network/bearermonitor}{Bearer Monitor}
+ \li \l{network/securesocketclient}{Secure Socket Client}
+ \li \l{network/multicastreceiver}{Multicast Receiver}
+ \li \l{network/multicastsender}{Multicast Sender}
+ \endlist
+
+ Examples marked with an asterisk (*) are fully documented.
+*/
diff --git a/src/network/doc/src/ssl.qdoc b/src/network/doc/src/ssl.qdoc
index 0a07e72f93..751c7cd668 100644
--- a/src/network/doc/src/ssl.qdoc
+++ b/src/network/doc/src/ssl.qdoc
@@ -33,8 +33,8 @@
\keyword SSL
The classes below provide support for secure network communication using
- the Secure Sockets Layer (SSL) protocol, using the \l{OpenSSL Toolkit} to
- perform encryption and protocol handling.
+ the Secure Sockets Layer (SSL) protocol, using the OpenSSL Toolkit (\l{http://www.openssl.org/})
+ to perform encryption and protocol handling.
See the \l{General Qt Requirements} page for information about the
versions of OpenSSL that are known to work with Qt.
diff --git a/src/network/kernel/qnetworkproxy.cpp b/src/network/kernel/qnetworkproxy.cpp
index 60139dcc8a..7f1e66a2ce 100644
--- a/src/network/kernel/qnetworkproxy.cpp
+++ b/src/network/kernel/qnetworkproxy.cpp
@@ -84,7 +84,7 @@
\section1 SOCKS5
- The SOCKS5 support in Qt 4 is based on \l{RFC 1928} and \l{RFC 1929}.
+ The SOCKS5 support in Qt 4 is based on \l{http://www.rfc-editor.org/rfc/rfc1928.txt}{RFC 1928} and \l{http://www.rfc-editor.org/rfc/rfc1929.txt}{RFC 1929}.
The supported authentication methods are no authentication and
username/password authentication. Both IPv4 and IPv6 are
supported. Domain names are resolved through the SOCKS5 server if
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp
index 5ff7da9e9d..124f15e586 100644
--- a/src/network/socket/qabstractsocket.cpp
+++ b/src/network/socket/qabstractsocket.cpp
@@ -195,7 +195,7 @@
\fn void QAbstractSocket::disconnected()
This signal is emitted when the socket has been disconnected.
-
+
\warning If you need to delete the sender() of this signal in a slot connected
to it, use the \l{QObject::deleteLater()}{deleteLater()} function.
@@ -639,7 +639,7 @@ bool QAbstractSocketPrivate::initSocketLayer(QAbstractSocket::NetworkLayerProtoc
socketEngine->errorString().toLatin1().constData());
#endif
socketError = socketEngine->error();
- q->setErrorString(socketEngine->errorString());
+ q->setErrorString(socketEngine->errorString());
return false;
}
diff --git a/src/network/socket/qlocalserver_tcp.cpp b/src/network/socket/qlocalserver_tcp.cpp
index cb727a9d2c..a705b18dc5 100644
--- a/src/network/socket/qlocalserver_tcp.cpp
+++ b/src/network/socket/qlocalserver_tcp.cpp
@@ -67,7 +67,7 @@ bool QLocalServerPrivate::listen(const QString &requestedServerName)
else
fullServerName = prefix + requestedServerName;
- QSettings settings(QLatin1String("Trolltech"), QLatin1String("Qt"));
+ QSettings settings(QLatin1String("QtProject"), QLatin1String("Qt"));
if (settings.contains(fullServerName)) {
qWarning("QLocalServer::listen: server name is already in use.");
tcpServer.close();
@@ -87,7 +87,7 @@ bool QLocalServerPrivate::listen(qintptr socketDescriptor)
void QLocalServerPrivate::closeServer()
{
- QSettings settings(QLatin1String("Trolltech"), QLatin1String("Qt"));
+ QSettings settings(QLatin1String("QtProject"), QLatin1String("Qt"));
if (fullServerName == QLatin1String("QLocalServer"))
settings.setValue(fullServerName, QVariant());
else
@@ -126,7 +126,7 @@ bool QLocalServerPrivate::removeServer(const QString &name)
else
serverName = prefix + name;
- QSettings settings(QLatin1String("Trolltech"), QLatin1String("Qt"));
+ QSettings settings(QLatin1String("QtProject"), QLatin1String("Qt"));
if (settings.contains(serverName))
settings.remove(serverName);
diff --git a/src/network/socket/qlocalsocket_tcp.cpp b/src/network/socket/qlocalsocket_tcp.cpp
index 5429d8dc36..913d10f50a 100644
--- a/src/network/socket/qlocalsocket_tcp.cpp
+++ b/src/network/socket/qlocalsocket_tcp.cpp
@@ -238,7 +238,7 @@ void QLocalSocket::connectToServer(const QString &name, OpenMode openMode)
else
d->fullServerName = prefix + name;
- QSettings settings(QLatin1String("Trolltech"), QLatin1String("Qt"));
+ QSettings settings(QLatin1String("QtProject"), QLatin1String("Qt"));
bool ok;
const quint16 port = settings.value(d->fullServerName).toUInt(&ok);
if (!ok) {
diff --git a/src/network/socket/qlocalsocket_win.cpp b/src/network/socket/qlocalsocket_win.cpp
index cb264a4c83..0138a96261 100644
--- a/src/network/socket/qlocalsocket_win.cpp
+++ b/src/network/socket/qlocalsocket_win.cpp
@@ -67,7 +67,7 @@ void QLocalSocketPrivate::_q_winError(ulong windowsError, const QString &functio
Q_Q(QLocalSocket);
QLocalSocket::LocalSocketState currentState = state;
- // If the connectToServer fails due to WaitNamedPipe() time-out, assume ConnectionError
+ // If the connectToServer fails due to WaitNamedPipe() time-out, assume ConnectionError
if (state == QLocalSocket::ConnectingState && windowsError == ERROR_SEM_TIMEOUT)
windowsError = ERROR_NO_DATA;
diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp
index e9353916cb..6d3a77b45f 100644
--- a/src/network/ssl/qsslcertificate.cpp
+++ b/src/network/ssl/qsslcertificate.cpp
@@ -245,7 +245,7 @@ bool QSslCertificate::isNull() const
expiryDate() and effectiveDate() with QDateTime::currentDateTime()
This function checks that the current
- data-time is within the date-time range during which the
+ date-time is within the date-time range during which the
certificate is considered valid, and checks that the
certificate is not in a blacklist of fraudulent certificates.
diff --git a/src/network/ssl/qsslerror.h b/src/network/ssl/qsslerror.h
index a222e2c58d..1acc5cb6e5 100644
--- a/src/network/ssl/qsslerror.h
+++ b/src/network/ssl/qsslerror.h
@@ -122,6 +122,10 @@ Q_NETWORK_EXPORT QDebug operator<<(QDebug debug, const QSslError::SslError &erro
QT_END_NAMESPACE
+#ifndef QT_NO_SSL
+Q_DECLARE_METATYPE(QList<QSslError>)
+#endif
+
QT_END_HEADER
#endif
diff --git a/src/network/ssl/qsslsocket.h b/src/network/ssl/qsslsocket.h
index 306fb636a6..37f7c484f4 100644
--- a/src/network/ssl/qsslsocket.h
+++ b/src/network/ssl/qsslsocket.h
@@ -223,10 +223,6 @@ private:
QT_END_NAMESPACE
-#ifndef QT_NO_SSL
-Q_DECLARE_METATYPE(QList<QSslError>)
-#endif
-
QT_END_HEADER
#endif
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index 39b49ce09e..9e0331391b 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -229,12 +229,12 @@ static int q_X509Callback(int ok, X509_STORE_CTX *ctx)
{
if (!ok) {
// Store the error and at which depth the error was detected.
- _q_sslErrorList()->errors << qMakePair<int, int>(ctx->error, ctx->error_depth);
+ _q_sslErrorList()->errors << qMakePair<int, int>(q_X509_STORE_CTX_get_error(ctx), q_X509_STORE_CTX_get_error_depth(ctx));
#ifdef QSSLSOCKET_DEBUG
qDebug() << "verification error: dumping bad certificate";
- qDebug() << QSslCertificatePrivate::QSslCertificate_from_X509(ctx->current_cert).toPem();
+ qDebug() << QSslCertificatePrivate::QSslCertificate_from_X509(q_X509_STORE_CTX_get_current_cert(ctx)).toPem();
qDebug() << "dumping chain";
- foreach (QSslCertificate cert, QSslSocketBackendPrivate::STACKOFX509_to_QSslCertificates(ctx->chain)) {
+ foreach (QSslCertificate cert, QSslSocketBackendPrivate::STACKOFX509_to_QSslCertificates(q_X509_STORE_CTX_get_chain(ctx))) {
QString certFormat(QStringLiteral("O=%1 CN=%2 L=%3 OU=%4 C=%5 ST=%6"));
qDebug() << "Issuer:" << "O=" << cert.issuerInfo(QSslCertificate::Organization)
<< "CN=" << cert.issuerInfo(QSslCertificate::CommonName)
diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp
index eeae9d461f..0df77b07f7 100644
--- a/src/network/ssl/qsslsocket_openssl_symbols.cpp
+++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp
@@ -294,6 +294,10 @@ DEFINEFUNC2(int, X509_STORE_add_cert, X509_STORE *a, a, X509 *b, b, return 0, re
DEFINEFUNC(void, X509_STORE_CTX_free, X509_STORE_CTX *a, a, return, DUMMYARG)
DEFINEFUNC4(int, X509_STORE_CTX_init, X509_STORE_CTX *a, a, X509_STORE *b, b, X509 *c, c, STACK_OF(X509) *d, d, return -1, return)
DEFINEFUNC2(int, X509_STORE_CTX_set_purpose, X509_STORE_CTX *a, a, int b, b, return -1, return)
+DEFINEFUNC(int, X509_STORE_CTX_get_error, X509_STORE_CTX *a, a, return -1, return)
+DEFINEFUNC(int, X509_STORE_CTX_get_error_depth, X509_STORE_CTX *a, a, return -1, return)
+DEFINEFUNC(X509 *, X509_STORE_CTX_get_current_cert, X509_STORE_CTX *a, a, return 0, return)
+DEFINEFUNC(STACK_OF(X509) *, X509_STORE_CTX_get_chain, X509_STORE_CTX *a, a, return 0, return)
DEFINEFUNC(X509_STORE_CTX *, X509_STORE_CTX_new, DUMMYARG, DUMMYARG, return 0, return)
#ifdef SSLEAY_MACROS
DEFINEFUNC2(int, i2d_DSAPrivateKey, const DSA *a, a, unsigned char **b, b, return -1, return)
@@ -714,6 +718,10 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(X509_STORE_CTX_init)
RESOLVEFUNC(X509_STORE_CTX_new)
RESOLVEFUNC(X509_STORE_CTX_set_purpose)
+ RESOLVEFUNC(X509_STORE_CTX_get_error)
+ RESOLVEFUNC(X509_STORE_CTX_get_error_depth)
+ RESOLVEFUNC(X509_STORE_CTX_get_current_cert)
+ RESOLVEFUNC(X509_STORE_CTX_get_chain)
RESOLVEFUNC(X509_cmp)
#ifndef SSLEAY_MACROS
RESOLVEFUNC(X509_dup)
diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h
index 40c6522d93..2be84331e3 100644
--- a/src/network/ssl/qsslsocket_openssl_symbols_p.h
+++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h
@@ -398,6 +398,10 @@ int q_X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store,
X509 *x509, STACK_OF(X509) *chain);
X509_STORE_CTX *q_X509_STORE_CTX_new();
int q_X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, int purpose);
+int q_X509_STORE_CTX_get_error(X509_STORE_CTX *ctx);
+int q_X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx);
+X509 *q_X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx);
+STACK_OF(X509) *q_X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx);
#define q_BIO_get_mem_data(b, pp) (int)q_BIO_ctrl(b,BIO_CTRL_INFO,0,(char *)pp)
#define q_BIO_pending(b) (int)q_BIO_ctrl(b,BIO_CTRL_PENDING,0,NULL)
diff --git a/src/opengl/doc/qtopengl.qdocconf b/src/opengl/doc/qtopengl.qdocconf
index 2d8703a1dc..131fdb8968 100644
--- a/src/opengl/doc/qtopengl.qdocconf
+++ b/src/opengl/doc/qtopengl.qdocconf
@@ -23,6 +23,8 @@ imagedirs += images \
depends += qtcore qtgui qtwidgets
+examplesinstallpath = opengl
+
# The following parameters are for creating a qhp file, the qhelpgenerator
# program can convert the qhp file into a qch file which can be opened in
# Qt Assistant and/or Qt Creator.
@@ -37,15 +39,16 @@ qhp.qtopengl.file = qtopengl.qhp
# Namespace for the output file. This namespace is used to distinguish between
# different documentation files in Creator/Assistant.
-qhp.qtopengl.namespace = org.qt-project.qtopengl.500
+qhp.qtopengl.namespace = org.qt-project.qtopengl.501
# Title for the package, will be the main title for the package in
# Assistant/Creator.
-qhp.qtopengl.indexTitle = Qt Script Documentation
+qhp.qtopengl.indexTitle = Qt OpenGL
# Only update the name of the project for the next variables.
qhp.qtopengl.virtualFolder = qtopengl
qhp.qtopengl.subprojects = classes
-qhp.qtopengl.subprojects.classes.title = Qt D-Bus C++ Classes
+qhp.qtopengl.subprojects.classes.title = C++ Classes
+qhp.qtopengl.subprojects.classes.indexTitle = Qt OpenGL C++ Classes
qhp.qtopengl.subprojects.classes.selectors = class fake:headerfile
qhp.qtopengl.subprojects.classes.sortPages = true
diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro
index 57892c7300..64b33b8c97 100644
--- a/src/opengl/opengl.pro
+++ b/src/opengl/opengl.pro
@@ -59,5 +59,3 @@ SOURCES += qglshaderprogram.cpp \
gl2paintengineex/qtextureglyphcache_gl.cpp
SOURCES += qgl_qpa.cpp
-
-INCLUDEPATH += ../3rdparty/harfbuzz/src
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 69f4871c6b..9489762516 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -1477,6 +1477,11 @@ bool operator!=(const QGLFormat& a, const QGLFormat& b)
}
struct QGLContextGroupList {
+ QGLContextGroupList()
+ : m_mutex(QMutex::Recursive)
+ {
+ }
+
void append(QGLContextGroup *group) {
QMutexLocker locker(&m_mutex);
m_list.append(group);
diff --git a/src/opengl/qgl_qpa.cpp b/src/opengl/qgl_qpa.cpp
index 0e8b8abb4f..fa94b7cc37 100644
--- a/src/opengl/qgl_qpa.cpp
+++ b/src/opengl/qgl_qpa.cpp
@@ -70,8 +70,8 @@ QGLFormat QGLFormat::fromSurfaceFormat(const QSurfaceFormat &format)
if (format.depthBufferSize() >= 0)
retFormat.setDepthBufferSize(format.depthBufferSize());
if (format.samples() > 1) {
- retFormat.setSampleBuffers(format.samples());
- retFormat.setSamples(true);
+ retFormat.setSampleBuffers(true);
+ retFormat.setSamples(format.samples());
}
if (format.stencilBufferSize() > 0) {
retFormat.setStencil(true);
@@ -421,7 +421,8 @@ QOpenGLContext *QGLContext::contextHandle() const
}
/*!
- Returns a OpenGL context for the window context specified by \a windowContext
+ Returns a OpenGL context for the window context specified by the \a context
+ parameter.
*/
QGLContext *QGLContext::fromOpenGLContext(QOpenGLContext *context)
{
diff --git a/src/platformsupport/dnd/qsimpledrag.cpp b/src/platformsupport/dnd/qsimpledrag.cpp
index 18e6b97e3c..efaede4c5f 100644
--- a/src/platformsupport/dnd/qsimpledrag.cpp
+++ b/src/platformsupport/dnd/qsimpledrag.cpp
@@ -237,6 +237,7 @@ void QBasicDrag::exitDndEventLoop()
void QBasicDrag::updateCursor(Qt::DropAction action)
{
+#ifndef QT_NO_CURSOR
Qt::CursorShape cursorShape = Qt::ForbiddenCursor;
if (canDrop()) {
switch (action) {
@@ -267,6 +268,7 @@ void QBasicDrag::updateCursor(Qt::DropAction action)
}
}
}
+#endif
updateAction(action);
}
diff --git a/src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp b/src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp
index b8f4475d9e..3154e65ec8 100644
--- a/src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp
+++ b/src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp
@@ -119,8 +119,6 @@ QPAEventDispatcherGlib::~QPAEventDispatcherGlib()
bool QPAEventDispatcherGlib::processEvents(QEventLoop::ProcessEventsFlags flags)
{
- Q_D(QPAEventDispatcherGlib);
-
m_flags = flags;
return QEventDispatcherGlib::processEvents(m_flags);
}
diff --git a/src/platformsupport/fbconvenience/qfbcursor.cpp b/src/platformsupport/fbconvenience/qfbcursor.cpp
index f3b8ecbf50..bc44055721 100644
--- a/src/platformsupport/fbconvenience/qfbcursor.cpp
+++ b/src/platformsupport/fbconvenience/qfbcursor.cpp
@@ -116,6 +116,7 @@ void QFbCursor::setCursor(const uchar *data, const uchar *mask, int width, int h
mGraphic->set(data, mask, width, height, hotX, hotY);
}
+#ifndef QT_NO_CURSOR
void QFbCursor::changeCursor(QCursor * widgetCursor, QWindow *window)
{
Q_UNUSED(window);
@@ -134,6 +135,7 @@ void QFbCursor::changeCursor(QCursor * widgetCursor, QWindow *window)
if (mOnScreen || mScreen->geometry().intersects(mCurrentRect.translated(mScreenOffset)))
setDirty();
}
+#endif
QT_END_NAMESPACE
diff --git a/src/platformsupport/fbconvenience/qfbcursor_p.h b/src/platformsupport/fbconvenience/qfbcursor_p.h
index 9468e647aa..a56e352533 100644
--- a/src/platformsupport/fbconvenience/qfbcursor_p.h
+++ b/src/platformsupport/fbconvenience/qfbcursor_p.h
@@ -59,7 +59,9 @@ public:
// input methods
virtual void pointerEvent(const QMouseEvent &event);
+#ifndef QT_NO_CURSOR
virtual void changeCursor(QCursor *widgetCursor, QWindow *window);
+#endif
virtual void setDirty() { mDirty = true; /* screen->setDirty(QRect()); */ }
virtual bool isDirty() const { return mDirty; }
diff --git a/src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp b/src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp
index d0755711de..d50d23e2a9 100644
--- a/src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp
+++ b/src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp
@@ -452,7 +452,7 @@ QStringList QBasicFontDatabase::addTTFile(const QByteArray &fontData, const QByt
QFont::Stretch stretch = QFont::Unstretched;
- registerFont(family,QString(),weight,style,stretch,true,true,0,fixedPitch,writingSystems,fontFile);
+ registerFont(family,QString::fromLatin1(face->style_name),QString(),weight,style,stretch,true,true,0,fixedPitch,writingSystems,fontFile);
families.append(family);
diff --git a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp
index 128ef396db..2e458d9153 100644
--- a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp
+++ b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp
@@ -362,6 +362,7 @@ void QFontconfigDatabase::populateFontDatabase()
FcChar8 *file_value;
int indexValue;
FcChar8 *foundry_value;
+ FcChar8 *style_value;
FcBool scalable;
FcBool antialias;
@@ -369,7 +370,7 @@ void QFontconfigDatabase::populateFontDatabase()
FcObjectSet *os = FcObjectSetCreate();
FcPattern *pattern = FcPatternCreate();
const char *properties [] = {
- FC_FAMILY, FC_WEIGHT, FC_SLANT,
+ FC_FAMILY, FC_STYLE, FC_WEIGHT, FC_SLANT,
FC_SPACING, FC_FILE, FC_INDEX,
FC_LANG, FC_CHARSET, FC_FOUNDRY, FC_SCALABLE, FC_PIXEL_SIZE, FC_WEIGHT,
FC_WIDTH,
@@ -415,6 +416,8 @@ void QFontconfigDatabase::populateFontDatabase()
scalable = FcTrue;
if (FcPatternGetString(fonts->fonts[i], FC_FOUNDRY, 0, &foundry_value) != FcResultMatch)
foundry_value = 0;
+ if (FcPatternGetString(fonts->fonts[i], FC_STYLE, 0, &style_value) != FcResultMatch)
+ style_value = 0;
if(FcPatternGetBool(fonts->fonts[i],FC_ANTIALIAS,0,&antialias) != FcResultMatch)
antialias = true;
@@ -482,7 +485,8 @@ void QFontconfigDatabase::populateFontDatabase()
bool fixedPitch = spacing_value >= FC_MONO;
QFont::Stretch stretch = QFont::Unstretched;
- QPlatformFontDatabase::registerFont(familyName,QLatin1String((const char *)foundry_value),weight,style,stretch,antialias,scalable,pixel_size,fixedPitch,writingSystems,fontFile);
+ QString styleName = style_value ? QString::fromUtf8((const char *) style_value) : QString();
+ QPlatformFontDatabase::registerFont(familyName,styleName,QLatin1String((const char *)foundry_value),weight,style,stretch,antialias,scalable,pixel_size,fixedPitch,writingSystems,fontFile);
// qDebug() << familyName << (const char *)foundry_value << weight << style << &writingSystems << scalable << true << pixel_size;
}
@@ -506,9 +510,9 @@ void QFontconfigDatabase::populateFontDatabase()
while (f->qtname) {
QString familyQtName = QString::fromLatin1(f->qtname);
- registerFont(familyQtName,QString(),QFont::Normal,QFont::StyleNormal,QFont::Unstretched,true,true,0,f->fixed,ws,0);
- registerFont(familyQtName,QString(),QFont::Normal,QFont::StyleItalic,QFont::Unstretched,true,true,0,f->fixed,ws,0);
- registerFont(familyQtName,QString(),QFont::Normal,QFont::StyleOblique,QFont::Unstretched,true,true,0,f->fixed,ws,0);
+ registerFont(familyQtName,QString(),QString(),QFont::Normal,QFont::StyleNormal,QFont::Unstretched,true,true,0,f->fixed,ws,0);
+ registerFont(familyQtName,QString(),QString(),QFont::Normal,QFont::StyleItalic,QFont::Unstretched,true,true,0,f->fixed,ws,0);
+ registerFont(familyQtName,QString(),QString(),QFont::Normal,QFont::StyleOblique,QFont::Unstretched,true,true,0,f->fixed,ws,0);
++f;
}
diff --git a/src/platformsupport/fontdatabases/fontdatabases.pri b/src/platformsupport/fontdatabases/fontdatabases.pri
index 0fc4e71a3f..003017473b 100644
--- a/src/platformsupport/fontdatabases/fontdatabases.pri
+++ b/src/platformsupport/fontdatabases/fontdatabases.pri
@@ -1,5 +1,4 @@
DEFINES += QT_COMPILES_IN_HARFBUZZ
-INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty/harfbuzz/src
!win32|contains(QT_CONFIG, freetype):!mac {
include($$PWD/basic/basic.pri)
diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
index ef0c1b5103..edb0e90163 100644
--- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
+++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
@@ -227,6 +227,7 @@ void QCoreTextFontDatabase::populateFontDatabase()
for (int i = 0; i < numFonts; ++i) {
CTFontDescriptorRef font = (CTFontDescriptorRef) CFArrayGetValueAtIndex(fonts, i);
QCFString familyName = (CFStringRef) CTFontDescriptorCopyLocalizedAttribute(font, kCTFontFamilyNameAttribute, NULL);
+ QCFString styleName = (CFStringRef)CTFontDescriptorCopyLocalizedAttribute(font, kCTFontStyleNameAttribute, NULL);
QCFType<CFDictionaryRef> styles = (CFDictionaryRef) CTFontDescriptorCopyAttribute(font, kCTFontTraitsAttribute);
QFont::Weight weight = QFont::Normal;
QFont::Style style = QFont::StyleNormal;
@@ -285,7 +286,7 @@ void QCoreTextFontDatabase::populateFontDatabase()
}
CFRetain(font);
- QPlatformFontDatabase::registerFont(familyName, foundryName, weight, style, stretch,
+ QPlatformFontDatabase::registerFont(familyName, styleName, foundryName, weight, style, stretch,
true /* antialiased */, true /* scalable */,
pixelSize, fixedPitch, writingSystems, (void *) font);
CFStringRef psName = (CFStringRef) CTFontDescriptorCopyAttribute(font, kCTFontNameAttribute);
diff --git a/src/platformsupport/input/evdevtouch/qevdevtouch.cpp b/src/platformsupport/input/evdevtouch/qevdevtouch.cpp
index 9dd607b425..042d7547b6 100644
--- a/src/platformsupport/input/evdevtouch/qevdevtouch.cpp
+++ b/src/platformsupport/input/evdevtouch/qevdevtouch.cpp
@@ -457,7 +457,7 @@ void QEvdevTouchScreenData::assignIds()
int maxId = -1;
QHash<int, Contact>::iterator it, ite, bestMatch;
while (!pending.isEmpty() && !candidates.isEmpty()) {
- int bestDist = -1, bestId;
+ int bestDist = -1, bestId = 0;
for (it = pending.begin(), ite = pending.end(); it != ite; ++it) {
int dist;
int id = findClosestContact(candidates, it->x, it->y, &dist);
diff --git a/src/platformsupport/linuxaccessibility/application.cpp b/src/platformsupport/linuxaccessibility/application.cpp
index c2049e536a..22059de864 100644
--- a/src/platformsupport/linuxaccessibility/application.cpp
+++ b/src/platformsupport/linuxaccessibility/application.cpp
@@ -52,6 +52,8 @@
QT_BEGIN_NAMESPACE
+#ifndef QT_NO_ACCESSIBILITY
+
/*!
\class QSpiApplicationAdaptor
\internal
@@ -217,4 +219,6 @@ void QSpiApplicationAdaptor::notifyKeyboardListenerError(const QDBusError& error
}
}
+#endif // QT_NO_ACCESSIBILITY
+
QT_END_NAMESPACE
diff --git a/src/platformsupport/linuxaccessibility/application_p.h b/src/platformsupport/linuxaccessibility/application_p.h
index 14b8a71b42..4a60bbfe84 100644
--- a/src/platformsupport/linuxaccessibility/application_p.h
+++ b/src/platformsupport/linuxaccessibility/application_p.h
@@ -49,6 +49,8 @@
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+#ifndef QT_NO_ACCESSIBILITY
+
/*
* Used for the root object.
*
@@ -80,6 +82,8 @@ private:
QDBusConnection dbusConnection;
};
+#endif // QT_NO_ACCESSIBILITY
+
QT_END_NAMESPACE
QT_END_HEADER
diff --git a/src/platformsupport/linuxaccessibility/atspiadaptor.cpp b/src/platformsupport/linuxaccessibility/atspiadaptor.cpp
index 6926f546a2..534cf4b73a 100644
--- a/src/platformsupport/linuxaccessibility/atspiadaptor.cpp
+++ b/src/platformsupport/linuxaccessibility/atspiadaptor.cpp
@@ -65,6 +65,8 @@
QT_BEGIN_NAMESPACE
+#ifndef QT_NO_ACCESSIBILITY
+
static bool isDebugging = false;
#define qAtspiDebug if (!::isDebugging); else qDebug
@@ -99,6 +101,7 @@ AtSpiAdaptor::AtSpiAdaptor(DBusConnection *connection, QObject *parent)
, sendObject_row_inserted(0)
, sendObject_row_reordered(0)
, sendObject_selection_changed(0)
+ , sendObject_state_changed(0)
, sendObject_text_attributes_changed(0)
, sendObject_text_bounds_changed(0)
, sendObject_text_caret_moved(0)
@@ -903,6 +906,14 @@ QAIPointer AtSpiAdaptor::interfaceFromPath(const QString& dbusPath) const
return QAIPointer();
}
+void AtSpiAdaptor::notifyStateChange(const QAIPointer &interface, const QString &state, int value)
+{
+ QString path = pathForInterface(interface);
+ QVariantList stateArgs = packDBusSignalArguments(state, value, 0, variantForPath(path));
+ sendDBusSignal(path, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_OBJECT),
+ QLatin1String("StateChanged"), stateArgs);
+}
+
/*!
This function gets called when Qt notifies about accessibility updates.
@@ -919,19 +930,13 @@ void AtSpiAdaptor::notify(QAccessibleEvent *event)
break;
case QAccessible::ObjectShow: {
if (sendObject || sendObject_state_changed) {
- QString path = pathForInterface(QAIPointer(event->accessibleInterface()));
- QVariantList stateArgs = packDBusSignalArguments(QLatin1String("showing"), 1, 0, variantForPath(path));
- sendDBusSignal(path, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_OBJECT),
- QLatin1String("StateChanged"), stateArgs);
+ notifyStateChange(QAIPointer(event->accessibleInterface()), QLatin1String("showing"), 1);
}
break;
}
case QAccessible::ObjectHide: {
if (sendObject || sendObject_state_changed) {
- QString path = pathForInterface(QAIPointer(event->accessibleInterface()));
- QVariantList stateArgs = packDBusSignalArguments(QLatin1String("showing"), 0, 0, variantForPath(path));
- sendDBusSignal(path, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_OBJECT),
- QLatin1String("StateChanged"), stateArgs);
+ notifyStateChange(QAIPointer(event->accessibleInterface()), QLatin1String("showing"), 0);
}
break;
}
@@ -968,7 +973,10 @@ void AtSpiAdaptor::notify(QAccessibleEvent *event)
case QAccessible::TextUpdated: {
if (sendObject || sendObject_text_changed) {
QAIPointer iface = QAIPointer(event->accessibleInterface());
- Q_ASSERT(iface->textInterface());
+ if (!iface || !iface->textInterface()) {
+ qAtspiDebug() << "Received text event for invalid interface.";
+ return;
+ }
QString path = pathForInterface(iface);
int changePosition = 0;
@@ -1023,8 +1031,8 @@ void AtSpiAdaptor::notify(QAccessibleEvent *event)
case QAccessible::TextCaretMoved: {
if (sendObject || sendObject_text_caret_moved) {
QAIPointer iface = QAIPointer(event->accessibleInterface());
- if (!iface->textInterface()) {
- qWarning() << "Sending TextCaretMoved from object that does not implement text interface: " << iface << iface->object();
+ if (!iface || !iface->textInterface()) {
+ qWarning() << "Sending TextCaretMoved from object that does not implement text interface: " << iface;
return;
}
@@ -1049,9 +1057,13 @@ void AtSpiAdaptor::notify(QAccessibleEvent *event)
break;
}
case QAccessible::ValueChanged: {
- if (sendObject || sendObject_value_changed) {
+ if (sendObject || sendObject_value_changed || sendObject_property_change_accessible_value) {
QAIPointer iface = QAIPointer(event->accessibleInterface());
- Q_ASSERT(iface->valueInterface());
+ if (!iface || !iface->valueInterface()) {
+ qWarning() << "ValueChanged event from invalid accessible: " << iface;
+ return;
+ }
+
QString path = pathForInterface(iface);
QVariantList args = packDBusSignalArguments(QLatin1String("accessible-value"), 0, 0, variantForPath(path));
sendDBusSignal(path, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_OBJECT),
@@ -1061,6 +1073,10 @@ void AtSpiAdaptor::notify(QAccessibleEvent *event)
}
case QAccessible::Selection: {
QAIPointer iface = QAIPointer(event->accessibleInterface());
+ if (!iface) {
+ qWarning() << "Selection event from invalid accessible.";
+ return;
+ }
QString path = pathForInterface(iface);
int selected = iface->state().selected ? 1 : 0;
QVariantList stateArgs = packDBusSignalArguments(QLatin1String("selected"), selected, 0, variantForPath(path));
@@ -1074,14 +1090,15 @@ void AtSpiAdaptor::notify(QAccessibleEvent *event)
QAccessible::State stateChange = static_cast<QAccessibleStateChangeEvent*>(event)->changedStates();
if (stateChange.checked) {
QAIPointer iface = QAIPointer(event->accessibleInterface());
+ if (!iface) {
+ qWarning() << "StateChanged event from invalid accessible.";
+ return;
+ }
int checked = iface->state().checked;
- QString path = pathForInterface(iface);
- QVariantList args = packDBusSignalArguments(QLatin1String("checked"), checked, 0, variantForPath(path));
- sendDBusSignal(path, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_OBJECT),
- QLatin1String("StateChanged"), args);
+ notifyStateChange(iface, QLatin1String("checked"), checked);
} else if (stateChange.active) {
QAIPointer iface = QAIPointer(event->accessibleInterface());
- if (!(iface->role() == QAccessible::Window && (sendWindow || sendWindow_activate)))
+ if (!iface || !(iface->role() == QAccessible::Window && (sendWindow || sendWindow_activate)))
return;
QString windowTitle = iface->text(QAccessible::Name);
QDBusVariant data;
@@ -1092,9 +1109,15 @@ void AtSpiAdaptor::notify(QAccessibleEvent *event)
QString path = pathForInterface(iface);
sendDBusSignal(path, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_WINDOW), status, args);
- QVariantList stateArgs = packDBusSignalArguments(QLatin1String("active"), iface->state().active ? 1 : 0, 0, variantForPath(path));
- sendDBusSignal(path, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_OBJECT),
- QLatin1String("StateChanged"), stateArgs);
+ int isActive = iface->state().active;
+ notifyStateChange(iface, QLatin1String("active"), isActive);
+ } else if (stateChange.disabled) {
+ QAIPointer iface = QAIPointer(event->accessibleInterface());
+ QAccessible::State state = iface->state();
+ bool enabled = !state.disabled;
+
+ notifyStateChange(iface, QLatin1String("enabled"), enabled);
+ notifyStateChange(iface, QLatin1String("sensitive"), enabled);
}
}
break;
@@ -2093,44 +2116,35 @@ bool AtSpiAdaptor::editableTextInterface(const QAIPointer &interface, const QStr
// Value interface
bool AtSpiAdaptor::valueInterface(const QAIPointer &interface, const QString &function, const QDBusMessage &message, const QDBusConnection &connection)
{
- if (0) {
- } else if (function == QLatin1String("SetCurrentValue")) {
+ if (function == QLatin1String("SetCurrentValue")) {
QDBusVariant v = message.arguments().at(2).value<QDBusVariant>();
double value = v.variant().toDouble();
//Temporary fix
//See https://bugzilla.gnome.org/show_bug.cgi?id=652596
interface->valueInterface()->setCurrentValue(value);
connection.send(message.createReply()); // FIXME is the reply needed?
- } else if (function == QLatin1String("GetCurrentValue")) {
- bool success;
- double val = interface->valueInterface()->currentValue().toDouble(&success);
- if (!success) {
- qAtspiDebug ("AtSpiAdaptor::valueInterface: Could not convert current value to double.");
- }
- connection.send(message.createReply(
- QVariant::fromValue(QDBusVariant(QVariant::fromValue(val)))));
- } else if (function == QLatin1String("GetMaximumValue")) {
- bool success;
- double val = interface->valueInterface()->maximumValue().toDouble(&success);
- if (!success) {
- qAtspiDebug ("AtSpiAdaptor::valueInterface: Could not convert current value to double.");
+ } else {
+ QVariant value;
+ if (function == QLatin1String("GetCurrentValue"))
+ value = interface->valueInterface()->currentValue();
+ else if (function == QLatin1String("GetMaximumValue"))
+ value = interface->valueInterface()->maximumValue();
+ else if (function == QLatin1String("GetMinimumIncrement"))
+ value = interface->valueInterface()->minimumStepSize();
+ else if (function == QLatin1String("GetMinimumValue"))
+ value = interface->valueInterface()->minimumValue();
+ else {
+ qAtspiDebug() << "WARNING: AtSpiAdaptor::valueInterface does not implement " << function << message.path();
+ return false;
}
- connection.send(message.createReply(
- QVariant::fromValue(QDBusVariant(QVariant::fromValue(val)))));
- } else if (function == QLatin1String("GetMinimumIncrement")) {
- connection.send(message.createReply(
- QVariant::fromValue(QDBusVariant(QVariant::fromValue(0.0)))));
- } else if (function == QLatin1String("GetMinimumValue")) {
- bool success;
- double val = interface->valueInterface()->minimumValue().toDouble(&success);
- if (!success) {
- qAtspiDebug ("AtSpiAdaptor::valueInterface: Could not convert current value to double.");
+ if (!value.canConvert(QVariant::Double)) {
+ qAtspiDebug() << "AtSpiAdaptor::valueInterface: Could not convert to double: " << function;
}
+
+ // explicitly convert to dbus-variant containing one double since atspi expects that
+ // everything else might fail to convert back on the other end
connection.send(message.createReply(
- QVariant::fromValue(QDBusVariant(QVariant::fromValue(val)))));
- } else {
- qAtspiDebug() << "WARNING: AtSpiAdaptor::valueInterface does not implement " << function << message.path();
- return false;
+ QVariant::fromValue(QDBusVariant(QVariant::fromValue(value.toDouble())))));
}
return true;
}
@@ -2345,4 +2359,6 @@ bool AtSpiAdaptor::tableInterface(const QAIPointer &interface, const QString &fu
return true;
}
+#endif // QT_NO_ACCESSIBILITY
+
QT_END_NAMESPACE
diff --git a/src/platformsupport/linuxaccessibility/atspiadaptor_p.h b/src/platformsupport/linuxaccessibility/atspiadaptor_p.h
index 4a8ff23bef..e6f95195fe 100644
--- a/src/platformsupport/linuxaccessibility/atspiadaptor_p.h
+++ b/src/platformsupport/linuxaccessibility/atspiadaptor_p.h
@@ -56,6 +56,8 @@
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+#ifndef QT_NO_ACCESSIBILITY
+
class QAccessibleInterface;
class QSpiAccessibleInterface;
class QSpiApplicationAdaptor;
@@ -111,6 +113,8 @@ private:
QString pathForInterface(const QAIPointer &interface, bool inDestructor = false) const;
QString pathForObject(QObject *object) const;
+ void notifyStateChange(const QAIPointer& interface, const QString& state, int value);
+
// accessible helper functions
AtspiRole getRole(const QAIPointer &interface) const;
QSpiRelationArray relationSet(const QAIPointer &interface, const QDBusConnection &connection) const;
@@ -214,6 +218,8 @@ private:
uint sendWindow_unshade : 1;
};
+#endif // QT_NO_ACCESSIBILITY
+
QT_END_NAMESPACE
QT_END_HEADER
diff --git a/src/platformsupport/linuxaccessibility/bridge.cpp b/src/platformsupport/linuxaccessibility/bridge.cpp
index f22dc4e191..bf2486fc57 100644
--- a/src/platformsupport/linuxaccessibility/bridge.cpp
+++ b/src/platformsupport/linuxaccessibility/bridge.cpp
@@ -56,6 +56,8 @@
QT_BEGIN_NAMESPACE
+#ifndef QT_NO_ACCESSIBILITY
+
/*!
\class QSpiAccessibleBridge
\internal
@@ -182,4 +184,6 @@ void QSpiAccessibleBridge::initializeConstantMappings()
qSpiRoleMapping.insert(map[i].role, RoleNames(map[i].spiRole, QLatin1String(map[i].name), tr(map[i].name)));
}
+#endif // QT_NO_ACCESSIBILITY
+
QT_END_NAMESPACE
diff --git a/src/platformsupport/linuxaccessibility/bridge_p.h b/src/platformsupport/linuxaccessibility/bridge_p.h
index f7c243cfbb..3865e06489 100644
--- a/src/platformsupport/linuxaccessibility/bridge_p.h
+++ b/src/platformsupport/linuxaccessibility/bridge_p.h
@@ -51,6 +51,8 @@ class DeviceEventControllerAdaptor;
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+#ifndef QT_NO_ACCESSIBILITY
+
class DBusConnection;
class QSpiDBusCache;
class AtSpiAdaptor;
@@ -79,6 +81,8 @@ private:
bool initialized;
};
+#endif // QT_NO_ACCESSIBILITY
+
QT_END_NAMESPACE
QT_END_HEADER
diff --git a/src/platformsupport/linuxaccessibility/cache.cpp b/src/platformsupport/linuxaccessibility/cache.cpp
index 81a54a1ce5..9201fc1d8b 100644
--- a/src/platformsupport/linuxaccessibility/cache.cpp
+++ b/src/platformsupport/linuxaccessibility/cache.cpp
@@ -49,6 +49,8 @@
QT_BEGIN_NAMESPACE
+#ifndef QT_NO_ACCESSIBILITY
+
/*!
\class QSpiDBusCache
\internal
@@ -89,4 +91,6 @@ QSpiAccessibleCacheArray QSpiDBusCache::GetItems()
return cacheArray;
}
+#endif // QT_NO_ACCESSIBILITY
+
QT_END_NAMESPACE
diff --git a/src/platformsupport/linuxaccessibility/cache_p.h b/src/platformsupport/linuxaccessibility/cache_p.h
index 898f06f0d6..4b606eadb1 100644
--- a/src/platformsupport/linuxaccessibility/cache_p.h
+++ b/src/platformsupport/linuxaccessibility/cache_p.h
@@ -49,6 +49,8 @@
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+#ifndef QT_NO_ACCESSIBILITY
+
class QSpiDBusCache : public QObject
{
Q_OBJECT
@@ -66,6 +68,8 @@ public Q_SLOTS:
QSpiAccessibleCacheArray GetItems();
};
+#endif // QT_NO_ACCESSIBILITY
+
QT_END_NAMESPACE
QT_END_HEADER
diff --git a/src/platformsupport/linuxaccessibility/constant_mappings.cpp b/src/platformsupport/linuxaccessibility/constant_mappings.cpp
index a15355f9d3..5138b9a163 100644
--- a/src/platformsupport/linuxaccessibility/constant_mappings.cpp
+++ b/src/platformsupport/linuxaccessibility/constant_mappings.cpp
@@ -55,6 +55,8 @@
QT_BEGIN_NAMESPACE
+#ifndef QT_NO_ACCESSIBILITY
+
QHash <QAccessible::Role, RoleNames> qSpiRoleMapping;
quint64 spiStatesFromQState(QAccessible::State state)
@@ -69,8 +71,6 @@ quint64 spiStatesFromQState(QAccessible::State state)
if (state.disabled) {
unsetSpiStateBit(&spiState, ATSPI_STATE_ENABLED);
- unsetSpiStateBit(&spiState, ATSPI_STATE_SHOWING);
- unsetSpiStateBit(&spiState, ATSPI_STATE_VISIBLE);
unsetSpiStateBit(&spiState, ATSPI_STATE_SENSITIVE);
}
@@ -156,4 +156,6 @@ AtspiRelationType qAccessibleRelationToAtSpiRelation(QAccessible::Relation relat
return ATSPI_RELATION_NULL;
}
+#endif // QT_NO_ACCESSIBILITY
+
QT_END_NAMESPACE
diff --git a/src/platformsupport/linuxaccessibility/constant_mappings_p.h b/src/platformsupport/linuxaccessibility/constant_mappings_p.h
index 837a68516d..870a3a4b2a 100644
--- a/src/platformsupport/linuxaccessibility/constant_mappings_p.h
+++ b/src/platformsupport/linuxaccessibility/constant_mappings_p.h
@@ -53,6 +53,7 @@
#include <QtGui/QAccessible>
#include <atspi/atspi-constants.h>
+#ifndef QT_NO_ACCESSIBILITY
// interface names from at-spi2-core/atspi/atspi-misc-private.h
#define ATSPI_DBUS_NAME_REGISTRY "org.a11y.atspi.Registry"
@@ -135,4 +136,6 @@ AtspiRelationType qAccessibleRelationToAtSpiRelation(QAccessible::Relation relat
QT_END_NAMESPACE
QT_END_HEADER
+#endif // QT_NO_ACCESSIBILITY
+
#endif /* Q_SPI_CONSTANT_MAPPINGS_H */
diff --git a/src/platformsupport/linuxaccessibility/dbusconnection.cpp b/src/platformsupport/linuxaccessibility/dbusconnection.cpp
index a99e8f0a5e..a38570a465 100644
--- a/src/platformsupport/linuxaccessibility/dbusconnection.cpp
+++ b/src/platformsupport/linuxaccessibility/dbusconnection.cpp
@@ -48,6 +48,8 @@
QT_BEGIN_NAMESPACE
+#ifndef QT_NO_ACCESSIBILITY
+
/*!
\class DBusConnection
\internal
@@ -104,4 +106,6 @@ QDBusConnection DBusConnection::connection() const
return dbusConnection;
}
+#endif // QT_NO_ACCESSIBILITY
+
QT_END_NAMESPACE
diff --git a/src/platformsupport/linuxaccessibility/dbusconnection_p.h b/src/platformsupport/linuxaccessibility/dbusconnection_p.h
index 674cf28c34..da090da9cf 100644
--- a/src/platformsupport/linuxaccessibility/dbusconnection_p.h
+++ b/src/platformsupport/linuxaccessibility/dbusconnection_p.h
@@ -49,6 +49,8 @@
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+#ifndef QT_NO_ACCESSIBILITY
+
class DBusConnection
{
public:
@@ -62,6 +64,8 @@ private:
QDBusConnection dbusConnection;
};
+#endif // QT_NO_ACCESSIBILITY
+
QT_END_NAMESPACE
QT_END_HEADER
diff --git a/src/platformsupport/linuxaccessibility/linuxaccessibility.pri b/src/platformsupport/linuxaccessibility/linuxaccessibility.pri
index 85a02da004..09d437678f 100644
--- a/src/platformsupport/linuxaccessibility/linuxaccessibility.pri
+++ b/src/platformsupport/linuxaccessibility/linuxaccessibility.pri
@@ -1,4 +1,4 @@
-contains(QT_CONFIG, dbus):contains(QT_CONFIG, xcb):contains(QT_CONFIG, accessibility) {
+qtHaveModule(dbus):contains(QT_CONFIG, xcb):contains(QT_CONFIG, accessibility) {
QT += dbus
include(../../3rdparty/atspi2/atspi2.pri)
diff --git a/src/platformsupport/linuxaccessibility/struct_marshallers.cpp b/src/platformsupport/linuxaccessibility/struct_marshallers.cpp
index 713e26f25a..027993c4bd 100644
--- a/src/platformsupport/linuxaccessibility/struct_marshallers.cpp
+++ b/src/platformsupport/linuxaccessibility/struct_marshallers.cpp
@@ -50,6 +50,8 @@
QT_BEGIN_NAMESPACE
+#ifndef QT_NO_ACCESSIBILITY
+
QSpiObjectReference::QSpiObjectReference()
: path(QDBusObjectPath(ATSPI_DBUS_PATH_NULL))
{}
@@ -234,4 +236,6 @@ void qSpiInitializeStructTypes()
qDBusRegisterMetaType<QSpiRelationArray>();
}
+#endif // QT_NO_ACCESSIBILITY
+
QT_END_NAMESPACE
diff --git a/src/plugins/accessible/widgets/main.cpp b/src/plugins/accessible/widgets/main.cpp
index 55b1d375dd..8392ef3a6d 100644
--- a/src/plugins/accessible/widgets/main.cpp
+++ b/src/plugins/accessible/widgets/main.cpp
@@ -199,7 +199,7 @@ QAccessibleInterface *AccessibleFactory::create(const QString &classname, QObjec
} else if (classname == QLatin1String("QSplitterHandle")) {
iface = new QAccessibleWidget(widget, QAccessible::Grip);
#endif
-#ifndef QT_NO_TEXTEDIT
+#if !defined(QT_NO_TEXTEDIT) && !defined(QT_NO_CURSOR)
} else if (classname == QLatin1String("QTextEdit")) {
iface = new QAccessibleTextEdit(widget);
} else if (classname == QLatin1String("QPlainTextEdit")) {
@@ -233,7 +233,7 @@ QAccessibleInterface *AccessibleFactory::create(const QString &classname, QObjec
} else if (classname == QLatin1String("QRubberBand")) {
iface = new QAccessibleWidget(widget, QAccessible::Border);
#endif
-#ifndef QT_NO_TEXTBROWSER
+#if !defined(QT_NO_TEXTBROWSER) && !defined(QT_NO_CURSOR)
} else if (classname == QLatin1String("QTextBrowser")) {
iface = new QAccessibleTextBrowser(widget);
#endif
diff --git a/src/plugins/accessible/widgets/qaccessiblemenu.cpp b/src/plugins/accessible/widgets/qaccessiblemenu.cpp
index 5f7d9a9c30..c7dcee78f0 100644
--- a/src/plugins/accessible/widgets/qaccessiblemenu.cpp
+++ b/src/plugins/accessible/widgets/qaccessiblemenu.cpp
@@ -165,7 +165,7 @@ QAccessibleMenuItem::~QAccessibleMenuItem()
QAccessibleInterface *QAccessibleMenuItem::childAt(int x, int y ) const
{
- for (int i = childCount(); i >= 0; --i) {
+ for (int i = childCount() - 1; i >= 0; --i) {
QAccessibleInterface *childInterface = child(i);
if (childInterface->rect().contains(x,y)) {
return childInterface;
diff --git a/src/plugins/accessible/widgets/qaccessiblewidgets.cpp b/src/plugins/accessible/widgets/qaccessiblewidgets.cpp
index 56e6166e85..e93a82c0ce 100644
--- a/src/plugins/accessible/widgets/qaccessiblewidgets.cpp
+++ b/src/plugins/accessible/widgets/qaccessiblewidgets.cpp
@@ -99,7 +99,7 @@ QList<QWidget*> childWidgets(const QWidget *widget, bool includeTopLevel)
return widgets;
}
-#ifndef QT_NO_TEXTEDIT
+#if !defined(QT_NO_TEXTEDIT) && !defined(QT_NO_CURSOR)
QAccessiblePlainTextEdit::QAccessiblePlainTextEdit(QWidget* o)
:QAccessibleTextWidget(o)
@@ -292,7 +292,7 @@ void QAccessibleTextEdit::scrollToSubstring(int startIndex, int endIndex)
qWarning("AccessibleTextEdit::scrollToSubstring failed!");
}
-#endif // QT_NO_TEXTEDIT
+#endif // QT_NO_TEXTEDIT && QT_NO_CURSOR
#ifndef QT_NO_STACKEDWIDGET
// ======================= QAccessibleStackedWidget ======================
@@ -488,7 +488,7 @@ QAccessibleDialogButtonBox::QAccessibleDialogButtonBox(QWidget *widget)
#endif // QT_NO_DIALOGBUTTONBOX
-#ifndef QT_NO_TEXTBROWSER
+#if !defined(QT_NO_TEXTBROWSER) && !defined(QT_NO_CURSOR)
QAccessibleTextBrowser::QAccessibleTextBrowser(QWidget *widget)
: QAccessibleTextEdit(widget)
{
@@ -499,7 +499,7 @@ QAccessible::Role QAccessibleTextBrowser::role() const
{
return QAccessible::StaticText;
}
-#endif // QT_NO_TEXTBROWSER
+#endif // QT_NO_TEXTBROWSER && QT_NO_CURSOR
#ifndef QT_NO_CALENDARWIDGET
// ===================== QAccessibleCalendarWidget ========================
diff --git a/src/plugins/accessible/widgets/qaccessiblewidgets.h b/src/plugins/accessible/widgets/qaccessiblewidgets.h
index e14b89a63b..fd76dbd076 100644
--- a/src/plugins/accessible/widgets/qaccessiblewidgets.h
+++ b/src/plugins/accessible/widgets/qaccessiblewidgets.h
@@ -122,7 +122,6 @@ protected:
virtual QTextDocument *textDocument() const = 0;
virtual QWidget *viewport() const = 0;
};
-#endif //QT_NO_CURSOR
#ifndef QT_NO_TEXTEDIT
class QAccessiblePlainTextEdit : public QAccessibleTextWidget
@@ -177,6 +176,7 @@ protected:
QWidget *viewport() const;
};
#endif // QT_NO_TEXTEDIT
+#endif //QT_NO_CURSOR
class QAccessibleStackedWidget : public QAccessibleWidget
{
@@ -245,7 +245,7 @@ public:
explicit QAccessibleDialogButtonBox(QWidget *widget);
};
-#ifndef QT_NO_TEXTBROWSER
+#if !defined(QT_NO_TEXTBROWSER) && !defined(QT_NO_CURSOR)
class QAccessibleTextBrowser : public QAccessibleTextEdit
{
public:
@@ -253,7 +253,7 @@ public:
QAccessible::Role role() const;
};
-#endif // QT_NO_TEXTBROWSER
+#endif // QT_NO_TEXTBROWSER && QT_NO_CURSOR
#ifndef QT_NO_CALENDARWIDGET
class QAccessibleCalendarWidget : public QAccessibleWidget
diff --git a/src/plugins/accessible/widgets/rangecontrols.cpp b/src/plugins/accessible/widgets/rangecontrols.cpp
index 954369b6b3..d03130f148 100644
--- a/src/plugins/accessible/widgets/rangecontrols.cpp
+++ b/src/plugins/accessible/widgets/rangecontrols.cpp
@@ -122,6 +122,11 @@ QVariant QAccessibleAbstractSpinBox::minimumValue() const
return abstractSpinBox()->property("minimum");
}
+QVariant QAccessibleAbstractSpinBox::minimumStepSize() const
+{
+ return abstractSpinBox()->property("stepSize");
+}
+
/*!
\class QAccessibleSpinBox
\brief The QAccessibleSpinBox class implements the QAccessibleInterface for spinbox widgets.
@@ -278,6 +283,11 @@ QVariant QAccessibleAbstractSlider::minimumValue() const
return abstractSlider()->minimum();
}
+QVariant QAccessibleAbstractSlider::minimumStepSize() const
+{
+ return abstractSlider()->singleStep();
+}
+
QAbstractSlider *QAccessibleAbstractSlider::abstractSlider() const
{
return static_cast<QAbstractSlider *>(object());
diff --git a/src/plugins/accessible/widgets/rangecontrols.h b/src/plugins/accessible/widgets/rangecontrols.h
index b26d97421a..a370ada199 100644
--- a/src/plugins/accessible/widgets/rangecontrols.h
+++ b/src/plugins/accessible/widgets/rangecontrols.h
@@ -71,6 +71,7 @@ public:
void setCurrentValue(const QVariant &value);
QVariant maximumValue() const;
QVariant minimumValue() const;
+ QVariant minimumStepSize() const;
// FIXME Action interface
@@ -110,6 +111,7 @@ public:
void setCurrentValue(const QVariant &value);
QVariant maximumValue() const;
QVariant minimumValue() const;
+ QVariant minimumStepSize() const;
protected:
QAbstractSlider *abstractSlider() const;
diff --git a/src/plugins/accessible/widgets/simplewidgets.cpp b/src/plugins/accessible/widgets/simplewidgets.cpp
index 1bd509dc41..8bf71da6e1 100644
--- a/src/plugins/accessible/widgets/simplewidgets.cpp
+++ b/src/plugins/accessible/widgets/simplewidgets.cpp
@@ -832,6 +832,14 @@ QVariant QAccessibleProgressBar::minimumValue() const
return progressBar()->minimum();
}
+QVariant QAccessibleProgressBar::minimumStepSize() const
+{
+ // This is arbitrary since any value between min and max is valid.
+ // Some screen readers (orca use it to calculate how many digits to display though,
+ // so it makes sense to return a "sensible" value. Providing 100 increments seems ok.
+ return (progressBar()->maximum() - progressBar()->minimum()) / 100.0;
+}
+
QProgressBar *QAccessibleProgressBar::progressBar() const
{
return qobject_cast<QProgressBar *>(object());
diff --git a/src/plugins/accessible/widgets/simplewidgets.h b/src/plugins/accessible/widgets/simplewidgets.h
index 2e1bca88b4..dbea8d4f09 100644
--- a/src/plugins/accessible/widgets/simplewidgets.h
+++ b/src/plugins/accessible/widgets/simplewidgets.h
@@ -188,6 +188,7 @@ public:
QVariant currentValue() const;
QVariant maximumValue() const;
QVariant minimumValue() const;
+ QVariant minimumStepSize() const;
inline void setCurrentValue(const QVariant &) {}
protected:
diff --git a/src/plugins/accessible/widgets/widgets.pro b/src/plugins/accessible/widgets/widgets.pro
index afabbac9bc..aff60d9781 100644
--- a/src/plugins/accessible/widgets/widgets.pro
+++ b/src/plugins/accessible/widgets/widgets.pro
@@ -1,6 +1,7 @@
TARGET = qtaccessiblewidgets
PLUGIN_TYPE = accessible
+PLUGIN_CLASS_NAME = AccessibleFactory
load(qt_plugin)
QT += core-private gui-private widgets-private
diff --git a/src/plugins/bearer/bearer.pro b/src/plugins/bearer/bearer.pro
index 899eede7bf..0375500306 100644
--- a/src/plugins/bearer/bearer.pro
+++ b/src/plugins/bearer/bearer.pro
@@ -1,6 +1,6 @@
TEMPLATE = subdirs
-linux*:contains(QT_CONFIG, dbus) {
+linux*:qtHaveModule(dbus) {
SUBDIRS += generic
SUBDIRS += connman networkmanager
}
diff --git a/src/plugins/bearer/blackberry/blackberry.pro b/src/plugins/bearer/blackberry/blackberry.pro
index 220a506d90..c75de3aaad 100644
--- a/src/plugins/bearer/blackberry/blackberry.pro
+++ b/src/plugins/bearer/blackberry/blackberry.pro
@@ -1,6 +1,7 @@
TARGET = qbbbearer
PLUGIN_TYPE = bearer
+PLUGIN_CLASS_NAME = QBBEnginePlugin
load(qt_plugin)
QT = core-private network-private
diff --git a/src/plugins/bearer/connman/connman.pro b/src/plugins/bearer/connman/connman.pro
index 99d9b367f2..cccdff0fdb 100644
--- a/src/plugins/bearer/connman/connman.pro
+++ b/src/plugins/bearer/connman/connman.pro
@@ -1,6 +1,7 @@
TARGET = qconnmanbearer
PLUGIN_TYPE = bearer
+PLUGIN_CLASS_NAME = QConnmanEnginePlugin
load(qt_plugin)
QT = core network-private dbus
diff --git a/src/plugins/bearer/connman/qconnmanservice_linux.cpp b/src/plugins/bearer/connman/qconnmanservice_linux.cpp
index 46757ab021..dbfac6b438 100644
--- a/src/plugins/bearer/connman/qconnmanservice_linux.cpp
+++ b/src/plugins/bearer/connman/qconnmanservice_linux.cpp
@@ -57,9 +57,24 @@
#ifndef QT_NO_DBUS
QT_BEGIN_NAMESPACE
-static QDBusConnection dbusConnection = QDBusConnection::systemBus();
+QDBusArgument &operator<<(QDBusArgument &argument, const ConnmanMap &map)
+{
+ argument.beginStructure();
+ argument << map.objectPath << map.propertyMap;
+ argument.endStructure();
+ return argument;
+}
+
+const QDBusArgument &operator>>(const QDBusArgument &argument, ConnmanMap &map)
+{
+ argument.beginStructure();
+ argument >> map.objectPath >> map.propertyMap;
+ argument.endStructure();
+ return argument;
+}
+static QDBusConnection dbusConnection = QDBusConnection::systemBus();
QConnmanManagerInterface::QConnmanManagerInterface( QObject *parent)
: QDBusAbstractInterface(QLatin1String(CONNMAN_SERVICE),
QLatin1String(CONNMAN_MANAGER_PATH),
@@ -301,14 +316,37 @@ QStringList QConnmanManagerInterface::getProfiles()
QStringList QConnmanManagerInterface::getTechnologies()
{
- QVariant var = getProperty("Technologies");
- return qdbus_cast<QStringList >(var);
+ QStringList list;
+ QDBusReply<ConnmanMapList> replyList = this->call(QLatin1String("GetTechnologies"));
+ if (replyList.isValid()) {
+ Q_FOREACH (ConnmanMap map, replyList.value()) {
+ list << map.objectPath.path();
+ }
+ } else {
+ // try for older version
+ QVariant var = getProperty("Technologies");
+ if (!var.isNull()) {
+ list = qdbus_cast<QStringList>(var);
+ }
+ }
+ return list;
}
QStringList QConnmanManagerInterface::getServices()
{
- QVariant var = getProperty("Services");
- return qdbus_cast<QStringList >(var);
+ QStringList list;
+ QDBusReply<ConnmanMapList> replyList = this->call(QLatin1String("GetServices"));
+ if (replyList.isValid()) {
+ Q_FOREACH (ConnmanMap map, replyList.value()) {
+ list << map.objectPath.path();
+ }
+ } else {
+ QVariant var = getProperty("Services");
+ if (!var.isNull()) {
+ list = qdbus_cast<QStringList>(var);
+ }
+ }
+ return list;
}
QString QConnmanManagerInterface::getPathForTechnology(const QString &name)
diff --git a/src/plugins/bearer/connman/qconnmanservice_linux_p.h b/src/plugins/bearer/connman/qconnmanservice_linux_p.h
index be2063f8e8..3ed66f4769 100644
--- a/src/plugins/bearer/connman/qconnmanservice_linux_p.h
+++ b/src/plugins/bearer/connman/qconnmanservice_linux_p.h
@@ -59,6 +59,7 @@
#include <QtDBus/QDBusInterface>
#include <QtDBus/QDBusMessage>
#include <QtDBus/QDBusReply>
+#include <QtDBus/QDBusArgument>
#include <QtDBus/QDBusPendingCallWatcher>
#include <QtDBus/QDBusObjectPath>
@@ -90,11 +91,23 @@
QT_BEGIN_NAMESPACE
+struct ConnmanMap {
+ QDBusObjectPath objectPath;
+ QVariantMap propertyMap;
+};
+
+typedef QList< ConnmanMap > ConnmanMapList;
+
QT_END_NAMESPACE
+Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(ConnmanMap))
+Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(ConnmanMapList))
QT_BEGIN_NAMESPACE
+QDBusArgument &operator<<(QDBusArgument &argument, const ConnmanMap &obj);
+const QDBusArgument &operator>>(const QDBusArgument &argument, ConnmanMap &obj);
+
class QConnmanManagerInterface : public QDBusAbstractInterface
{
Q_OBJECT
diff --git a/src/plugins/bearer/corewlan/corewlan.pro b/src/plugins/bearer/corewlan/corewlan.pro
index 481b75c8ab..db8651de6e 100644
--- a/src/plugins/bearer/corewlan/corewlan.pro
+++ b/src/plugins/bearer/corewlan/corewlan.pro
@@ -1,6 +1,7 @@
TARGET = qcorewlanbearer
PLUGIN_TYPE = bearer
+PLUGIN_CLASS_NAME = QCoreWlanEnginePlugin
load(qt_plugin)
QT = core-private network-private
diff --git a/src/plugins/bearer/generic/generic.pro b/src/plugins/bearer/generic/generic.pro
index a1da0dddda..d0e17380e3 100644
--- a/src/plugins/bearer/generic/generic.pro
+++ b/src/plugins/bearer/generic/generic.pro
@@ -1,6 +1,7 @@
TARGET = qgenericbearer
PLUGIN_TYPE = bearer
+PLUGIN_CLASS_NAME = QGenericEnginePlugin
load(qt_plugin)
QT = core-private network-private
diff --git a/src/plugins/bearer/nativewifi/nativewifi.pro b/src/plugins/bearer/nativewifi/nativewifi.pro
index 4382cd08cd..e372c8ca05 100644
--- a/src/plugins/bearer/nativewifi/nativewifi.pro
+++ b/src/plugins/bearer/nativewifi/nativewifi.pro
@@ -1,6 +1,7 @@
TARGET = qnativewifibearer
PLUGIN_TYPE = bearer
+PLUGIN_CLASS_NAME = QNativeWifiEnginePlugin
load(qt_plugin)
QT = core-private network-private
diff --git a/src/plugins/bearer/networkmanager/networkmanager.pro b/src/plugins/bearer/networkmanager/networkmanager.pro
index 4f299e22f2..1ed9bfaa1b 100644
--- a/src/plugins/bearer/networkmanager/networkmanager.pro
+++ b/src/plugins/bearer/networkmanager/networkmanager.pro
@@ -1,6 +1,7 @@
TARGET = qnmbearer
PLUGIN_TYPE = bearer
+PLUGIN_CLASS_NAME = QNetworkManagerEnginePlugin
load(qt_plugin)
QT = core network-private dbus
diff --git a/src/plugins/bearer/nla/nla.pro b/src/plugins/bearer/nla/nla.pro
index 56c06a57b1..bac7608477 100644
--- a/src/plugins/bearer/nla/nla.pro
+++ b/src/plugins/bearer/nla/nla.pro
@@ -1,6 +1,7 @@
TARGET = qnlabearer
PLUGIN_TYPE = bearer
+PLUGIN_CLASS_NAME = QNlaEnginePlugin
load(qt_plugin)
QT = core core-private network network-private
diff --git a/src/plugins/generic/evdevkeyboard/evdevkeyboard.pro b/src/plugins/generic/evdevkeyboard/evdevkeyboard.pro
index 97b827b779..281515145f 100644
--- a/src/plugins/generic/evdevkeyboard/evdevkeyboard.pro
+++ b/src/plugins/generic/evdevkeyboard/evdevkeyboard.pro
@@ -1,6 +1,7 @@
TARGET = qevdevkeyboardplugin
PLUGIN_TYPE = generic
+PLUGIN_CLASS_NAME = QEvdevKeyboardPlugin
load(qt_plugin)
QT += core-private platformsupport-private gui-private
diff --git a/src/plugins/generic/evdevmouse/evdevmouse.pro b/src/plugins/generic/evdevmouse/evdevmouse.pro
index c1356593df..9a3cc839cc 100644
--- a/src/plugins/generic/evdevmouse/evdevmouse.pro
+++ b/src/plugins/generic/evdevmouse/evdevmouse.pro
@@ -1,6 +1,7 @@
TARGET = qevdevmouseplugin
PLUGIN_TYPE = generic
+PLUGIN_CLASS_NAME = QEvdevMousePlugin
load(qt_plugin)
QT += core-private platformsupport-private gui-private
diff --git a/src/plugins/generic/evdevtablet/evdevtablet.pro b/src/plugins/generic/evdevtablet/evdevtablet.pro
index 066819be33..ee3fbb3ec1 100644
--- a/src/plugins/generic/evdevtablet/evdevtablet.pro
+++ b/src/plugins/generic/evdevtablet/evdevtablet.pro
@@ -1,6 +1,7 @@
TARGET = qevdevtabletplugin
PLUGIN_TYPE = generic
+PLUGIN_CLASS_NAME = QEvdevTabletPlugin
load(qt_plugin)
SOURCES = main.cpp
diff --git a/src/plugins/generic/evdevtouch/evdevtouch.pro b/src/plugins/generic/evdevtouch/evdevtouch.pro
index 2c1d6913ad..3d1c481c36 100644
--- a/src/plugins/generic/evdevtouch/evdevtouch.pro
+++ b/src/plugins/generic/evdevtouch/evdevtouch.pro
@@ -1,6 +1,7 @@
TARGET = qevdevtouchplugin
PLUGIN_TYPE = generic
+PLUGIN_CLASS_NAME = QEvdevTouchScreenPlugin
load(qt_plugin)
SOURCES = main.cpp
diff --git a/src/plugins/generic/meego/meego.pro b/src/plugins/generic/meego/meego.pro
index b8845418e8..c428517cd5 100644
--- a/src/plugins/generic/meego/meego.pro
+++ b/src/plugins/generic/meego/meego.pro
@@ -1,6 +1,7 @@
TARGET = qmeegointegration
PLUGIN_TYPE = generic
+PLUGIN_CLASS_NAME = QMeeGoIntegrationPlugin
load(qt_plugin)
SOURCES = qmeegointegration.cpp \
diff --git a/src/plugins/generic/tslib/tslib.pro b/src/plugins/generic/tslib/tslib.pro
index ab0645d89a..035857bb73 100644
--- a/src/plugins/generic/tslib/tslib.pro
+++ b/src/plugins/generic/tslib/tslib.pro
@@ -1,6 +1,7 @@
TARGET = qtslibplugin
PLUGIN_TYPE = generic
+PLUGIN_CLASS_NAME = QTsLibPlugin
load(qt_plugin)
HEADERS = qtslib.h
diff --git a/src/plugins/imageformats/gif/gif.pro b/src/plugins/imageformats/gif/gif.pro
index d5acfedff7..898f06e7c7 100644
--- a/src/plugins/imageformats/gif/gif.pro
+++ b/src/plugins/imageformats/gif/gif.pro
@@ -1,6 +1,7 @@
TARGET = qgif
PLUGIN_TYPE = imageformats
+PLUGIN_CLASS_NAME = QGifPlugin
load(qt_plugin)
include(../../../gui/image/qgifhandler.pri)
diff --git a/src/plugins/imageformats/gif/main.h b/src/plugins/imageformats/gif/main.h
index 46d669a97f..c7770edc53 100644
--- a/src/plugins/imageformats/gif/main.h
+++ b/src/plugins/imageformats/gif/main.h
@@ -42,6 +42,8 @@
#include <qimageiohandler.h>
#include <qstringlist.h>
+#ifndef QT_NO_IMAGEFORMATPLUGIN
+
#ifdef QT_NO_IMAGEFORMAT_GIF
#undef QT_NO_IMAGEFORMAT_GIF
#endif
@@ -62,3 +64,5 @@ public:
};
QT_END_NAMESPACE
+
+#endif // QT_NO_IMAGEFORMATPLUGIN
diff --git a/src/plugins/imageformats/ico/ico.pro b/src/plugins/imageformats/ico/ico.pro
index 48bfd6b344..4250fcb4bc 100644
--- a/src/plugins/imageformats/ico/ico.pro
+++ b/src/plugins/imageformats/ico/ico.pro
@@ -1,6 +1,7 @@
TARGET = qico
PLUGIN_TYPE = imageformats
+PLUGIN_CLASS_NAME = QICOPlugin
load(qt_plugin)
QTDIR_build:REQUIRES = "!contains(QT_CONFIG, no-ico)"
diff --git a/src/plugins/imageformats/jpeg/jpeg.pro b/src/plugins/imageformats/jpeg/jpeg.pro
index 35153eb59c..45bf7bbd43 100644
--- a/src/plugins/imageformats/jpeg/jpeg.pro
+++ b/src/plugins/imageformats/jpeg/jpeg.pro
@@ -1,6 +1,7 @@
TARGET = qjpeg
PLUGIN_TYPE = imageformats
+PLUGIN_CLASS_NAME = QJpegPlugin
load(qt_plugin)
QT += core-private
diff --git a/src/plugins/platforminputcontexts/ibus/ibus.pro b/src/plugins/platforminputcontexts/ibus/ibus.pro
index 033d5a4d5c..75a5b5838f 100644
--- a/src/plugins/platforminputcontexts/ibus/ibus.pro
+++ b/src/plugins/platforminputcontexts/ibus/ibus.pro
@@ -1,6 +1,7 @@
TARGET = ibusplatforminputcontextplugin
PLUGIN_TYPE = platforminputcontexts
+PLUGIN_CLASS_NAME = QIbusPlatformInputContextPlugin
load(qt_plugin)
QT += dbus gui-private
diff --git a/src/plugins/platforminputcontexts/maliit/maliit.pro b/src/plugins/platforminputcontexts/maliit/maliit.pro
index dec6833196..1e50f7289b 100644
--- a/src/plugins/platforminputcontexts/maliit/maliit.pro
+++ b/src/plugins/platforminputcontexts/maliit/maliit.pro
@@ -1,6 +1,7 @@
TARGET = maliitplatforminputcontextplugin
PLUGIN_TYPE = platforminputcontexts
+PLUGIN_CLASS_NAME = QMaliitPlatformInputContextPlugin
load(qt_plugin)
QT += dbus gui-private
diff --git a/src/plugins/platforminputcontexts/platforminputcontexts.pro b/src/plugins/platforminputcontexts/platforminputcontexts.pro
index 7c1f55927d..c8449e7e44 100644
--- a/src/plugins/platforminputcontexts/platforminputcontexts.pro
+++ b/src/plugins/platforminputcontexts/platforminputcontexts.pro
@@ -1,4 +1,4 @@
TEMPLATE = subdirs
-contains(QT_CONFIG, dbus) {
+qtHaveModule(dbus) {
!macx:!win32:SUBDIRS += ibus maliit
}
diff --git a/src/plugins/platforms/cocoa/cocoa.pro b/src/plugins/platforms/cocoa/cocoa.pro
index 78fcf20afc..83e2a88e6a 100644
--- a/src/plugins/platforms/cocoa/cocoa.pro
+++ b/src/plugins/platforms/cocoa/cocoa.pro
@@ -1,6 +1,7 @@
TARGET = qcocoa
PLUGIN_TYPE = platforms
+PLUGIN_CLASS_NAME = QCocoaIntegrationPlugin
load(qt_plugin)
OBJECTIVE_SOURCES += main.mm \
@@ -38,6 +39,7 @@ OBJECTIVE_SOURCES += main.mm \
qcocoaservices.mm \
qcocoasystemtrayicon.mm \
qcocoaintrospection.mm \
+ qcocoakeymapper.mm \
HEADERS += qcocoaintegration.h \
qcocoatheme.h \
@@ -72,6 +74,7 @@ HEADERS += qcocoaintegration.h \
qcocoaservices.h \
qcocoasystemtrayicon.h \
qcocoaintrospection.h \
+ qcocoakeymapper.h \
RESOURCES += qcocoaresources.qrc
@@ -79,7 +82,7 @@ LIBS += -framework Cocoa -framework IOKit
QT += core-private gui-private platformsupport-private
-!contains(QT_CONFIG, no-widgets) {
+qtHaveModule(widgets) {
OBJECTIVE_SOURCES += \
qpaintengine_mac.mm \
qprintengine_mac.mm \
@@ -95,13 +98,6 @@ QT += core-private gui-private platformsupport-private
OTHER_FILES += cocoa.json
-# Build the release libqcocoa.dylib only, skip the debug version.
-# The Qt plugin loader will dlopen both if found, causing duplicate
-# Objective-c class definitions for the classes defined in the plugin.
-contains(QT_CONFIG,release):CONFIG -= debug
-contains(QT_CONFIG,debug_and_release):CONFIG -= debug_and_release
-contains(QT_CONFIG,build_all):CONFIG -= build_all
-
# Acccessibility debug support
# DEFINES += QT_COCOA_ENABLE_ACCESSIBILITY_INSPECTOR
# include ($$PWD/../../../../util/accessibilityinspector/accessibilityinspector.pri)
diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm
index df6b64443d..d5841c1983 100644
--- a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm
+++ b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm
@@ -122,7 +122,7 @@ static QAccessibleInterface *acast(void *ptr)
[attributes addObject : NSAccessibilityValueAttribute];
}
- return attributes;
+ return [attributes autorelease];
}
- (id)accessibilityAttributeValue:(NSString *)attribute {
@@ -139,7 +139,7 @@ static QAccessibleInterface *acast(void *ptr)
[kids addObject:[QCocoaAccessibleElement elementWithInterface:(void*)childInterface parent:self]];
}
- return NSAccessibilityUnignoredChildren(kids);
+ return kids;
} else if ([attribute isEqualToString:NSAccessibilityFocusedAttribute]) {
// Just check if the app thinks we're focused.
id focusedElement = [NSApp accessibilityAttributeValue:NSAccessibilityFocusedUIElementAttribute];
@@ -239,6 +239,10 @@ static QAccessibleInterface *acast(void *ptr)
if (!accessibleInterface)
return NSAccessibilityUnignoredAncestor(self);
+
+ if (!acast(accessibleInterface)->isValid())
+ return NSAccessibilityUnignoredAncestor(self);
+
QAccessibleInterface *childInterface = acast(accessibleInterface)->childAt(point.x, qt_mac_flipYCoordinate(point.y));
// No child found, meaning we hit this element.
diff --git a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm
index 7aa365df67..80c9e227d2 100644
--- a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm
+++ b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm
@@ -510,14 +510,16 @@ static bool IsMouseOrKeyEvent( NSEvent* event )
static inline void qt_mac_waitForMoreEvents(NSString *runLoopMode = NSDefaultRunLoopMode)
{
- // If no event exist in the cocoa event que, wait
- // (and free up cpu time) until at least one event occur.
- // This implementation is a bit on the edge, but seems to
- // work fine:
- [NSApp nextEventMatchingMask:NSAnyEventMask
- untilDate:[NSDate distantFuture]
- inMode:runLoopMode
- dequeue:NO];
+ // If no event exist in the cocoa event que, wait (and free up cpu time) until
+ // at least one event occur. Setting 'dequeuing' to 'no' in the following call
+ // causes it to hang under certain circumstances (QTBUG-28283), so we tell it
+ // to dequeue instead, just to repost the event again:
+ NSEvent* event = [NSApp nextEventMatchingMask:NSAnyEventMask
+ untilDate:[NSDate distantFuture]
+ inMode:runLoopMode
+ dequeue:YES];
+ if (event)
+ [NSApp postEvent:event atStart:YES];
}
bool QCocoaEventDispatcher::processEvents(QEventLoop::ProcessEventsFlags flags)
diff --git a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
index f9122f56d1..5747cc01e9 100644
--- a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
+++ b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
@@ -223,7 +223,7 @@ static QString strippedText(QString s)
- (void)showModelessPanel
{
if (mOpenPanel){
- QFileInfo info(*mCurrentSelection);
+ QFileInfo info(!mCurrentSelection->isEmpty() ? *mCurrentSelection : QT_PREPEND_NAMESPACE(QCFString::toQString)(mCurrentDir));
NSString *filepath = QT_PREPEND_NAMESPACE(QCFString::toNSString)(info.filePath());
bool selectable = (mOptions->acceptMode() == QFileDialogOptions::AcceptSave)
|| [self panel:nil shouldShowFilename:filepath];
@@ -241,7 +241,7 @@ static QString strippedText(QString s)
- (BOOL)runApplicationModalPanel
{
- QFileInfo info(*mCurrentSelection);
+ QFileInfo info(!mCurrentSelection->isEmpty() ? *mCurrentSelection : QT_PREPEND_NAMESPACE(QCFString::toQString)(mCurrentDir));
NSString *filepath = QT_PREPEND_NAMESPACE(QCFString::toNSString)(info.filePath());
bool selectable = (mOptions->acceptMode() == QFileDialogOptions::AcceptSave)
|| [self panel:nil shouldShowFilename:filepath];
@@ -266,7 +266,7 @@ static QString strippedText(QString s)
- (void)showWindowModalSheet:(QWindow *)parent
{
- QFileInfo info(*mCurrentSelection);
+ QFileInfo info(!mCurrentSelection->isEmpty() ? *mCurrentSelection : QT_PREPEND_NAMESPACE(QCFString::toQString)(mCurrentDir));
NSString *filepath = QT_PREPEND_NAMESPACE(QCFString::toNSString)(info.filePath());
bool selectable = (mOptions->acceptMode() == QFileDialogOptions::AcceptSave)
|| [self panel:nil shouldShowFilename:filepath];
diff --git a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm
index 5ccd019a9b..ff3ba63931 100644
--- a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm
+++ b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm
@@ -92,20 +92,16 @@ static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont)
QFont newFont;
if (cocoaFont) {
int pSize = qRound([cocoaFont pointSize]);
- QString family(QCFString::toQString([cocoaFont familyName]));
- QString typeface(QCFString::toQString([cocoaFont fontName]));
-
- int hyphenPos = typeface.indexOf(QLatin1Char('-'));
- if (hyphenPos != -1) {
- typeface.remove(0, hyphenPos + 1);
- } else {
- typeface = QLatin1String("Normal");
- }
+ CTFontDescriptorRef font = CTFontCopyFontDescriptor((CTFontRef)cocoaFont);
+ // QCoreTextFontDatabase::populateFontDatabase() is using localized names
+ QString family = QCFString::toQString((CFStringRef) CTFontDescriptorCopyLocalizedAttribute(font, kCTFontFamilyNameAttribute, NULL));
+ QString style = QCFString::toQString((CFStringRef) CTFontDescriptorCopyLocalizedAttribute(font, kCTFontStyleNameAttribute, NULL));
- newFont = QFontDatabase().font(family, typeface, pSize);
+ newFont = QFontDatabase().font(family, style, pSize);
newFont.setUnderline(resolveFont.underline());
newFont.setStrikeOut(resolveFont.strikeOut());
+ CFRelease(font);
}
return newFont;
}
diff --git a/src/plugins/platforms/cocoa/qcocoahelpers.mm b/src/plugins/platforms/cocoa/qcocoahelpers.mm
index 9783899742..31a56b9d66 100644
--- a/src/plugins/platforms/cocoa/qcocoahelpers.mm
+++ b/src/plugins/platforms/cocoa/qcocoahelpers.mm
@@ -138,6 +138,8 @@ NSImage *qt_mac_cgimage_to_nsimage(CGImageRef image)
NSImage *qt_mac_create_nsimage(const QPixmap &pm)
{
+ if (pm.isNull())
+ return 0;
QImage image = pm.toImage();
CGImageRef cgImage = qt_mac_image_to_cgimage(image);
NSImage *nsImage = qt_mac_cgimage_to_nsimage(cgImage);
@@ -784,14 +786,49 @@ CGImageRef qt_mac_toCGImage(const QImage &qImage, bool isMask, uchar **dataCopy)
NULL,
false);
} else {
- CGColorSpaceRef cgColourSpaceRef = CGColorSpaceCreateDeviceRGB();
+ // Try get a device color space. Using the device color space means
+ // that the CGImage can be drawn to screen without per-pixel color
+ // space conversion, at the cost of less color accuracy.
+ CGColorSpaceRef cgColourSpaceRef = 0;
+ CMProfileRef sysProfile;
+ if (CMGetSystemProfile(&sysProfile) == noErr)
+ {
+ cgColourSpaceRef = CGColorSpaceCreateWithPlatformColorSpace(sysProfile);
+ CMCloseProfile(sysProfile);
+ }
+
+ // Fall back to Generic RGB if a profile was not found.
+ if (!cgColourSpaceRef)
+ cgColourSpaceRef = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);
+
+ // Create a CGBitmapInfo contiaining the image format.
+ // Support the 8-bit per component (A)RGB formats.
+ CGBitmapInfo bitmapInfo = kCGBitmapByteOrder32Little;
+ switch (qImage.format()) {
+ case QImage::Format_ARGB32_Premultiplied :
+ bitmapInfo |= kCGImageAlphaPremultipliedFirst;
+ break;
+ case QImage::Format_ARGB32 :
+ bitmapInfo |= kCGImageAlphaFirst;
+ break;
+ case QImage::Format_RGB32 :
+ bitmapInfo |= kCGImageAlphaNoneSkipFirst;
+ break;
+ case QImage::Format_RGB888 :
+ bitmapInfo |= kCGImageAlphaNone;
+ break;
+ default:
+ qWarning() << "qt_mac_toCGImage: Unsupported image format" << qImage.format();
+ break;
+ }
+
cgImage = CGImageCreate(width,
height,
colorBufferSize,
bitDepth,
bytesPrLine,
cgColourSpaceRef,
- kCGBitmapByteOrder32Little | kCGImageAlphaNoneSkipFirst,
+ bitmapInfo,
cgDataProviderRef,
NULL,
false,
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.h b/src/plugins/platforms/cocoa/qcocoaintegration.h
index 1bb46ea3ea..e455a3552e 100644
--- a/src/plugins/platforms/cocoa/qcocoaintegration.h
+++ b/src/plugins/platforms/cocoa/qcocoaintegration.h
@@ -49,6 +49,7 @@
#include "qcocoaclipboard.h"
#include "qcocoadrag.h"
#include "qcocoaservices.h"
+#include "qcocoakeymapper.h"
#include <QtCore/QScopedPointer>
#include <qpa/qplatformintegration.h>
@@ -121,6 +122,8 @@ public:
QPlatformServices *services() const;
QVariant styleHint(StyleHint hint) const;
+ QList<int> possibleKeys(const QKeyEvent *event) const;
+
void updateScreens();
private:
@@ -138,6 +141,7 @@ private:
QScopedPointer<QCocoaDrag> mCocoaDrag;
QScopedPointer<QPlatformNativeInterface> mNativeInterface;
QScopedPointer<QCocoaServices> mServices;
+ QScopedPointer<QCocoaKeyMapper> mKeyboardMapper;
};
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm
index 393c471c25..e096096e99 100644
--- a/src/plugins/platforms/cocoa/qcocoaintegration.mm
+++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm
@@ -199,6 +199,7 @@ QCocoaIntegration::QCocoaIntegration()
, mCocoaDrag(new QCocoaDrag)
, mNativeInterface(new QCocoaNativeInterface)
, mServices(new QCocoaServices)
+ , mKeyboardMapper(new QCocoaKeyMapper)
{
initResources();
QCocoaAutoReleasePool pool;
@@ -414,4 +415,9 @@ QVariant QCocoaIntegration::styleHint(StyleHint hint) const
return QPlatformIntegration::styleHint(hint);
}
+QList<int> QCocoaIntegration::possibleKeys(const QKeyEvent *event) const
+{
+ return mKeyboardMapper->possibleKeys(event);
+}
+
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/cocoa/qcocoakeymapper.h b/src/plugins/platforms/cocoa/qcocoakeymapper.h
new file mode 100644
index 0000000000..693539dd4e
--- /dev/null
+++ b/src/plugins/platforms/cocoa/qcocoakeymapper.h
@@ -0,0 +1,111 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** 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, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QCOCOAKEYMAPPER_H
+#define QCOCOAKEYMAPPER_H
+
+#include <qcocoahelpers.h>
+
+#include <Cocoa/Cocoa.h>
+#include <Carbon/Carbon.h>
+
+#include <QtCore/QList>
+#include <QtGui/QKeyEvent>
+
+QT_BEGIN_NAMESPACE
+
+/*
+ \internal
+ A Mac KeyboardLayoutItem has 8 possible states:
+ 1. Unmodified
+ 2. Shift
+ 3. Control
+ 4. Control + Shift
+ 5. Alt
+ 6. Alt + Shift
+ 7. Alt + Control
+ 8. Alt + Control + Shift
+ 9. Meta
+ 10. Meta + Shift
+ 11. Meta + Control
+ 12. Meta + Control + Shift
+ 13. Meta + Alt
+ 14. Meta + Alt + Shift
+ 15. Meta + Alt + Control
+ 16. Meta + Alt + Control + Shift
+*/
+struct KeyboardLayoutItem {
+ bool dirty;
+ quint32 qtKey[16]; // Can by any Qt::Key_<foo>, or unicode character
+};
+
+
+class QCocoaKeyMapper
+{
+public:
+ QCocoaKeyMapper();
+ ~QCocoaKeyMapper();
+ QList<int> possibleKeys(const QKeyEvent *event) const;
+ bool updateKeyboard();
+ void deleteLayouts();
+ void updateKeyMap(unsigned short macVirtualKey, QChar unicodeKey);
+ void clearMappings();
+
+private:
+ QCFType<TISInputSourceRef> currentInputSource;
+
+ QLocale keyboardInputLocale;
+ Qt::LayoutDirection keyboardInputDirection;
+ enum { NullMode, UnicodeMode, OtherMode } keyboard_mode;
+ union {
+ const UCKeyboardLayout *unicode;
+ void *other;
+ } keyboard_layout_format;
+ KeyboardLayoutRef currentKeyboardLayout;
+ KeyboardLayoutKind keyboard_kind;
+ UInt32 keyboard_dead;
+ KeyboardLayoutItem *keyLayout[256];
+};
+
+QT_END_NAMESPACE
+
+#endif
+
diff --git a/src/plugins/platforms/cocoa/qcocoakeymapper.mm b/src/plugins/platforms/cocoa/qcocoakeymapper.mm
new file mode 100644
index 0000000000..6df0466355
--- /dev/null
+++ b/src/plugins/platforms/cocoa/qcocoakeymapper.mm
@@ -0,0 +1,468 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** 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, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qcocoakeymapper.h"
+
+#include <QtCore/QDebug>
+#include <QtGui/QGuiApplication>
+
+QT_BEGIN_NAMESPACE
+
+// QCocoaKeyMapper debug facilities
+//#define DEBUG_KEY_BINDINGS
+//#define DEBUG_KEY_BINDINGS_MODIFIERS
+//#define DEBUG_KEY_MAPS
+
+// Possible modifier states.
+// NOTE: The order of these states match the order in updatePossibleKeyCodes()!
+static const Qt::KeyboardModifiers ModsTbl[] = {
+ Qt::NoModifier, // 0
+ Qt::ShiftModifier, // 1
+ Qt::ControlModifier, // 2
+ Qt::ControlModifier | Qt::ShiftModifier, // 3
+ Qt::AltModifier, // 4
+ Qt::AltModifier | Qt::ShiftModifier, // 5
+ Qt::AltModifier | Qt::ControlModifier, // 6
+ Qt::AltModifier | Qt::ShiftModifier | Qt::ControlModifier, // 7
+ Qt::MetaModifier, // 8
+ Qt::MetaModifier | Qt::ShiftModifier, // 9
+ Qt::MetaModifier | Qt::ControlModifier, // 10
+ Qt::MetaModifier | Qt::ControlModifier | Qt::ShiftModifier,// 11
+ Qt::MetaModifier | Qt::AltModifier, // 12
+ Qt::MetaModifier | Qt::AltModifier | Qt::ShiftModifier, // 13
+ Qt::MetaModifier | Qt::AltModifier | Qt::ControlModifier, // 14
+ Qt::MetaModifier | Qt::AltModifier | Qt::ShiftModifier | Qt::ControlModifier, // 15
+};
+
+bool qt_mac_eat_unicode_key = false;
+
+Q_GUI_EXPORT void qt_mac_secure_keyboard(bool b)
+{
+ static bool secure = false;
+ if (b != secure){
+ b ? EnableSecureEventInput() : DisableSecureEventInput();
+ secure = b;
+ }
+}
+
+/* key maps */
+struct qt_mac_enum_mapper
+{
+ int mac_code;
+ int qt_code;
+#if defined(DEBUG_KEY_BINDINGS)
+# define QT_MAC_MAP_ENUM(x) x, #x
+ const char *desc;
+#else
+# define QT_MAC_MAP_ENUM(x) x
+#endif
+};
+
+//modifiers
+static qt_mac_enum_mapper qt_mac_modifier_symbols[] = {
+ { shiftKey, QT_MAC_MAP_ENUM(Qt::ShiftModifier) },
+ { rightShiftKey, QT_MAC_MAP_ENUM(Qt::ShiftModifier) },
+ { controlKey, QT_MAC_MAP_ENUM(Qt::MetaModifier) },
+ { rightControlKey, QT_MAC_MAP_ENUM(Qt::MetaModifier) },
+ { cmdKey, QT_MAC_MAP_ENUM(Qt::ControlModifier) },
+ { optionKey, QT_MAC_MAP_ENUM(Qt::AltModifier) },
+ { rightOptionKey, QT_MAC_MAP_ENUM(Qt::AltModifier) },
+ { kEventKeyModifierNumLockMask, QT_MAC_MAP_ENUM(Qt::KeypadModifier) },
+ { 0, QT_MAC_MAP_ENUM(0) }
+};
+Qt::KeyboardModifiers qt_mac_get_modifiers(int keys)
+{
+#ifdef DEBUG_KEY_BINDINGS_MODIFIERS
+ qDebug("Qt: internal: **Mapping modifiers: %d (0x%04x)", keys, keys);
+#endif
+ Qt::KeyboardModifiers ret = Qt::NoModifier;
+ for (int i = 0; qt_mac_modifier_symbols[i].qt_code; i++) {
+ if (keys & qt_mac_modifier_symbols[i].mac_code) {
+#ifdef DEBUG_KEY_BINDINGS_MODIFIERS
+ qDebug("Qt: internal: got modifier: %s", qt_mac_modifier_symbols[i].desc);
+#endif
+ ret |= Qt::KeyboardModifier(qt_mac_modifier_symbols[i].qt_code);
+ }
+ }
+ if (qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta)) {
+ Qt::KeyboardModifiers oldModifiers = ret;
+ ret &= ~(Qt::MetaModifier | Qt::ControlModifier);
+ if (oldModifiers & Qt::ControlModifier)
+ ret |= Qt::MetaModifier;
+ if (oldModifiers & Qt::MetaModifier)
+ ret |= Qt::ControlModifier;
+ }
+ return ret;
+}
+static int qt_mac_get_mac_modifiers(Qt::KeyboardModifiers keys)
+{
+#ifdef DEBUG_KEY_BINDINGS_MODIFIERS
+ qDebug("Qt: internal: **Mapping modifiers: %d (0x%04x)", (int)keys, (int)keys);
+#endif
+ int ret = 0;
+ for (int i = 0; qt_mac_modifier_symbols[i].qt_code; i++) {
+ if (keys & qt_mac_modifier_symbols[i].qt_code) {
+#ifdef DEBUG_KEY_BINDINGS_MODIFIERS
+ qDebug("Qt: internal: got modifier: %s", qt_mac_modifier_symbols[i].desc);
+#endif
+ ret |= qt_mac_modifier_symbols[i].mac_code;
+ }
+ }
+
+ if (qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta)) {
+ int oldModifiers = ret;
+ ret &= ~(controlKeyBit | cmdKeyBit);
+ if (oldModifiers & controlKeyBit)
+ ret |= cmdKeyBit;
+ if (oldModifiers & cmdKeyBit)
+ ret |= controlKeyBit;
+ }
+ return ret;
+}
+
+//keyboard keys (non-modifiers)
+static qt_mac_enum_mapper qt_mac_keyboard_symbols[] = {
+ { kHomeCharCode, QT_MAC_MAP_ENUM(Qt::Key_Home) },
+ { kEnterCharCode, QT_MAC_MAP_ENUM(Qt::Key_Enter) },
+ { kEndCharCode, QT_MAC_MAP_ENUM(Qt::Key_End) },
+ { kBackspaceCharCode, QT_MAC_MAP_ENUM(Qt::Key_Backspace) },
+ { kTabCharCode, QT_MAC_MAP_ENUM(Qt::Key_Tab) },
+ { kPageUpCharCode, QT_MAC_MAP_ENUM(Qt::Key_PageUp) },
+ { kPageDownCharCode, QT_MAC_MAP_ENUM(Qt::Key_PageDown) },
+ { kReturnCharCode, QT_MAC_MAP_ENUM(Qt::Key_Return) },
+ { kEscapeCharCode, QT_MAC_MAP_ENUM(Qt::Key_Escape) },
+ { kLeftArrowCharCode, QT_MAC_MAP_ENUM(Qt::Key_Left) },
+ { kRightArrowCharCode, QT_MAC_MAP_ENUM(Qt::Key_Right) },
+ { kUpArrowCharCode, QT_MAC_MAP_ENUM(Qt::Key_Up) },
+ { kDownArrowCharCode, QT_MAC_MAP_ENUM(Qt::Key_Down) },
+ { kHelpCharCode, QT_MAC_MAP_ENUM(Qt::Key_Help) },
+ { kDeleteCharCode, QT_MAC_MAP_ENUM(Qt::Key_Delete) },
+//ascii maps, for debug
+ { ':', QT_MAC_MAP_ENUM(Qt::Key_Colon) },
+ { ';', QT_MAC_MAP_ENUM(Qt::Key_Semicolon) },
+ { '<', QT_MAC_MAP_ENUM(Qt::Key_Less) },
+ { '=', QT_MAC_MAP_ENUM(Qt::Key_Equal) },
+ { '>', QT_MAC_MAP_ENUM(Qt::Key_Greater) },
+ { '?', QT_MAC_MAP_ENUM(Qt::Key_Question) },
+ { '@', QT_MAC_MAP_ENUM(Qt::Key_At) },
+ { ' ', QT_MAC_MAP_ENUM(Qt::Key_Space) },
+ { '!', QT_MAC_MAP_ENUM(Qt::Key_Exclam) },
+ { '"', QT_MAC_MAP_ENUM(Qt::Key_QuoteDbl) },
+ { '#', QT_MAC_MAP_ENUM(Qt::Key_NumberSign) },
+ { '$', QT_MAC_MAP_ENUM(Qt::Key_Dollar) },
+ { '%', QT_MAC_MAP_ENUM(Qt::Key_Percent) },
+ { '&', QT_MAC_MAP_ENUM(Qt::Key_Ampersand) },
+ { '\'', QT_MAC_MAP_ENUM(Qt::Key_Apostrophe) },
+ { '(', QT_MAC_MAP_ENUM(Qt::Key_ParenLeft) },
+ { ')', QT_MAC_MAP_ENUM(Qt::Key_ParenRight) },
+ { '*', QT_MAC_MAP_ENUM(Qt::Key_Asterisk) },
+ { '+', QT_MAC_MAP_ENUM(Qt::Key_Plus) },
+ { ',', QT_MAC_MAP_ENUM(Qt::Key_Comma) },
+ { '-', QT_MAC_MAP_ENUM(Qt::Key_Minus) },
+ { '.', QT_MAC_MAP_ENUM(Qt::Key_Period) },
+ { '/', QT_MAC_MAP_ENUM(Qt::Key_Slash) },
+ { '[', QT_MAC_MAP_ENUM(Qt::Key_BracketLeft) },
+ { ']', QT_MAC_MAP_ENUM(Qt::Key_BracketRight) },
+ { '\\', QT_MAC_MAP_ENUM(Qt::Key_Backslash) },
+ { '_', QT_MAC_MAP_ENUM(Qt::Key_Underscore) },
+ { '`', QT_MAC_MAP_ENUM(Qt::Key_QuoteLeft) },
+ { '{', QT_MAC_MAP_ENUM(Qt::Key_BraceLeft) },
+ { '}', QT_MAC_MAP_ENUM(Qt::Key_BraceRight) },
+ { '|', QT_MAC_MAP_ENUM(Qt::Key_Bar) },
+ { '~', QT_MAC_MAP_ENUM(Qt::Key_AsciiTilde) },
+ { '^', QT_MAC_MAP_ENUM(Qt::Key_AsciiCircum) },
+ { 0, QT_MAC_MAP_ENUM(0) }
+};
+
+static qt_mac_enum_mapper qt_mac_keyvkey_symbols[] = { //real scan codes
+ { 122, QT_MAC_MAP_ENUM(Qt::Key_F1) },
+ { 120, QT_MAC_MAP_ENUM(Qt::Key_F2) },
+ { 99, QT_MAC_MAP_ENUM(Qt::Key_F3) },
+ { 118, QT_MAC_MAP_ENUM(Qt::Key_F4) },
+ { 96, QT_MAC_MAP_ENUM(Qt::Key_F5) },
+ { 97, QT_MAC_MAP_ENUM(Qt::Key_F6) },
+ { 98, QT_MAC_MAP_ENUM(Qt::Key_F7) },
+ { 100, QT_MAC_MAP_ENUM(Qt::Key_F8) },
+ { 101, QT_MAC_MAP_ENUM(Qt::Key_F9) },
+ { 109, QT_MAC_MAP_ENUM(Qt::Key_F10) },
+ { 103, QT_MAC_MAP_ENUM(Qt::Key_F11) },
+ { 111, QT_MAC_MAP_ENUM(Qt::Key_F12) },
+ { 105, QT_MAC_MAP_ENUM(Qt::Key_F13) },
+ { 107, QT_MAC_MAP_ENUM(Qt::Key_F14) },
+ { 113, QT_MAC_MAP_ENUM(Qt::Key_F15) },
+ { 106, QT_MAC_MAP_ENUM(Qt::Key_F16) },
+ { 0, QT_MAC_MAP_ENUM(0) }
+};
+
+static qt_mac_enum_mapper qt_mac_private_unicode[] = {
+ { 0xF700, QT_MAC_MAP_ENUM(Qt::Key_Up) }, //NSUpArrowFunctionKey
+ { 0xF701, QT_MAC_MAP_ENUM(Qt::Key_Down) }, //NSDownArrowFunctionKey
+ { 0xF702, QT_MAC_MAP_ENUM(Qt::Key_Left) }, //NSLeftArrowFunctionKey
+ { 0xF703, QT_MAC_MAP_ENUM(Qt::Key_Right) }, //NSRightArrowFunctionKey
+ { 0xF727, QT_MAC_MAP_ENUM(Qt::Key_Insert) }, //NSInsertFunctionKey
+ { 0xF728, QT_MAC_MAP_ENUM(Qt::Key_Delete) }, //NSDeleteFunctionKey
+ { 0xF729, QT_MAC_MAP_ENUM(Qt::Key_Home) }, //NSHomeFunctionKey
+ { 0xF72B, QT_MAC_MAP_ENUM(Qt::Key_End) }, //NSEndFunctionKey
+ { 0xF72C, QT_MAC_MAP_ENUM(Qt::Key_PageUp) }, //NSPageUpFunctionKey
+ { 0xF72D, QT_MAC_MAP_ENUM(Qt::Key_PageDown) }, //NSPageDownFunctionKey
+ { 0xF72F, QT_MAC_MAP_ENUM(Qt::Key_ScrollLock) }, //NSScrollLockFunctionKey
+ { 0xF730, QT_MAC_MAP_ENUM(Qt::Key_Pause) }, //NSPauseFunctionKey
+ { 0xF731, QT_MAC_MAP_ENUM(Qt::Key_SysReq) }, //NSSysReqFunctionKey
+ { 0xF735, QT_MAC_MAP_ENUM(Qt::Key_Menu) }, //NSMenuFunctionKey
+ { 0xF738, QT_MAC_MAP_ENUM(Qt::Key_Print) }, //NSPrintFunctionKey
+ { 0xF73A, QT_MAC_MAP_ENUM(Qt::Key_Clear) }, //NSClearDisplayFunctionKey
+ { 0xF73D, QT_MAC_MAP_ENUM(Qt::Key_Insert) }, //NSInsertCharFunctionKey
+ { 0xF73E, QT_MAC_MAP_ENUM(Qt::Key_Delete) }, //NSDeleteCharFunctionKey
+ { 0xF741, QT_MAC_MAP_ENUM(Qt::Key_Select) }, //NSSelectFunctionKey
+ { 0xF742, QT_MAC_MAP_ENUM(Qt::Key_Execute) }, //NSExecuteFunctionKey
+ { 0xF746, QT_MAC_MAP_ENUM(Qt::Key_Help) }, //NSHelpFunctionKey
+ { 0xF747, QT_MAC_MAP_ENUM(Qt::Key_Mode_switch) }, //NSModeSwitchFunctionKey
+ { 0, QT_MAC_MAP_ENUM(0) }
+};
+
+static int qt_mac_get_key(int modif, const QChar &key, int virtualKey)
+{
+#ifdef DEBUG_KEY_BINDINGS
+ qDebug("**Mapping key: %d (0x%04x) - %d (0x%04x)", key.unicode(), key.unicode(), virtualKey, virtualKey);
+#endif
+
+ if (key == kClearCharCode && virtualKey == 0x47)
+ return Qt::Key_Clear;
+
+ if (key.isDigit()) {
+#ifdef DEBUG_KEY_BINDINGS
+ qDebug("%d: got key: %d", __LINE__, key.digitValue());
+#endif
+ return key.digitValue() + Qt::Key_0;
+ }
+
+ if (key.isLetter()) {
+#ifdef DEBUG_KEY_BINDINGS
+ qDebug("%d: got key: %d", __LINE__, (key.toUpper().unicode() - 'A'));
+#endif
+ return (key.toUpper().unicode() - 'A') + Qt::Key_A;
+ }
+ if (key.isSymbol()) {
+#ifdef DEBUG_KEY_BINDINGS
+ qDebug("%d: got key: %d", __LINE__, (key.unicode()));
+#endif
+ return key.unicode();
+ }
+
+ for (int i = 0; qt_mac_keyboard_symbols[i].qt_code; i++) {
+ if (qt_mac_keyboard_symbols[i].mac_code == key) {
+ /* To work like Qt for X11 we issue Backtab when Shift + Tab are pressed */
+ if (qt_mac_keyboard_symbols[i].qt_code == Qt::Key_Tab && (modif & Qt::ShiftModifier)) {
+#ifdef DEBUG_KEY_BINDINGS
+ qDebug("%d: got key: Qt::Key_Backtab", __LINE__);
+#endif
+ return Qt::Key_Backtab;
+ }
+
+#ifdef DEBUG_KEY_BINDINGS
+ qDebug("%d: got key: %s", __LINE__, qt_mac_keyboard_symbols[i].desc);
+#endif
+ return qt_mac_keyboard_symbols[i].qt_code;
+ }
+ }
+
+ //last ditch try to match the scan code
+ for (int i = 0; qt_mac_keyvkey_symbols[i].qt_code; i++) {
+ if (qt_mac_keyvkey_symbols[i].mac_code == virtualKey) {
+#ifdef DEBUG_KEY_BINDINGS
+ qDebug("%d: got key: %s", __LINE__, qt_mac_keyvkey_symbols[i].desc);
+#endif
+ return qt_mac_keyvkey_symbols[i].qt_code;
+ }
+ }
+
+ // check if they belong to key codes in private unicode range
+ if (key >= 0xf700 && key <= 0xf747) {
+ if (key >= 0xf704 && key <= 0xf726) {
+ return Qt::Key_F1 + (key.unicode() - 0xf704) ;
+ }
+ for (int i = 0; qt_mac_private_unicode[i].qt_code; i++) {
+ if (qt_mac_private_unicode[i].mac_code == key) {
+ return qt_mac_private_unicode[i].qt_code;
+ }
+ }
+
+ }
+
+ //oh well
+#ifdef DEBUG_KEY_BINDINGS
+ qDebug("Unknown case.. %s:%d %d[%d] %d", __FILE__, __LINE__, key.unicode(), key.toLatin1(), virtualKey);
+#endif
+ return Qt::Key_unknown;
+}
+
+QCocoaKeyMapper::QCocoaKeyMapper()
+{
+ memset(keyLayout, 0, sizeof(keyLayout));
+ keyboard_layout_format.unicode = 0;
+ currentInputSource = 0;
+}
+
+QCocoaKeyMapper::~QCocoaKeyMapper()
+{
+ deleteLayouts();
+}
+
+bool QCocoaKeyMapper::updateKeyboard()
+{
+ const UCKeyboardLayout *uchrData = 0;
+ QCFType<TISInputSourceRef> source = TISCopyCurrentKeyboardInputSource();
+ if (keyboard_mode != NullMode && source == currentInputSource) {
+ return false;
+ }
+ Q_ASSERT(source != 0);
+ CFDataRef data = static_cast<CFDataRef>(TISGetInputSourceProperty(source,
+ kTISPropertyUnicodeKeyLayoutData));
+ uchrData = data ? reinterpret_cast<const UCKeyboardLayout *>(CFDataGetBytePtr(data)) : 0;
+
+ keyboard_kind = LMGetKbdType();
+ if (uchrData) {
+ keyboard_layout_format.unicode = uchrData;
+ keyboard_mode = UnicodeMode;
+ }
+ currentInputSource = source;
+ keyboard_dead = 0;
+ CFStringRef iso639Code;
+
+ CFArrayRef array = static_cast<CFArrayRef>(TISGetInputSourceProperty(currentInputSource, kTISPropertyInputSourceLanguages));
+ iso639Code = static_cast<CFStringRef>(CFArrayGetValueAtIndex(array, 0)); // Actually a RFC3066bis, but it's close enough
+
+ if (iso639Code) {
+ keyboardInputLocale = QLocale(QCFString::toQString(iso639Code));
+ keyboardInputDirection = keyboardInputLocale.textDirection();
+ } else {
+ keyboardInputLocale = QLocale::c();
+ keyboardInputDirection = Qt::LeftToRight;
+ }
+ return true;
+}
+
+void QCocoaKeyMapper::deleteLayouts()
+{
+ keyboard_mode = NullMode;
+ for (int i = 0; i < 255; ++i) {
+ if (keyLayout[i]) {
+ delete keyLayout[i];
+ keyLayout[i] = 0;
+ }
+ }
+}
+
+void QCocoaKeyMapper::clearMappings()
+{
+ deleteLayouts();
+ updateKeyboard();
+}
+
+void QCocoaKeyMapper::updateKeyMap(unsigned short macVirtualKey, QChar unicodeKey)
+{
+ if (updateKeyboard()) {
+ // ### Qt 4 did this:
+ // QKeyMapper::changeKeyboard();
+ }
+ if (keyLayout[macVirtualKey])
+ return;
+
+ UniCharCount buffer_size = 10;
+ UniChar buffer[buffer_size];
+ keyLayout[macVirtualKey] = new KeyboardLayoutItem;
+ for (int i = 0; i < 16; ++i) {
+ UniCharCount out_buffer_size = 0;
+ keyLayout[macVirtualKey]->qtKey[i] = 0;
+
+ const UInt32 keyModifier = ((qt_mac_get_mac_modifiers(ModsTbl[i]) >> 8) & 0xFF);
+ OSStatus err = UCKeyTranslate(keyboard_layout_format.unicode, macVirtualKey, kUCKeyActionDown, keyModifier,
+ keyboard_kind, 0, &keyboard_dead, buffer_size, &out_buffer_size, buffer);
+ if (err == noErr && out_buffer_size) {
+ const QChar unicode(buffer[0]);
+ int qtkey = qt_mac_get_key(keyModifier, unicode, macVirtualKey);
+ if (qtkey == Qt::Key_unknown)
+ qtkey = unicode.unicode();
+ keyLayout[macVirtualKey]->qtKey[i] = qtkey;
+ } else {
+ int qtkey = qt_mac_get_key(keyModifier, unicodeKey, macVirtualKey);
+ if (qtkey == Qt::Key_unknown)
+ qtkey = unicodeKey.unicode();
+ keyLayout[macVirtualKey]->qtKey[i] = qtkey;
+ }
+ }
+#ifdef DEBUG_KEY_MAPS
+ qDebug("updateKeyMap for virtual key = 0x%02x!", (uint)macVirtualKey);
+ for (int i = 0; i < 16; ++i) {
+ qDebug(" [%d] (%d,0x%02x,'%c')", i,
+ keyLayout[macVirtualKey]->qtKey[i],
+ keyLayout[macVirtualKey]->qtKey[i],
+ keyLayout[macVirtualKey]->qtKey[i]);
+ }
+#endif
+}
+
+QList<int> QCocoaKeyMapper::possibleKeys(const QKeyEvent *event) const
+{
+ QList<int> ret;
+ const_cast<QCocoaKeyMapper *>(this)->updateKeyMap(event->nativeVirtualKey(), QChar(event->key()));
+
+ KeyboardLayoutItem *kbItem = keyLayout[event->nativeVirtualKey()];
+
+ if (!kbItem) // Key is not in any keyboard layout (e.g. eisu-key on Japanese keyboard)
+ return ret;
+
+ int baseKey = kbItem->qtKey[0];
+ Qt::KeyboardModifiers keyMods = event->modifiers();
+
+ ret << int(baseKey + keyMods); // The base key is _always_ valid, of course
+
+ for (int i = 1; i < 8; ++i) {
+ Qt::KeyboardModifiers neededMods = ModsTbl[i];
+ int key = kbItem->qtKey[i];
+ if (key && key != baseKey && ((keyMods & neededMods) == neededMods)) {
+ ret << int(key + (keyMods & ~neededMods));
+ }
+ }
+ return ret;
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/cocoa/qcocoanativeinterface.mm b/src/plugins/platforms/cocoa/qcocoanativeinterface.mm
index f0b1bd330a..271c9d2894 100644
--- a/src/plugins/platforms/cocoa/qcocoanativeinterface.mm
+++ b/src/plugins/platforms/cocoa/qcocoanativeinterface.mm
@@ -107,8 +107,10 @@ QPlatformPrinterSupport *QCocoaNativeInterface::createPlatformPrinterSupport()
void *QCocoaNativeInterface::NSPrintInfoForPrintEngine(QPrintEngine *printEngine)
{
#ifndef QT_NO_WIDGETS
- QMacPrintEngine *macPrintEngine = static_cast<QMacPrintEngine *>(printEngine);
- return macPrintEngine->d_func()->printInfo;
+ QMacPrintEnginePrivate *macPrintEnginePriv = static_cast<QMacPrintEngine *>(printEngine)->d_func();
+ if (macPrintEnginePriv->state == QPrinter::Idle && !macPrintEnginePriv->isPrintSessionInitialized())
+ macPrintEnginePriv->initialize();
+ return macPrintEnginePriv->printInfo;
#else
qFatal("Printing is not supported when Qt is configured with -no-widgets");
return 0;
diff --git a/src/plugins/platforms/cocoa/qcocoasystemsettings.mm b/src/plugins/platforms/cocoa/qcocoasystemsettings.mm
index aacf47ec43..692e504432 100644
--- a/src/plugins/platforms/cocoa/qcocoasystemsettings.mm
+++ b/src/plugins/platforms/cocoa/qcocoasystemsettings.mm
@@ -96,6 +96,8 @@ QColor qt_mac_colorForThemeTextColor(ThemeTextColor themeColor)
case kThemeTextColorTabFrontInactive:
case kThemeTextColorBevelButtonInactive:
return QColor(127, 127, 127, 255);
+ case kThemeTextColorMenuItemSelected:
+ return Qt::white;
default:
return QColor(0, 0, 0, 255); // ### TODO: Sample color like Qt 4.
}
@@ -153,21 +155,19 @@ struct QMacPaletteMap {
};
static QMacPaletteMap mac_widget_colors[] = {
-// TODO (msorvig): Fix/match palette behavior with Qt 4 and enable.
-//
-// QMacPaletteMap(QPlatformTheme::ToolButtonPalette, kThemeTextColorBevelButtonActive, kThemeTextColorBevelButtonInactive),
-// QMacPaletteMap(QPlatformTheme::ButtonPalette, kThemeTextColorPushButtonActive, kThemeTextColorPushButtonInactive),
-// QMacPaletteMap(QPlatformTheme::HeaderPalette, kThemeTextColorPushButtonActive, kThemeTextColorPushButtonInactive),
-// QMacPaletteMap(QPlatformTheme::ComboBoxPalette, kThemeTextColorPopupButtonActive, kThemeTextColorPopupButtonInactive),
-// QMacPaletteMap(QPlatformTheme::ItemViewPalette, kThemeTextColorListView, kThemeTextColorDialogInactive),
-// QMacPaletteMap(QPlatformTheme::MessageBoxLabelPelette, kThemeTextColorAlertActive, kThemeTextColorAlertInactive),
-// QMacPaletteMap(QPlatformTheme::TabBarPalette, kThemeTextColorTabFrontActive, kThemeTextColorTabFrontInactive),
-// QMacPaletteMap(QPlatformTheme::LabelPalette, kThemeTextColorPlacardActive, kThemeTextColorPlacardInactive),
-// QMacPaletteMap(QPlatformTheme::GroupBoxPalette, kThemeTextColorPlacardActive, kThemeTextColorPlacardInactive),
-// QMacPaletteMap(QPlatformTheme::MenuPalette, kThemeTextColorPopupLabelActive, kThemeTextColorPopupLabelInactive),
-// ### TODO: The zeros below gives white-on-black text.
-// QMacPaletteMap(QPlatformTheme::TextEditPalette, 0, 0),
-// QMacPaletteMap(QPlatformTheme::TextLineEditPalette, 0, 0),
+ QMacPaletteMap(QPlatformTheme::ToolButtonPalette, kThemeTextColorBevelButtonActive, kThemeTextColorBevelButtonInactive),
+ QMacPaletteMap(QPlatformTheme::ButtonPalette, kThemeTextColorPushButtonActive, kThemeTextColorPushButtonInactive),
+ QMacPaletteMap(QPlatformTheme::HeaderPalette, kThemeTextColorPushButtonActive, kThemeTextColorPushButtonInactive),
+ QMacPaletteMap(QPlatformTheme::ComboBoxPalette, kThemeTextColorPopupButtonActive, kThemeTextColorPopupButtonInactive),
+ QMacPaletteMap(QPlatformTheme::ItemViewPalette, kThemeTextColorListView, kThemeTextColorDialogInactive),
+ QMacPaletteMap(QPlatformTheme::MessageBoxLabelPelette, kThemeTextColorAlertActive, kThemeTextColorAlertInactive),
+ QMacPaletteMap(QPlatformTheme::TabBarPalette, kThemeTextColorTabFrontActive, kThemeTextColorTabFrontInactive),
+ QMacPaletteMap(QPlatformTheme::LabelPalette, kThemeTextColorPlacardActive, kThemeTextColorPlacardInactive),
+ QMacPaletteMap(QPlatformTheme::GroupBoxPalette, kThemeTextColorPlacardActive, kThemeTextColorPlacardInactive),
+ QMacPaletteMap(QPlatformTheme::MenuPalette, kThemeTextColorPopupLabelActive, kThemeTextColorPopupLabelInactive),
+ //### TODO: The zeros below gives white-on-black text.
+ QMacPaletteMap(QPlatformTheme::TextEditPalette, 0, 0),
+ QMacPaletteMap(QPlatformTheme::TextLineEditPalette, 0, 0),
QMacPaletteMap(QPlatformTheme::NPalettes, 0, 0) };
QHash<QPlatformTheme::Palette, QPalette*> qt_mac_createRolePalettes()
@@ -175,7 +175,7 @@ QHash<QPlatformTheme::Palette, QPalette*> qt_mac_createRolePalettes()
QHash<QPlatformTheme::Palette, QPalette*> palettes;
QColor qc;
for (int i = 0; mac_widget_colors[i].paletteRole != QPlatformTheme::NPalettes; i++) {
- QPalette pal;
+ QPalette pal = *qt_mac_createSystemPalette();
if (mac_widget_colors[i].active != 0) {
qc = qt_mac_colorForThemeTextColor(mac_widget_colors[i].active);
pal.setColor(QPalette::Active, QPalette::Text, qc);
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index f786e6969f..b545844a24 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -49,6 +49,7 @@
#include <QtCore/qfileinfo.h>
#include <QtCore/private/qcore_mac_p.h>
#include <qwindow.h>
+#include <private/qwindow_p.h>
#include <qpa/qwindowsysteminterface.h>
#include <qpa/qplatformscreen.h>
@@ -372,9 +373,9 @@ NSUInteger QCocoaWindow::windowStyleMask(Qt::WindowFlags flags)
if (flags == Qt::Window) {
styleMask = (NSResizableWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSTitledWindowMask);
} else if ((flags & Qt::Dialog) && (window()->modality() != Qt::NonModal)) {
- styleMask = NSTitledWindowMask;
+ styleMask = NSResizableWindowMask | NSTitledWindowMask;
} else if (!(flags & Qt::FramelessWindowHint)) {
- if (flags & Qt::WindowMaximizeButtonHint)
+ if ((flags & Qt::Dialog) || (flags & Qt::WindowMaximizeButtonHint))
styleMask |= NSResizableWindowMask;
if (flags & Qt::WindowTitleHint)
styleMask |= NSTitledWindowMask;
@@ -590,9 +591,7 @@ void QCocoaWindow::windowDidResize()
if (!m_nsWindow)
return;
- NSRect rect = [[m_nsWindow contentView]frame];
- // Call setFrameSize which will trigger a frameDidChangeNotification on QNSView.
- [[m_nsWindow contentView] setFrameSize:rect.size];
+ [m_contentView updateGeometry];
}
void QCocoaWindow::windowWillClose()
@@ -651,6 +650,10 @@ void QCocoaWindow::recreateWindow(const QPlatformWindow *parentWindow)
NSRect frame = NSMakeRect(rect.x(), rect.y(), rect.width(), rect.height());
[m_contentView setFrame:frame];
}
+
+ const qreal opacity = qt_window_private(window())->opacity;
+ if (!qFuzzyCompare(opacity, qreal(1.0)))
+ setOpacity(opacity);
}
NSWindow * QCocoaWindow::createNSWindow()
diff --git a/src/plugins/platforms/cocoa/qnsview.h b/src/plugins/platforms/cocoa/qnsview.h
index f93fd86205..9cdfe6f5bb 100644
--- a/src/plugins/platforms/cocoa/qnsview.h
+++ b/src/plugins/platforms/cocoa/qnsview.h
@@ -66,6 +66,7 @@ QT_END_NAMESPACE
QString m_composingText;
bool m_sendKeyEvent;
QStringList *currentCustomDragTypes;
+ bool m_sendUpAsRightButton;
Qt::KeyboardModifiers currentWheelModifiers;
bool m_subscribesForGlobalFrameNotifications;
}
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm
index b608989e43..678f88baa0 100644
--- a/src/plugins/platforms/cocoa/qnsview.mm
+++ b/src/plugins/platforms/cocoa/qnsview.mm
@@ -84,6 +84,7 @@ static QTouchDevice *touchDevice = 0;
m_sendKeyEvent = false;
m_subscribesForGlobalFrameNotifications = false;
currentCustomDragTypes = 0;
+ m_sendUpAsRightButton = false;
if (!touchDevice) {
touchDevice = new QTouchDevice;
@@ -184,6 +185,9 @@ static QTouchDevice *touchDevice = 0;
geometry = qt_mac_toQRect([self frame]);
}
+ if (m_platformWindow->m_nsWindow && geometry == m_platformWindow->geometry())
+ return;
+
#ifdef QT_COCOA_ENABLE_WINDOW_DEBUG
qDebug() << "QNSView::udpateGeometry" << m_platformWindow << geometry;
#endif
@@ -312,6 +316,7 @@ static QTouchDevice *touchDevice = 0;
);
CGImageRef bsCGImage = m_backingStore->getBackingStoreCGImage();
CGImageRef cleanImg = CGImageCreateWithImageInRect(bsCGImage, backingStoreRect);
+ CGContextSetBlendMode(cgContext, kCGBlendModeCopy);
CGContextDrawImage(cgContext, dirtyWindowRect, cleanImg);
// Clean-up:
@@ -427,6 +432,7 @@ static QTouchDevice *touchDevice = 0;
- (void)mouseDown:(NSEvent *)theEvent
{
+ m_sendUpAsRightButton = false;
if (m_platformWindow->m_activePopupWindow) {
QWindowSystemInterface::handleCloseEvent(m_platformWindow->m_activePopupWindow);
QWindowSystemInterface::flushWindowSystemEvents();
@@ -438,7 +444,12 @@ static QTouchDevice *touchDevice = 0;
[inputManager handleMouseEvent:theEvent];
}
} else {
- m_buttons |= Qt::LeftButton;
+ if ([self convertKeyModifiers:[theEvent modifierFlags]] & Qt::MetaModifier) {
+ m_buttons |= Qt::RightButton;
+ m_sendUpAsRightButton = true;
+ } else {
+ m_buttons |= Qt::LeftButton;
+ }
[self handleMouseEvent:theEvent];
}
}
@@ -452,7 +463,12 @@ static QTouchDevice *touchDevice = 0;
- (void)mouseUp:(NSEvent *)theEvent
{
- m_buttons &= QFlag(~int(Qt::LeftButton));
+ if (m_sendUpAsRightButton) {
+ m_buttons &= QFlag(~int(Qt::RightButton));
+ m_sendUpAsRightButton = false;
+ } else {
+ m_buttons &= QFlag(~int(Qt::LeftButton));
+ }
[self handleMouseEvent:theEvent];
}
@@ -740,9 +756,19 @@ static QTouchDevice *touchDevice = 0;
- (void)handleKeyEvent:(NSEvent *)nsevent eventType:(int)eventType
{
ulong timestamp = [nsevent timestamp] * 1000;
- Qt::KeyboardModifiers modifiers = [self convertKeyModifiers:[nsevent modifierFlags]];
+ ulong nativeModifiers = [nsevent modifierFlags];
+ Qt::KeyboardModifiers modifiers = [self convertKeyModifiers: nativeModifiers];
NSString *charactersIgnoringModifiers = [nsevent charactersIgnoringModifiers];
+ // [from Qt 4 impl] There is no way to get the scan code from carbon. But we cannot
+ // use the value 0, since it indicates that the event originates from somewhere
+ // else than the keyboard.
+ quint32 nativeScanCode = 1;
+
+ UInt32 nativeVirtualKey = 0;
+ EventRef eventRef = EventRef([nsevent eventRef]);
+ GetEventParameter(eventRef, kEventParamKeyCode, typeUInt32, 0, sizeof(nativeVirtualKey), 0, &nativeVirtualKey);
+
QChar ch;
int keyCode;
if ([charactersIgnoringModifiers length] > 0) {
@@ -783,7 +809,8 @@ static QTouchDevice *touchDevice = 0;
}
if (m_sendKeyEvent && m_composingText.isEmpty())
- QWindowSystemInterface::handleKeyEvent(m_window, timestamp, QEvent::Type(eventType), keyCode, modifiers, text);
+ QWindowSystemInterface::handleExtendedKeyEvent(m_window, timestamp, QEvent::Type(eventType), keyCode, modifiers,
+ nativeScanCode, nativeVirtualKey, nativeModifiers, text);
m_sendKeyEvent = false;
}
diff --git a/src/plugins/platforms/cocoa/qnsviewaccessibility.mm b/src/plugins/platforms/cocoa/qnsviewaccessibility.mm
index 6824f19489..da714d3326 100644
--- a/src/plugins/platforms/cocoa/qnsviewaccessibility.mm
+++ b/src/plugins/platforms/cocoa/qnsviewaccessibility.mm
@@ -80,7 +80,7 @@
[kids addObject:[QCocoaAccessibleElement elementWithInterface: m_accessibleRoot->child(i) parent:self ]];
}
- return NSAccessibilityUnignoredChildren(kids);
+ return kids;
} else {
return [super accessibilityAttributeValue:attribute];
}
diff --git a/src/plugins/platforms/directfb/directfb.pro b/src/plugins/platforms/directfb/directfb.pro
index 29c5ebd99b..ec4a612b52 100644
--- a/src/plugins/platforms/directfb/directfb.pro
+++ b/src/plugins/platforms/directfb/directfb.pro
@@ -1,6 +1,7 @@
TARGET = qdirectfb
PLUGIN_TYPE = platforms
+PLUGIN_CLASS_NAME = QDirectFbIntegrationPlugin
load(qt_plugin)
QT += core-private gui-private platformsupport-private
diff --git a/src/plugins/platforms/directfb/qdirectfbblitter.cpp b/src/plugins/platforms/directfb/qdirectfbblitter.cpp
index cac250fb9d..ec6ecd540c 100644
--- a/src/plugins/platforms/directfb/qdirectfbblitter.cpp
+++ b/src/plugins/platforms/directfb/qdirectfbblitter.cpp
@@ -133,7 +133,7 @@ void QDirectFbBlitter::alphaFillRect(const QRectF &rect, const QColor &color, QP
int x, y, w, h;
DFBResult result;
- // check paramters
+ // check parameters
rect.toRect().getRect(&x, &y ,&w, &h);
if ((w <= 0) || (h <= 0)) return;
diff --git a/src/plugins/platforms/directfb/qdirectfbcursor.cpp b/src/plugins/platforms/directfb/qdirectfbcursor.cpp
index 1ff71f3e63..b04848ec40 100644
--- a/src/plugins/platforms/directfb/qdirectfbcursor.cpp
+++ b/src/plugins/platforms/directfb/qdirectfbcursor.cpp
@@ -47,9 +47,12 @@ QT_BEGIN_NAMESPACE
QDirectFBCursor::QDirectFBCursor(QPlatformScreen *screen)
: m_screen(screen)
{
+#ifndef QT_NO_CURSOR
m_image.reset(new QPlatformCursorImage(0, 0, 0, 0, 0, 0));
+#endif
}
+#ifndef QT_NO_CURSOR
void QDirectFBCursor::changeCursor(QCursor *cursor, QWindow *)
{
int xSpot;
@@ -82,5 +85,6 @@ void QDirectFBCursor::changeCursor(QCursor *cursor, QWindow *)
layer->SetCursorShape(layer, surface, xSpot, ySpot);
layer->SetCooperativeLevel(layer, DLSCL_SHARED);
}
+#endif
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/directfb/qdirectfbcursor.h b/src/plugins/platforms/directfb/qdirectfbcursor.h
index bd11b97467..21f205a5a1 100644
--- a/src/plugins/platforms/directfb/qdirectfbcursor.h
+++ b/src/plugins/platforms/directfb/qdirectfbcursor.h
@@ -56,10 +56,14 @@ class QDirectFBCursor : public QPlatformCursor
{
public:
QDirectFBCursor(QPlatformScreen *screen);
+#ifndef QT_NO_CURSOR
void changeCursor(QCursor *cursor, QWindow *window);
+#endif
private:
+#ifndef QT_NO_CURSOR
QScopedPointer<QPlatformCursorImage> m_image;
+#endif
QPlatformScreen *m_screen;
};
diff --git a/src/plugins/platforms/eglfs/eglfs.pro b/src/plugins/platforms/eglfs/eglfs.pro
index 1223b6b133..45059a9cb9 100644
--- a/src/plugins/platforms/eglfs/eglfs.pro
+++ b/src/plugins/platforms/eglfs/eglfs.pro
@@ -1,6 +1,7 @@
TARGET = qeglfs
PLUGIN_TYPE = platforms
+PLUGIN_CLASS_NAME = QEglFSIntegrationPlugin
load(qt_plugin)
QT += core-private gui-private platformsupport-private
diff --git a/src/plugins/platforms/eglfs/qeglfscursor.cpp b/src/plugins/platforms/eglfs/qeglfscursor.cpp
index 85bc8679f2..b29849226f 100644
--- a/src/plugins/platforms/eglfs/qeglfscursor.cpp
+++ b/src/plugins/platforms/eglfs/qeglfscursor.cpp
@@ -55,8 +55,10 @@ QEglFSCursor::QEglFSCursor(QEglFSScreen *screen)
initCursorAtlas();
// initialize the cursor
+#ifndef QT_NO_CURSOR
QCursor cursor(Qt::ArrowCursor);
setCurrentCursor(&cursor);
+#endif
}
QEglFSCursor::~QEglFSCursor()
@@ -183,6 +185,7 @@ void QEglFSCursor::initCursorAtlas()
m_cursorAtlas.image = image;
}
+#ifndef QT_NO_CURSOR
void QEglFSCursor::changeCursor(QCursor *cursor, QWindow *window)
{
Q_UNUSED(window);
@@ -221,6 +224,7 @@ bool QEglFSCursor::setCurrentCursor(QCursor *cursor)
return true;
}
+#endif
void QEglFSCursor::update(const QRegion &rgn)
{
diff --git a/src/plugins/platforms/eglfs/qeglfscursor.h b/src/plugins/platforms/eglfs/qeglfscursor.h
index 9a91b73894..1c82abdb44 100644
--- a/src/plugins/platforms/eglfs/qeglfscursor.h
+++ b/src/plugins/platforms/eglfs/qeglfscursor.h
@@ -57,7 +57,9 @@ public:
QEglFSCursor(QEglFSScreen *screen);
~QEglFSCursor();
+#ifndef QT_NO_CURSOR
void changeCursor(QCursor *cursor, QWindow *widget) Q_DECL_OVERRIDE;
+#endif
void pointerEvent(const QMouseEvent &event) Q_DECL_OVERRIDE;
QPoint pos() const Q_DECL_OVERRIDE;
@@ -68,7 +70,9 @@ public:
virtual void paintOnScreen();
protected:
+#ifndef QT_NO_CURSOR
bool setCurrentCursor(QCursor *cursor);
+#endif
void draw(const QRectF &rect);
void update(const QRegion &region);
diff --git a/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp b/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp
index f60b9ee83d..7106b99490 100644
--- a/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp
+++ b/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp
@@ -50,6 +50,7 @@ QT_BEGIN_NAMESPACE
void QEglFSHooks::platformInit()
{
+ Q_UNUSED(hooks);
}
void QEglFSHooks::platformDestroy()
diff --git a/src/plugins/platforms/eglfs/qeglfswindow.cpp b/src/plugins/platforms/eglfs/qeglfswindow.cpp
index 32d20e6aaa..df665cea84 100644
--- a/src/plugins/platforms/eglfs/qeglfswindow.cpp
+++ b/src/plugins/platforms/eglfs/qeglfswindow.cpp
@@ -75,7 +75,7 @@ void QEglFSWindow::create()
if (m_window)
return;
- if (window()->windowType() == Qt::Desktop) {
+ if (window()->type() == Qt::Desktop) {
QRect rect(QPoint(), hooks->screenSize());
QPlatformWindow::setGeometry(rect);
QWindowSystemInterface::handleGeometryChange(window(), rect);
diff --git a/src/plugins/platforms/kms/kms.pro b/src/plugins/platforms/kms/kms.pro
index 57191d8d97..c0300e0960 100644
--- a/src/plugins/platforms/kms/kms.pro
+++ b/src/plugins/platforms/kms/kms.pro
@@ -1,6 +1,7 @@
TARGET = qkms
PLUGIN_TYPE = platforms
+PLUGIN_CLASS_NAME = QKmsIntegrationPlugin
load(qt_plugin)
QT += core-private gui-private platformsupport-private opengl-private
diff --git a/src/plugins/platforms/linuxfb/linuxfb.pro b/src/plugins/platforms/linuxfb/linuxfb.pro
index 2482a64469..9e9f9b29b7 100644
--- a/src/plugins/platforms/linuxfb/linuxfb.pro
+++ b/src/plugins/platforms/linuxfb/linuxfb.pro
@@ -1,6 +1,7 @@
TARGET = qlinuxfb
PLUGIN_TYPE = platforms
+PLUGIN_CLASS_NAME = QLinuxFbIntegrationPlugin
load(qt_plugin)
QT += core-private gui-private platformsupport-private
diff --git a/src/plugins/platforms/minimal/minimal.pro b/src/plugins/platforms/minimal/minimal.pro
index 9c3d37269c..3131b16232 100644
--- a/src/plugins/platforms/minimal/minimal.pro
+++ b/src/plugins/platforms/minimal/minimal.pro
@@ -1,6 +1,7 @@
TARGET = qminimal
PLUGIN_TYPE = platforms
+PLUGIN_CLASS_NAME = QMinimalIntegrationPlugin
load(qt_plugin)
QT += core-private gui-private platformsupport-private
diff --git a/src/plugins/platforms/minimalegl/minimalegl.pro b/src/plugins/platforms/minimalegl/minimalegl.pro
index 23a6ad9708..00c83eb1ca 100644
--- a/src/plugins/platforms/minimalegl/minimalegl.pro
+++ b/src/plugins/platforms/minimalegl/minimalegl.pro
@@ -1,6 +1,7 @@
TARGET = qminimalegl
PLUGIN_TYPE = platforms
+PLUGIN_CLASS_NAME = QMinimalEglIntegrationPlugin
load(qt_plugin)
QT += core-private gui-private platformsupport-private
diff --git a/src/plugins/platforms/openwfd/openwf.pro b/src/plugins/platforms/openwfd/openwf.pro
index 1b177cba04..2dbcb282db 100644
--- a/src/plugins/platforms/openwfd/openwf.pro
+++ b/src/plugins/platforms/openwfd/openwf.pro
@@ -1,6 +1,7 @@
TARGET = qopenwf
PLUGIN_TYPE = platforms
+PLUGIN_CLASS_NAME = QOpenWFDIntegrationPlugin
load(qt_plugin)
QT += core-private gui-private platformsupport-private
diff --git a/src/plugins/platforms/qnx/qnx.pro b/src/plugins/platforms/qnx/qnx.pro
index fa5f69769c..203cdebda9 100644
--- a/src/plugins/platforms/qnx/qnx.pro
+++ b/src/plugins/platforms/qnx/qnx.pro
@@ -1,4 +1,4 @@
-TARGET = qnx
+TARGET = qqnx
QT += platformsupport platformsupport-private
@@ -140,4 +140,5 @@ include (../../../platformsupport/eglconvenience/eglconvenience.pri)
include (../../../platformsupport/fontdatabases/fontdatabases.pri)
PLUGIN_TYPE = platforms
+PLUGIN_CLASS_NAME = QQnxIntegrationPlugin
load(qt_plugin)
diff --git a/src/plugins/platforms/qnx/qqnxfiledialoghelper.cpp b/src/plugins/platforms/qnx/qqnxfiledialoghelper.cpp
index 262bdb16f4..79d7c7d9ca 100644
--- a/src/plugins/platforms/qnx/qqnxfiledialoghelper.cpp
+++ b/src/plugins/platforms/qnx/qqnxfiledialoghelper.cpp
@@ -43,6 +43,7 @@
#include "qqnxbpseventfilter.h"
#include "qqnxscreen.h"
+#include "qqnxintegration.h"
#include <QDebug>
#include <QEventLoop>
@@ -58,9 +59,9 @@
QT_BEGIN_NAMESPACE
-QQnxFileDialogHelper::QQnxFileDialogHelper(QQnxBpsEventFilter *eventFilter)
+QQnxFileDialogHelper::QQnxFileDialogHelper(const QQnxIntegration *integration)
: QPlatformFileDialogHelper(),
- m_eventFilter(eventFilter),
+ m_integration(integration),
m_dialog(0),
m_acceptMode(QFileDialogOptions::AcceptOpen),
m_selectedFilter(),
@@ -144,8 +145,9 @@ bool QQnxFileDialogHelper::show(Qt::WindowFlags flags, Qt::WindowModality modali
Q_UNUSED(flags);
qFileDialogHelperDebug() << Q_FUNC_INFO;
+ QQnxBpsEventFilter *eventFilter = m_integration->bpsEventFilter();
// We *really* need the bps event filter ;)
- if (!m_eventFilter)
+ if (!eventFilter)
return false;
// Native dialogs can only handle application modal use cases so far
@@ -208,12 +210,15 @@ bool QQnxFileDialogHelper::show(Qt::WindowFlags flags, Qt::WindowModality modali
m_acceptMode = opts->acceptMode();
// Set the libscreen window group and common properties
- QQnxScreen *nativeScreen = static_cast<QQnxScreen *>(parent->screen()->handle());
+
+ QQnxScreen *nativeScreen = parent ? static_cast<QQnxScreen *>(parent->screen()->handle()) :
+ m_integration->primaryDisplay();
+ Q_ASSERT(nativeScreen);
dialog_set_group_id(m_dialog, nativeScreen->windowGroupName());
dialog_set_title_text(m_dialog, opts->windowTitle().toLocal8Bit().constData());
// Register ourselves for dialog domain events from bps
- m_eventFilter->registerForDialogEvents(this);
+ eventFilter->registerForDialogEvents(this);
// Show the dialog
dialog_show(m_dialog);
diff --git a/src/plugins/platforms/qnx/qqnxfiledialoghelper.h b/src/plugins/platforms/qnx/qqnxfiledialoghelper.h
index 352709c763..e17ea80501 100644
--- a/src/plugins/platforms/qnx/qqnxfiledialoghelper.h
+++ b/src/plugins/platforms/qnx/qqnxfiledialoghelper.h
@@ -48,13 +48,13 @@
QT_BEGIN_NAMESPACE
-class QQnxBpsEventFilter;
+class QQnxIntegration;
class QQnxFileDialogHelper : public QPlatformFileDialogHelper
{
Q_OBJECT
public:
- explicit QQnxFileDialogHelper(QQnxBpsEventFilter *eventFilter);
+ explicit QQnxFileDialogHelper(const QQnxIntegration *);
~QQnxFileDialogHelper();
bool handleEvent(bps_event_t *event);
@@ -81,7 +81,7 @@ Q_SIGNALS:
private:
void setNameFilter(const QString &filter);
- QQnxBpsEventFilter *m_eventFilter;
+ const QQnxIntegration *m_integration;
dialog_instance_t m_dialog;
QFileDialogOptions::AcceptMode m_acceptMode;
QString m_selectedFilter;
diff --git a/src/plugins/platforms/qnx/qqnxintegration.cpp b/src/plugins/platforms/qnx/qqnxintegration.cpp
index e594ea952d..bff4dbdc2a 100644
--- a/src/plugins/platforms/qnx/qqnxintegration.cpp
+++ b/src/plugins/platforms/qnx/qqnxintegration.cpp
@@ -406,7 +406,7 @@ QPlatformTheme *QQnxIntegration::createPlatformTheme(const QString &name) const
{
qIntegrationDebug() << Q_FUNC_INFO << "name =" << name;
if (name == QQnxTheme::name())
- return new QQnxTheme(m_fontDatabase, m_bpsEventFilter);
+ return new QQnxTheme(this);
return QPlatformIntegration::createPlatformTheme(name);
}
#endif
diff --git a/src/plugins/platforms/qnx/qqnxintegration.h b/src/plugins/platforms/qnx/qqnxintegration.h
index 97a5e631e8..e3eb9e06ba 100644
--- a/src/plugins/platforms/qnx/qqnxintegration.h
+++ b/src/plugins/platforms/qnx/qqnxintegration.h
@@ -128,10 +128,10 @@ public:
void createDisplay(screen_display_t display, bool isPrimary);
void removeDisplay(QQnxScreen *screen);
+ QQnxScreen *primaryDisplay() const;
private:
void createDisplays();
void destroyDisplays();
- QQnxScreen *primaryDisplay() const;
static void addWindow(screen_window_t qnxWindow, QWindow *window);
static void removeWindow(screen_window_t qnxWindow);
diff --git a/src/plugins/platforms/qnx/qqnxscreen.cpp b/src/plugins/platforms/qnx/qqnxscreen.cpp
index 3b57f5d4e5..5450f086e9 100644
--- a/src/plugins/platforms/qnx/qqnxscreen.cpp
+++ b/src/plugins/platforms/qnx/qqnxscreen.cpp
@@ -429,7 +429,7 @@ void QQnxScreen::addWindow(QQnxWindow *window)
// Such a situation would strangely break focus handling due to the
// invisible desktop widget window being layered on top of normal
// windows
- if (window->window()->windowType() == Qt::Desktop)
+ if (window->window()->type() == Qt::Desktop)
m_childWindows.push_front(window);
else
m_childWindows.push_back(window);
diff --git a/src/plugins/platforms/qnx/qqnxtheme.cpp b/src/plugins/platforms/qnx/qqnxtheme.cpp
index be62c3e410..ae9acd845e 100644
--- a/src/plugins/platforms/qnx/qqnxtheme.cpp
+++ b/src/plugins/platforms/qnx/qqnxtheme.cpp
@@ -43,13 +43,11 @@
#include "qqnxfiledialoghelper.h"
#include "qqnxsystemsettings.h"
+#include "qqnxintegration.h"
QT_BEGIN_NAMESPACE
-QQnxTheme::QQnxTheme(QPlatformFontDatabase *fontDatabase,
- QQnxBpsEventFilter *eventFilter)
- : m_fontDatabase(fontDatabase),
- m_eventFilter(eventFilter)
+QQnxTheme::QQnxTheme(const QQnxIntegration *integration) : m_integration(integration)
{
}
@@ -77,7 +75,7 @@ QPlatformDialogHelper *QQnxTheme::createPlatformDialogHelper(DialogType type) co
{
switch (type) {
case QPlatformTheme::FileDialog:
- return new QQnxFileDialogHelper(m_eventFilter);
+ return new QQnxFileDialogHelper(m_integration);
#ifndef QT_NO_COLORDIALOG
case QPlatformTheme::ColorDialog:
#endif
@@ -91,8 +89,10 @@ QPlatformDialogHelper *QQnxTheme::createPlatformDialogHelper(DialogType type) co
const QFont *QQnxTheme::font(Font type) const
{
- if (m_fonts.isEmpty() && m_fontDatabase)
- m_fonts = qt_qnx_createRoleFonts(m_fontDatabase);
+ QPlatformFontDatabase *fontDatabase = m_integration->fontDatabase();
+
+ if (fontDatabase && m_fonts.isEmpty())
+ m_fonts = qt_qnx_createRoleFonts(fontDatabase);
return m_fonts.value(type, 0);
}
diff --git a/src/plugins/platforms/qnx/qqnxtheme.h b/src/plugins/platforms/qnx/qqnxtheme.h
index ea44d1cee2..17b2eab142 100644
--- a/src/plugins/platforms/qnx/qqnxtheme.h
+++ b/src/plugins/platforms/qnx/qqnxtheme.h
@@ -51,14 +51,12 @@
QT_BEGIN_NAMESPACE
-class QQnxBpsEventFilter;
-
-class QPlatformFontDatabase;
+class QQnxIntegration;
class QQnxTheme : public QPlatformTheme
{
public:
- QQnxTheme(QPlatformFontDatabase *fontDatabase, QQnxBpsEventFilter *eventFilter);
+ explicit QQnxTheme(const QQnxIntegration *);
~QQnxTheme();
static QString name() { return QStringLiteral("blackberry"); }
@@ -69,9 +67,8 @@ public:
const QFont *font(Font type = SystemFont) const;
private:
- QPlatformFontDatabase *m_fontDatabase;
- QQnxBpsEventFilter *m_eventFilter;
mutable QHash<QPlatformTheme::Font, QFont*> m_fonts;
+ const QQnxIntegration *m_integration;
};
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp b/src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp
index 059dcb574b..3d2f49aa6c 100644
--- a/src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp
+++ b/src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp
@@ -86,6 +86,11 @@ bool QQnxVirtualKeyboardBps::handleEvent(bps_event_t *event)
bool QQnxVirtualKeyboardBps::showKeyboard()
{
qVirtualKeyboardDebug() << Q_FUNC_INFO << "current visibility=" << isVisible();
+
+ // They keyboard's mode is global between applications, we have to set it each time
+ if ( !isVisible() )
+ applyKeyboardMode(keyboardMode());
+
virtualkeyboard_show();
return true;
}
diff --git a/src/plugins/platforms/qnx/qqnxwindow.cpp b/src/plugins/platforms/qnx/qqnxwindow.cpp
index e4505c6c60..af7a89a399 100644
--- a/src/plugins/platforms/qnx/qqnxwindow.cpp
+++ b/src/plugins/platforms/qnx/qqnxwindow.cpp
@@ -269,7 +269,7 @@ void QQnxWindow::setVisible(bool visible)
root->updateVisibility(root->m_visible);
- window()->requestActivateWindow();
+ window()->requestActivate();
if (window()->isTopLevel() && visible)
QWindowSystemInterface::handleExposeEvent(window(), window()->geometry());
@@ -511,8 +511,8 @@ void QQnxWindow::setScreen(QQnxScreen *platformScreen)
Q_FOREACH (QQnxWindow *childWindow, m_childWindows) {
// Only subwindows and tooltips need necessarily be moved to another display with the window.
- if ((window()->windowType() & Qt::WindowType_Mask) == Qt::SubWindow ||
- (window()->windowType() & Qt::WindowType_Mask) == Qt::ToolTip)
+ if ((window()->type() & Qt::WindowType_Mask) == Qt::SubWindow ||
+ (window()->type() & Qt::WindowType_Mask) == Qt::ToolTip)
childWindow->setScreen(platformScreen);
}
diff --git a/src/plugins/platforms/windows/accessible/comutils.cpp b/src/plugins/platforms/windows/accessible/comutils.cpp
index 5e5a1ebd0f..a67e2c4534 100644
--- a/src/plugins/platforms/windows/accessible/comutils.cpp
+++ b/src/plugins/platforms/windows/accessible/comutils.cpp
@@ -88,7 +88,7 @@ inline uint QColorToOLEColor(const QColor &col)
return qRgba(col.blue(), col.green(), col.red(), 0x00);
}
-bool QVariantToVARIANT(const QVariant &var, VARIANT &arg, const QByteArray &typeName, bool out)
+bool QVariant2VARIANT(const QVariant &var, VARIANT &arg, const QByteArray &typeName, bool out)
{
QVariant qvar = var;
// "type" is the expected type, so coerce if necessary
@@ -107,12 +107,12 @@ bool QVariantToVARIANT(const QVariant &var, VARIANT &arg, const QByteArray &type
}
if (out && arg.vt == (VT_VARIANT|VT_BYREF) && arg.pvarVal) {
- return QVariantToVARIANT(var, *arg.pvarVal, typeName, false);
+ return QVariant2VARIANT(var, *arg.pvarVal, typeName, false);
}
if (out && proptype == QVariant::UserType && typeName == "QVariant") {
VARIANT *pVariant = new VARIANT;
- QVariantToVARIANT(var, *pVariant, QByteArray(), false);
+ QVariant2VARIANT(var, *pVariant, QByteArray(), false);
arg.vt = VT_VARIANT|VT_BYREF;
arg.pvarVal = pVariant;
return true;
@@ -409,7 +409,7 @@ bool QVariantToVARIANT(const QVariant &var, VARIANT &arg, const QByteArray &type
for (LONG j = 0; j < columnCount; ++j) {
QVariant elem = columns.at(j);
VariantInit(&variant);
- QVariantToVARIANT(elem, variant, elem.typeName());
+ QVariant2VARIANT(elem, variant, elem.typeName());
rgIndices[1] = j;
SafeArrayPutElement(array, rgIndices, pElement);
clearVARIANT(&variant);
@@ -425,7 +425,7 @@ bool QVariantToVARIANT(const QVariant &var, VARIANT &arg, const QByteArray &type
if (listType != QVariant::LastType)
elem.convert(listType);
VariantInit(&variant);
- QVariantToVARIANT(elem, variant, elem.typeName());
+ QVariant2VARIANT(elem, variant, elem.typeName());
SafeArrayPutElement(array, &index, pElement);
clearVARIANT(&variant);
}
@@ -555,7 +555,7 @@ bool QVariantToVARIANT(const QVariant &var, VARIANT &arg, const QByteArray &type
arg.pRecInfo = recordInfo,
arg.pvRecord = record;
if (out) {
- qWarning("QVariantToVARIANT: out-parameter not supported for records");
+ qWarning("QVariant2VARIANT: out-parameter not supported for records");
return false;
}
}
@@ -574,7 +574,7 @@ bool QVariantToVARIANT(const QVariant &var, VARIANT &arg, const QByteArray &type
if (arg.pdispVal)
arg.pdispVal->AddRef();
if (out) {
- qWarning("QVariantToVARIANT: out-parameter not supported for IDispatch");
+ qWarning("QVariant2VARIANT: out-parameter not supported for IDispatch");
return false;
}
} else if (!qstrcmp(qvar.typeName(), "IDispatch**")) {
@@ -588,7 +588,7 @@ bool QVariantToVARIANT(const QVariant &var, VARIANT &arg, const QByteArray &type
if (arg.punkVal)
arg.punkVal->AddRef();
if (out) {
- qWarning("QVariantToVARIANT: out-parameter not supported for IUnknown");
+ qWarning("QVariant2VARIANT: out-parameter not supported for IUnknown");
return false;
}
#ifdef QAX_SERVER
@@ -602,7 +602,7 @@ bool QVariantToVARIANT(const QVariant &var, VARIANT &arg, const QByteArray &type
qAxFactory()->createObjectWrapper(static_cast<QObject*>(user), &arg.pdispVal);
}
if (out) {
- qWarning("QVariantToVARIANT: out-parameter not supported for subtype");
+ qWarning("QVariant2VARIANT: out-parameter not supported for subtype");
return false;
}
#else
@@ -612,7 +612,7 @@ bool QVariantToVARIANT(const QVariant &var, VARIANT &arg, const QByteArray &type
arg.vt = VT_DISPATCH;
object->queryInterface(IID_IDispatch, (void**)&arg.pdispVal);
if (out) {
- qWarning("QVariantToVARIANT: out-parameter not supported for subtype");
+ qWarning("QVariant2VARIANT: out-parameter not supported for subtype");
return false;
}
#endif
diff --git a/src/plugins/platforms/windows/accessible/comutils.h b/src/plugins/platforms/windows/accessible/comutils.h
index c9ed2b1224..8593f68d76 100644
--- a/src/plugins/platforms/windows/accessible/comutils.h
+++ b/src/plugins/platforms/windows/accessible/comutils.h
@@ -52,7 +52,8 @@ QT_BEGIN_NAMESPACE
class QVariant;
-bool QVariantToVARIANT(const QVariant &var, VARIANT &arg, const QByteArray &typeName, bool out);
+// Originally QVariantToVARIANT copied from ActiveQt - renamed to avoid conflicts in static builds.
+bool QVariant2VARIANT(const QVariant &var, VARIANT &arg, const QByteArray &typeName, bool out);
inline QString BSTRToQString(const BSTR &bstr)
{
diff --git a/src/plugins/platforms/windows/accessible/iaccessible2.cpp b/src/plugins/platforms/windows/accessible/iaccessible2.cpp
index 03bb94db8f..838cd055ab 100644
--- a/src/plugins/platforms/windows/accessible/iaccessible2.cpp
+++ b/src/plugins/platforms/windows/accessible/iaccessible2.cpp
@@ -1425,7 +1425,7 @@ HRESULT STDMETHODCALLTYPE QWindowsIA2Accessible::get_currentValue(VARIANT *curre
return E_FAIL;
if (QAccessibleValueInterface *valueIface = valueInterface()) {
const QVariant var = valueIface->currentValue();
- if (QVariantToVARIANT(var, *currentValue, QByteArray(), false))
+ if (QVariant2VARIANT(var, *currentValue, QByteArray(), false))
return S_OK;
}
@@ -1456,7 +1456,7 @@ HRESULT STDMETHODCALLTYPE QWindowsIA2Accessible::get_maximumValue(VARIANT *maxim
return E_FAIL;
if (QAccessibleValueInterface *valueIface = valueInterface()) {
const QVariant var = valueIface->maximumValue();
- if (QVariantToVARIANT(var, *maximumValue, QByteArray(), false))
+ if (QVariant2VARIANT(var, *maximumValue, QByteArray(), false))
return S_OK;
}
maximumValue->vt = VT_EMPTY;
@@ -1470,7 +1470,7 @@ HRESULT STDMETHODCALLTYPE QWindowsIA2Accessible::get_minimumValue(VARIANT *minim
return E_FAIL;
if (QAccessibleValueInterface *valueIface = valueInterface()) {
const QVariant var = valueIface->minimumValue();
- if (QVariantToVARIANT(var, *minimumValue, QByteArray(), false))
+ if (QVariant2VARIANT(var, *minimumValue, QByteArray(), false))
return S_OK;
}
minimumValue->vt = VT_EMPTY;
diff --git a/src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp b/src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp
index 94a5dd6a68..44a79d86ee 100644
--- a/src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp
+++ b/src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp
@@ -48,6 +48,7 @@
#include <QtCore/qlocale.h>
#include <QtCore/qmap.h>
#include <QtCore/qpair.h>
+#include <QtCore/qpointer.h>
#include <QtCore/qsettings.h>
#include <QtGui/qaccessible.h>
#include <QtGui/qaccessible2.h>
@@ -87,10 +88,9 @@
// This stuff is used for widgets/items with no window handle:
-typedef QMap<int, QPair<QObject*,int> > NotifyMap;
+typedef QMap<int, QPair<QPointer<QObject>,int> > NotifyMap;
Q_GLOBAL_STATIC(NotifyMap, qAccessibleRecentSentEvents)
-
QT_BEGIN_NAMESPACE
@@ -182,14 +182,25 @@ void QWindowsAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *event)
HWND hWnd = (HWND)platform->nativeResourceForWindow("handle", window);
static int eventNum = 0;
- if (event->type() != QAccessible::MenuCommand) { // MenuCommand is faked
- // See comment "SENDING EVENTS TO OBJECTS WITH NO WINDOW HANDLE"
+ if (event->type() != QAccessible::MenuCommand && // MenuCommand is faked
+ event->type() != QAccessible::ObjectDestroyed) {
+ /* In some rare occasions, the server (Qt) might get a ::get_accChild call with a
+ childId that references an entry in the cache where there was a dangling
+ QObject-pointer. Previously we crashed on this.
+
+ There is no point in actually notifying the AT client that the object got destroyed,
+ because the AT client won't query for get_accChild if the event is ObjectDestroyed
+ anyway, and we have no other way of mapping the eventId argument to the actual
+ child/descendant object. (Firefox seems to simply completely ignore
+ EVENT_OBJECT_DESTROY).
+
+ We therefore guard each QObject in the cache with a QPointer, and only notify the AT
+ client if the type is not ObjectDestroyed.
+ */
eventNum %= 50; //[0..49]
int eventId = - (eventNum - 1);
-
- qAccessibleRecentSentEvents()->insert(eventId, qMakePair(event->object(), event->child()));
- ::NotifyWinEvent(event->type(), hWnd, OBJID_CLIENT, eventId );
-
+ qAccessibleRecentSentEvents()->insert(eventId, qMakePair(QPointer<QObject>(event->object()), event->child()));
+ ::NotifyWinEvent(event->type(), hWnd, OBJID_CLIENT, eventId);
++eventNum;
}
#endif // Q_OS_WINCE
@@ -233,7 +244,8 @@ IAccessible *QWindowsAccessibility::wrap(QAccessibleInterface *acc)
*/
QPair<QObject*, int> QWindowsAccessibility::getCachedObject(int entryId)
{
- return qAccessibleRecentSentEvents()->value(entryId);
+ QPair<QPointer<QObject>, int> pair = qAccessibleRecentSentEvents()->value(entryId);
+ return qMakePair(pair.first.data(), pair.second);
}
/*
diff --git a/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp b/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp
index 328053604e..f1bdc77303 100644
--- a/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp
+++ b/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp
@@ -757,7 +757,7 @@ HRESULT STDMETHODCALLTYPE QWindowsMsaaAccessible::get_accChild(VARIANT varChildI
acc = res;
}
} else {
- qWarning("get_accChild got a negative varChildID, but did not find it in cache");
+ qWarning("get_accChild got a negative varChildID (%d), but did not find it in cache", childIndex);
}
} else {
if (childIndex) {
diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp
index 5a1b4f1522..d4a8bd12d3 100644
--- a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp
@@ -1033,17 +1033,17 @@ static bool addFontToDatabase(QString familyName, const QString &scriptName,
writingSystems.setSupported(ws);
}
- QPlatformFontDatabase::registerFont(familyName, foundryName, weight,
+ QPlatformFontDatabase::registerFont(familyName, QString(), foundryName, weight,
style, stretch, antialias, scalable, size, fixed, writingSystems, 0);
// add fonts windows can generate for us:
if (weight <= QFont::DemiBold)
- QPlatformFontDatabase::registerFont(familyName, foundryName, QFont::Bold,
+ QPlatformFontDatabase::registerFont(familyName, QString(), foundryName, QFont::Bold,
style, stretch, antialias, scalable, size, fixed, writingSystems, 0);
if (style != QFont::StyleItalic)
- QPlatformFontDatabase::registerFont(familyName, foundryName, weight,
+ QPlatformFontDatabase::registerFont(familyName, QString(), foundryName, weight,
QFont::StyleItalic, stretch, antialias, scalable, size, fixed, writingSystems, 0);
if (weight <= QFont::DemiBold && style != QFont::StyleItalic)
- QPlatformFontDatabase::registerFont(familyName, foundryName, QFont::Bold,
+ QPlatformFontDatabase::registerFont(familyName, QString(), foundryName, QFont::Bold,
QFont::StyleItalic, stretch, antialias, scalable, size, fixed, writingSystems, 0);
if (!englishName.isEmpty())
@@ -1298,43 +1298,6 @@ QFontEngine *QWindowsFontDatabase::fontEngine(const QByteArray &fontData, qreal
return fontEngine;
}
-QStringList QWindowsFontDatabase::fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script) const
-{
- QStringList result = QPlatformFontDatabase::fallbacksForFamily(family, style, styleHint, script);
- if (!result.isEmpty())
- return result;
-
- switch (styleHint) {
- case QFont::Times:
- result << QString::fromLatin1("Times New Roman");
- break;
- case QFont::Courier:
- result << QString::fromLatin1("Courier New");
- break;
- case QFont::Monospace:
- result << QString::fromLatin1("Courier New");
- break;
- case QFont::Cursive:
- result << QString::fromLatin1("Comic Sans MS");
- break;
- case QFont::Fantasy:
- result << QString::fromLatin1("Impact");
- break;
- case QFont::Decorative:
- result << QString::fromLatin1("Old English");
- break;
- case QFont::Helvetica:
- case QFont::System:
- default:
- result << QString::fromLatin1("Arial");
- }
-
- if (QWindowsContext::verboseFonts)
- qDebug() << __FUNCTION__ << family << style << styleHint
- << script << result << m_families.size();
- return result;
-}
-
static QList<quint32> getTrueTypeFontOffsets(const uchar *fontData)
{
QList<quint32> offsets;
@@ -1686,6 +1649,82 @@ LOGFONT QWindowsFontDatabase::fontDefToLOGFONT(const QFontDef &request)
return lf;
}
+static QStringList extraTryFontsForFamily(const QString& family)
+{
+ QStringList result;
+ QFontDatabase db;
+ if (!db.writingSystems(family).contains(QFontDatabase::Symbol)) {
+ if (!tryFonts) {
+ LANGID lid = GetUserDefaultLangID();
+ switch (lid&0xff) {
+ case LANG_CHINESE: // Chinese (Taiwan)
+ if ( lid == 0x0804 ) // Taiwan
+ tryFonts = ch_TW_tryFonts;
+ else
+ tryFonts = ch_CN_tryFonts;
+ break;
+ case LANG_JAPANESE:
+ tryFonts = jp_tryFonts;
+ break;
+ case LANG_KOREAN:
+ tryFonts = kr_tryFonts;
+ break;
+ default:
+ tryFonts = other_tryFonts;
+ break;
+ }
+ }
+ QStringList fm = QFontDatabase().families();
+ const char **tf = tryFonts;
+ while (tf && *tf) {
+ if (fm.contains(QLatin1String(*tf)))
+ result << QLatin1String(*tf);
+ ++tf;
+ }
+ }
+ return result;
+}
+
+QStringList QWindowsFontDatabase::fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script) const
+{
+ QStringList result = QPlatformFontDatabase::fallbacksForFamily(family, style, styleHint, script);
+ if (!result.isEmpty())
+ return result;
+
+ switch (styleHint) {
+ case QFont::Times:
+ result << QString::fromLatin1("Times New Roman");
+ break;
+ case QFont::Courier:
+ result << QString::fromLatin1("Courier New");
+ break;
+ case QFont::Monospace:
+ result << QString::fromLatin1("Courier New");
+ break;
+ case QFont::Cursive:
+ result << QString::fromLatin1("Comic Sans MS");
+ break;
+ case QFont::Fantasy:
+ result << QString::fromLatin1("Impact");
+ break;
+ case QFont::Decorative:
+ result << QString::fromLatin1("Old English");
+ break;
+ case QFont::Helvetica:
+ case QFont::System:
+ default:
+ result << QString::fromLatin1("Arial");
+ }
+
+ result.append(extraTryFontsForFamily(family));
+
+ if (QWindowsContext::verboseFonts)
+ qDebug() << __FUNCTION__ << family << style << styleHint
+ << script << result << m_families.size();
+ return result;
+}
+
+
QFontEngine *QWindowsFontDatabase::createEngine(int script, const QFontDef &request,
HDC fontHdc, int dpi, bool rawMode,
const QStringList &family_list,
@@ -1849,42 +1888,16 @@ QFontEngine *QWindowsFontDatabase::createEngine(int script, const QFontDef &requ
#endif
if (script == QChar::Script_Common
- && !(request.styleStrategy & QFont::NoFontMerging)) {
- QFontDatabase db;
- if (!db.writingSystems(request.family).contains(QFontDatabase::Symbol)) {
- if(!tryFonts) {
- LANGID lid = GetUserDefaultLangID();
- switch( lid&0xff ) {
- case LANG_CHINESE: // Chinese (Taiwan)
- if ( lid == 0x0804 ) // Taiwan
- tryFonts = ch_TW_tryFonts;
- else
- tryFonts = ch_CN_tryFonts;
- break;
- case LANG_JAPANESE:
- tryFonts = jp_tryFonts;
- break;
- case LANG_KOREAN:
- tryFonts = kr_tryFonts;
- break;
- default:
- tryFonts = other_tryFonts;
- break;
- }
- }
- QStringList fm = QFontDatabase().families();
- QStringList list = family_list;
- const char **tf = tryFonts;
- while(tf && *tf) {
- if(fm.contains(QLatin1String(*tf)))
- list << QLatin1String(*tf);
- ++tf;
- }
- QFontEngine *mfe = new QWindowsMultiFontEngine(fe, list);
- mfe->setObjectName(QStringLiteral("QWindowsMultiFontEngine_") + request.family);
- mfe->fontDef = fe->fontDef;
- fe = mfe;
- }
+ && !(request.styleStrategy & QFont::NoFontMerging)) {
+ QStringList extraFonts = extraTryFontsForFamily(request.family);
+ if (extraFonts.size()) {
+ QStringList list = family_list;
+ list.append(extraFonts);
+ QFontEngine *mfe = new QWindowsMultiFontEngine(fe, list);
+ mfe->setObjectName(QStringLiteral("QWindowsMultiFontEngine_") + request.family);
+ mfe->fontDef = fe->fontDef;
+ fe = mfe;
+ }
}
return fe;
}
diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp
index d30c1f984d..0509a55eaa 100644
--- a/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp
@@ -279,20 +279,20 @@ static bool addFontToDatabase(QString familyName, const QString &scriptName,
if (!QDir::isAbsolutePath(value))
value.prepend(QString::fromLocal8Bit(qgetenv("windir") + "\\Fonts\\"));
- QPlatformFontDatabase::registerFont(faceName, foundryName, weight, style, stretch,
+ QPlatformFontDatabase::registerFont(faceName, QString(), foundryName, weight, style, stretch,
antialias, scalable, size, fixed, writingSystems, createFontFile(value, index));
// add fonts windows can generate for us:
if (weight <= QFont::DemiBold)
- QPlatformFontDatabase::registerFont(faceName, foundryName, QFont::Bold, style, stretch,
+ QPlatformFontDatabase::registerFont(faceName, QString(), foundryName, QFont::Bold, style, stretch,
antialias, scalable, size, fixed, writingSystems, createFontFile(value, index));
if (style != QFont::StyleItalic)
- QPlatformFontDatabase::registerFont(faceName, foundryName, weight, QFont::StyleItalic, stretch,
+ QPlatformFontDatabase::registerFont(faceName, QString(), foundryName, weight, QFont::StyleItalic, stretch,
antialias, scalable, size, fixed, writingSystems, createFontFile(value, index));
if (weight <= QFont::DemiBold && style != QFont::StyleItalic)
- QPlatformFontDatabase::registerFont(faceName, foundryName, QFont::Bold, QFont::StyleItalic, stretch,
+ QPlatformFontDatabase::registerFont(faceName, QString(), foundryName, QFont::Bold, QFont::StyleItalic, stretch,
antialias, scalable, size, fixed, writingSystems, createFontFile(value, index));
if (!englishName.isEmpty())
diff --git a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
index f7ba0d237d..210405d4ba 100644
--- a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
@@ -41,6 +41,11 @@
#ifndef QT_NO_DIRECTWRITE
+#if _WIN32_WINNT < 0x0600
+#undef _WIN32_WINNT
+#define _WIN32_WINNT 0x0600
+#endif
+
#include "qwindowsfontenginedirectwrite.h"
#include "qwindowsfontdatabase.h"
#include "qwindowscontext.h"
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 1f6253438f..3831c6b10e 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -55,6 +55,7 @@
#include <QtGui/QWindow>
#include <QtGui/QRegion>
#include <private/qwindow_p.h>
+#include <private/qguiapplication_p.h>
#include <qpa/qwindowsysteminterface.h>
#include <QtCore/QDebug>
@@ -321,7 +322,6 @@ void WindowCreationData::fromWindow(const QWindow *w, const Qt::WindowFlags flag
topLevel = ((creationFlags & ForceChild) || embedded) ? false : w->isTopLevel();
if (topLevel && flags == 1) {
- qWarning("Remove me: fixing toplevel window flags");
flags |= Qt::WindowTitleHint|Qt::WindowSystemMenuHint|Qt::WindowMinimizeButtonHint
|Qt::WindowMaximizeButtonHint|Qt::WindowCloseButtonHint;
}
@@ -731,6 +731,9 @@ QWindowsWindow::QWindowsWindow(QWindow *aWindow, const WindowData &data) :
if (QWindowsContext::instance()->systemInfo() & QWindowsContext::SI_SupportsTouch)
QWindowsContext::user32dll.registerTouchWindow(m_data.hwnd, 0);
setWindowState(aWindow->windowState());
+ const qreal opacity = qt_window_private(aWindow)->opacity;
+ if (!qFuzzyCompare(opacity, qreal(1.0)))
+ setOpacity(opacity);
}
QWindowsWindow::~QWindowsWindow()
@@ -1185,8 +1188,21 @@ void QWindowsWindow::setWindowTitle(const QString &title)
{
if (QWindowsContext::verboseWindows)
qDebug() << __FUNCTION__ << this << window() <<title;
- if (m_data.hwnd)
- SetWindowText(m_data.hwnd, (const wchar_t*)title.utf16());
+ if (m_data.hwnd) {
+
+ QString fullTitle = title;
+ if (QGuiApplicationPrivate::displayName) {
+ // Append display name, if set.
+ if (!fullTitle.isEmpty())
+ fullTitle += QStringLiteral(" - ");
+ fullTitle += *QGuiApplicationPrivate::displayName;
+ } else if (fullTitle.isEmpty()) {
+ // Don't let the window title be completely empty, use the app name as fallback.
+ fullTitle = QCoreApplication::applicationName();
+ }
+
+ SetWindowText(m_data.hwnd, (const wchar_t*)fullTitle.utf16());
+ }
}
void QWindowsWindow::setWindowFlags(Qt::WindowFlags flags)
diff --git a/src/plugins/platforms/windows/windows.pro b/src/plugins/platforms/windows/windows.pro
index 794bd3aa35..7f73465135 100644
--- a/src/plugins/platforms/windows/windows.pro
+++ b/src/plugins/platforms/windows/windows.pro
@@ -1,14 +1,13 @@
-TARGET = windows
+TARGET = qwindows
PLUGIN_TYPE = platforms
+PLUGIN_CLASS_NAME = QWindowsIntegrationPlugin
load(qt_plugin)
QT *= core-private
QT *= gui-private
QT *= platformsupport-private
-INCLUDEPATH += ../../../3rdparty/harfbuzz/src
-
# Note: OpenGL32 must precede Gdi32 as it overwrites some functions.
LIBS *= -lole32
!wince*:LIBS *= -lgdi32 -luser32 -lwinspool -limm32 -lwinmm -loleaut32
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index 4c4df137a3..1192894693 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -257,6 +257,7 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, const char
, has_shape_extension(false)
, has_randr_extension(false)
, has_input_shape(false)
+ , m_buttons(0)
{
#ifdef XCB_USE_XLIB
Display *dpy = XOpenDisplay(m_displayName.constData());
@@ -312,6 +313,7 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, const char
initializeAllAtoms();
m_time = XCB_CURRENT_TIME;
+ m_netWmUserTime = XCB_CURRENT_TIME;
initializeXRandr();
updateScreens();
@@ -662,6 +664,73 @@ void QXcbConnection::handleXcbError(xcb_generic_error_t *error)
#endif
}
+static Qt::MouseButtons translateMouseButtons(int s)
+{
+ Qt::MouseButtons ret = 0;
+ if (s & XCB_BUTTON_MASK_1)
+ ret |= Qt::LeftButton;
+ if (s & XCB_BUTTON_MASK_2)
+ ret |= Qt::MidButton;
+ if (s & XCB_BUTTON_MASK_3)
+ ret |= Qt::RightButton;
+ return ret;
+}
+
+static Qt::MouseButton translateMouseButton(xcb_button_t s)
+{
+ switch (s) {
+ case 1: return Qt::LeftButton;
+ case 2: return Qt::MidButton;
+ case 3: return Qt::RightButton;
+ // Button values 4-7 were already handled as Wheel events, and won't occur here.
+ case 8: return Qt::BackButton; // Also known as Qt::ExtraButton1
+ case 9: return Qt::ForwardButton; // Also known as Qt::ExtraButton2
+ case 10: return Qt::ExtraButton3;
+ case 11: return Qt::ExtraButton4;
+ case 12: return Qt::ExtraButton5;
+ case 13: return Qt::ExtraButton6;
+ case 14: return Qt::ExtraButton7;
+ case 15: return Qt::ExtraButton8;
+ case 16: return Qt::ExtraButton9;
+ case 17: return Qt::ExtraButton10;
+ case 18: return Qt::ExtraButton11;
+ case 19: return Qt::ExtraButton12;
+ case 20: return Qt::ExtraButton13;
+ case 21: return Qt::ExtraButton14;
+ case 22: return Qt::ExtraButton15;
+ case 23: return Qt::ExtraButton16;
+ case 24: return Qt::ExtraButton17;
+ case 25: return Qt::ExtraButton18;
+ case 26: return Qt::ExtraButton19;
+ case 27: return Qt::ExtraButton20;
+ case 28: return Qt::ExtraButton21;
+ case 29: return Qt::ExtraButton22;
+ case 30: return Qt::ExtraButton23;
+ case 31: return Qt::ExtraButton24;
+ default: return Qt::NoButton;
+ }
+}
+
+void QXcbConnection::handleButtonPress(xcb_generic_event_t *ev)
+{
+ xcb_button_press_event_t *event = (xcb_button_press_event_t *)ev;
+
+ // the event explicitly contains the state of the three first buttons,
+ // the rest we need to manage ourselves
+ m_buttons = (m_buttons & ~0x7) | translateMouseButtons(event->state);
+ m_buttons |= translateMouseButton(event->detail);
+}
+
+void QXcbConnection::handleButtonRelease(xcb_generic_event_t *ev)
+{
+ xcb_button_release_event_t *event = (xcb_button_release_event_t *)ev;
+
+ // the event explicitly contains the state of the three first buttons,
+ // the rest we need to manage ourselves
+ m_buttons = (m_buttons & ~0x7) | translateMouseButtons(event->state);
+ m_buttons &= ~translateMouseButton(event->detail);
+}
+
void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event)
{
#ifdef Q_XCB_DEBUG
@@ -686,8 +755,10 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event)
case XCB_EXPOSE:
HANDLE_PLATFORM_WINDOW_EVENT(xcb_expose_event_t, window, handleExposeEvent);
case XCB_BUTTON_PRESS:
+ handleButtonPress(event);
HANDLE_PLATFORM_WINDOW_EVENT(xcb_button_press_event_t, event, handleButtonPressEvent);
case XCB_BUTTON_RELEASE:
+ handleButtonRelease(event);
HANDLE_PLATFORM_WINDOW_EVENT(xcb_button_release_event_t, event, handleButtonReleaseEvent);
case XCB_MOTION_NOTIFY:
HANDLE_PLATFORM_WINDOW_EVENT(xcb_motion_notify_event_t, event, handleMotionNotifyEvent);
diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h
index c67acb3218..464d918adf 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.h
+++ b/src/plugins/platforms/xcb/qxcbconnection.h
@@ -370,6 +370,9 @@ public:
inline xcb_timestamp_t time() const { return m_time; }
inline void setTime(xcb_timestamp_t t) { if (t > m_time) m_time = t; }
+ inline xcb_timestamp_t netWmUserTime() const { return m_netWmUserTime; }
+ inline void setNetWmUserTime(xcb_timestamp_t t) { if (t > m_netWmUserTime) m_netWmUserTime = t; }
+
bool hasGLX() const { return has_glx_extension; }
bool hasXFixes() const { return xfixes_first_event > 0; }
bool hasXShape() const { return has_shape_extension; }
@@ -380,6 +383,8 @@ public:
xcb_timestamp_t getTimestamp();
+ Qt::MouseButtons buttons() const { return m_buttons; }
+
private slots:
void processXcbEvents();
@@ -400,6 +405,8 @@ private:
QXcbScreen* findOrCreateScreen(QList<QXcbScreen *>& newScreens, int screenNumber,
xcb_screen_t* xcbScreen, xcb_randr_get_output_info_reply_t *output = NULL);
void updateScreens();
+ void handleButtonPress(xcb_generic_event_t *event);
+ void handleButtonRelease(xcb_generic_event_t *event);
bool m_xi2Enabled;
int m_xi2Minor;
@@ -448,6 +455,7 @@ private:
xcb_atom_t m_allAtoms[QXcbAtom::NAtoms];
xcb_timestamp_t m_time;
+ xcb_timestamp_t m_netWmUserTime;
QByteArray m_displayName;
@@ -501,6 +509,8 @@ private:
bool has_shape_extension;
bool has_randr_extension;
bool has_input_shape;
+
+ Qt::MouseButtons m_buttons;
};
#define DISPLAY_FROM_XCB(object) ((Display *)(object->connection()->xlib_display()))
diff --git a/src/plugins/platforms/xcb/qxcbcursor.cpp b/src/plugins/platforms/xcb/qxcbcursor.cpp
index c1cfbd02d6..e1dfe3d6c0 100644
--- a/src/plugins/platforms/xcb/qxcbcursor.cpp
+++ b/src/plugins/platforms/xcb/qxcbcursor.cpp
@@ -291,6 +291,7 @@ QXcbCursor::~QXcbCursor()
xcb_close_font(xcb_connection(), cursorFont);
}
+#ifndef QT_NO_CURSOR
void QXcbCursor::changeCursor(QCursor *cursor, QWindow *widget)
{
QXcbWindow *w = 0;
@@ -507,6 +508,7 @@ xcb_cursor_t QXcbCursor::createBitmapCursor(QCursor *cursor)
}
return c;
}
+#endif
void QXcbCursor::queryPointer(QXcbConnection *c, xcb_window_t *rootWin, QPoint *pos, int *keybMask)
{
diff --git a/src/plugins/platforms/xcb/qxcbcursor.h b/src/plugins/platforms/xcb/qxcbcursor.h
index 4c74034988..a4f3bf11ee 100644
--- a/src/plugins/platforms/xcb/qxcbcursor.h
+++ b/src/plugins/platforms/xcb/qxcbcursor.h
@@ -52,20 +52,26 @@ class QXcbCursor : public QXcbObject, public QPlatformCursor
public:
QXcbCursor(QXcbConnection *conn, QXcbScreen *screen);
~QXcbCursor();
+#ifndef QT_NO_CURSOR
void changeCursor(QCursor *cursor, QWindow *widget);
+#endif
QPoint pos() const;
void setPos(const QPoint &pos);
static void queryPointer(QXcbConnection *c, xcb_window_t *rootWin, QPoint *pos, int *keybMask = 0);
private:
+#ifndef QT_NO_CURSOR
xcb_cursor_t createFontCursor(int cshape);
xcb_cursor_t createBitmapCursor(QCursor *cursor);
xcb_cursor_t createNonStandardCursor(int cshape);
+#endif
QXcbScreen *m_screen;
+#ifndef QT_NO_CURSOR
QMap<int, xcb_cursor_t> m_shapeCursorMap;
QMap<qint64, xcb_cursor_t> m_bitmapCursorMap;
+#endif
};
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
index a44e7fb959..9c360df900 100644
--- a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
+++ b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
@@ -71,6 +71,8 @@ public:
insert("screen",QXcbNativeInterface::Screen);
insert("eglcontext",QXcbNativeInterface::EglContext);
insert("glxcontext",QXcbNativeInterface::GLXContext);
+ insert("apptime",QXcbNativeInterface::AppTime);
+ insert("appusertime",QXcbNativeInterface::AppUserTime);
}
};
@@ -109,18 +111,24 @@ void *QXcbNativeInterface::nativeResourceForScreen(const QByteArray &resource, Q
const QXcbResourceMap::const_iterator it = qXcbResourceMap()->constFind(resource.toLower());
if (it == qXcbResourceMap()->constEnd() || !screen->handle())
return 0;
+ void *result = 0;
const QXcbScreen *xcbScreen = static_cast<QXcbScreen *>(screen->handle());
switch (it.value()) {
case Display:
#ifdef XCB_USE_XLIB
- return xcbScreen->connection()->xlib_display();
-#else
- break;
+ result = xcbScreen->connection()->xlib_display();
#endif
+ break;
+ case AppTime:
+ result = appTime(xcbScreen);
+ break;
+ case AppUserTime:
+ result = appUserTime(xcbScreen);
+ break;
default:
break;
}
- return 0;
+ return result;
}
void *QXcbNativeInterface::nativeResourceForWindow(const QByteArray &resourceString, QWindow *window)
@@ -151,6 +159,36 @@ void *QXcbNativeInterface::nativeResourceForWindow(const QByteArray &resourceStr
return result;
}
+QPlatformNativeInterface::NativeResourceForScreenFunction QXcbNativeInterface::nativeResourceFunctionForScreen(const QByteArray &resource)
+{
+ const QByteArray lowerCaseResource = resource.toLower();
+ if (lowerCaseResource == "setapptime")
+ return NativeResourceForScreenFunction(setAppTime);
+ else if (lowerCaseResource == "setappusertime")
+ return NativeResourceForScreenFunction(setAppUserTime);
+ return 0;
+}
+
+void *QXcbNativeInterface::appTime(const QXcbScreen *screen)
+{
+ return reinterpret_cast<void *>(quintptr(screen->connection()->time()));
+}
+
+void *QXcbNativeInterface::appUserTime(const QXcbScreen *screen)
+{
+ return reinterpret_cast<void *>(quintptr(screen->connection()->netWmUserTime()));
+}
+
+void QXcbNativeInterface::setAppTime(QScreen* screen, xcb_timestamp_t time)
+{
+ static_cast<QXcbScreen *>(screen->handle())->connection()->setTime(time);
+}
+
+void QXcbNativeInterface::setAppUserTime(QScreen* screen, xcb_timestamp_t time)
+{
+ static_cast<QXcbScreen *>(screen->handle())->connection()->setNetWmUserTime(time);
+}
+
QPlatformNativeInterface::NativeResourceForContextFunction QXcbNativeInterface::nativeResourceFunctionForContext(const QByteArray &resource)
{
QByteArray lowerCaseResource = resource.toLower();
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.h b/src/plugins/platforms/xcb/qxcbnativeinterface.h
index a7e0a207cb..e2e03fce8f 100644
--- a/src/plugins/platforms/xcb/qxcbnativeinterface.h
+++ b/src/plugins/platforms/xcb/qxcbnativeinterface.h
@@ -43,11 +43,13 @@
#define QXCBNATIVEINTERFACE_H
#include <qpa/qplatformnativeinterface.h>
+#include <xcb/xcb.h>
QT_BEGIN_NAMESPACE
class QWidget;
class QXcbScreen;
+class QXcbConnection;
class QXcbNativeInterface : public QPlatformNativeInterface
{
@@ -59,7 +61,9 @@ public:
Screen,
GraphicsDevice,
EglContext,
- GLXContext
+ GLXContext,
+ AppTime,
+ AppUserTime
};
QXcbNativeInterface();
@@ -69,6 +73,7 @@ public:
void *nativeResourceForWindow(const QByteArray &resourceString, QWindow *window);
NativeResourceForContextFunction nativeResourceFunctionForContext(const QByteArray &resource);
+ NativeResourceForScreenFunction nativeResourceFunctionForScreen(const QByteArray &resource) Q_DECL_OVERRIDE;
inline const QByteArray &genericEventFilterType() const { return m_genericEventFilterType; }
@@ -77,6 +82,10 @@ public:
void *connectionForWindow(QWindow *window);
void *screenForWindow(QWindow *window);
void *graphicsDeviceForWindow(QWindow *window);
+ void *appTime(const QXcbScreen *screen);
+ void *appUserTime(const QXcbScreen *screen);
+ static void setAppTime(QScreen *screen, xcb_timestamp_t time);
+ static void setAppUserTime(QScreen *screen, xcb_timestamp_t time);
static void *eglContextForContext(QOpenGLContext *context);
static void *glxContextForContext(QOpenGLContext *context);
diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
index 6452186bbf..fc80662c46 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
@@ -50,6 +50,7 @@
#include <QDebug>
#include <qpa/qwindowsysteminterface.h>
+#include <private/qmath_p.h>
QT_BEGIN_NAMESPACE
@@ -65,6 +66,7 @@ QXcbScreen::QXcbScreen(QXcbConnection *connection, xcb_screen_t *scr,
, m_orientation(Qt::PrimaryOrientation)
, m_number(number)
, m_refreshRate(60)
+ , m_forcedDpi(-1)
{
if (connection->hasXRandr())
xcb_randr_select_input(xcb_connection(), screen()->root, true);
@@ -81,6 +83,9 @@ QXcbScreen::QXcbScreen(QXcbConnection *connection, xcb_screen_t *scr,
if (m_availableGeometry.isEmpty())
m_availableGeometry = QRect(QPoint(), m_virtualSize);
+ readXResources();
+
+
#ifdef Q_XCB_DEBUG
qDebug();
qDebug("Screen output %s of xcb screen %d:", m_outputName.toUtf8().constData(), m_number);
@@ -242,8 +247,11 @@ QImage::Format QXcbScreen::format() const
QDpi QXcbScreen::logicalDpi() const
{
- return QDpi(25.4 * m_virtualSize.width() / m_virtualSizeMillimeters.width(),
- 25.4 * m_virtualSize.height() / m_virtualSizeMillimeters.height());
+ if (m_forcedDpi > 0)
+ return QDpi(m_forcedDpi, m_forcedDpi);
+
+ return QDpi(Q_MM_PER_INCH * m_virtualSize.width() / m_virtualSizeMillimeters.width(),
+ Q_MM_PER_INCH * m_virtualSize.height() / m_virtualSizeMillimeters.height());
}
QPlatformCursor *QXcbScreen::cursor() const
@@ -315,6 +323,9 @@ void QXcbScreen::handleScreenChange(xcb_randr_screen_change_notify_event_t *chan
QWindowSystemInterface::handleScreenGeometryChange(QPlatformScreen::screen(), geometry());
QWindowSystemInterface::handleScreenAvailableGeometryChange(QPlatformScreen::screen(), availableGeometry());
QWindowSystemInterface::handleScreenOrientationChange(QPlatformScreen::screen(), m_orientation);
+ QWindowSystemInterface::handleScreenLogicalDotsPerInchChange(QPlatformScreen::screen(),
+ Q_MM_PER_INCH * m_virtualSize.width() / m_virtualSizeMillimeters.width(),
+ Q_MM_PER_INCH * m_virtualSize.height() / m_virtualSizeMillimeters.height());
}
void QXcbScreen::updateGeometry(xcb_timestamp_t timestamp)
@@ -470,4 +481,41 @@ QPixmap QXcbScreen::grabWindow(WId window, int x, int y, int width, int height)
return result;
}
+void QXcbScreen::readXResources()
+{
+ int offset = 0;
+ QByteArray resources;
+ while(1) {
+ xcb_get_property_reply_t *reply =
+ xcb_get_property_reply(xcb_connection(),
+ xcb_get_property_unchecked(xcb_connection(), false, screen()->root,
+ XCB_ATOM_RESOURCE_MANAGER,
+ XCB_ATOM_STRING, offset/4, 8192), NULL);
+ bool more = false;
+ if (reply && reply->format == 8 && reply->type == XCB_ATOM_STRING) {
+ resources += QByteArray((const char *)xcb_get_property_value(reply), xcb_get_property_value_length(reply));
+ offset += xcb_get_property_value_length(reply);
+ more = reply->bytes_after != 0;
+ }
+
+ if (reply)
+ free(reply);
+
+ if (!more)
+ break;
+ }
+
+ QList<QByteArray> split = resources.split('\n');
+ for (int i = 0; i < split.size(); ++i) {
+ const QByteArray &r = split.at(i);
+ if (r.startsWith("Xft.dpi:\t")) {
+ bool ok;
+ int dpi = r.mid(sizeof("Xft.dpi:")).toInt(&ok);
+ if (ok)
+ m_forcedDpi = dpi;
+ break;
+ }
+ }
+}
+
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/xcb/qxcbscreen.h b/src/plugins/platforms/xcb/qxcbscreen.h
index d9eee464dc..96d30cde8b 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.h
+++ b/src/plugins/platforms/xcb/qxcbscreen.h
@@ -96,6 +96,7 @@ public:
void updateGeometry(xcb_timestamp_t timestamp);
void updateRefreshRate();
+ void readXResources();
private:
xcb_screen_t *m_screen;
xcb_randr_crtc_t m_crtc;
@@ -114,6 +115,7 @@ private:
QMap<xcb_visualid_t, xcb_visualtype_t> m_visuals;
QXcbCursor *m_cursor;
int m_refreshRate;
+ int m_forcedDpi;
};
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 5e4e749c83..528c4c6580 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -385,6 +385,10 @@ void QXcbWindow::create()
#ifndef QT_NO_DRAGANDDROP
connection()->drag()->dndEnable(this, true);
#endif
+
+ const qreal opacity = qt_window_private(window())->opacity;
+ if (!qFuzzyCompare(opacity, qreal(1.0)))
+ setOpacity(opacity);
}
QXcbWindow::~QXcbWindow()
@@ -1024,6 +1028,7 @@ void QXcbWindow::updateNetWmStateBeforeMap()
void QXcbWindow::updateNetWmUserTime(xcb_timestamp_t timestamp)
{
xcb_window_t wid = m_window;
+ connection()->setNetWmUserTime(timestamp);
const bool isSupportedByWM = connection()->wmSupport()->isSupportedByWM(atom(QXcbAtom::_NET_WM_USER_TIME_WINDOW));
if (m_netWmUserTimeWindow || isSupportedByWM) {
@@ -1112,7 +1117,18 @@ void QXcbWindow::setParent(const QPlatformWindow *parent)
void QXcbWindow::setWindowTitle(const QString &title)
{
- QByteArray ba = title.toUtf8();
+ QString fullTitle = title;
+ if (QGuiApplicationPrivate::displayName) {
+ // Append display name, if set.
+ if (!fullTitle.isEmpty())
+ fullTitle += QString::fromUtf8(" \xe2\x80\x94 "); // unicode character U+2014, EM DASH
+ fullTitle += *QGuiApplicationPrivate::displayName;
+ } else if (fullTitle.isEmpty()) {
+ // Don't let the window title be completely empty, use the app name as fallback.
+ fullTitle = QCoreApplication::applicationName();
+ }
+ const QByteArray ba = fullTitle.toUtf8();
+
Q_XCB_CALL(xcb_change_property(xcb_connection(),
XCB_PROP_MODE_REPLACE,
m_window,
@@ -1460,53 +1476,6 @@ void QXcbWindow::handleUnmapNotifyEvent(const xcb_unmap_notify_event_t *event)
}
}
-static Qt::MouseButtons translateMouseButtons(int s)
-{
- Qt::MouseButtons ret = 0;
- if (s & XCB_BUTTON_MASK_1)
- ret |= Qt::LeftButton;
- if (s & XCB_BUTTON_MASK_2)
- ret |= Qt::MidButton;
- if (s & XCB_BUTTON_MASK_3)
- ret |= Qt::RightButton;
- return ret;
-}
-
-static Qt::MouseButton translateMouseButton(xcb_button_t s)
-{
- switch (s) {
- case 1: return Qt::LeftButton;
- case 2: return Qt::MidButton;
- case 3: return Qt::RightButton;
- // Button values 4-7 were already handled as Wheel events, and won't occur here.
- case 8: return Qt::BackButton; // Also known as Qt::ExtraButton1
- case 9: return Qt::ForwardButton; // Also known as Qt::ExtraButton2
- case 10: return Qt::ExtraButton3;
- case 11: return Qt::ExtraButton4;
- case 12: return Qt::ExtraButton5;
- case 13: return Qt::ExtraButton6;
- case 14: return Qt::ExtraButton7;
- case 15: return Qt::ExtraButton8;
- case 16: return Qt::ExtraButton9;
- case 17: return Qt::ExtraButton10;
- case 18: return Qt::ExtraButton11;
- case 19: return Qt::ExtraButton12;
- case 20: return Qt::ExtraButton13;
- case 21: return Qt::ExtraButton14;
- case 22: return Qt::ExtraButton15;
- case 23: return Qt::ExtraButton16;
- case 24: return Qt::ExtraButton17;
- case 25: return Qt::ExtraButton18;
- case 26: return Qt::ExtraButton19;
- case 27: return Qt::ExtraButton20;
- case 28: return Qt::ExtraButton21;
- case 29: return Qt::ExtraButton22;
- case 30: return Qt::ExtraButton23;
- case 31: return Qt::ExtraButton24;
- default: return Qt::NoButton;
- }
-}
-
void QXcbWindow::handleButtonPressEvent(const xcb_button_press_event_t *event)
{
updateNetWmUserTime(event->time);
@@ -1528,7 +1497,7 @@ void QXcbWindow::handleButtonPressEvent(const xcb_button_press_event_t *event)
return;
}
- handleMouseEvent(event->detail, event->state, event->time, local, global, modifiers);
+ handleMouseEvent(event->time, local, global, modifiers);
}
void QXcbWindow::handleButtonReleaseEvent(const xcb_button_release_event_t *event)
@@ -1537,7 +1506,12 @@ void QXcbWindow::handleButtonReleaseEvent(const xcb_button_release_event_t *even
QPoint global(event->root_x, event->root_y);
Qt::KeyboardModifiers modifiers = connection()->keyboard()->translateModifiers(event->state);
- handleMouseEvent(event->detail, event->state, event->time, local, global, modifiers);
+ if (event->detail >= 4 && event->detail <= 7) {
+ // mouse wheel, handled in handleButtonPressEvent()
+ return;
+ }
+
+ handleMouseEvent(event->time, local, global, modifiers);
}
void QXcbWindow::handleMotionNotifyEvent(const xcb_motion_notify_event_t *event)
@@ -1546,19 +1520,13 @@ void QXcbWindow::handleMotionNotifyEvent(const xcb_motion_notify_event_t *event)
QPoint global(event->root_x, event->root_y);
Qt::KeyboardModifiers modifiers = connection()->keyboard()->translateModifiers(event->state);
- handleMouseEvent(event->detail, event->state, event->time, local, global, modifiers);
+ handleMouseEvent(event->time, local, global, modifiers);
}
-void QXcbWindow::handleMouseEvent(xcb_button_t detail, uint16_t state, xcb_timestamp_t time, const QPoint &local, const QPoint &global, Qt::KeyboardModifiers modifiers)
+void QXcbWindow::handleMouseEvent(xcb_timestamp_t time, const QPoint &local, const QPoint &global, Qt::KeyboardModifiers modifiers)
{
connection()->setTime(time);
-
- Qt::MouseButtons buttons = translateMouseButtons(state);
- Qt::MouseButton button = translateMouseButton(detail);
-
- buttons ^= button; // X event uses state *before*, Qt uses state *after*
-
- QWindowSystemInterface::handleMouseEvent(window(), time, local, global, buttons, modifiers);
+ QWindowSystemInterface::handleMouseEvent(window(), time, local, global, connection()->buttons(), modifiers);
}
class EnterEventChecker
@@ -1786,6 +1754,23 @@ static inline xcb_rectangle_t qRectToXCBRectangle(const QRect &r)
return result;
}
+void QXcbWindow::setOpacity(qreal level)
+{
+ if (!m_window)
+ return;
+
+ quint32 value = qRound64(qBound(qreal(0), level, qreal(1)) * 0xffffffff);
+
+ Q_XCB_CALL(xcb_change_property(xcb_connection(),
+ XCB_PROP_MODE_REPLACE,
+ m_window,
+ atom(QXcbAtom::_NET_WM_WINDOW_OPACITY),
+ XCB_ATOM_CARDINAL,
+ 32,
+ 1,
+ (uchar *)&value));
+}
+
void QXcbWindow::setMask(const QRegion &region)
{
if (!connection()->hasXShape())
diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h
index bd4d18a175..b2c637281d 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.h
+++ b/src/plugins/platforms/xcb/qxcbwindow.h
@@ -109,6 +109,8 @@ public:
bool startSystemResize(const QPoint &pos, Qt::Corner corner);
+ void setOpacity(qreal level);
+
#if !defined(QT_NO_SHAPE)
void setMask(const QRegion &region);
#endif // !QT_NO_SHAPE
@@ -132,11 +134,10 @@ public:
void handleFocusOutEvent(const xcb_focus_out_event_t *event);
void handlePropertyNotifyEvent(const xcb_property_notify_event_t *event);
- void handleMouseEvent(xcb_button_t detail, uint16_t state, xcb_timestamp_t time, const QPoint &local, const QPoint &global, Qt::KeyboardModifiers modifiers);
+ void handleMouseEvent(xcb_timestamp_t time, const QPoint &local, const QPoint &global, Qt::KeyboardModifiers modifiers);
void updateSyncRequestCounter();
void updateNetWmUserTime(xcb_timestamp_t timestamp);
- void netWmUserTime() const;
#if defined(XCB_USE_EGL)
QXcbEGLSurface *eglSurface() const;
diff --git a/src/plugins/platforms/xcb/xcb-plugin.pro b/src/plugins/platforms/xcb/xcb-plugin.pro
index b7b5650eea..5823e97f36 100644
--- a/src/plugins/platforms/xcb/xcb-plugin.pro
+++ b/src/plugins/platforms/xcb/xcb-plugin.pro
@@ -1,6 +1,7 @@
-TARGET = xcb
+TARGET = qxcb
PLUGIN_TYPE = platforms
+PLUGIN_CLASS_NAME = QXcbIntegrationPlugin
load(qt_plugin)
QT += core-private gui-private platformsupport-private
@@ -109,7 +110,7 @@ contains(QT_CONFIG, xcb-qt) {
DEFINES += XCB_USE_RENDER
XCB_DIR = ../../../3rdparty/xcb
INCLUDEPATH += $$XCB_DIR/include $$XCB_DIR/sysinclude
- LIBS += -lxcb -L ./xcb-static -l xcb-static
+ LIBS += -lxcb -L$$OUT_PWD/xcb-static -lxcb-static
} else {
LIBS += -lxcb -lxcb-image -lxcb-keysyms -lxcb-icccm -lxcb-sync -lxcb-xfixes -lxcb-shm -lxcb-randr
!contains(DEFINES, QT_NO_SHAPE):LIBS += -lxcb-shape
diff --git a/src/plugins/platforms/xcb/xcb-static/xcb-static.pro b/src/plugins/platforms/xcb/xcb-static/xcb-static.pro
index d7530fe42e..01667d41db 100644
--- a/src/plugins/platforms/xcb/xcb-static/xcb-static.pro
+++ b/src/plugins/platforms/xcb/xcb-static/xcb-static.pro
@@ -8,7 +8,7 @@ CONFIG += staticlib
XCB_DIR = ../../../../3rdparty/xcb
-INCLUDEPATH += $$XCB_DIR/include/xcb $$XCB_DIR/sysinclude
+INCLUDEPATH += $$XCB_DIR/include $$XCB_DIR/include/xcb $$XCB_DIR/sysinclude
# ignore compiler warnings in 3rdparty code
QMAKE_CFLAGS_STATIC_LIB+=-w
diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro
index b056fa4002..3b0ff3f6c8 100644
--- a/src/plugins/plugins.pro
+++ b/src/plugins/plugins.pro
@@ -1,7 +1,7 @@
TEMPLATE = subdirs
SUBDIRS *= sqldrivers bearer
-!contains(QT_CONFIG, no-gui): SUBDIRS *= imageformats platforms platforminputcontexts generic
-!contains(QT_CONFIG, no-widgets): SUBDIRS += accessible
+qtHaveModule(gui): SUBDIRS *= imageformats platforms platforminputcontexts generic
+qtHaveModule(widgets): SUBDIRS += accessible
-!wince*:!contains(QT_CONFIG, no-widgets):SUBDIRS += printsupport
+!wince*:qtHaveModule(widgets): SUBDIRS += printsupport
diff --git a/src/plugins/printsupport/cocoa/cocoa.pro b/src/plugins/printsupport/cocoa/cocoa.pro
index c0206fd2bc..a3b9e2dfcf 100644
--- a/src/plugins/printsupport/cocoa/cocoa.pro
+++ b/src/plugins/printsupport/cocoa/cocoa.pro
@@ -1,6 +1,7 @@
TARGET = cocoaprintersupport
MODULE = cocoaprintersupport
PLUGIN_TYPE = printsupport
+PLUGIN_CLASS_NAME = QCocoaPrinterSupportPlugin
load(qt_plugin)
QT += gui-private printsupport-private
diff --git a/src/plugins/printsupport/cups/cups.pro b/src/plugins/printsupport/cups/cups.pro
index 0ea5058c00..f617738a94 100644
--- a/src/plugins/printsupport/cups/cups.pro
+++ b/src/plugins/printsupport/cups/cups.pro
@@ -1,6 +1,7 @@
TARGET = cupsprintersupport
MODULE = cupsprintersupport
PLUGIN_TYPE = printsupport
+PLUGIN_CLASS_NAME = QCupsPrinterSupportPlugin
load(qt_plugin)
QT += core-private gui-private printsupport printsupport-private
diff --git a/src/plugins/printsupport/windows/windows.pro b/src/plugins/printsupport/windows/windows.pro
index 5b5dd86beb..ae9efa342b 100644
--- a/src/plugins/printsupport/windows/windows.pro
+++ b/src/plugins/printsupport/windows/windows.pro
@@ -1,6 +1,7 @@
TARGET = windowsprintersupport
MODULE = windowsprintersupport
PLUGIN_TYPE = printsupport
+PLUGIN_CLASS_NAME = QWindowsPrinterSupportPlugin
load(qt_plugin)
QT *= core-private
diff --git a/src/plugins/sqldrivers/db2/db2.pro b/src/plugins/sqldrivers/db2/db2.pro
index d04e6f191b..2365c5bc0e 100644
--- a/src/plugins/sqldrivers/db2/db2.pro
+++ b/src/plugins/sqldrivers/db2/db2.pro
@@ -4,4 +4,5 @@ SOURCES = main.cpp
OTHER_FILES += db2.json
include(../../../sql/drivers/db2/qsql_db2.pri)
+PLUGIN_CLASS_NAME = QDB2DriverPlugin
include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/ibase/ibase.pro b/src/plugins/sqldrivers/ibase/ibase.pro
index ca2a91aa2e..1f29597a2b 100644
--- a/src/plugins/sqldrivers/ibase/ibase.pro
+++ b/src/plugins/sqldrivers/ibase/ibase.pro
@@ -4,4 +4,5 @@ SOURCES = main.cpp
OTHER_FILES += ibase.json
include(../../../sql/drivers/ibase/qsql_ibase.pri)
+PLUGIN_CLASS_NAME = QIBaseDriverPlugin
include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/mysql/mysql.pro b/src/plugins/sqldrivers/mysql/mysql.pro
index 05d1073701..c917bfca48 100644
--- a/src/plugins/sqldrivers/mysql/mysql.pro
+++ b/src/plugins/sqldrivers/mysql/mysql.pro
@@ -4,4 +4,5 @@ SOURCES = main.cpp
OTHER_FILES += mysql.json
include(../../../sql/drivers/mysql/qsql_mysql.pri)
+PLUGIN_CLASS_NAME = QMYSQLDriverPlugin
include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/oci/oci.pro b/src/plugins/sqldrivers/oci/oci.pro
index 89642f3653..96a0dd9ab6 100644
--- a/src/plugins/sqldrivers/oci/oci.pro
+++ b/src/plugins/sqldrivers/oci/oci.pro
@@ -4,4 +4,5 @@ SOURCES = main.cpp
OTHER_FILES += oci.json
include(../../../sql/drivers/oci/qsql_oci.pri)
+PLUGIN_CLASS_NAME = QOCIDriverPlugin
include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/odbc/odbc.pro b/src/plugins/sqldrivers/odbc/odbc.pro
index 5ebd34fd17..c0020c065f 100644
--- a/src/plugins/sqldrivers/odbc/odbc.pro
+++ b/src/plugins/sqldrivers/odbc/odbc.pro
@@ -4,4 +4,5 @@ SOURCES = main.cpp
OTHER_FILES += odbc.json
include(../../../sql/drivers/odbc/qsql_odbc.pri)
+PLUGIN_CLASS_NAME = QODBCDriverPlugin
include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/psql/psql.pro b/src/plugins/sqldrivers/psql/psql.pro
index cb0d27e171..0fabe0e616 100644
--- a/src/plugins/sqldrivers/psql/psql.pro
+++ b/src/plugins/sqldrivers/psql/psql.pro
@@ -4,4 +4,5 @@ SOURCES = main.cpp
OTHER_FILES += psql.json
include(../../../sql/drivers/psql/qsql_psql.pri)
+PLUGIN_CLASS_NAME = QPSQLDriverPlugin
include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/sqlite/sqlite.pro b/src/plugins/sqldrivers/sqlite/sqlite.pro
index d1f4aa7233..60b30d70c0 100644
--- a/src/plugins/sqldrivers/sqlite/sqlite.pro
+++ b/src/plugins/sqldrivers/sqlite/sqlite.pro
@@ -6,4 +6,5 @@ include(../../../sql/drivers/sqlite/qsql_sqlite.pri)
wince*: DEFINES += HAVE_LOCALTIME_S=0
+PLUGIN_CLASS_NAME = QSQLiteDriverPlugin
include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/sqlite2/sqlite2.pro b/src/plugins/sqldrivers/sqlite2/sqlite2.pro
index 1cbd31c3dc..d69afc119f 100644
--- a/src/plugins/sqldrivers/sqlite2/sqlite2.pro
+++ b/src/plugins/sqldrivers/sqlite2/sqlite2.pro
@@ -4,4 +4,5 @@ SOURCES = smain.cpp
OTHER_FILES += sqlite2.json
include(../../../sql/drivers/sqlite2/qsql_sqlite2.pri)
+PLUGIN_CLASS_NAME = QSQLite2DriverPlugin
include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/tds/tds.pro b/src/plugins/sqldrivers/tds/tds.pro
index 9f7c2a193f..88f4b7c451 100644
--- a/src/plugins/sqldrivers/tds/tds.pro
+++ b/src/plugins/sqldrivers/tds/tds.pro
@@ -4,4 +4,5 @@ SOURCES = main.cpp
OTHER_FILES += tds.json
include(../../../sql/drivers/tds/qsql_tds.pri)
+PLUGIN_CLASS_NAME = QTDSDriverPlugin
include(../qsqldriverbase.pri)
diff --git a/src/printsupport/doc/qtprintsupport.qdocconf b/src/printsupport/doc/qtprintsupport.qdocconf
index 98160f3d5d..1a4d37ae49 100644
--- a/src/printsupport/doc/qtprintsupport.qdocconf
+++ b/src/printsupport/doc/qtprintsupport.qdocconf
@@ -3,21 +3,21 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
project = QtPrintSupport
description = Qt Print Support Reference Documentation
url = http://qt-project.org/doc/qtprintsupport
-version = 5.0.0
+version = 5.0.1
examplesinstallpath = printsupport
qhp.projects = QtPrintSupport
qhp.QtPrintSupport.file = qtprintsupport.qhp
-qhp.QtPrintSupport.namespace = org.qt-project.qtprintsupport.500
+qhp.QtPrintSupport.namespace = org.qt-project.qtprintsupport.501
qhp.QtPrintSupport.virtualFolder = qtprintsupport
qhp.QtPrintSupport.indexTitle = Qt Print Support
qhp.QtPrintSupport.indexRoot =
-qhp.QtPrintSupport.filterAttributes = qtprintsupport 5.0.0 qtrefdoc
-qhp.QtPrintSupport.customFilters.Qt.name = QtPrintSupport 5.0.0
-qhp.QtPrintSupport.customFilters.Qt.filterAttributes = qtprintsupport 5.0.0
+qhp.QtPrintSupport.filterAttributes = qtprintsupport 5.0.1 qtrefdoc
+qhp.QtPrintSupport.customFilters.Qt.name = QtPrintSupport 5.0.1
+qhp.QtPrintSupport.customFilters.Qt.filterAttributes = qtprintsupport 5.0.1
qhp.QtPrintSupport.subprojects = classes
qhp.QtPrintSupport.subprojects.classes.title = C++ Classes
diff --git a/src/sql/doc/qtsql.qdocconf b/src/sql/doc/qtsql.qdocconf
index 4de56207f6..6c5af37de8 100644
--- a/src/sql/doc/qtsql.qdocconf
+++ b/src/sql/doc/qtsql.qdocconf
@@ -3,25 +3,25 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
project = QtSql
description = Qt SQL Reference Documentation
url = http://qt-project.org/doc/qtsql
-version = 5.0.0
+version = 5.0.1
examplesinstallpath = sql
qhp.projects = QtSql
qhp.QtSql.file = qtsql.qhp
-qhp.QtSql.namespace = org.qt-project.qtsql.500
+qhp.QtSql.namespace = org.qt-project.qtsql.501
qhp.QtSql.virtualFolder = qtsql
qhp.QtSql.indexTitle = Qt SQL
qhp.QtSql.indexRoot =
-qhp.QtSql.filterAttributes = qtsql 5.0.0 qtrefdoc
-qhp.QtSql.customFilters.Qt.name = QtSql 5.0.0
-qhp.QtSql.customFilters.Qt.filterAttributes = qtsql 5.0.0
+qhp.QtSql.filterAttributes = qtsql 5.0.1 qtrefdoc
+qhp.QtSql.customFilters.Qt.name = QtSql 5.0.1
+qhp.QtSql.customFilters.Qt.filterAttributes = qtsql 5.0.1
qhp.QtSql.subprojects = classes
qhp.QtSql.subprojects.classes.title = C++ Classes
-qhp.QtSql.subprojects.classes.indexTitle = Qt SQL C++ Classes
+qhp.QtSql.subprojects.classes.indexTitle = Qt SQL Module C++ Classes
qhp.QtSql.subprojects.classes.selectors = class fake:headerfile
qhp.QtSql.subprojects.classes.sortPages = true
tagfile = ../../../doc/qtsql/qtsql.tags
diff --git a/src/sql/doc/src/sql-driver.qdoc b/src/sql/doc/src/sql-driver.qdoc
index 57efa5c4cc..d8a468222b 100644
--- a/src/sql/doc/src/sql-driver.qdoc
+++ b/src/sql/doc/src/sql-driver.qdoc
@@ -494,7 +494,7 @@
\snippet code/doc_src_sql-driver.qdoc 15
Users of MinGW may wish to consult the following online document:
- \l{PostgreSQL MinGW/Native Windows}.
+ \l{http://www.postgresql.org/docs/current/static/installation-platform-notes.html#INSTALLATION-NOTES-MINGW}{PostgreSQL MinGW/Native Windows}.
\b{Note:} This database plugin is not supported for Windows CE.
diff --git a/src/sql/doc/src/sql-programming.qdoc b/src/sql/doc/src/sql-programming.qdoc
index aa2eb243b8..ab8eee5b88 100644
--- a/src/sql/doc/src/sql-programming.qdoc
+++ b/src/sql/doc/src/sql-programming.qdoc
@@ -76,7 +76,7 @@
\section2 Driver Layer
- This comprises the classes QSqlDriver, QSqlDriverCreator<T>,
+ This comprises the classes QSqlDriver, QSqlDriverCreator,
QSqlDriverCreatorBase, QSqlDriverPlugin, and QSqlResult.
This layer provides the low-level bridge between the specific databases
@@ -98,8 +98,8 @@
These classes are designed to work with Qt's
\l{Model/View Programming}{model/view framework}.
- Note that to use any of these classes, a QCoreApplication object
- must have been instantiated first.
+ Note that a QCoreApplication object must be instantiated before
+ using any of these classes.
*/
/*!
diff --git a/src/sql/drivers/mysql/qsql_mysql.cpp b/src/sql/drivers/mysql/qsql_mysql.cpp
index e7b86cec42..80c3087bf1 100644
--- a/src/sql/drivers/mysql/qsql_mysql.cpp
+++ b/src/sql/drivers/mysql/qsql_mysql.cpp
@@ -1175,6 +1175,7 @@ bool QMYSQLDriver::hasFeature(DriverFeature f) const
case SimpleLocking:
case EventNotifications:
case FinishQuery:
+ case CancelQuery:
return false;
case QuerySize:
case BLOB:
diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp
index 0eb078b0e4..c14e2d68c4 100644
--- a/src/sql/drivers/odbc/qsql_odbc.cpp
+++ b/src/sql/drivers/odbc/qsql_odbc.cpp
@@ -85,7 +85,7 @@ inline static QString fromSQLTCHAR(const QVarLengthArray<SQLTCHAR>& input, int s
result=QString::fromUcs4((const uint *)input.constData(), realsize);
break;
default:
- qCritical("sizeof(SQLTCHAR) is %d. Don't know how to handle this.", sizeof(SQLTCHAR));
+ qCritical("sizeof(SQLTCHAR) is %d. Don't know how to handle this.", int(sizeof(SQLTCHAR)));
}
return result;
}
@@ -105,7 +105,7 @@ inline static QVarLengthArray<SQLTCHAR> toSQLTCHAR(const QString &input)
memcpy(result.data(), input.toUcs4().data(), input.size() * 4);
break;
default:
- qCritical("sizeof(SQLTCHAR) is %d. Don't know how to handle this.", sizeof(SQLTCHAR));
+ qCritical("sizeof(SQLTCHAR) is %d. Don't know how to handle this.", int(sizeof(SQLTCHAR)));
}
result.append(0); // make sure it's null terminated, doesn't matter if it already is, it does if it isn't.
return result;
@@ -646,7 +646,7 @@ static QSqlField qMakeFieldInfo(const QODBCPrivate* p, int i )
return f;
}
-static int qGetODBCVersion(const QString &connOpts)
+static size_t qGetODBCVersion(const QString &connOpts)
{
if (connOpts.contains(QLatin1String("SQL_ATTR_ODBC_VERSION=SQL_OV_ODBC3"), Qt::CaseInsensitive))
return SQL_OV_ODBC3;
@@ -703,13 +703,13 @@ bool QODBCDriverPrivate::setConnectionOptions(const QString& connOpts)
qWarning() << "QODBCDriver::open: Unknown option value '" << val << '\'';
continue;
}
- r = SQLSetConnectAttr(hDbc, SQL_ATTR_ACCESS_MODE, (SQLPOINTER) v, 0);
+ r = SQLSetConnectAttr(hDbc, SQL_ATTR_ACCESS_MODE, (SQLPOINTER) size_t(v), 0);
} else if (opt.toUpper() == QLatin1String("SQL_ATTR_CONNECTION_TIMEOUT")) {
v = val.toUInt();
- r = SQLSetConnectAttr(hDbc, SQL_ATTR_CONNECTION_TIMEOUT, (SQLPOINTER) v, 0);
+ r = SQLSetConnectAttr(hDbc, SQL_ATTR_CONNECTION_TIMEOUT, (SQLPOINTER) size_t(v), 0);
} else if (opt.toUpper() == QLatin1String("SQL_ATTR_LOGIN_TIMEOUT")) {
v = val.toUInt();
- r = SQLSetConnectAttr(hDbc, SQL_ATTR_LOGIN_TIMEOUT, (SQLPOINTER) v, 0);
+ r = SQLSetConnectAttr(hDbc, SQL_ATTR_LOGIN_TIMEOUT, (SQLPOINTER) size_t(v), 0);
} else if (opt.toUpper() == QLatin1String("SQL_ATTR_CURRENT_CATALOG")) {
val.utf16(); // 0 terminate
r = SQLSetConnectAttr(hDbc, SQL_ATTR_CURRENT_CATALOG,
@@ -728,10 +728,10 @@ bool QODBCDriverPrivate::setConnectionOptions(const QString& connOpts)
qWarning() << "QODBCDriver::open: Unknown option value '" << val << '\'';
continue;
}
- r = SQLSetConnectAttr(hDbc, SQL_ATTR_METADATA_ID, (SQLPOINTER) v, 0);
+ r = SQLSetConnectAttr(hDbc, SQL_ATTR_METADATA_ID, (SQLPOINTER) size_t(v), 0);
} else if (opt.toUpper() == QLatin1String("SQL_ATTR_PACKET_SIZE")) {
v = val.toUInt();
- r = SQLSetConnectAttr(hDbc, SQL_ATTR_PACKET_SIZE, (SQLPOINTER) v, 0);
+ r = SQLSetConnectAttr(hDbc, SQL_ATTR_PACKET_SIZE, (SQLPOINTER) size_t(v), 0);
} else if (opt.toUpper() == QLatin1String("SQL_ATTR_TRACEFILE")) {
val.utf16(); // 0 terminate
r = SQLSetConnectAttr(hDbc, SQL_ATTR_TRACEFILE,
@@ -750,7 +750,7 @@ bool QODBCDriverPrivate::setConnectionOptions(const QString& connOpts)
qWarning() << "QODBCDriver::open: Unknown option value '" << val << '\'';
continue;
}
- r = SQLSetConnectAttr(hDbc, SQL_ATTR_TRACE, (SQLPOINTER) v, 0);
+ r = SQLSetConnectAttr(hDbc, SQL_ATTR_TRACE, (SQLPOINTER) size_t(v), 0);
} else if (opt.toUpper() == QLatin1String("SQL_ATTR_CONNECTION_POOLING")) {
if (val == QLatin1String("SQL_CP_OFF"))
v = SQL_CP_OFF;
@@ -764,7 +764,7 @@ bool QODBCDriverPrivate::setConnectionOptions(const QString& connOpts)
qWarning() << "QODBCDriver::open: Unknown option value '" << val << '\'';
continue;
}
- r = SQLSetConnectAttr(hDbc, SQL_ATTR_CONNECTION_POOLING, (SQLPOINTER)v, 0);
+ r = SQLSetConnectAttr(hDbc, SQL_ATTR_CONNECTION_POOLING, (SQLPOINTER) size_t(v), 0);
} else if (opt.toUpper() == QLatin1String("SQL_ATTR_CP_MATCH")) {
if (val.toUpper() == QLatin1String("SQL_CP_STRICT_MATCH"))
v = SQL_CP_STRICT_MATCH;
@@ -776,7 +776,7 @@ bool QODBCDriverPrivate::setConnectionOptions(const QString& connOpts)
qWarning() << "QODBCDriver::open: Unknown option value '" << val << '\'';
continue;
}
- r = SQLSetConnectAttr(hDbc, SQL_ATTR_CP_MATCH, (SQLPOINTER)v, 0);
+ r = SQLSetConnectAttr(hDbc, SQL_ATTR_CP_MATCH, (SQLPOINTER) size_t(v), 0);
} else if (opt.toUpper() == QLatin1String("SQL_ATTR_ODBC_VERSION")) {
// Already handled in QODBCDriver::open()
continue;
@@ -1801,6 +1801,7 @@ bool QODBCDriver::hasFeature(DriverFeature f) const
case BatchOperations:
case SimpleLocking:
case EventNotifications:
+ case CancelQuery:
return false;
case MultipleResultSets:
return d->hasMultiResultSets;
@@ -2171,7 +2172,7 @@ bool QODBCDriver::beginTransaction()
SQLUINTEGER ac(SQL_AUTOCOMMIT_OFF);
SQLRETURN r = SQLSetConnectAttr(d->hDbc,
SQL_ATTR_AUTOCOMMIT,
- (SQLPOINTER)ac,
+ (SQLPOINTER)size_t(ac),
sizeof(ac));
if (r != SQL_SUCCESS) {
setLastError(qMakeError(tr("Unable to disable autocommit"),
@@ -2220,7 +2221,7 @@ bool QODBCDriver::endTrans()
SQLUINTEGER ac(SQL_AUTOCOMMIT_ON);
SQLRETURN r = SQLSetConnectAttr(d->hDbc,
SQL_ATTR_AUTOCOMMIT,
- (SQLPOINTER)ac,
+ (SQLPOINTER)size_t(ac),
sizeof(ac));
if (r != SQL_SUCCESS) {
setLastError(qMakeError(tr("Unable to enable autocommit"), QSqlError::TransactionError, d));
diff --git a/src/sql/drivers/psql/qsql_psql.cpp b/src/sql/drivers/psql/qsql_psql.cpp
index 8a0e2b86ea..b66af49de6 100644
--- a/src/sql/drivers/psql/qsql_psql.cpp
+++ b/src/sql/drivers/psql/qsql_psql.cpp
@@ -695,25 +695,30 @@ QPSQLDriver::Protocol QPSQLDriverPrivate::getPSQLVersion()
int vMaj = rx.cap(1).toInt();
int vMin = rx.cap(2).toInt();
serverVersion = qMakePSQLVersion(vMaj, vMin);
-#ifdef PG_MAJORVERSION
- if (rx.indexIn(QLatin1String(PG_MAJORVERSION)) != -1) {
+#if defined(PG_MAJORVERSION)
+ if (rx.indexIn(QLatin1String(PG_MAJORVERSION)) != -1)
+#elif defined(PG_VERSION)
+ if (rx.indexIn(QLatin1String(PG_VERSION)) != -1)
+#else
+ if (0)
+#endif
+ {
vMaj = rx.cap(1).toInt();
vMin = rx.cap(2).toInt();
+ QPSQLDriver::Protocol clientVersion = qMakePSQLVersion(vMaj, vMin);
+
+ if (serverVersion >= QPSQLDriver::Version9 && clientVersion < QPSQLDriver::Version9) {
+ //Client version before QPSQLDriver::Version9 only supports escape mode for bytea type,
+ //but bytea format is set to hex by default in PSQL 9 and above. So need to force the
+ //server use the old escape mode when connects to the new server with old client library.
+ result = exec("SET bytea_output=escape; ");
+ status = PQresultStatus(result);
+ } else if (serverVersion == QPSQLDriver::VersionUnknown) {
+ serverVersion = clientVersion;
+ if (serverVersion != QPSQLDriver::VersionUnknown)
+ qWarning("The server version of this PostgreSQL is unknown, falling back to the client version.");
+ }
}
- QPSQLDriver::Protocol clientVersion = qMakePSQLVersion(vMaj, vMin);
-
- if (serverVersion >= QPSQLDriver::Version9 && clientVersion < QPSQLDriver::Version9) {
- //Client version before QPSQLDriver::Version9 only supports escape mode for bytea type,
- //but bytea format is set to hex by default in PSQL 9 and above. So need to force the
- //server use the old escape mode when connects to the new server with old client library.
- result = exec("SET bytea_output=escape; ");
- status = PQresultStatus(result);
- } else if (serverVersion == QPSQLDriver::VersionUnknown) {
- serverVersion = clientVersion;
- if (serverVersion != QPSQLDriver::VersionUnknown)
- qWarning("The server version of this PostgreSQL is unknown, falling back to the client version.");
- }
-#endif
}
}
PQclear(result);
@@ -781,6 +786,7 @@ bool QPSQLDriver::hasFeature(DriverFeature f) const
case SimpleLocking:
case FinishQuery:
case MultipleResultSets:
+ case CancelQuery:
return false;
case BLOB:
return d->pro >= QPSQLDriver::Version71;
diff --git a/src/sql/drivers/sqlite/qsql_sqlite.cpp b/src/sql/drivers/sqlite/qsql_sqlite.cpp
index 595ef496ec..a0ccde96d4 100644
--- a/src/sql/drivers/sqlite/qsql_sqlite.cpp
+++ b/src/sql/drivers/sqlite/qsql_sqlite.cpp
@@ -540,6 +540,7 @@ bool QSQLiteDriver::hasFeature(DriverFeature f) const
case BatchOperations:
case EventNotifications:
case MultipleResultSets:
+ case CancelQuery:
return false;
}
return false;
diff --git a/src/sql/kernel/qsql.qdoc b/src/sql/kernel/qsql.qdoc
index b3afe82245..de7ea76181 100644
--- a/src/sql/kernel/qsql.qdoc
+++ b/src/sql/kernel/qsql.qdoc
@@ -45,9 +45,6 @@
\value BeforeFirstRow Before the first record.
\value AfterLastRow After the last record.
- \omitvalue BeforeFirst
- \omitvalue AfterLast
-
\sa QSqlQuery::at()
*/
diff --git a/src/sql/kernel/qsqldriver.cpp b/src/sql/kernel/qsqldriver.cpp
index 62ec4e7e1f..841c563973 100644
--- a/src/sql/kernel/qsqldriver.cpp
+++ b/src/sql/kernel/qsqldriver.cpp
@@ -218,6 +218,7 @@ bool QSqlDriver::isOpenError() const
\value EventNotifications Whether the driver supports database event notifications.
\value FinishQuery Whether the driver can do any low-level resource cleanup when QSqlQuery::finish() is called.
\value MultipleResultSets Whether the driver can access multiple result sets returned from batched statements or stored procedures.
+ \value CancelQuery Whether the driver allows cancelling a running query.
More information about supported features can be found in the
\l{sql-driver.html}{Qt SQL driver} documentation.
diff --git a/src/sql/kernel/qsqlresult.cpp b/src/sql/kernel/qsqlresult.cpp
index 0396e127ec..1259360dd4 100644
--- a/src/sql/kernel/qsqlresult.cpp
+++ b/src/sql/kernel/qsqlresult.cpp
@@ -162,8 +162,6 @@ QString QSqlResultPrivate::positionalToNamedBinding()
for (int i = 0; i < n; ++i) {
QChar ch = sql.at(i);
if (ch == QLatin1Char('?') && !inQuote) {
- // Update the holder position since we are changing the holder name lengths
- holders[count].holderPos = result.size();
result += qFieldSerial(count++);
} else {
if (ch == QLatin1Char('\''))
diff --git a/src/sql/models/qsqlrelationaldelegate.cpp b/src/sql/models/qsqlrelationaldelegate.cpp
index af50c03b2d..e040789fa6 100644
--- a/src/sql/models/qsqlrelationaldelegate.cpp
+++ b/src/sql/models/qsqlrelationaldelegate.cpp
@@ -45,6 +45,7 @@ QT_BEGIN_NAMESPACE
/*!
\class QSqlRelationalDelegate
+ \inmodule QtSql
\brief The QSqlRelationalDelegate class provides a delegate that is used to
display and edit data from a QSqlRelationalTableModel.
@@ -88,11 +89,6 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \fn void QSqlRelationalDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const
- \reimp
-*/
-
-/*!
\fn void QSqlRelationalDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index) const
\reimp
diff --git a/src/sql/models/qsqlrelationaltablemodel.cpp b/src/sql/models/qsqlrelationaltablemodel.cpp
index c3637f0db7..29a70391b1 100644
--- a/src/sql/models/qsqlrelationaltablemodel.cpp
+++ b/src/sql/models/qsqlrelationaltablemodel.cpp
@@ -67,6 +67,7 @@ typedef QSqlRelationalTableModelSql Sql;
/*!
\class QSqlRelation
+ \inmodule QtSql
\brief The QSqlRelation class stores information about an SQL foreign key.
QSqlRelation is a helper class for QSqlRelationalTableModel. See
diff --git a/src/testlib/3rdparty/valgrind_p.h b/src/testlib/3rdparty/valgrind_p.h
index 6380a9f28d..bbce1b24d6 100644
--- a/src/testlib/3rdparty/valgrind_p.h
+++ b/src/testlib/3rdparty/valgrind_p.h
@@ -259,6 +259,7 @@ typedef
: "cc", "memory" \
); \
_zzq_rlval = _zzq_result; \
+ (void)_zzq_rlval; \
}
#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) \
diff --git a/src/testlib/doc/qttestlib.qdocconf b/src/testlib/doc/qttestlib.qdocconf
index d4404c7951..2a2a1e4ea0 100644
--- a/src/testlib/doc/qttestlib.qdocconf
+++ b/src/testlib/doc/qttestlib.qdocconf
@@ -1,31 +1,31 @@
include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
-project = qttestlib
+project = QtTestLib
description = Qt Test Reference Documentation
-url = http://qt-project.org/doc/qttest
-version = 5.0.0
+url = http://qt-project.org/doc/qttestlib
+version = 5.0.1
-examplesinstallpath = qtestlib
+examplesinstallpath = testlib
-qhp.projects = QtTest
+qhp.projects = QtTestLib
-qhp.QtTest.file = qttestlib.qhp
-qhp.QtTest.namespace = org.qt-project.qttest.500
-qhp.QtTest.virtualFolder = qttest
-qhp.QtTest.indexTitle = Qt Test
-qhp.QtTest.indexRoot =
+qhp.QtTestLib.file = qttestlib.qhp
+qhp.QtTestLib.namespace = org.qt-project.qttest.501
+qhp.QtTestLib.virtualFolder = qttest
+qhp.QtTestLib.indexTitle = Qt Test
+qhp.QtTestLib.indexRoot =
-qhp.QtTest.filterAttributes = qttest 5.0.0 qtrefdoc
-qhp.QtTest.customFilters.Qt.name = QtTest 5.0.0
-qhp.QtTest.customFilters.Qt.filterAttributes = qttest 5.0.0
+qhp.QtTestLib.filterAttributes = qttestlib 5.0.1 qtrefdoc
+qhp.QtTestLib.customFilters.Qt.name = QtTestLib 5.0.1
+qhp.QtTestLib.customFilters.Qt.filterAttributes = qttest 5.0.1
-qhp.QtTest.subprojects = classes
-qhp.QtTest.subprojects.classes.title = C++ Classes
-qhp.QtTest.subprojects.classes.indexTitle = Qt Test C++ Classes
-qhp.QtTest.subprojects.classes.selectors = class fake:headerfile
-qhp.QtTest.subprojects.classes.sortPages = true
+qhp.QtTestLib.subprojects = classes
+qhp.QtTestLib.subprojects.classes.title = C++ Classes
+qhp.QtTestLib.subprojects.classes.indexTitle = Qt Test C++ Classes
+qhp.QtTestLib.subprojects.classes.selectors = class fake:headerfile
+qhp.QtTestLib.subprojects.classes.sortPages = true
-tagfile = ../../../doc/qttest/qttest.tags
+tagfile = ../../../doc/qttestlib/qttestlib.tags
depends += qtcore qtdoc qtwidgets qtgui
diff --git a/src/testlib/doc/snippets/code/doc_src_qsignalspy.cpp b/src/testlib/doc/snippets/code/doc_src_qsignalspy.cpp
index a0fd16f577..6741ae7942 100644
--- a/src/testlib/doc/snippets/code/doc_src_qsignalspy.cpp
+++ b/src/testlib/doc/snippets/code/doc_src_qsignalspy.cpp
@@ -79,3 +79,7 @@ QModelIndex result = qvariant_cast<QModelIndex>(spy.at(0).at(0));
//! [4]
QSignalSpy spy(myPushButton, SIGNAL(clicked(bool)));
//! [4]
+
+//! [5]
+QVERIFY(spy.wait(1000));
+//! [5]
diff --git a/src/testlib/qsignalspy.qdoc b/src/testlib/qsignalspy.qdoc
index 30ab7c8b55..d36716bf2e 100644
--- a/src/testlib/qsignalspy.qdoc
+++ b/src/testlib/qsignalspy.qdoc
@@ -94,4 +94,7 @@
Optionally the event loop can return earlier on a \a timeout (in milliseconds).
Returns true if the signal was emitted at least once in \a timeout milliseconds, otherwise returns false.
+
+ Example:
+ \snippet code/doc_src_qsignalspy.cpp 5
*/
diff --git a/src/testlib/qtestaccessible.h b/src/testlib/qtestaccessible.h
index 2642ee206a..830c5346ed 100644
--- a/src/testlib/qtestaccessible.h
+++ b/src/testlib/qtestaccessible.h
@@ -56,6 +56,8 @@
#include <QtCore/qdebug.h>
#include <QtGui/qaccessible.h>
#include <QtGui/qguiapplication.h>
+#include <QtTest/qtest_global.h>
+#include <QtTest/qtestsystem.h>
QT_BEGIN_HEADER
@@ -254,7 +256,7 @@ private:
str << "Event " << needle->object() << ", type: "
<< needle->type() << ", child: " << needle->child()
<< " not found at head of event list of size " << haystack.size() << " :";
- foreach (const QAccessibleEvent *e, haystack)
+ Q_FOREACH (const QAccessibleEvent *e, haystack)
str << ' ' << e->object() << ", type: "
<< e->type() << ", child: " << e->child();
return rc;
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index d4266c0f9d..2bfd3412c7 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -185,7 +185,7 @@ QT_BEGIN_NAMESPACE
\relates QTest
- Invokes QTRY_VERIFY_WITH_TIMEOUT() with a timeout of five seconds.
+ Checks the \a condition by invoking QTRY_VERIFY_WITH_TIMEOUT() with a timeout of five seconds.
\note This macro can only be used in a test function that is invoked
by the test framework.
@@ -215,7 +215,8 @@ QT_BEGIN_NAMESPACE
\relates QTest
- Invokes QTRY_COMPARE_WITH_TIMEOUT() with a timeout of five seconds.
+ Performs a comparison of the \a actual and \a expected values by
+ invoking QTRY_COMPARE_WITH_TIMEOUT() with a timeout of five seconds.
\note This macro can only be used in a test function that is invoked
by the test framework.
diff --git a/src/testlib/testlib.pro b/src/testlib/testlib.pro
index db908574fd..6b74f23454 100644
--- a/src/testlib/testlib.pro
+++ b/src/testlib/testlib.pro
@@ -26,6 +26,7 @@ HEADERS = qbenchmark.h \
qtesteventloop.h \
qtest_global.h \
qtest_gui.h \
+ qtest_widgets.h \
qtest.h \
qtestkeyboard.h \
qtestmouse.h \
diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro
index f2f041b704..0d4b62fd16 100644
--- a/src/tools/bootstrap/bootstrap.pro
+++ b/src/tools/bootstrap/bootstrap.pro
@@ -41,16 +41,6 @@ load(qt_module)
INCLUDEPATH += $$QT_BUILD_TREE/src/corelib/global
-DEPENDPATH += $$INCLUDEPATH \
- ../../corelib/global \
- ../../corelib/kernel \
- ../../corelib/tools \
- ../../corelib/io \
- ../../corelib/codecs \
- ../../corelib/json \
- ../../xml/dom \
- ../../xml/sax
-
SOURCES += \
../../corelib/codecs/qlatincodec.cpp \
../../corelib/codecs/qtextcodec.cpp \
@@ -139,16 +129,6 @@ win32:LIBS += -luser32 -lole32 -ladvapi32
lib.CONFIG = dummy_install
INSTALLS += lib
-# Make dummy "sis" and "freeze" target to keep recursive "make sis/freeze" working.
-sis_target.target = sis
-sis_target.commands =
-sis_target.depends = first
-QMAKE_EXTRA_TARGETS += sis_target
-freeze_target.target = freeze
-freeze_target.commands =
-freeze_target.depends = first
-QMAKE_EXTRA_TARGETS += freeze_target
-
!build_pass {
# We need the forwarding headers before their respective modules are built,
# so do a minimal syncqt run.
diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp
index 96d6e9e456..5fbbd57c22 100644
--- a/src/tools/moc/moc.cpp
+++ b/src/tools/moc/moc.cpp
@@ -831,9 +831,6 @@ static void findRequiredContainers(ClassDef *cdef, QSet<QByteArray> *requiredQtC
void Moc::generate(FILE *out)
{
-
- QDateTime dt = QDateTime::currentDateTime();
- QByteArray dstr = dt.toString().toLatin1();
QByteArray fn = filename;
int i = filename.length()-1;
while (i>0 && filename[i-1] != '/' && filename[i-1] != '\\')
@@ -842,8 +839,7 @@ void Moc::generate(FILE *out)
fn = filename.mid(i);
fprintf(out, "/****************************************************************************\n"
"** Meta object code from reading C++ file '%s'\n**\n" , fn.constData());
- fprintf(out, "** Created: %s\n"
- "** by: The Qt Meta Object Compiler version %d (Qt %s)\n**\n" , dstr.data(), mocOutputRevision, QT_VERSION_STR);
+ fprintf(out, "** Created by: The Qt Meta Object Compiler version %d (Qt %s)\n**\n" , mocOutputRevision, QT_VERSION_STR);
fprintf(out, "** WARNING! All changes made in this file will be lost!\n"
"*****************************************************************************/\n\n");
diff --git a/src/tools/qdbuscpp2xml/qdbuscpp2xml.pro b/src/tools/qdbuscpp2xml/qdbuscpp2xml.pro
index a17b91dd79..02c3655f33 100644
--- a/src/tools/qdbuscpp2xml/qdbuscpp2xml.pro
+++ b/src/tools/qdbuscpp2xml/qdbuscpp2xml.pro
@@ -19,7 +19,6 @@ SOURCES += qdbuscpp2xml.cpp \
$$QT_SOURCE_TREE/src/dbus/qdbusutil.cpp \
$$QT_SOURCE_TREE/src/dbus/qdbusmisc.cpp \
$$QT_SOURCE_TREE/src/dbus/qdbusargument.cpp \
- $$QT_SOURCE_TREE/src/dbus/qdbusmarshaller.cpp \
$$QT_SOURCE_TREE/src/dbus/qdbusextratypes.cpp \
$$QT_SOURCE_TREE/src/dbus/qdbus_symbols.cpp \
$$QT_SOURCE_TREE/src/dbus/qdbusunixfiledescriptor.cpp
diff --git a/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp b/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp
index bdc9bc30dc..786d5108fc 100644
--- a/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp
+++ b/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp
@@ -498,7 +498,7 @@ static QString stringify(const QString &data)
retval += QLatin1String("\\\"");
else
retval += data[i];
- if (data[i] == QLatin1Char('\r') && data[i+1] == QLatin1Char('\n'))
+ if (i+1 < data.length() && data[i] == QLatin1Char('\r') && data[i+1] == QLatin1Char('\n'))
i++;
retval += QLatin1String("\\n\"\n");
}
diff --git a/src/tools/qdbusxml2cpp/qdbusxml2cpp.pro b/src/tools/qdbusxml2cpp/qdbusxml2cpp.pro
index 7c2bb2e22f..b473014938 100644
--- a/src/tools/qdbusxml2cpp/qdbusxml2cpp.pro
+++ b/src/tools/qdbusxml2cpp/qdbusxml2cpp.pro
@@ -19,7 +19,6 @@ SOURCES = qdbusxml2cpp.cpp \
$$QT_SOURCE_TREE/src/dbus/qdbusutil.cpp \
$$QT_SOURCE_TREE/src/dbus/qdbusmetatype.cpp \
$$QT_SOURCE_TREE/src/dbus/qdbusargument.cpp \
- $$QT_SOURCE_TREE/src/dbus/qdbusmarshaller.cpp \
$$QT_SOURCE_TREE/src/dbus/qdbusextratypes.cpp \
$$QT_SOURCE_TREE/src/dbus/qdbus_symbols.cpp \
$$QT_SOURCE_TREE/src/dbus/qdbusunixfiledescriptor.cpp
diff --git a/src/tools/qdoc/codemarker.cpp b/src/tools/qdoc/codemarker.cpp
index 7cc6b631f6..9fe91d93e8 100644
--- a/src/tools/qdoc/codemarker.cpp
+++ b/src/tools/qdoc/codemarker.cpp
@@ -396,7 +396,7 @@ void CodeMarker::insert(FastSection &fastSection,
bool irrelevant = false;
bool inheritedMember = false;
if (!node->relates()) {
- if (node->parent() != (const InnerNode*)fastSection.innerNode && !node->parent()->isAbstract()) {
+ if (node->parent() != fastSection.parent_) { // && !node->parent()->isAbstract()) {
if (node->type() != Node::QmlProperty) {
inheritedMember = true;
}
@@ -468,7 +468,7 @@ void CodeMarker::insert(FastSection& fastSection,
(parent->subType() == Node::QmlPropertyGroup)) {
parent = parent->parent();
}
- inheritedMember = (parent != (const InnerNode*)fastSection.innerNode);
+ inheritedMember = (parent != fastSection.parent_);
if (!inheritedMember || style == Subpage) {
QString key = sortName(node);
@@ -488,24 +488,24 @@ void CodeMarker::insert(FastSection& fastSection,
}
/*!
- Returns true if \a node represents a reimplemented member function.
- If it is, then it is inserted in the reimplemented member map in the
- section \a fs. And, the test is only performed if \a status is \e OK.
- Otherwise, false is returned.
+ Returns true if \a node represents a reimplemented member
+ function in the class of the FastSection \a fs. If it is
+ a reimplemented function, then it is inserted into the
+ reimplemented member map in \a fs. The test is performed
+ only if \a status is \e OK. True is returned if \a node
+ is inserted into the map. Otherwise, false is returned.
*/
bool CodeMarker::insertReimpFunc(FastSection& fs, Node* node, Status status)
{
- if (node->access() == Node::Private)
- return false;
-
- const FunctionNode* fn = static_cast<const FunctionNode*>(node);
- if ((fn->reimplementedFrom() != 0) && (status == Okay)) {
- bool inherited = (!fn->relates() && (fn->parent() != (const InnerNode*)fs.innerNode));
- if (!inherited) {
- QString key = sortName(fn);
- if (!fs.reimpMemberMap.contains(key)) {
- fs.reimpMemberMap.insert(key,node);
- return true;
+ if ((node->access() != Node::Private) && (node->relates() == 0)) {
+ const FunctionNode* fn = static_cast<const FunctionNode*>(node);
+ if ((fn->reimplementedFrom() != 0) && (status == Okay)) {
+ if (fn->parent() == fs.parent_) {
+ QString key = sortName(fn);
+ if (!fs.reimpMemberMap.contains(key)) {
+ fs.reimpMemberMap.insert(key,node);
+ return true;
+ }
}
}
}
diff --git a/src/tools/qdoc/codemarker.h b/src/tools/qdoc/codemarker.h
index 0e699a62bf..14d33d37a0 100644
--- a/src/tools/qdoc/codemarker.h
+++ b/src/tools/qdoc/codemarker.h
@@ -82,7 +82,7 @@ struct Section
struct FastSection
{
- const InnerNode *innerNode;
+ const InnerNode *parent_;
QString name;
QString divClass;
QString singularMember;
@@ -91,12 +91,12 @@ struct FastSection
QMap<QString, Node *> reimpMemberMap;
QList<QPair<InnerNode *, int> > inherited;
- FastSection(const InnerNode *innerNode0,
+ FastSection(const InnerNode *parent,
const QString& name0,
const QString& divClass0,
const QString& singularMember0,
const QString& pluralMember0)
- : innerNode(innerNode0),
+ : parent_(parent),
name(name0),
divClass(divClass0),
singularMember(singularMember0),
diff --git a/src/tools/qdoc/cppcodemarker.cpp b/src/tools/qdoc/cppcodemarker.cpp
index 3abe4c2a65..74036f4011 100644
--- a/src/tools/qdoc/cppcodemarker.cpp
+++ b/src/tools/qdoc/cppcodemarker.cpp
@@ -449,74 +449,74 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner,
QList<Section> sections;
if (inner->type() == Node::Class) {
- const ClassNode *classe = static_cast<const ClassNode *>(inner);
+ const ClassNode *classNode = static_cast<const ClassNode *>(inner);
if (style == Summary) {
- FastSection privateFunctions(classe,
+ FastSection privateFunctions(classNode,
"Private Functions",
QString(),
"private function",
"private functions");
- FastSection privateSlots(classe, "Private Slots", QString(), "private slot", "private slots");
- FastSection privateTypes(classe, "Private Types", QString(), "private type", "private types");
- FastSection protectedFunctions(classe,
+ FastSection privateSlots(classNode, "Private Slots", QString(), "private slot", "private slots");
+ FastSection privateTypes(classNode, "Private Types", QString(), "private type", "private types");
+ FastSection protectedFunctions(classNode,
"Protected Functions",
QString(),
"protected function",
"protected functions");
- FastSection protectedSlots(classe,
+ FastSection protectedSlots(classNode,
"Protected Slots",
QString(),
"protected slot",
"protected slots");
- FastSection protectedTypes(classe,
+ FastSection protectedTypes(classNode,
"Protected Types",
QString(),
"protected type",
"protected types");
- FastSection protectedVariables(classe,
+ FastSection protectedVariables(classNode,
"Protected Variables",
QString(),
"protected type",
"protected variables");
- FastSection publicFunctions(classe,
+ FastSection publicFunctions(classNode,
"Public Functions",
QString(),
"public function",
"public functions");
- FastSection publicSignals(classe, "Signals", QString(), "signal", "signal");
- FastSection publicSlots(classe, "Public Slots", QString(), "public slot", "public slots");
- FastSection publicTypes(classe, "Public Types", QString(), "public type", "public types");
- FastSection publicVariables(classe,
+ FastSection publicSignals(classNode, "Signals", QString(), "signal", "signals");
+ FastSection publicSlots(classNode, "Public Slots", QString(), "public slot", "public slots");
+ FastSection publicTypes(classNode, "Public Types", QString(), "public type", "public types");
+ FastSection publicVariables(classNode,
"Public Variables",
QString(),
"public variable",
"public variables");
- FastSection properties(classe, "Properties", QString(), "property", "properties");
- FastSection relatedNonMembers(classe,
+ FastSection properties(classNode, "Properties", QString(), "property", "properties");
+ FastSection relatedNonMembers(classNode,
"Related Non-Members",
QString(),
"related non-member",
"related non-members");
- FastSection staticPrivateMembers(classe,
+ FastSection staticPrivateMembers(classNode,
"Static Private Members",
QString(),
"static private member",
"static private members");
- FastSection staticProtectedMembers(classe,
+ FastSection staticProtectedMembers(classNode,
"Static Protected Members",
QString(),
"static protected member",
"static protected members");
- FastSection staticPublicMembers(classe,
+ FastSection staticPublicMembers(classNode,
"Static Public Members",
QString(),
"static public member",
"static public members");
FastSection macros(inner, "Macros", QString(), "macro", "macros");
- NodeList::ConstIterator r = classe->relatedNodes().constBegin();
- while (r != classe->relatedNodes().constEnd()) {
+ NodeList::ConstIterator r = classNode->relatedNodes().constBegin();
+ while (r != classNode->relatedNodes().constEnd()) {
if ((*r)->type() == Node::Function) {
FunctionNode *func = static_cast<FunctionNode *>(*r);
if (func->isMacro())
@@ -531,7 +531,7 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner,
}
QStack<const ClassNode *> stack;
- stack.push(classe);
+ stack.push(classNode);
while (!stack.isEmpty()) {
const ClassNode *ancestorClass = stack.pop();
@@ -566,8 +566,7 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner,
insert(publicSignals, *c, style, status);
}
else if (isStatic) {
- if ((*c)->type() != Node::Variable
- || !(*c)->doc().isEmpty())
+ if ((*c)->type() != Node::Variable || !(*c)->doc().isEmpty())
insert(staticPublicMembers,*c,style,status);
}
else if ((*c)->type() == Node::Property) {
@@ -578,8 +577,9 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner,
insert(publicVariables, *c, style, status);
}
else if ((*c)->type() == Node::Function) {
- if (!insertReimpFunc(publicFunctions,*c,status))
+ if (!insertReimpFunc(publicFunctions,*c,status)) {
insert(publicFunctions, *c, style, status);
+ }
}
else {
insert(publicTypes, *c, style, status);
@@ -590,8 +590,7 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner,
insert(protectedSlots, *c, style, status);
}
else if (isStatic) {
- if ((*c)->type() != Node::Variable
- || !(*c)->doc().isEmpty())
+ if ((*c)->type() != Node::Variable || !(*c)->doc().isEmpty())
insert(staticProtectedMembers,*c,style,status);
}
else if ((*c)->type() == Node::Variable) {
@@ -599,8 +598,9 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner,
insert(protectedVariables,*c,style,status);
}
else if ((*c)->type() == Node::Function) {
- if (!insertReimpFunc(protectedFunctions,*c,status))
+ if (!insertReimpFunc(protectedFunctions,*c,status)) {
insert(protectedFunctions, *c, style, status);
+ }
}
else {
insert(protectedTypes, *c, style, status);
@@ -611,13 +611,13 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner,
insert(privateSlots, *c, style, status);
}
else if (isStatic) {
- if ((*c)->type() != Node::Variable
- || !(*c)->doc().isEmpty())
+ if ((*c)->type() != Node::Variable || !(*c)->doc().isEmpty())
insert(staticPrivateMembers,*c,style,status);
}
else if ((*c)->type() == Node::Function) {
- if (!insertReimpFunc(privateFunctions,*c,status))
+ if (!insertReimpFunc(privateFunctions,*c,status)) {
insert(privateFunctions, *c, style, status);
+ }
}
else {
insert(privateTypes,*c,style,status);
@@ -654,15 +654,15 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner,
append(sections, macros);
}
else if (style == Detailed) {
- FastSection memberFunctions(classe,"Member Function Documentation","func","member","members");
- FastSection memberTypes(classe,"Member Type Documentation","types","member","members");
- FastSection memberVariables(classe,"Member Variable Documentation","vars","member","members");
- FastSection properties(classe,"Property Documentation","prop","member","members");
- FastSection relatedNonMembers(classe,"Related Non-Members","relnonmem","member","members");
- FastSection macros(classe,"Macro Documentation","macros","member","members");
-
- NodeList::ConstIterator r = classe->relatedNodes().constBegin();
- while (r != classe->relatedNodes().constEnd()) {
+ FastSection memberFunctions(classNode,"Member Function Documentation","func","member","members");
+ FastSection memberTypes(classNode,"Member Type Documentation","types","member","members");
+ FastSection memberVariables(classNode,"Member Variable Documentation","vars","member","members");
+ FastSection properties(classNode,"Property Documentation","prop","member","members");
+ FastSection relatedNonMembers(classNode,"Related Non-Members","relnonmem","member","members");
+ FastSection macros(classNode,"Macro Documentation","macros","member","members");
+
+ NodeList::ConstIterator r = classNode->relatedNodes().constBegin();
+ while (r != classNode->relatedNodes().constEnd()) {
if ((*r)->type() == Node::Function) {
FunctionNode *func = static_cast<FunctionNode *>(*r);
if (func->isMacro())
@@ -676,8 +676,8 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner,
++r;
}
- NodeList::ConstIterator c = classe->childNodes().constBegin();
- while (c != classe->childNodes().constEnd()) {
+ NodeList::ConstIterator c = classNode->childNodes().constBegin();
+ while (c != classNode->childNodes().constEnd()) {
if ((*c)->type() == Node::Enum ||
(*c)->type() == Node::Typedef) {
insert(memberTypes, *c, style, status);
@@ -705,10 +705,10 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner,
append(sections, macros);
}
else {
- FastSection all(classe,QString(),QString(),"member","members");
+ FastSection all(classNode,QString(),QString(),"member","members");
QStack<const ClassNode *> stack;
- stack.push(classe);
+ stack.push(classNode);
while (!stack.isEmpty()) {
const ClassNode *ancestorClass = stack.pop();
diff --git a/src/tools/qdoc/generator.cpp b/src/tools/qdoc/generator.cpp
index 50687d8014..d9aed3ed06 100644
--- a/src/tools/qdoc/generator.cpp
+++ b/src/tools/qdoc/generator.cpp
@@ -1529,9 +1529,9 @@ void Generator::initialize(const Config &config)
if (outputFormats.contains((*g)->format())) {
currentGenerator_ = (*g);
(*g)->initializeGenerator(config);
- QStringList extraImages = config.getCleanPathList((*g)->format() +
- Config::dot +
- CONFIG_EXTRAIMAGES);
+ QStringList extraImages = config.getPathList((*g)->format() +
+ Config::dot +
+ CONFIG_EXTRAIMAGES);
QStringList::ConstIterator e = extraImages.constBegin();
while (e != extraImages.constEnd()) {
QString filePath = *e;
diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp
index 1a8425b5ce..6c0248362c 100644
--- a/src/tools/qdoc/htmlgenerator.cpp
+++ b/src/tools/qdoc/htmlgenerator.cpp
@@ -3502,6 +3502,10 @@ QString HtmlGenerator::getLink(const Atom *atom, const Node *relative, const Nod
}
if (!*node) {
*node = qdb_->findUnambiguousTarget(first, ref, relative);
+ if (*node && !(*node)->url().isEmpty() && !ref.isEmpty()) {
+ QString final = (*node)->url() + "#" + ref;
+ return final;
+ }
}
}
if (*node) {
diff --git a/src/tools/qdoc/node.h b/src/tools/qdoc/node.h
index f93e777d84..88be423478 100644
--- a/src/tools/qdoc/node.h
+++ b/src/tools/qdoc/node.h
@@ -822,13 +822,8 @@ private:
QString rt;
QStringList pp;
-#ifdef Q_WS_WIN
Metaness met;
Virtualness vir;
-#else
- Metaness met : 4;
- Virtualness vir : 2;
-#endif
bool con : 1;
bool sta : 1;
bool ove : 1;
diff --git a/src/tools/qdoc/qdoc.pro b/src/tools/qdoc/qdoc.pro
index b489668059..c0f3cd70d1 100644
--- a/src/tools/qdoc/qdoc.pro
+++ b/src/tools/qdoc/qdoc.pro
@@ -5,9 +5,6 @@ DEFINES += QDOC2_COMPAT
INCLUDEPATH += $$QT_SOURCE_TREE/src/tools/qdoc \
$$QT_SOURCE_TREE/src/tools/qdoc/qmlparser
-DEPENDPATH += $$QT_SOURCE_TREE/src/tools/qdoc \
- $$QT_SOURCE_TREE/src/tools/qdoc/qmlparser
-
# Increase the stack size on MSVC to 4M to avoid a stack overflow
win32-msvc*:{
QMAKE_LFLAGS += /STACK:4194304
diff --git a/src/tools/qdoc/qdocdatabase.cpp b/src/tools/qdoc/qdocdatabase.cpp
index fa5b2c013f..806b7b1d48 100644
--- a/src/tools/qdoc/qdocdatabase.cpp
+++ b/src/tools/qdoc/qdocdatabase.cpp
@@ -684,14 +684,15 @@ const Node* QDocDatabase::findNodeForTarget(const QString& target, const Node* r
Inserts a new target into the target table with the specified
\a name, \a node, and \a priority.
*/
-void QDocDatabase::insertTarget(const QString& name, Node* node, int priority)
+void QDocDatabase::insertTarget(const QString& name, TargetRec::Type type, Node* node, int priority)
{
- Target target;
+ TargetRec target;
+ target.type_ = type;
target.node_ = node;
target.priority_ = priority;
Atom a = Atom(Atom::Target, name);
target.ref_ = refForAtom(&a);
- targetMultiMap_.insert(name, target);
+ targetRecMultiMap_.insert(name, target);
}
/*!
@@ -701,16 +702,16 @@ void QDocDatabase::insertTarget(const QString& name, Node* node, int priority)
const Node*
QDocDatabase::findUnambiguousTarget(const QString& target, QString& ref, const Node* relative)
{
- Target bestTarget;
+ TargetRec bestTarget;
int numBestTargets = 0;
- QList<Target> bestTargetList;
+ QList<TargetRec> bestTargetList;
QString key = Doc::canonicalTitle(target);
- TargetMultiMap::iterator i = targetMultiMap_.find(key);
- while (i != targetMultiMap_.end()) {
+ TargetRecMultiMap::iterator i = targetRecMultiMap_.find(key);
+ while (i != targetRecMultiMap_.end()) {
if (i.key() != key)
break;
- const Target& candidate = i.value();
+ const TargetRec& candidate = i.value();
if (candidate.priority_ < bestTarget.priority_) {
bestTarget = candidate;
bestTargetList.clear();
@@ -808,14 +809,14 @@ const DocNode* QDocDatabase::findDocNodeByTitle(const QString& title, const Node
QString QDocDatabase::findTarget(const QString& target, const Node* node) const
{
QString key = Doc::canonicalTitle(target);
- TargetMultiMap::const_iterator i = targetMultiMap_.constFind(key);
+ TargetRecMultiMap::const_iterator i = targetRecMultiMap_.constFind(key);
- if (i != targetMultiMap_.constEnd()) {
+ if (i != targetRecMultiMap_.constEnd()) {
do {
if (i.value().node_ == node)
return i.value().ref_;
++i;
- } while (i != targetMultiMap_.constEnd() && i.key() == key);
+ } while (i != targetRecMultiMap_.constEnd() && i.key() == key);
}
return QString();
}
@@ -840,7 +841,7 @@ void QDocDatabase::resolveTargets(InnerNode* root)
if (child->doc().hasTableOfContents()) {
const QList<Atom*>& toc = child->doc().tableOfContents();
- Target target;
+ TargetRec target;
target.node_ = child;
target.priority_ = 3;
@@ -849,32 +850,32 @@ void QDocDatabase::resolveTargets(InnerNode* root)
QString title = Text::sectionHeading(toc.at(i)).toString();
if (!title.isEmpty()) {
QString key = Doc::canonicalTitle(title);
- targetMultiMap_.insert(key, target);
+ targetRecMultiMap_.insert(key, target);
}
}
}
if (child->doc().hasKeywords()) {
const QList<Atom*>& keywords = child->doc().keywords();
- Target target;
+ TargetRec target;
target.node_ = child;
target.priority_ = 1;
for (int i = 0; i < keywords.size(); ++i) {
target.ref_ = refForAtom(keywords.at(i));
QString key = Doc::canonicalTitle(keywords.at(i)->string());
- targetMultiMap_.insert(key, target);
+ targetRecMultiMap_.insert(key, target);
}
}
if (child->doc().hasTargets()) {
const QList<Atom*>& toc = child->doc().targets();
- Target target;
+ TargetRec target;
target.node_ = child;
target.priority_ = 2;
for (int i = 0; i < toc.size(); ++i) {
target.ref_ = refForAtom(toc.at(i));
QString key = Doc::canonicalTitle(toc.at(i)->string());
- targetMultiMap_.insert(key, target);
+ targetRecMultiMap_.insert(key, target);
}
}
}
diff --git a/src/tools/qdoc/qdocdatabase.h b/src/tools/qdoc/qdocdatabase.h
index 2a91693c02..d715b71e23 100644
--- a/src/tools/qdoc/qdocdatabase.h
+++ b/src/tools/qdoc/qdocdatabase.h
@@ -65,21 +65,23 @@ enum FindFlag {
NonFunction = 0x4
};
-class QDocDatabase
+struct TargetRec
{
+ public:
+ enum Type { Unknown, Target, Keyword, Contents, Class, Function, Page, Subtitle };
+ TargetRec() : node_(0), priority_(INT_MAX), type_(Unknown) { }
+ bool isEmpty() const { return ref_.isEmpty(); }
+ //void debug(int idx, const QString& key);
+ Node* node_;
+ QString ref_;
+ int priority_;
+ Type type_;
+};
+typedef QMultiMap<QString, TargetRec> TargetRecMultiMap;
- struct Target
- {
- public:
- Target() : node_(0), priority_(INT_MAX) { }
- bool isEmpty() const { return ref_.isEmpty(); }
- //void debug(int idx, const QString& key);
- Node* node_;
- QString ref_;
- int priority_;
- };
- typedef QMultiMap<QString, Target> TargetMultiMap;
+class QDocDatabase
+{
public:
static QDocDatabase* qdocDB();
static void destroyQdocDB();
@@ -127,7 +129,7 @@ class QDocDatabase
const Node* resolveTarget(const QString& target, const Node* relative, const Node* self=0);
const Node* findNodeForTarget(const QString& target, const Node* relative);
- void insertTarget(const QString& name, Node* node, int priority);
+ void insertTarget(const QString& name, TargetRec::Type type, Node* node, int priority);
/* convenience functions
Many of these will be either eliminated or replaced.
@@ -226,7 +228,7 @@ class QDocDatabase
NodeMapMap funcIndex_;
TextToNodeMap legaleseTexts_;
DocNodeMultiMap docNodesByTitle_;
- TargetMultiMap targetMultiMap_;
+ TargetRecMultiMap targetRecMultiMap_;
};
QT_END_NAMESPACE
diff --git a/src/tools/qdoc/qdocindexfiles.cpp b/src/tools/qdoc/qdocindexfiles.cpp
index 2db5db3714..fec4f304e3 100644
--- a/src/tools/qdoc/qdocindexfiles.cpp
+++ b/src/tools/qdoc/qdocindexfiles.cpp
@@ -381,15 +381,15 @@ void QDocIndexFiles::readIndexSection(const QDomElement& element,
location = Location(parent->name().toLower() + ".html");
}
else if (element.nodeName() == "keyword") {
- qdb_->insertTarget(name, parent,1);
+ qdb_->insertTarget(name, TargetRec::Keyword, parent, 1);
return;
}
else if (element.nodeName() == "target") {
- qdb_->insertTarget(name, parent,2);
+ qdb_->insertTarget(name, TargetRec::Target, parent, 2);
return;
}
else if (element.nodeName() == "contents") {
- qdb_->insertTarget(name, parent,3);
+ qdb_->insertTarget(name, TargetRec::Contents, parent, 3);
return;
}
else
diff --git a/src/tools/qdoc/tree.cpp b/src/tools/qdoc/tree.cpp
index c622fb929b..e7a8f5b5d0 100644
--- a/src/tools/qdoc/tree.cpp
+++ b/src/tools/qdoc/tree.cpp
@@ -398,6 +398,11 @@ void Tree::addPropertyFunction(PropertyNode* property,
}
/*!
+ This function resolves inheritance and reimplementation settings
+ for each class node found in the namspace beginning ar \a rootNode.
+ If it finds another namespace node in the child list of \a rootNode,
+ it calls itself recursively. For each child of \a rootNode that is a
+ class node, it calls the other resolveInheritance() function.
*/
void Tree::resolveInheritance(NamespaceNode* rootNode)
{
@@ -475,11 +480,24 @@ void Tree::resolveProperties()
}
/*!
+ This function is run twice for each \a classNode in the
+ tree. First it is run with \a pass set to 0 for each
+ \a classNode. Then it is run with \a pass set to 1 for
+ each \a classNode.
+
+ In \a pass 0, all the base classes of \a classNode are
+ found and added to the base class list for \a classNode.
+
+ In \a pass 1, each child of \a classNode that is a function
+ that is reimplemented from one of the base classes is marked
+ as being reimplemented from that class.
+
+ Some property node fixing up is also done in \a pass 1.
*/
-void Tree::resolveInheritance(int pass, ClassNode* classe)
+void Tree::resolveInheritance(int pass, ClassNode* classNode)
{
if (pass == 0) {
- QList<InheritanceBound> bounds = unresolvedInheritanceMap[classe];
+ QList<InheritanceBound> bounds = unresolvedInheritanceMap[classNode];
QList<InheritanceBound>::ConstIterator b = bounds.constBegin();
while (b != bounds.constEnd()) {
Node* n = findClassNode((*b).basePath);
@@ -487,17 +505,17 @@ void Tree::resolveInheritance(int pass, ClassNode* classe)
n = findClassNode((*b).basePath, (*b).parent);
}
if (n) {
- classe->addBaseClass((*b).access, static_cast<ClassNode*>(n), (*b).dataTypeWithTemplateArgs);
+ classNode->addBaseClass((*b).access, static_cast<ClassNode*>(n), (*b).dataTypeWithTemplateArgs);
}
++b;
}
}
else {
- NodeList::ConstIterator c = classe->childNodes().constBegin();
- while (c != classe->childNodes().constEnd()) {
+ NodeList::ConstIterator c = classNode->childNodes().constBegin();
+ while (c != classNode->childNodes().constEnd()) {
if ((*c)->type() == Node::Function) {
FunctionNode* func = (FunctionNode*)* c;
- FunctionNode* from = findVirtualFunctionInBaseClasses(classe, func);
+ FunctionNode* from = findVirtualFunctionInBaseClasses(classNode, func);
if (from != 0) {
if (func->virtualness() == FunctionNode::NonVirtual)
func->setVirtualness(FunctionNode::ImpureVirtual);
@@ -505,7 +523,7 @@ void Tree::resolveInheritance(int pass, ClassNode* classe)
}
}
else if ((*c)->type() == Node::Property) {
- fixPropertyUsingBaseClasses(classe, static_cast<PropertyNode*>(*c));
+ fixPropertyUsingBaseClasses(classNode, static_cast<PropertyNode*>(*c));
}
++c;
}
@@ -551,11 +569,11 @@ void Tree::fixInheritance(NamespaceNode* rootNode)
/*!
*/
-FunctionNode* Tree::findVirtualFunctionInBaseClasses(ClassNode* classe,
+FunctionNode* Tree::findVirtualFunctionInBaseClasses(ClassNode* classNode,
FunctionNode* clone)
{
- QList<RelatedClass>::ConstIterator r = classe->baseClasses().constBegin();
- while (r != classe->baseClasses().constEnd()) {
+ QList<RelatedClass>::ConstIterator r = classNode->baseClasses().constBegin();
+ while (r != classNode->baseClasses().constEnd()) {
FunctionNode* func;
if (((func = findVirtualFunctionInBaseClasses((*r).node, clone)) != 0 ||
(func = (*r).node->findFunctionNode(clone)) != 0)) {
@@ -569,10 +587,10 @@ FunctionNode* Tree::findVirtualFunctionInBaseClasses(ClassNode* classe,
/*!
*/
-void Tree::fixPropertyUsingBaseClasses(ClassNode* classe, PropertyNode* property)
+void Tree::fixPropertyUsingBaseClasses(ClassNode* classNode, PropertyNode* property)
{
- QList<RelatedClass>::const_iterator r = classe->baseClasses().constBegin();
- while (r != classe->baseClasses().constEnd()) {
+ QList<RelatedClass>::const_iterator r = classNode->baseClasses().constBegin();
+ while (r != classNode->baseClasses().constEnd()) {
Node* n = r->node->findChildNodeByNameAndType(property->name(), Node::Property);
if (n) {
PropertyNode* baseProperty = static_cast<PropertyNode*>(n);
@@ -588,10 +606,10 @@ void Tree::fixPropertyUsingBaseClasses(ClassNode* classe, PropertyNode* property
/*!
*/
-NodeList Tree::allBaseClasses(const ClassNode* classe) const
+NodeList Tree::allBaseClasses(const ClassNode* classNode) const
{
NodeList result;
- foreach (const RelatedClass& r, classe->baseClasses()) {
+ foreach (const RelatedClass& r, classNode->baseClasses()) {
result += r.node;
result += allBaseClasses(r.node);
}
diff --git a/src/tools/rcc/rcc.cpp b/src/tools/rcc/rcc.cpp
index 969b644d84..fb952e2970 100644
--- a/src/tools/rcc/rcc.cpp
+++ b/src/tools/rcc/rcc.cpp
@@ -793,9 +793,7 @@ bool RCCResourceLibrary::writeHeader()
writeString("/****************************************************************************\n");
writeString("** Resource object code\n");
writeString("**\n");
- writeString("** Created: ");
- writeByteArray(QDateTime::currentDateTime().toString().toLatin1());
- writeString("\n** by: The Resource Compiler for Qt version ");
+ writeString("** Created by: The Resource Compiler for Qt version ");
writeByteArray(QT_VERSION_STR);
writeString("\n**\n");
writeString("** WARNING! All changes made in this file will be lost!\n");
diff --git a/src/tools/tools.pro b/src/tools/tools.pro
index f7d1e651ff..fa9ed54c50 100644
--- a/src/tools/tools.pro
+++ b/src/tools/tools.pro
@@ -4,20 +4,20 @@ TOOLS_SUBDIRS = src_tools_bootstrap src_tools_moc src_tools_rcc src_tools_qdoc
contains(QT_CONFIG, dbus): TOOLS_SUBDIRS += src_tools_qdbusxml2cpp src_tools_qdbuscpp2xml
!contains(QT_CONFIG, no-widgets): TOOLS_SUBDIRS += src_tools_uic
# Set subdir and respective target name
-src_tools_bootstrap.subdir = $$PWD/bootstrap
+src_tools_bootstrap.subdir = bootstrap
src_tools_bootstrap.target = sub-tools-bootstrap
-src_tools_moc.subdir = $$PWD/moc
+src_tools_moc.subdir = moc
src_tools_moc.target = sub-moc
-src_tools_rcc.subdir = $$PWD/rcc
+src_tools_rcc.subdir = rcc
src_tools_rcc.target = sub-rcc
-src_tools_uic.subdir = $$PWD/uic
+src_tools_uic.subdir = uic
src_tools_uic.target = sub-uic
-src_tools_qdoc.subdir = $$QT_SOURCE_TREE/src/tools/qdoc
+src_tools_qdoc.subdir = qdoc
src_tools_qdoc.target = sub-qdoc
contains(QT_CONFIG, dbus) {
- src_tools_qdbusxml2cpp.subdir = $$QT_SOURCE_TREE/src/tools/qdbusxml2cpp
+ src_tools_qdbusxml2cpp.subdir = qdbusxml2cpp
src_tools_qdbusxml2cpp.target = sub-qdbusxml2cpp
- src_tools_qdbuscpp2xml.subdir = $$QT_SOURCE_TREE/src/tools/qdbuscpp2xml
+ src_tools_qdbuscpp2xml.subdir = qdbuscpp2xml
src_tools_qdbuscpp2xml.target = sub-qdbuscpp2xml
}
diff --git a/src/tools/uic/uic.cpp b/src/tools/uic/uic.cpp
index 38b4780ec9..1188271d99 100644
--- a/src/tools/uic/uic.cpp
+++ b/src/tools/uic/uic.cpp
@@ -134,8 +134,7 @@ void Uic::writeCopyrightHeader(DomUI *ui)
out << "/********************************************************************************\n";
out << "** Form generated from reading UI file '" << QFileInfo(opt.inputFile).fileName() << "'\n";
out << "**\n";
- out << "** Created: " << QDateTime::currentDateTime().toString() << "\n";
- out << "** " << QString::fromLatin1("by: Qt User Interface Compiler version %1\n").arg(QLatin1String(QT_VERSION_STR));
+ out << "** Created by: Qt User Interface Compiler version " << QLatin1String(QT_VERSION_STR) << "\n";
out << "**\n";
out << "** WARNING! All changes made in this file will be lost when recompiling UI file!\n";
out << "********************************************************************************/\n\n";
diff --git a/src/widgets/accessible/qaccessiblewidget.cpp b/src/widgets/accessible/qaccessiblewidget.cpp
index c8a22175fc..2177b2b262 100644
--- a/src/widgets/accessible/qaccessiblewidget.cpp
+++ b/src/widgets/accessible/qaccessiblewidget.cpp
@@ -162,7 +162,6 @@ public:
QAccessible::Role role;
QString name;
QStringList primarySignals;
- const QAccessibleInterface *asking;
};
/*!
@@ -201,7 +200,6 @@ QAccessibleWidget::QAccessibleWidget(QWidget *w, QAccessible::Role role, const Q
d = new QAccessibleWidgetPrivate();
d->role = role;
d->name = name;
- d->asking = 0;
}
/*! \reimp */
diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp
index 7b47f4e135..290f0a7f65 100644
--- a/src/widgets/dialogs/qdialog.cpp
+++ b/src/widgets/dialogs/qdialog.cpp
@@ -67,8 +67,10 @@ static inline int themeDialogType(const QDialog *dialog)
if (qobject_cast<const QFileDialog *>(dialog))
return QPlatformTheme::FileDialog;
#endif
+#ifndef QT_NO_COLORDIALOG
if (qobject_cast<const QColorDialog *>(dialog))
return QPlatformTheme::ColorDialog;
+#endif
#ifndef QT_NO_FONTDIALOG
if (qobject_cast<const QFontDialog *>(dialog))
return QPlatformTheme::FontDialog;
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp
index fc8b62d75e..88652271af 100644
--- a/src/widgets/dialogs/qfiledialog.cpp
+++ b/src/widgets/dialogs/qfiledialog.cpp
@@ -363,7 +363,7 @@ QFileDialog::QFileDialog(const QFileDialogArgs &args)
QFileDialog::~QFileDialog()
{
#ifndef QT_NO_SETTINGS
- QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
+ QSettings settings(QSettings::UserScope, QLatin1String("QtProject"));
settings.beginGroup(QLatin1String("Qt"));
settings.setValue(QLatin1String("filedialog"), saveState());
#endif
@@ -2229,7 +2229,7 @@ void QFileDialogPrivate::init(const QString &directory, const QString &nameFilte
q->setFileMode(QFileDialog::AnyFile);
#ifndef QT_NO_SETTINGS
- QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
+ QSettings settings(QSettings::UserScope, QLatin1String("QtProject"));
settings.beginGroup(QLatin1String("Qt"));
if (!directory.isEmpty())
setLastVisitedDirectory(workingDirectory(directory));
diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp
index 1bab8b7785..e93850c1b7 100644
--- a/src/widgets/dialogs/qmessagebox.cpp
+++ b/src/widgets/dialogs/qmessagebox.cpp
@@ -240,7 +240,7 @@ void QMessageBoxPrivate::init(const QString &title, const QString &text)
label->setTextInteractionFlags(Qt::TextInteractionFlags(q->style()->styleHint(QStyle::SH_MessageBox_TextInteractionFlags, 0, q)));
label->setAlignment(Qt::AlignVCenter | Qt::AlignLeft);
label->setOpenExternalLinks(true);
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
label->setContentsMargins(16, 0, 0, 0);
#else
label->setContentsMargins(2, 0, 0, 0);
@@ -258,7 +258,7 @@ void QMessageBoxPrivate::init(const QString &title, const QString &text)
q, SLOT(_q_buttonClicked(QAbstractButton*)));
QGridLayout *grid = new QGridLayout;
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
grid->addWidget(iconLabel, 0, 0, 2, 1, Qt::AlignTop);
grid->addWidget(label, 0, 1, 1, 1);
// -- leave space for information label --
@@ -285,7 +285,7 @@ void QMessageBoxPrivate::init(const QString &title, const QString &text)
}
q->setModal(true);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QFont f = q->font();
f.setBold(true);
label->setFont(f);
@@ -316,7 +316,7 @@ void QMessageBoxPrivate::updateSize()
if (screenSize.width() <= 1024)
hardLimit = screenSize.width();
#endif
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
int softLimit = qMin(screenSize.width()/2, 420);
#else
// note: ideally on windows, hard and soft limits but it breaks compat
@@ -1328,7 +1328,7 @@ void QMessageBox::changeEvent(QEvent *ev)
}
case QEvent::FontChange:
case QEvent::ApplicationFontChange:
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
{
QFont f = font();
f.setBold(true);
@@ -1348,12 +1348,12 @@ void QMessageBox::keyPressEvent(QKeyEvent *e)
{
Q_D(QMessageBox);
if (e->key() == Qt::Key_Escape
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
|| (e->modifiers() == Qt::ControlModifier && e->key() == Qt::Key_Period)
#endif
) {
if (d->detectedEscapeButton) {
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
d->detectedEscapeButton->animateClick();
#else
d->detectedEscapeButton->click();
@@ -1687,7 +1687,7 @@ QMessageBox::StandardButton QMessageBox::critical(QWidget *parent, const QString
*/
void QMessageBox::about(QWidget *parent, const QString &title, const QString &text)
{
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
static QPointer<QMessageBox> oldMsgBox;
if (oldMsgBox && oldMsgBox->text() == text) {
@@ -1699,7 +1699,7 @@ void QMessageBox::about(QWidget *parent, const QString &title, const QString &te
#endif
QMessageBox *msgBox = new QMessageBox(title, text, Information, 0, 0, 0, parent
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
, Qt::WindowTitleHint | Qt::WindowSystemMenuHint
#endif
);
@@ -1709,7 +1709,7 @@ void QMessageBox::about(QWidget *parent, const QString &title, const QString &te
msgBox->setIconPixmap(icon.pixmap(size));
// should perhaps be a style hint
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
oldMsgBox = msgBox;
#if 0
// ### doesn't work until close button is enabled in title bar
@@ -1740,7 +1740,7 @@ void QMessageBox::about(QWidget *parent, const QString &title, const QString &te
*/
void QMessageBox::aboutQt(QWidget *parent, const QString &title)
{
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
static QPointer<QMessageBox> oldMsgBox;
if (oldMsgBox) {
@@ -1802,7 +1802,7 @@ void QMessageBox::aboutQt(QWidget *parent, const QString &title)
#endif
// should perhaps be a style hint
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
oldMsgBox = msgBox;
#if 0
// ### doesn't work until close button is enabled in title bar
@@ -2467,7 +2467,7 @@ void QMessageBox::setInformativeText(const QString &text)
layout()->removeWidget(d->informativeLabel);
delete d->informativeLabel;
d->informativeLabel = 0;
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
d->label->setContentsMargins(2, 0, 0, 0);
#endif
d->updateSize();
@@ -2481,7 +2481,7 @@ void QMessageBox::setInformativeText(const QString &text)
label->setAlignment(Qt::AlignTop | Qt::AlignLeft);
label->setOpenExternalLinks(true);
label->setWordWrap(true);
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
d->label->setContentsMargins(2, 0, 0, 0);
label->setContentsMargins(2, 0, 0, 6);
label->setIndent(9);
@@ -2511,7 +2511,7 @@ void QMessageBox::setInformativeText(const QString &text)
void QMessageBox::setWindowTitle(const QString &title)
{
// Message boxes on the mac do not have a title
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
QDialog::setWindowTitle(title);
#else
Q_UNUSED(title);
diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp
index 44518ec7d5..241e9f678a 100644
--- a/src/widgets/dialogs/qwizard.cpp
+++ b/src/widgets/dialogs/qwizard.cpp
@@ -916,7 +916,7 @@ QWizardLayoutInfo QWizardPrivate::layoutInfoForCurrentPage()
info.buttonSpacing = 12;
info.wizStyle = wizStyle;
- if ((info.wizStyle == QWizard::AeroStyle)
+ if (info.wizStyle == QWizard::AeroStyle
#if !defined(QT_NO_STYLE_WINDOWSVISTA)
&& (QVistaHelper::vistaState() == QVistaHelper::Classic || vistaDisabled())
#endif
diff --git a/src/widgets/doc/images/dialog-examples.png b/src/widgets/doc/images/dialog-examples.png
new file mode 100644
index 0000000000..26537b5de3
--- /dev/null
+++ b/src/widgets/doc/images/dialog-examples.png
Binary files differ
diff --git a/src/widgets/doc/images/graphicsview-examples.png b/src/widgets/doc/images/graphicsview-examples.png
new file mode 100644
index 0000000000..8889424023
--- /dev/null
+++ b/src/widgets/doc/images/graphicsview-examples.png
Binary files differ
diff --git a/src/widgets/doc/images/itemviews-examples.png b/src/widgets/doc/images/itemviews-examples.png
new file mode 100644
index 0000000000..a151ea857f
--- /dev/null
+++ b/src/widgets/doc/images/itemviews-examples.png
Binary files differ
diff --git a/src/widgets/doc/images/mainwindow-examples.png b/src/widgets/doc/images/mainwindow-examples.png
new file mode 100644
index 0000000000..3e946a68bf
--- /dev/null
+++ b/src/widgets/doc/images/mainwindow-examples.png
Binary files differ
diff --git a/src/widgets/doc/qtwidgets.qdocconf b/src/widgets/doc/qtwidgets.qdocconf
index 0e4ea0351b..062adc7f7c 100644
--- a/src/widgets/doc/qtwidgets.qdocconf
+++ b/src/widgets/doc/qtwidgets.qdocconf
@@ -3,21 +3,21 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
project = QtWidgets
description = Qt Widgets Reference Documentation
url = http://qt-project.org/doc/qtwidgets
-version = 5.0.0
+version = 5.0.1
examplesinstallpath = widgets
qhp.projects = QtWidgets
qhp.QtWidgets.file = qtwidgets.qhp
-qhp.QtWidgets.namespace = org.qt-project.qtwidgets.500
+qhp.QtWidgets.namespace = org.qt-project.qtwidgets.501
qhp.QtWidgets.virtualFolder = qtwidgets
qhp.QtWidgets.indexTitle = Qt Widgets
qhp.QtWidgets.indexRoot =
-qhp.QtWidgets.filterAttributes = qtwidgets 5.0.0 qtrefdoc
-qhp.QtWidgets.customFilters.Qt.name = QtWidgets 5.0.0
-qhp.QtWidgets.customFilters.Qt.filterAttributes = qtwidgets 5.0.0
+qhp.QtWidgets.filterAttributes = qtwidgets 5.0.1 qtrefdoc
+qhp.QtWidgets.customFilters.Qt.name = QtWidgets 5.0.1
+qhp.QtWidgets.customFilters.Qt.filterAttributes = qtwidgets 5.0.1
qhp.QtWidgets.subprojects = classes
qhp.QtWidgets.subprojects.classes.title = C++ Classes
@@ -27,7 +27,7 @@ qhp.QtWidgets.subprojects.classes.sortPages = true
tagfile = ../../../doc/qtwidgets/qtwidgets.tags
-depends += qtcore qtgui qtdoc qtsql
+depends += qtcore qtgui qtdoc qtsql qtdesigner
headerdirs += ..
diff --git a/src/widgets/doc/snippets/code/src_gui_kernel_qapplication.cpp b/src/widgets/doc/snippets/code/src_gui_kernel_qapplication.cpp
index aa562078a6..b4b1eb5a00 100644
--- a/src/widgets/doc/snippets/code/src_gui_kernel_qapplication.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_kernel_qapplication.cpp
@@ -39,23 +39,25 @@
****************************************************************************/
//! [0]
-int main(int argc, char **argv)
+QCoreApplication* createApplication(int &argc, char *argv[])
{
-#ifdef Q_WS_X11
- bool useGUI = getenv("DISPLAY") != 0;
-#else
- bool useGUI = true;
-#endif
- QApplication app(argc, argv, useGUI);
-
- if (useGUI) {
- // start GUI version
- ...
+ for (int i = 1; i < argc; ++i)
+ if (!qstrcmp(argv[i], "-no-gui"))
+ return new QCoreApplication(argc, argv);
+ return new QApplication(argc, argv);
+}
+
+int main(int argc, char* argv[])
+{
+ QScopedPointer<QCoreApplication> app(createApplication(argc, argv));
+
+ if (qobject_cast<QApplication *>(app.data())) {
+ // start GUI version...
} else {
- // start non-GUI version
- ...
+ // start non-GUI version...
}
- return app.exec();
+
+ return app->exec();
}
//! [0]
diff --git a/src/widgets/doc/src/model-view-programming.qdoc b/src/widgets/doc/src/model-view-programming.qdoc
index 804c91cea4..c665a8dba6 100644
--- a/src/widgets/doc/src/model-view-programming.qdoc
+++ b/src/widgets/doc/src/model-view-programming.qdoc
@@ -1943,9 +1943,6 @@
other components and applications can understand.
\endlist
- For more information, see the \l
- {"Item View Classes" Chapter of C++ GUI Programming with Qt 4}.
-
\section2 Item data handling
Models can provide varying levels of access to the data they provide: They can be
diff --git a/src/widgets/doc/src/qtwidgets-examples.qdoc b/src/widgets/doc/src/qtwidgets-examples.qdoc
index b321942a70..6d00a0b067 100644
--- a/src/widgets/doc/src/qtwidgets-examples.qdoc
+++ b/src/widgets/doc/src/qtwidgets-examples.qdoc
@@ -95,3 +95,73 @@
*/
+/*!
+ \group examples-dialogs
+ \ingroup all-examples
+ \title Dialog Examples
+ \brief Using Qt's standard dialogs and building and using custom dialogs.
+
+ \image dialog-examples.png
+
+ Qt includes standard dialogs for many common operations, such as file
+ selection, printing, and color selection.
+
+ Custom dialogs can also be created for specialized modal or modeless
+ interactions with users.
+*/
+
+/*!
+ \ingroup all-examples
+ \title Itemview Examples
+ \brief Using the model/view framework.
+ \group examples-itemviews
+
+ \image itemviews-examples.png
+
+ Qt provides a lot of capabalities to display pre- and user-defined item models
+ in different ways.
+ The separation of functionality introduced by the model/view architecture gives
+ developers greater flexibility to customize the presentation of items.
+
+*/
+
+/*!
+ \ingroup all-examples
+ \title Graphicsview Examples
+ \brief Using the Graphics View framework.
+ \page examples-graphicsview.html
+
+ \image graphicsview-examples.png
+
+ Qt provides powerful graphics engine that supports easy visualization of items, with
+ support for rotation and zooming.
+ Additionally it provides an event propagation architecture for interaction.
+
+ These examples demonstrate the fundamental aspects of canvas programming with Qt.
+
+ \annotatedlist{examples-graphicsview}
+
+ These examples show the use of graphics widgets and layouts.
+
+ \annotatedlist{examples-graphicsview-layout}
+
+ Some examples demonstrate the use of graphics effects with canvas items.
+
+ \annotatedlist{examples-graphicsview-graphicseffects}
+*/
+
+/*!
+ \group examples-mainwindow
+ \ingroup all-examples
+ \title Main Window Examples
+ \brief Building applications around a main window.
+
+ \image mainwindow-examples.png
+
+ All the standard features of application main windows are provided by Qt.
+
+ Main windows can have pull down menus, tool bars, and dock windows. These
+ separate forms of user input are unified in an integrated action system that
+ also supports keyboard shortcuts and accelerator keys in menu items.
+
+*/
diff --git a/src/widgets/doc/src/widgets-and-layouts/styles.qdoc b/src/widgets/doc/src/widgets-and-layouts/styles.qdoc
index 0154b2c9f6..51812ec9fe 100644
--- a/src/widgets/doc/src/widgets-and-layouts/styles.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/styles.qdoc
@@ -1632,7 +1632,7 @@
toolbars with equal orientation (vertical or horizontal) placed
next to each other.
- \l{QToolbar}{QToolbar}s in Qt consist of three elements:
+ \l{QToolBar}{Toolbars} in Qt consist of three elements:
\c CE_ToolBar, \c PE_IndicatorToolBarHandle, and
\c PE_IndicatorToolBarSeparator. It is QMainWindowLayout that
calculates the bounding rectangles (i.e., position and size of the
@@ -1647,7 +1647,7 @@
The dotted lines indicate that the QToolBar keeps an instance of
QToolBarLayout and that QToolBarSeparators are kept by
QToolBarLayout. When the toolbar is floating (i.e., has its own
- window) the \c PE_FrameMenu element is drawn, else QToolbar draws
+ window) the \c PE_FrameMenu element is drawn, else QToolBar draws
\c CE_ToolBar.
Here is an image of a toolbar in the Java style:
diff --git a/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc b/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc
index b160a22e48..2d9d5bba33 100644
--- a/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc
@@ -138,8 +138,8 @@
/*!
\page stylesheet-syntax.html
- \contentspage {Qt Style Sheet}{Contents}
- \previouspage Qt Style Sheet
+ \contentspage {Qt Style Sheets}{Contents}
+ \previouspage Qt Style Sheets
\nextpage Qt Designer Integration
\title The Style Sheet Syntax
@@ -543,7 +543,7 @@
/*!
\page stylesheet-designer.html
- \contentspage {Qt Style Sheet}{Contents}
+ \contentspage {Qt Style Sheets}{Contents}
\previouspage The Style Sheet Syntax
\nextpage Customizing Qt Widgets Using Style Sheets
\title Qt Designer Integration
@@ -569,7 +569,7 @@
/*!
\page stylesheet-customizing.html
- \contentspage {Qt Style Sheet}{Contents}
+ \contentspage {Qt Style Sheets}{Contents}
\previouspage Qt Designer Integration
\nextpage Qt Style Sheets Reference
\title Customizing Qt Widgets Using Style Sheets
@@ -673,7 +673,7 @@
/*!
\page stylesheet-reference.html
- \contentspage {Qt Style Sheet}{Contents}
+ \contentspage {Qt Style Sheets}{Contents}
\previouspage Customizing Qt Widgets Using Style Sheets
\nextpage Qt Style Sheets Examples
\title Qt Style Sheets Reference
@@ -1754,7 +1754,7 @@
\li \b{\c bottom} \target bottom-prop
\li \l{#Length}{Length}
\li If \l{#position-prop}{position} is \c relative (the
- default), moves a \l{subcontrol} by a certain offset up;
+ default), moves a subcontrol by a certain offset up;
specifying \tt{bottom: \e{y}} is then equivalent to
specifying \tt{\l{Qt Style Sheets Reference#top-prop}{top}: -\e{y}}.
@@ -1906,7 +1906,7 @@
\row
\li \b{\c height} \target height-prop
\li \l{#Length}{Length}
- \li The height of a \l{subcontrol} (or in some case, a widget).
+ \li The height of a subcontrol (or in some case, a widget).
If this property is not specified, it defaults to a value
that depends on the subcontrol/widget and on the current style.
@@ -1944,7 +1944,7 @@
\li \b{\c image}* \target image-prop
\li \l{#Url}{Url}+
\li The image that is drawn in the contents rectangle of a
- \l{subcontrol}.
+ subcontrol.
The image property accepts a list of \l{#Url}{Url}s or
an \c{svg}. The actual image that is drawn is determined
@@ -1959,7 +1959,7 @@
image within the rectangle can be specified using
\l{image-position-prop}{image-position}.
- This property is for \l{subcontrol}s only--we don't support it for
+ This property is for subcontrols only--we don't support it for
other elements.
\warning The QIcon SVG plugin is needed to render SVG images.
@@ -1978,7 +1978,7 @@
\li \b{\c left} \target left-prop
\li \l{#Length}{Length}
\li If \l{#position-prop}{position} is \c relative (the
- default), moves a \l{subcontrol} by a certain offset to
+ default), moves a subcontrol by a certain offset to
the right.
If \l{#position-prop}{position} is \c absolute, the \c
@@ -2232,7 +2232,7 @@
\li \b{\c right} \target right-prop
\li \l{#Length}{Length}
\li If \l{#position-prop}{position} is \c relative (the
- default), moves a \l{subcontrol} by a certain offset to
+ default), moves a subcontrol by a certain offset to
the left; specifying \tt{right: \e{x}} is then equivalent
to specifying \tt{\l{Qt Style Sheets Reference#left-prop}{left}: -\e{x}}.
@@ -2323,7 +2323,7 @@
\row
\li \b{\c subcontrol-origin*} \target subcontrol-origin-prop
\li \l{#Origin}{Origin}
- \li The origin rectangle of the \l subcontrol within the
+ \li The origin rectangle of the subcontrol within the
parent element.
If this property is not specified, the default is \c
@@ -2339,7 +2339,7 @@
\row
\li \b{\c subcontrol-position*} \target subcontrol-position-prop
\li \l{#Alignment}{Alignment}
- \li The alignment of the \l subcontrol within the origin
+ \li The alignment of the subcontrol within the origin
rectangle specified by \l{Qt Style Sheets Reference#subcontrol-origin-prop}
{subcontrol-origin}.
@@ -2380,7 +2380,7 @@
\li \b{\c top} \target top-prop
\li \l{#Length}{Length}
\li If \l{#position-prop}{position} is \c relative (the
- default), moves a \l{subcontrol} by a certain offset
+ default), moves a subcontrol by a certain offset
down.
If \l{#position-prop}{position} is \c absolute, the \c top
@@ -2400,7 +2400,7 @@
\row
\li \b{\c width} \target width-prop
\li \l{#Length}{Length}
- \li The width of a \l{subcontrol} (or a widget in some cases).
+ \li The width of a subcontrol (or a widget in some cases).
If this property is not specified, it defaults to a value
that depends on the subcontrol/widget and on the current style.
@@ -3358,7 +3358,7 @@
/*!
\page stylesheet-examples.html
- \contentspage {Qt Style Sheet}{Contents}
+ \contentspage {Qt Style Sheets}{Contents}
\previouspage Qt Style Sheets Reference
\title Qt Style Sheets Examples
diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp
index 48430e60db..f76e89f1a0 100644
--- a/src/widgets/graphicsview/qgraphicsitem.cpp
+++ b/src/widgets/graphicsview/qgraphicsitem.cpp
@@ -1436,6 +1436,7 @@ QGraphicsItem::~QGraphicsItem()
#endif
clearFocus();
+ setFocusProxy(0);
// Update focus scope item ptr.
QGraphicsItem *p = d_ptr->parent;
@@ -1771,24 +1772,6 @@ void QGraphicsItem::setFlag(GraphicsItemFlag flag, bool enabled)
}
/*!
- \internal
-
- Sets the flag \a flag on \a item and all its children, to \a enabled.
-*/
-static void _q_qgraphicsItemSetFlag(QGraphicsItem *item, QGraphicsItem::GraphicsItemFlag flag,
- bool enabled)
-{
- if (item->flags() & flag) {
- // If this item already has the correct flag set, we don't have to
- // propagate it.
- return;
- }
- item->setFlag(flag, enabled);
- foreach (QGraphicsItem *child, item->childItems())
- _q_qgraphicsItemSetFlag(child, flag, enabled);
-}
-
-/*!
Sets the item flags to \a flags. All flags in \a flags are enabled; all
flags not in \a flags are disabled.
@@ -3348,6 +3331,12 @@ void QGraphicsItem::clearFocus()
*/
void QGraphicsItemPrivate::clearFocusHelper(bool giveFocusToParent, bool hiddenByParentPanel)
{
+ QGraphicsItem *subFocusItem = q_ptr;
+ if (flags & QGraphicsItem::ItemIsFocusScope) {
+ while (subFocusItem->d_ptr->focusScopeItem)
+ subFocusItem = subFocusItem->d_ptr->focusScopeItem;
+ }
+
if (giveFocusToParent) {
// Pass focus to the closest parent focus scope
if (!inDestructor) {
@@ -3356,10 +3345,10 @@ void QGraphicsItemPrivate::clearFocusHelper(bool giveFocusToParent, bool hiddenB
if (p->flags() & QGraphicsItem::ItemIsFocusScope) {
if (p->d_ptr->focusScopeItem == q_ptr) {
p->d_ptr->focusScopeItem = 0;
- if (!q_ptr->hasFocus()) //if it has focus, focusScopeItemChange is called elsewhere
+ if (!subFocusItem->hasFocus()) //if it has focus, focusScopeItemChange is called elsewhere
focusScopeItemChange(false);
}
- if (q_ptr->hasFocus())
+ if (subFocusItem->hasFocus())
p->d_ptr->setFocusHelper(Qt::OtherFocusReason, /* climb = */ false,
/* focusFromHide = */ false);
return;
@@ -3369,7 +3358,7 @@ void QGraphicsItemPrivate::clearFocusHelper(bool giveFocusToParent, bool hiddenB
}
}
- if (q_ptr->hasFocus()) {
+ if (subFocusItem->hasFocus()) {
// Invisible items with focus must explicitly clear subfocus.
if (!hiddenByParentPanel)
clearSubFocus(q_ptr);
diff --git a/src/widgets/graphicsview/qgraphicsview.cpp b/src/widgets/graphicsview/qgraphicsview.cpp
index 2012f980db..a1ee562807 100644
--- a/src/widgets/graphicsview/qgraphicsview.cpp
+++ b/src/widgets/graphicsview/qgraphicsview.cpp
@@ -616,6 +616,10 @@ void QGraphicsViewPrivate::mouseMoveEventHandler(QMouseEvent *event)
{
Q_Q(QGraphicsView);
+#ifndef QT_NO_RUBBERBAND
+ updateRubberBand(event);
+#endif
+
storeMouseEvent(event);
lastMouseEvent.setAccepted(false);
@@ -701,6 +705,58 @@ QRegion QGraphicsViewPrivate::rubberBandRegion(const QWidget *widget, const QRec
tmp &= mask.region;
return tmp;
}
+
+void QGraphicsViewPrivate::updateRubberBand(QMouseEvent *event)
+{
+ Q_Q(QGraphicsView);
+ if (dragMode == QGraphicsView::RubberBandDrag && sceneInteractionAllowed) {
+ storeMouseEvent(event);
+ if (rubberBanding) {
+ // Check for enough drag distance
+ if ((mousePressViewPoint - event->pos()).manhattanLength()
+ < QApplication::startDragDistance()) {
+ return;
+ }
+
+ // Update old rubberband
+ if (viewportUpdateMode != QGraphicsView::NoViewportUpdate && !rubberBandRect.isEmpty()) {
+ if (viewportUpdateMode != QGraphicsView::FullViewportUpdate)
+ q->viewport()->update(rubberBandRegion(q->viewport(), rubberBandRect));
+ else
+ updateAll();
+ }
+
+ // Stop rubber banding if the user has let go of all buttons (even
+ // if we didn't get the release events).
+ if (!event->buttons()) {
+ rubberBanding = false;
+ rubberBandRect = QRect();
+ return;
+ }
+
+ // Update rubberband position
+ const QPoint mp = q->mapFromScene(mousePressScenePoint);
+ const QPoint ep = event->pos();
+ rubberBandRect = QRect(qMin(mp.x(), ep.x()), qMin(mp.y(), ep.y()),
+ qAbs(mp.x() - ep.x()) + 1, qAbs(mp.y() - ep.y()) + 1);
+
+ // Update new rubberband
+ if (viewportUpdateMode != QGraphicsView::NoViewportUpdate){
+ if (viewportUpdateMode != QGraphicsView::FullViewportUpdate)
+ q->viewport()->update(rubberBandRegion(q->viewport(), rubberBandRect));
+ else
+ updateAll();
+ }
+ // Set the new selection area
+ QPainterPath selectionArea;
+ selectionArea.addPolygon(mapToScene(rubberBandRect));
+ selectionArea.closeSubpath();
+ if (scene)
+ scene->setSelectionArea(selectionArea, rubberBandSelectionMode,
+ q->viewportTransform());
+ }
+ }
+}
#endif
/*!
@@ -3211,56 +3267,6 @@ void QGraphicsView::mouseMoveEvent(QMouseEvent *event)
{
Q_D(QGraphicsView);
-#ifndef QT_NO_RUBBERBAND
- if (d->dragMode == QGraphicsView::RubberBandDrag && d->sceneInteractionAllowed) {
- d->storeMouseEvent(event);
- if (d->rubberBanding) {
- // Check for enough drag distance
- if ((d->mousePressViewPoint - event->pos()).manhattanLength()
- < QApplication::startDragDistance()) {
- return;
- }
-
- // Update old rubberband
- if (d->viewportUpdateMode != QGraphicsView::NoViewportUpdate && !d->rubberBandRect.isEmpty()) {
- if (d->viewportUpdateMode != FullViewportUpdate)
- viewport()->update(d->rubberBandRegion(viewport(), d->rubberBandRect));
- else
- d->updateAll();
- }
-
- // Stop rubber banding if the user has let go of all buttons (even
- // if we didn't get the release events).
- if (!event->buttons()) {
- d->rubberBanding = false;
- d->rubberBandRect = QRect();
- return;
- }
-
- // Update rubberband position
- const QPoint &mp = mapFromScene(d->mousePressScenePoint);
- QPoint ep = event->pos();
- d->rubberBandRect = QRect(qMin(mp.x(), ep.x()), qMin(mp.y(), ep.y()),
- qAbs(mp.x() - ep.x()) + 1, qAbs(mp.y() - ep.y()) + 1);
-
- // Update new rubberband
- if (d->viewportUpdateMode != QGraphicsView::NoViewportUpdate){
- if (d->viewportUpdateMode != FullViewportUpdate)
- viewport()->update(d->rubberBandRegion(viewport(), d->rubberBandRect));
- else
- d->updateAll();
- }
- // Set the new selection area
- QPainterPath selectionArea;
- selectionArea.addPolygon(mapToScene(d->rubberBandRect));
- selectionArea.closeSubpath();
- if (d->scene)
- d->scene->setSelectionArea(selectionArea, d->rubberBandSelectionMode,
- viewportTransform());
- return;
- }
- } else
-#endif // QT_NO_RUBBERBAND
if (d->dragMode == QGraphicsView::ScrollHandDrag) {
if (d->handScrolling) {
QScrollBar *hBar = horizontalScrollBar();
diff --git a/src/widgets/graphicsview/qgraphicsview_p.h b/src/widgets/graphicsview/qgraphicsview_p.h
index 6b15fb61f2..bb6b44af19 100644
--- a/src/widgets/graphicsview/qgraphicsview_p.h
+++ b/src/widgets/graphicsview/qgraphicsview_p.h
@@ -138,6 +138,7 @@ public:
#ifndef QT_NO_RUBBERBAND
QRect rubberBandRect;
QRegion rubberBandRegion(const QWidget *widget, const QRect &rect) const;
+ void updateRubberBand(QMouseEvent *event);
bool rubberBanding;
Qt::ItemSelectionMode rubberBandSelectionMode;
#endif
diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp
index ab98bf6438..cb466dfb4b 100644
--- a/src/widgets/itemviews/qabstractitemview.cpp
+++ b/src/widgets/itemviews/qabstractitemview.cpp
@@ -65,7 +65,7 @@
#include <qaccessible.h>
#include <qaccessible2.h>
#endif
-#ifndef QT_NO_GESTURE
+#ifndef QT_NO_GESTURES
# include <qscroller.h>
#endif
diff --git a/src/widgets/itemviews/qlistview.cpp b/src/widgets/itemviews/qlistview.cpp
index e43eda8621..13627b42ac 100644
--- a/src/widgets/itemviews/qlistview.cpp
+++ b/src/widgets/itemviews/qlistview.cpp
@@ -108,10 +108,10 @@ QT_BEGIN_NAMESPACE
be rendered as large or small icons depending on their iconSize().
\table 100%
- \row \li \inlineimage windowsxp-listview.png Screenshot of a Windows XP style list view
+ \row \li \inlineimage windowsvista-listview.png Screenshot of a Windows Vista style list view
\li \inlineimage macintosh-listview.png Screenshot of a Macintosh style table view
\li \inlineimage fusion-listview.png Screenshot of a Fusion style table view
- \row \li A \l{Windows XP Style Widget Gallery}{Windows XP style} list view.
+ \row \li A \l{Windows Vista Style Widget Gallery}{Windows Vista style} list view.
\li A \l{Macintosh Style Widget Gallery}{Macintosh style} list view.
\li A \l{Fusion Style Widget Gallery}{Fusion style} list view.
\endtable
diff --git a/src/widgets/itemviews/qlistwidget.cpp b/src/widgets/itemviews/qlistwidget.cpp
index 766c8e5cc7..183c3538c9 100644
--- a/src/widgets/itemviews/qlistwidget.cpp
+++ b/src/widgets/itemviews/qlistwidget.cpp
@@ -1189,10 +1189,10 @@ void QListWidgetPrivate::_q_dataChanged(const QModelIndex &topLeft,
new current item and the item that was previously current.
\table 100%
- \row \li \inlineimage windowsxp-listview.png Screenshot of a Windows XP style list widget
+ \row \li \inlineimage windowsvista-listview.png Screenshot of a Windows Vista style list widget
\li \inlineimage macintosh-listview.png Screenshot of a Macintosh style table widget
\li \inlineimage fusion-listview.png Screenshot of a Fusion style table widget
- \row \li A \l{Windows XP Style Widget Gallery}{Windows XP style} list widget.
+ \row \li A \l{Windows Vista Style Widget Gallery}{Windows Vista style} list widget.
\li A \l{Macintosh Style Widget Gallery}{Macintosh style} list widget.
\li A \l{Fusion Style Widget Gallery}{Fusion style} list widget.
\endtable
diff --git a/src/widgets/itemviews/qtableview.cpp b/src/widgets/itemviews/qtableview.cpp
index e010c6977e..e84325c730 100644
--- a/src/widgets/itemviews/qtableview.cpp
+++ b/src/widgets/itemviews/qtableview.cpp
@@ -1011,10 +1011,10 @@ void QTableViewPrivate::drawCell(QPainter *painter, const QStyleOptionViewItem &
its appearance in other styles.
\table 100%
- \row \li \inlineimage windowsxp-tableview.png Screenshot of a Windows XP style table view
+ \row \li \inlineimage windowsvista-tableview.png Screenshot of a Windows Vista style table view
\li \inlineimage macintosh-tableview.png Screenshot of a Macintosh style table view
\li \inlineimage fusion-tableview.png Screenshot of a Fusion style table view
- \row \li A \l{Windows XP Style Widget Gallery}{Windows XP style} table view.
+ \row \li A \l{Windows Vista Style Widget Gallery}{Windows Vista style} table view.
\li A \l{Macintosh Style Widget Gallery}{Macintosh style} table view.
\li A \l{Fusion Style Widget Gallery}{Fusion style} table view.
\endtable
diff --git a/src/widgets/itemviews/qtablewidget.cpp b/src/widgets/itemviews/qtablewidget.cpp
index 900af0872a..9793639d74 100644
--- a/src/widgets/itemviews/qtablewidget.cpp
+++ b/src/widgets/itemviews/qtablewidget.cpp
@@ -1539,10 +1539,10 @@ QTableWidgetItem &QTableWidgetItem::operator=(const QTableWidgetItem &other)
clear() function.
\table 100%
- \row \li \inlineimage windowsxp-tableview.png Screenshot of a Windows XP style table widget
+ \row \li \inlineimage windowsvista-tableview.png Screenshot of a Windows Vista style table widget
\li \inlineimage macintosh-tableview.png Screenshot of a Macintosh style table widget
\li \inlineimage fusion-tableview.png Screenshot of a Fusion style table widget
- \row \li A \l{Windows XP Style Widget Gallery}{Windows XP style} table widget.
+ \row \li A \l{Windows Vista Style Widget Gallery}{Windows Vista style} table widget.
\li A \l{Macintosh Style Widget Gallery}{Macintosh style} table widget.
\li A \l{Fusion Style Widget Gallery}{Fusion style} table widget.
\endtable
diff --git a/src/widgets/itemviews/qtreeview.cpp b/src/widgets/itemviews/qtreeview.cpp
index fe34d3de6a..194fb71880 100644
--- a/src/widgets/itemviews/qtreeview.cpp
+++ b/src/widgets/itemviews/qtreeview.cpp
@@ -146,10 +146,10 @@ QT_BEGIN_NAMESPACE
\endomit
\table 100%
- \row \li \inlineimage windowsxp-treeview.png Screenshot of a Windows XP style tree view
+ \row \li \inlineimage windowsvista-treeview.png Screenshot of a Windows Vista style tree view
\li \inlineimage macintosh-treeview.png Screenshot of a Macintosh style tree view
\li \inlineimage fusion-treeview.png Screenshot of a Fusion style tree view
- \row \li A \l{Windows XP Style Widget Gallery}{Windows XP style} tree view.
+ \row \li A \l{Windows Vista Style Widget Gallery}{Windows Vista style} tree view.
\li A \l{Macintosh Style Widget Gallery}{Macintosh style} tree view.
\li A \l{Fusion Style Widget Gallery}{Fusion style} tree view.
\endtable
@@ -876,7 +876,7 @@ bool QTreeView::isSortingEnabled() const
\brief whether animations are enabled
If this property is true the treeview will animate expandsion
- and collasping of branches. If this property is false, the treeview
+ and collapsing of branches. If this property is false, the treeview
will expand or collapse branches immediately without showing
the animation.
@@ -3743,7 +3743,7 @@ void QTreeView::currentChanged(const QModelIndex &current, const QModelIndex &pr
}
#ifndef QT_NO_ACCESSIBILITY
if (QAccessible::isActive() && current.isValid()) {
- int entry = (visualIndex(current) + (header()?1:0))*current.model()->columnCount()+current.column() + 1;
+ int entry = (visualIndex(current) + (header()?1:0))*current.model()->columnCount()+current.column();
QAccessibleEvent event(this, QAccessible::Focus);
event.setChild(entry);
QAccessible::updateAccessibility(&event);
@@ -3763,16 +3763,16 @@ void QTreeView::selectionChanged(const QItemSelection &selected,
// ### does not work properly for selection ranges.
QModelIndex sel = selected.indexes().value(0);
if (sel.isValid()) {
- int entry = (visualIndex(sel) + (header()?1:0))*sel.model()->columnCount()+sel.column() + 1;
- Q_ASSERT(entry > 0);
+ int entry = (visualIndex(sel) + (header()?1:0))*sel.model()->columnCount()+sel.column();
+ Q_ASSERT(entry >= 0);
QAccessibleEvent event(this, QAccessible::Selection);
event.setChild(entry);
QAccessible::updateAccessibility(&event);
}
QModelIndex desel = deselected.indexes().value(0);
if (desel.isValid()) {
- int entry = (visualIndex(desel) + (header()?1:0))*desel.model()->columnCount()+desel.column() + 1;
- Q_ASSERT(entry > 0);
+ int entry = (visualIndex(desel) + (header()?1:0))*desel.model()->columnCount()+desel.column();
+ Q_ASSERT(entry >= 0);
QAccessibleEvent event(this, QAccessible::SelectionRemove);
event.setChild(entry);
QAccessible::updateAccessibility(&event);
diff --git a/src/widgets/itemviews/qtreewidget.cpp b/src/widgets/itemviews/qtreewidget.cpp
index a2eb28e213..c4b71fd05f 100644
--- a/src/widgets/itemviews/qtreewidget.cpp
+++ b/src/widgets/itemviews/qtreewidget.cpp
@@ -2379,10 +2379,10 @@ void QTreeWidgetPrivate::_q_dataChanged(const QModelIndex &topLeft,
whether sorting is enabled.
\table 100%
- \row \li \inlineimage windowsxp-treeview.png Screenshot of a Windows XP style tree widget
+ \row \li \inlineimage windowsvista-treeview.png Screenshot of a Windows Vista style tree widget
\li \inlineimage macintosh-treeview.png Screenshot of a Macintosh style tree widget
\li \inlineimage fusion-treeview.png Screenshot of a Fusion style tree widget
- \row \li A \l{Windows XP Style Widget Gallery}{Windows XP style} tree widget.
+ \row \li A \l{Windows Vista Style Widget Gallery}{Windows Vista style} tree widget.
\li A \l{Macintosh Style Widget Gallery}{Macintosh style} tree widget.
\li A \l{Fusion Style Widget Gallery}{Fusion style} tree widget.
\endtable
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index 80912ff409..9d3c5f8616 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -41,7 +41,6 @@
#include "qplatformdefs.h"
#include "qabstracteventdispatcher.h"
-#include "qaccessible.h"
#include "qapplication.h"
#include "qclipboard.h"
#include "qcursor.h"
@@ -190,6 +189,15 @@ QApplicationPrivate::~QApplicationPrivate()
any given time. For non-QWidget based Qt applications, use QGuiApplication instead,
as it does not depend on the \l QtWidgets library.
+ Some GUI applications provide a special batch mode ie. provide command line
+ arguments for executing tasks without manual intervention. In such non-GUI
+ mode, it is often sufficient to instantiate a plain QCoreApplication to
+ avoid unnecessarily initializing resources needed for a graphical user
+ interface. The following example shows how to dynamically create an
+ appropriate type of application instance:
+
+ \snippet code/src_gui_kernel_qapplication.cpp 0
+
The QApplication object is accessible through the instance() function that
returns a pointer equivalent to the global qApp pointer.
@@ -2653,9 +2661,6 @@ int QApplication::startDragDistance()
*/
int QApplication::exec()
{
-#ifndef QT_NO_ACCESSIBILITY
- QAccessible::setRootObject(qApp);
-#endif
return QGuiApplication::exec();
}
diff --git a/src/widgets/kernel/qapplication.h b/src/widgets/kernel/qapplication.h
index 8a7cb24539..5800ca48b0 100644
--- a/src/widgets/kernel/qapplication.h
+++ b/src/widgets/kernel/qapplication.h
@@ -50,6 +50,9 @@
#ifdef QT_INCLUDE_COMPAT
# include <QtWidgets/qdesktopwidget.h>
#endif
+#ifdef Q_NO_USING_KEYWORD
+#include <QtGui/qpalette.h>
+#endif
#include <QtGui/qguiapplication.h>
QT_BEGIN_HEADER
diff --git a/src/widgets/kernel/qapplication_qpa.cpp b/src/widgets/kernel/qapplication_qpa.cpp
index 21bc9506d4..3568e49ccd 100644
--- a/src/widgets/kernel/qapplication_qpa.cpp
+++ b/src/widgets/kernel/qapplication_qpa.cpp
@@ -421,8 +421,11 @@ void qt_init(QApplicationPrivate *priv, int type)
QColormap::initialize();
+#ifndef QT_NO_TOOLTIP
if (const QPalette *toolTipPalette = QGuiApplicationPrivate::platformTheme()->palette(QPlatformTheme::ToolTipPalette))
QToolTip::setPalette(*toolTipPalette);
+#endif
+
QApplicationPrivate::initializeWidgetFontHash();
}
diff --git a/src/widgets/kernel/qformlayout.cpp b/src/widgets/kernel/qformlayout.cpp
index f875de16df..05f03dc97a 100644
--- a/src/widgets/kernel/qformlayout.cpp
+++ b/src/widgets/kernel/qformlayout.cpp
@@ -1022,7 +1022,7 @@ QStyle* QFormLayoutPrivate::getStyle() const
\li \b{Adherence to the different platform's look and feel guidelines.}
For example, the
- \l{Mac OS X Aqua} and KDE guidelines specify that the
+ \l{https://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/AppleHIGuidelines/Intro/Intro.html}{Mac OS X Aqua} and KDE guidelines specify that the
labels should be right-aligned, whereas Windows and GNOME
applications normally use left-alignment.
@@ -1065,7 +1065,7 @@ QStyle* QFormLayoutPrivate::getStyle() const
corresponds to what we would get using a two-column
QGridLayout.)
\li Style based on the
- \l{Mac OS X Aqua} guidelines. Labels are right-aligned,
+ \l{https://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/AppleHIGuidelines/Intro/Intro.html}{Mac OS X Aqua} guidelines. Labels are right-aligned,
the fields don't grow beyond their size hint, and the
form is horizontally centered.
\li Recommended style for
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 55326e2ef9..ecf73ee777 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -3069,11 +3069,13 @@ void QWidgetPrivate::setEnabled_helper(bool enable)
qt_x11_enforce_cursor(q);
}
#endif
+#ifndef QT_NO_CURSOR
if (q->testAttribute(Qt::WA_SetCursor) || q->isWindow()) {
// enforce the windows behavior of clearing the cursor on
// disabled widgets
qt_qpa_set_cursor(q, false);
}
+#endif
#if defined(Q_WS_MAC)
setEnabled_helper_sys(enable);
#endif
@@ -5472,18 +5474,6 @@ void QWidget::unsetLocale()
d->resolveLocale();
}
-static QString constructWindowTitleFromFilePath(const QString &filePath)
-{
- QFileInfo fi(filePath);
- QString windowTitle = fi.fileName() + QLatin1String("[*]");
-#ifndef Q_WS_MAC
- QString appName = QApplication::applicationName();
- if (!appName.isEmpty())
- windowTitle += QLatin1Char(' ') + QChar(0x2014) + QLatin1Char(' ') + appName;
-#endif
- return windowTitle;
-}
-
/*!
\property QWidget::windowTitle
\brief the window title (caption)
@@ -5500,6 +5490,11 @@ static QString constructWindowTitleFromFilePath(const QString &filePath)
windowModified property is false (the default), the placeholder
is simply removed.
+ On some desktop platforms (including Windows and Unix), the application name
+ (from QGuiApplication::applicationDisplayName) is added at the end of the
+ window title, if set. This is done by the QPA plugin, so it is shown to the
+ user, but isn't part of the \l windowTitle string.
+
\sa windowIcon, windowIconText, windowModified, windowFilePath
*/
QString QWidget::windowTitle() const
@@ -5509,7 +5504,7 @@ QString QWidget::windowTitle() const
if (!d->extra->topextra->caption.isEmpty())
return d->extra->topextra->caption;
if (!d->extra->topextra->filePath.isEmpty())
- return constructWindowTitleFromFilePath(d->extra->topextra->filePath);
+ return QFileInfo(d->extra->topextra->filePath).fileName() + QLatin1String("[*]");
}
return QString();
}
@@ -5681,24 +5676,8 @@ QString QWidget::windowIconText() const
This property only makes sense for windows. It associates a file path with
a window. If you set the file path, but have not set the window title, Qt
- sets the window title to contain a string created using the following
- components.
-
- On Mac OS X:
-
- \list
- \li The file name of the specified path, obtained using QFileInfo::fileName().
- \endlist
-
- On Windows and X11:
-
- \list
- \li The file name of the specified path, obtained using QFileInfo::fileName().
- \li An optional \c{*} character, if the \l windowModified property is set.
- \li The \c{0x2014} unicode character, padded either side by spaces.
- \li The application name, obtained from the application's
- \l{QCoreApplication::}{applicationName} property.
- \endlist
+ sets the window title to the file name of the specified path, obtained using
+ QFileInfo::fileName().
If the window title is set at any point, then the window title takes precedence and
will be shown instead of the file path string.
@@ -10264,6 +10243,7 @@ void QWidget::setWindowOpacity(qreal opacity)
QTLWExtra *extra = d->topData();
extra->opacity = uint(opacity * 255);
setAttribute(Qt::WA_WState_WindowOpacitySet);
+ d->setWindowOpacity_sys(opacity);
if (!testAttribute(Qt::WA_WState_Created))
return;
@@ -10278,8 +10258,6 @@ void QWidget::setWindowOpacity(qreal opacity)
return;
}
#endif
-
- d->setWindowOpacity_sys(opacity);
}
/*!
diff --git a/src/widgets/kernel/qwidgetsfunctions_wince.h b/src/widgets/kernel/qwidgetsfunctions_wince.h
index 39d29b83ad..a113f44043 100644
--- a/src/widgets/kernel/qwidgetsfunctions_wince.h
+++ b/src/widgets/kernel/qwidgetsfunctions_wince.h
@@ -58,4 +58,4 @@ HINSTANCE qt_wince_ShellExecute(HWND hwnd, LPCWSTR operation, LPCWSTR file, LPCW
#endif
#endif // Q_OS_WINCE
-#endif // QWIDGETSFUNCTIONS_WCE_H \ No newline at end of file
+#endif // QWIDGETSFUNCTIONS_WCE_H
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp
index f25f035382..7519d7f910 100644
--- a/src/widgets/styles/qcommonstyle.cpp
+++ b/src/widgets/styles/qcommonstyle.cpp
@@ -108,7 +108,7 @@ QT_BEGIN_NAMESPACE
subElementRect() are documented here.
\endomit
- \sa QStyle, QWindowsStyle
+ \sa QStyle, QProxyStyle
*/
/*!
@@ -1156,8 +1156,10 @@ void QCommonStylePrivate::startAnimation(QStyleAnimation *animation) const
void QCommonStylePrivate::stopAnimation(const QObject *target) const
{
QStyleAnimation *animation = animations.take(target);
- if (animation && animation->state() != QAbstractAnimation::Stopped)
+ if (animation) {
animation->stop();
+ delete animation;
+ }
}
/*! \internal */
@@ -4634,7 +4636,7 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid
ret = int(QStyleHelper::dpiScaled(13.));
break;
case PM_MessageBoxIconSize:
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
if (QApplication::desktopSettingsAware()) {
ret = 64; // No DPI scaling, it's handled elsewhere.
} else
diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp
index 623cdb55b9..6450ab049b 100644
--- a/src/widgets/styles/qfusionstyle.cpp
+++ b/src/widgets/styles/qfusionstyle.cpp
@@ -2631,7 +2631,7 @@ void QFusionStyle::drawComplexControl(ComplexControl control, const QStyleOption
buttonOption.QStyleOption::operator=(*comboBox);
buttonOption.rect = rect;
buttonOption.state = (comboBox->state & (State_Enabled | State_MouseOver | State_HasFocus))
- | State_KeyboardFocusChange; // Allways show hig
+ | State_KeyboardFocusChange; // Always show hig
if (sunken) {
buttonOption.state |= State_Sunken;
diff --git a/src/widgets/styles/qgtkpainter.cpp b/src/widgets/styles/qgtkpainter.cpp
index a5c408f20d..206dbf7e0f 100644
--- a/src/widgets/styles/qgtkpainter.cpp
+++ b/src/widgets/styles/qgtkpainter.cpp
@@ -63,6 +63,7 @@ void QGtkPainter::reset(QPainter *painter)
m_hflipped = false;
m_vflipped = false;
m_usePixmapCache = true;
+ m_cliprect = QRect();
}
QString QGtkPainter::uniqueName(const QString &key, GtkStateType state, GtkShadowType shadow,
diff --git a/src/widgets/styles/qgtkstyle.cpp b/src/widgets/styles/qgtkstyle.cpp
index 75d2306da7..3ee242334d 100644
--- a/src/widgets/styles/qgtkstyle.cpp
+++ b/src/widgets/styles/qgtkstyle.cpp
@@ -2204,8 +2204,10 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
GtkRange *range = (GtkRange*)(horizontal ? gtkHScrollBar : gtkVScrollBar);
- GtkAdjustment *adjustment = d->gtk_range_get_adjustment(range);
+ GtkAdjustment *adjustment = 0;
+ if (d->gtk_adjustment_configure)
+ adjustment = d->gtk_range_get_adjustment(range);
if (adjustment) {
d->gtk_adjustment_configure(adjustment, fakePos, 0, maximum, 0, 0, 0);
} else {
diff --git a/src/widgets/styles/qmacstyle.qdoc b/src/widgets/styles/qmacstyle.qdoc
index caa6bfa79e..29f41752ae 100644
--- a/src/widgets/styles/qmacstyle.qdoc
+++ b/src/widgets/styles/qmacstyle.qdoc
@@ -190,7 +190,7 @@
or Qt::WA_MacNormalSize instead.
*/
-/*! \fn QMacStyle::WidgetSizePolicy QMacStyle::widgetSizePolicy(const QWidget *widget)
+/*! \fn QMacStyle::WidgetSizePolicy QMacStyle::widgetSizePolicy(const QWidget *widget, const QStyleOption *opt = 0)
\obsolete
Call QWidget::testAttribute() with Qt::WA_MacMiniSize, Qt::WA_MacSmallSize,
diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm
index 89ea4d553a..bde33cdb97 100644
--- a/src/widgets/styles/qmacstyle_mac.mm
+++ b/src/widgets/styles/qmacstyle_mac.mm
@@ -1764,8 +1764,8 @@ void QMacStylePrivate::drawColorlessButton(const HIRect &macRect, HIThemeButtonD
QMacStyle::QMacStyle()
: QCommonStyle(*new QMacStylePrivate)
{
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
Q_D(QMacStyle);
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_7) {
d->receiver = [[NotificationReceiver alloc] initWithPrivate:d];
NotificationReceiver *receiver = static_cast<NotificationReceiver *>(d->receiver);
@@ -1778,6 +1778,7 @@ QMacStyle::QMacStyle()
d->nsscroller = [[NSScroller alloc] init];
}
#endif
+ d->indicatorBranchButtonCell = nil;
}
QMacStyle::~QMacStyle()
@@ -2181,11 +2182,11 @@ int QMacStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const QW
switch (d->aquaSizeConstrain(opt, widget)) {
case QAquaSizeUnknown:
case QAquaSizeLarge:
- ret = 9;
+ ret = QSysInfo::macVersion() >= QSysInfo::MV_10_8 ? 16 : 9;
break;
case QAquaSizeMini:
case QAquaSizeSmall:
- ret = 7;
+ ret = QSysInfo::macVersion() >= QSysInfo::MV_10_8 ? 14 : 7;
break;
}
break;
@@ -2706,6 +2707,10 @@ int QMacStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w
ret = false;
break;
case SH_ScrollBar_Transient:
+ if (!qobject_cast<const QScrollBar*>(w)) {
+ ret = false;
+ break;
+ }
ret = QSysInfo::MacintoshVersion >= QSysInfo::MV_10_7;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_7)
@@ -3076,21 +3081,30 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai
case PE_IndicatorBranch: {
if (!(opt->state & State_Children))
break;
- HIThemeButtonDrawInfo bi;
- bi.version = qt_mac_hitheme_version;
- bi.state = tds;
- if (tds == kThemeStateInactive && opt->palette.currentColorGroup() == QPalette::Active)
- bi.state = kThemeStateActive;
- if (opt->state & State_Sunken)
- bi.state |= kThemeStatePressed;
- bi.kind = kThemeDisclosureButton;
- if (opt->state & State_Open)
- bi.value = kThemeDisclosureDown;
- else
- bi.value = opt->direction == Qt::LeftToRight ? kThemeDisclosureRight : kThemeDisclosureLeft;
- bi.adornment = kThemeAdornmentNone;
- HIRect hirect = qt_hirectForQRect(opt->rect.adjusted(DisclosureOffset,0,-DisclosureOffset,0));
- HIThemeDrawButton(&hirect, &bi, cg, kHIThemeOrientationNormal, 0);
+ if (!d->indicatorBranchButtonCell)
+ const_cast<QMacStylePrivate *>(d)->indicatorBranchButtonCell = (void *)[[NSButtonCell alloc] init];
+ NSButtonCell *triangleCell = (NSButtonCell *)d->indicatorBranchButtonCell;
+ [triangleCell setButtonType:NSOnOffButton];
+ [triangleCell setState:(opt->state & State_Open) ? NSOnState : NSOffState];
+ [triangleCell setBezelStyle:NSDisclosureBezelStyle];
+ [triangleCell setBackgroundStyle:((opt->state & State_Selected) && w->hasFocus()) ? NSBackgroundStyleDark : NSBackgroundStyleLight];
+
+ CGContextSaveGState(cg);
+ [NSGraphicsContext saveGraphicsState];
+
+ [NSGraphicsContext setCurrentContext:[NSGraphicsContext
+ graphicsContextWithGraphicsPort:(CGContextRef)cg flipped:NO]];
+
+ QRect qtRect = opt->rect.adjusted(DisclosureOffset, 0, -DisclosureOffset, 0);
+ CGRect rect = CGRectMake(qtRect.x() + 1, qtRect.y(), qtRect.width(), qtRect.height());
+ CGContextTranslateCTM(cg, rect.origin.x, rect.origin.y + rect.size.height);
+ CGContextScaleCTM(cg, 1, -1);
+ CGContextTranslateCTM(cg, -rect.origin.x, -rect.origin.y);
+
+ [triangleCell drawBezelWithFrame:rect inView:[triangleCell controlView]];
+
+ [NSGraphicsContext restoreGraphicsState];
+ CGContextRestoreGState(cg);
break; }
case PE_Frame: {
@@ -4906,9 +4920,14 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex
}
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
- if (cc == CC_ScrollBar && proxy()->styleHint(SH_ScrollBar_Transient)) {
+ if (cc == CC_ScrollBar && proxy()->styleHint(SH_ScrollBar_Transient, 0, widget)) {
bool wasActive = false;
CGFloat opacity = 1.0;
+ CGFloat expandScale = 1.0;
+ CGFloat expandOffset = -1.0;
+ bool shouldExpand = false;
+ const CGFloat maxExpandScale = tdi.kind == kThemeSmallScrollBar ? 11.0 / 7.0 : 13.0 / 9.0;
+
if (QObject *styleObject = opt->styleObject) {
int oldPos = styleObject->property("_q_stylepos").toInt();
int oldMin = styleObject->property("_q_stylemin").toInt();
@@ -4936,23 +4955,24 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex
styleObject->setProperty("_q_stylestate", static_cast<int>(slider->state));
styleObject->setProperty("_q_stylecontrols", static_cast<uint>(slider->activeSubControls));
+ QScrollbarAnimation *anim = qobject_cast<QScrollbarAnimation *>(d->animation(styleObject));
if (transient) {
- QFadeOutAnimation *anim = qobject_cast<QFadeOutAnimation *>(d->animation(styleObject));
if (!anim) {
- anim = new QFadeOutAnimation(styleObject);
+ anim = new QScrollbarAnimation(styleObject);
+ anim->setFadingOut();
d->startAnimation(anim);
- } else {
+ } else if (anim->isFadingOut()) {
// the scrollbar was already fading out while the
// state changed -> restart the fade out animation
anim->setCurrentTime(0);
}
- } else {
+ } else if (anim && anim->isFadingOut()) {
d->stopAnimation(styleObject);
}
}
- QFadeOutAnimation *anim = qobject_cast<QFadeOutAnimation *>(d->animation(styleObject));
- if (anim) {
+ QScrollbarAnimation *anim = qobject_cast<QScrollbarAnimation *>(d->animation(styleObject));
+ if (anim && anim->isFadingOut()) {
// once a scrollbar was active (hovered/pressed), it retains
// the active look even if it's no longer active while fading out
if (oldActiveControls)
@@ -4961,6 +4981,24 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex
wasActive = anim->wasActive();
opacity = anim->currentValue();
}
+
+ shouldExpand = (opt->activeSubControls || wasActive) && QSysInfo::macVersion() >= QSysInfo::MV_10_8;
+ if (shouldExpand) {
+ if (!anim && !oldActiveControls) {
+ // Start expand animation only once and when entering
+ anim = new QScrollbarAnimation(styleObject);
+ anim->setExpanding();
+ d->startAnimation(anim);
+ }
+ if (anim && !anim->isFadingOut()) {
+ expandScale = 1.0 + (maxExpandScale - 1.0) * anim->currentValue();
+ expandOffset = 5.5 * anim->currentValue() - 1;
+ } else {
+ // Keep expanded state after the animation ends, and when fading out
+ expandScale = maxExpandScale;
+ expandOffset = 4.5;
+ }
+ }
}
const bool isHorizontal = slider->orientation == Qt::Horizontal;
@@ -4982,38 +5020,30 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex
[scroller setControlSize:(tdi.kind == kThemeSmallScrollBar ? NSMiniControlSize
: NSRegularControlSize)];
- if (isHorizontal)
- [scroller setBounds:NSMakeRect(0, -1,
- slider->rect.width(), slider->rect.height())];
- else
- [scroller setBounds:NSMakeRect(-1, 0,
- slider->rect.width(), slider->rect.height())];
+ [scroller setBounds:NSMakeRect(0, 0, slider->rect.width(), slider->rect.height())];
[scroller setScrollerStyle:NSScrollerStyleOverlay];
- // first we draw only the track, by using a disabled scroller
- if (opt->activeSubControls || wasActive) {
- CGContextBeginTransparencyLayerWithRect(cg, qt_hirectForQRect(slider->rect),
- NULL);
- CGContextSetAlpha(cg, opacity);
-
- [scroller setFrame:NSMakeRect(0, 0, slider->rect.width(), slider->rect.height())];
- [scroller setEnabled:NO];
- [scroller displayRectIgnoringOpacity:[scroller bounds]
- inContext:[NSGraphicsContext currentContext]];
+ CGContextBeginTransparencyLayer(cg, NULL);
+ CGContextSetAlpha(cg, opacity);
- CGContextEndTransparencyLayer(cg);
+ // Draw the track when hovering
+ if (opt->activeSubControls || wasActive) {
+ CGRect rect = [scroller bounds];
+ if (shouldExpand) {
+ if (isHorizontal)
+ rect.origin.y += 4.5 - expandOffset;
+ else
+ rect.origin.x += 4.5 - expandOffset;
+ }
+ [scroller drawKnobSlotInRect:rect highlight:YES];
}
- CGContextBeginTransparencyLayerWithRect(cg, qt_hirectForQRect(slider->rect), NULL);
- CGContextSetAlpha(cg, opacity);
-
const qreal length = slider->maximum - slider->minimum + slider->pageStep;
const qreal proportion = slider->pageStep / length;
qreal value = (slider->sliderValue - slider->minimum) / length;
if (isHorizontal && slider->direction == Qt::RightToLeft)
value = 1.0 - value - proportion;
- [scroller setEnabled:(slider->state & State_Enabled) ? YES : NO];
[scroller setKnobProportion:1.0];
const int minKnobWidth = 26;
@@ -5023,18 +5053,27 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex
const qreal width = qMax<qreal>(minKnobWidth, plannedWidth);
const qreal totalWidth = slider->rect.width() + plannedWidth - width;
[scroller setFrame:NSMakeRect(0, 0, width, slider->rect.height())];
- CGContextTranslateCTM(cg, value * totalWidth, 0);
+ if (shouldExpand) {
+ CGContextScaleCTM(cg, 1, expandScale);
+ CGContextTranslateCTM(cg, value * totalWidth, -expandOffset);
+ } else {
+ CGContextTranslateCTM(cg, value * totalWidth, 1);
+ }
} else {
const qreal plannedHeight = proportion * slider->rect.height();
const qreal height = qMax<qreal>(minKnobWidth, plannedHeight);
const qreal totalHeight = slider->rect.height() + plannedHeight - height;
[scroller setFrame:NSMakeRect(0, 0, slider->rect.width(), height)];
- CGContextTranslateCTM(cg, 0, value * totalHeight);
+ if (shouldExpand) {
+ CGContextScaleCTM(cg, expandScale, 1);
+ CGContextTranslateCTM(cg, -expandOffset, value * totalHeight);
+ } else {
+ CGContextTranslateCTM(cg, 1, value * totalHeight);
+ }
}
if (length > 0.0) {
[scroller layout];
- [scroller displayRectIgnoringOpacity:[scroller bounds]
- inContext:[NSGraphicsContext currentContext]];
+ [scroller drawKnob];
}
CGContextEndTransparencyLayer(cg);
diff --git a/src/widgets/styles/qmacstyle_mac_p_p.h b/src/widgets/styles/qmacstyle_mac_p_p.h
index c2e5a024a4..dae87bfec6 100644
--- a/src/widgets/styles/qmacstyle_mac_p_p.h
+++ b/src/widgets/styles/qmacstyle_mac_p_p.h
@@ -209,34 +209,50 @@ public:
void* receiver;
void *nsscroller;
#endif
+ void *indicatorBranchButtonCell;
};
-class QFadeOutAnimation : public QNumberStyleAnimation
+class QScrollbarAnimation : public QNumberStyleAnimation
{
Q_OBJECT
public:
- QFadeOutAnimation(QObject *target) : QNumberStyleAnimation(target), _active(false)
+ QScrollbarAnimation(QObject *target) : QNumberStyleAnimation(target), _active(false)
+ { }
+
+ bool wasActive() const { return _active; }
+ void setActive(bool active) { _active = active; }
+
+ bool isFadingOut() const { return _isFadingOut; }
+
+ void setFadingOut()
{
+ _isFadingOut = true;
setDuration(QMacStylePrivate::ScrollBarFadeOutDelay + QMacStylePrivate::ScrollBarFadeOutDuration);
setDelay(QMacStylePrivate::ScrollBarFadeOutDelay);
setStartValue(1.0);
setEndValue(0.0);
}
- bool wasActive() const { return _active; }
- void setActive(bool active) { _active = active; }
+ void setExpanding()
+ {
+ _isFadingOut = false;
+ setDuration(QMacStylePrivate::ScrollBarFadeOutDuration);
+ setStartValue(0.0);
+ setEndValue(1.0);
+ }
private slots:
void updateCurrentTime(int time)
{
QNumberStyleAnimation::updateCurrentTime(time);
- if (qFuzzyIsNull(currentValue()))
+ if (_isFadingOut && qFuzzyIsNull(currentValue()))
target()->setProperty("visible", false);
}
private:
bool _active;
+ bool _isFadingOut;
};
QT_END_NAMESPACE
diff --git a/src/widgets/styles/qstylehelper.cpp b/src/widgets/styles/qstylehelper.cpp
index c6e9a8d013..1630130de2 100644
--- a/src/widgets/styles/qstylehelper.cpp
+++ b/src/widgets/styles/qstylehelper.cpp
@@ -78,7 +78,7 @@ QString uniqueName(const QString &key, const QStyleOption *option, const QSize &
qreal dpiScaled(qreal value)
{
#ifdef Q_OS_MAC
- // On mac the DPI is allways 72 so we should not scale it
+ // On mac the DPI is always 72 so we should not scale it
return value;
#else
static const qreal scale = qreal(qt_defaultDpiX()) / 96.0;
diff --git a/src/widgets/styles/qstyleoption.cpp b/src/widgets/styles/qstyleoption.cpp
index 0ec42e446d..1c2df682cc 100644
--- a/src/widgets/styles/qstyleoption.cpp
+++ b/src/widgets/styles/qstyleoption.cpp
@@ -578,6 +578,7 @@ QStyleOptionFrame::QStyleOptionFrame(int version)
\value None Indicates a normal frame.
\value Flat Indicates a flat frame.
+ \value Rounded Indicates a rounded frame.
*/
/*!
diff --git a/src/widgets/widgets.pro b/src/widgets/widgets.pro
index f8f00af69b..6b9aa92fd9 100644
--- a/src/widgets/widgets.pro
+++ b/src/widgets/widgets.pro
@@ -2,6 +2,7 @@ TARGET = QtWidgets
QT = core-private gui-private
MODULE_CONFIG = uic
+CONFIG += $$MODULE_CONFIG
DEFINES += QT_NO_USING_NAMESPACE
win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x65000000
irix-cc*:QMAKE_CXXFLAGS += -no_prelink -ptused
@@ -41,15 +42,6 @@ testcocoon {
load(testcocoon)
}
-INCLUDEPATH += ../3rdparty/harfbuzz/src
-
win32:!contains(QT_CONFIG, directwrite) {
DEFINES += QT_NO_DIRECTWRITE
}
-
-load(uic)
-
-uic_dir.name = uic_location
-uic_dir.variable = QMAKE_UIC
-
-QMAKE_PKGCONFIG_VARIABLES += uic_dir
diff --git a/src/widgets/widgets/qabstractscrollarea.cpp b/src/widgets/widgets/qabstractscrollarea.cpp
index 3c21d767be..c277f7bd45 100644
--- a/src/widgets/widgets/qabstractscrollarea.cpp
+++ b/src/widgets/widgets/qabstractscrollarea.cpp
@@ -328,11 +328,14 @@ void QAbstractScrollAreaPrivate::setSingleFingerPanEnabled(bool on)
void QAbstractScrollAreaPrivate::layoutChildren()
{
Q_Q(QAbstractScrollArea);
- bool needh = (hbarpolicy == Qt::ScrollBarAlwaysOn
- || (hbarpolicy == Qt::ScrollBarAsNeeded && hbar->minimum() < hbar->maximum() && !hbar->sizeHint().isEmpty()));
+ bool transient = q->style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, vbar ? vbar : hbar);
+ bool needh = (hbarpolicy == Qt::ScrollBarAlwaysOn && !transient)
+ || ((hbarpolicy == Qt::ScrollBarAsNeeded || transient)
+ && hbar->minimum() < hbar->maximum() && !hbar->sizeHint().isEmpty());
- bool needv = (vbarpolicy == Qt::ScrollBarAlwaysOn
- || (vbarpolicy == Qt::ScrollBarAsNeeded && vbar->minimum() < vbar->maximum() && !vbar->sizeHint().isEmpty()));
+ bool needv = (vbarpolicy == Qt::ScrollBarAlwaysOn && !transient)
+ || ((vbarpolicy == Qt::ScrollBarAsNeeded || transient)
+ && vbar->minimum() < vbar->maximum() && !vbar->sizeHint().isEmpty());
QStyleOption opt(0);
opt.init(q);
@@ -489,12 +492,20 @@ void QAbstractScrollAreaPrivate::layoutChildren()
if (hasMacReverseSizeGrip)
horizontalScrollBarRect.adjust(vsbExt, 0, 0, 0);
#endif
+#ifdef Q_OS_MAC
+ if (!hasCornerWidget && QSysInfo::macVersion() >= QSysInfo::MV_10_8 && transient)
+ horizontalScrollBarRect.adjust(0, 0, cornerOffset.x(), 0);
+#endif
scrollBarContainers[Qt::Horizontal]->setGeometry(QStyle::visualRect(opt.direction, opt.rect, horizontalScrollBarRect));
scrollBarContainers[Qt::Horizontal]->raise();
}
if (needv) {
- const QRect verticalScrollBarRect (QPoint(cornerPoint.x(), controlsRect.top() + hHeaderBottom), QPoint(controlsRect.right(), cornerPoint.y() - 1));
+ QRect verticalScrollBarRect (QPoint(cornerPoint.x(), controlsRect.top() + hHeaderBottom), QPoint(controlsRect.right(), cornerPoint.y() - 1));
+#ifdef Q_OS_MAC
+ if (!hasCornerWidget && QSysInfo::macVersion() >= QSysInfo::MV_10_8 && transient)
+ verticalScrollBarRect.adjust(0, 0, 0, cornerOffset.y());
+#endif
scrollBarContainers[Qt::Vertical]->setGeometry(QStyle::visualRect(opt.direction, opt.rect, verticalScrollBarRect));
scrollBarContainers[Qt::Vertical]->raise();
}
@@ -654,7 +665,6 @@ void QAbstractScrollArea::setVerticalScrollBarPolicy(Qt::ScrollBarPolicy policy)
d->layoutChildren();
if (oldPolicy != d->vbarpolicy)
d->scrollBarPolicyChanged(Qt::Vertical, d->vbarpolicy);
- d->setScrollBarTransient(d->vbar, policy == Qt::ScrollBarAsNeeded);
}
@@ -716,7 +726,6 @@ void QAbstractScrollArea::setHorizontalScrollBarPolicy(Qt::ScrollBarPolicy polic
d->layoutChildren();
if (oldPolicy != d->hbarpolicy)
d->scrollBarPolicyChanged(Qt::Horizontal, d->hbarpolicy);
- d->setScrollBarTransient(d->hbar, policy == Qt::ScrollBarAsNeeded);
}
/*!
@@ -935,7 +944,7 @@ bool QAbstractScrollArea::eventFilter(QObject *o, QEvent *e)
Q_D(QAbstractScrollArea);
if ((o == d->hbar || o == d->vbar) && (e->type() == QEvent::HoverEnter || e->type() == QEvent::HoverLeave)) {
Qt::ScrollBarPolicy policy = o == d->hbar ? d->vbarpolicy : d->hbarpolicy;
- if (policy == Qt::ScrollBarAsNeeded) {
+ if (policy == Qt::ScrollBarAsNeeded || style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, d->vbar ? d->vbar : d->hbar)) {
QScrollBar *sibling = o == d->hbar ? d->vbar : d->hbar;
d->setScrollBarTransient(sibling, e->type() == QEvent::HoverLeave);
}
@@ -1445,9 +1454,11 @@ bool QAbstractScrollAreaPrivate::canStartScrollingAt( const QPoint &startPos )
void QAbstractScrollAreaPrivate::flashScrollBars()
{
- if (hbarpolicy == Qt::ScrollBarAsNeeded)
+ Q_Q(QAbstractScrollArea);
+ bool transient = q->style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, vbar ? vbar : hbar);
+ if (hbarpolicy == Qt::ScrollBarAsNeeded || transient)
hbar->d_func()->flash();
- if (vbarpolicy == Qt::ScrollBarAsNeeded)
+ if (vbarpolicy == Qt::ScrollBarAsNeeded || transient)
vbar->d_func()->flash();
}
diff --git a/src/widgets/widgets/qcheckbox.cpp b/src/widgets/widgets/qcheckbox.cpp
index 1567e30d83..0e2e802006 100644
--- a/src/widgets/widgets/qcheckbox.cpp
+++ b/src/widgets/widgets/qcheckbox.cpp
@@ -124,8 +124,8 @@ public:
\li \inlineimage macintosh-checkbox.png Screenshot of a Macintosh style checkbox
\li A checkbox shown in the \l{Macintosh Style Widget Gallery}{Macintosh widget style}.
\row
- \li \inlineimage windows-checkbox.png Screenshot of a Windows XP style checkbox
- \li A checkbox shown in the \l{Windows XP Style Widget Gallery}{Windows XP widget style}.
+ \li \inlineimage windowsvista-checkbox.png Screenshot of a Windows Vista style checkbox
+ \li A checkbox shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
\row
\li \inlineimage fusion-checkbox.png Screenshot of a Fusion style checkbox
\li A checkbox shown in the \l{Fusion Style Widget Gallery}{Fusion widget style}.
diff --git a/src/widgets/widgets/qdatetimeedit.cpp b/src/widgets/widgets/qdatetimeedit.cpp
index 394e2b537f..a962762bb1 100644
--- a/src/widgets/widgets/qdatetimeedit.cpp
+++ b/src/widgets/widgets/qdatetimeedit.cpp
@@ -105,8 +105,8 @@ QT_BEGIN_NAMESPACE
calendar widget can be retrieved with calendarWidget().
\table 100%
- \row \li \inlineimage windowsxp-datetimeedit.png Screenshot of a Windows XP style date time editing widget
- \li A date time editing widget shown in the \l{Windows XP Style Widget Gallery}{Windows XP widget style}.
+ \row \li \inlineimage windowsvista-datetimeedit.png Screenshot of a Windows Vista style date time editing widget
+ \li A date time editing widget shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
\row \li \inlineimage macintosh-datetimeedit.png Screenshot of a Macintosh style date time editing widget
\li A date time editing widget shown in the \l{Macintosh Style Widget Gallery}{Macintosh widget style}.
\row \li \inlineimage fusion-datetimeedit.png Screenshot of a Fusion style date time editing widget
@@ -1536,8 +1536,8 @@ void QDateTimeEdit::mousePressEvent(QMouseEvent *event)
\endlist
\table 100%
- \row \li \inlineimage windowsxp-timeedit.png Screenshot of a Windows XP style time editing widget
- \li A time editing widget shown in the \l{Windows XP Style Widget Gallery}{Windows XP widget style}.
+ \row \li \inlineimage windowsvista-timeedit.png Screenshot of a Windows Vista style time editing widget
+ \li A time editing widget shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
\row \li \inlineimage macintosh-timeedit.png Screenshot of a Macintosh style time editing widget
\li A time editing widget shown in the \l{Macintosh Style Widget Gallery}{Macintosh widget style}.
\row \li \inlineimage fusion-timeedit.png Screenshot of a Fusion style time editing widget
@@ -1613,8 +1613,8 @@ QTimeEdit::~QTimeEdit()
\endlist
\table 100%
- \row \li \inlineimage windowsxp-dateedit.png Screenshot of a Windows XP style date editing widget
- \li A date editing widget shown in the \l{Windows XP Style Widget Gallery}{Windows XP widget style}.
+ \row \li \inlineimage windowsvista-dateedit.png Screenshot of a Windows Vista style date editing widget
+ \li A date editing widget shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
\row \li \inlineimage macintosh-dateedit.png Screenshot of a Macintosh style date editing widget
\li A date editing widget shown in the \l{Macintosh Style Widget Gallery}{Macintosh widget style}.
\row \li \inlineimage fusion-dateedit.png Screenshot of a Fusion style date editing widget
diff --git a/src/widgets/widgets/qdial.cpp b/src/widgets/widgets/qdial.cpp
index 1f06fed0f6..4bdd5538b9 100644
--- a/src/widgets/widgets/qdial.cpp
+++ b/src/widgets/widgets/qdial.cpp
@@ -231,11 +231,11 @@ int QDialPrivate::valueFromPoint(const QPoint &p) const
\table
\row \li \inlineimage fusion-dial.png Screenshot of a dial in the Fusion widget style
- \li \inlineimage windowsxp-dial.png Screenshot of a dial in the Windows XP widget style
+ \li \inlineimage windowsvista-dial.png Screenshot of a dial in the Windows Vista widget style
\li \inlineimage macintosh-dial.png Screenshot of a dial in the Macintosh widget style
\row \li {3,1} Dials shown in various widget styles (from left to right):
\l{Fusion Style Widget Gallery}{Fusion},
- \l{Windows XP Style Widget Gallery}{Windows XP},
+ \l{Windows Vista Style Widget Gallery}{Windows Vista},
\l{Macintosh Style Widget Gallery}{Macintosh}.
\endtable
diff --git a/src/widgets/widgets/qfontcombobox.cpp b/src/widgets/widgets/qfontcombobox.cpp
index ab878cc98f..f602a47051 100644
--- a/src/widgets/widgets/qfontcombobox.cpp
+++ b/src/widgets/widgets/qfontcombobox.cpp
@@ -314,7 +314,7 @@ void QFontComboBoxPrivate::_q_currentChanged(const QString &text)
filter out certain types of fonts as e.g. non scalable fonts or
monospaced fonts.
- \image windowsxp-fontcombobox.png Screenshot of QFontComboBox on Windows XP
+ \image windowsvista-fontcombobox.png Screenshot of QFontComboBox on Windows Vista
\sa QComboBox, QFont, QFontInfo, QFontMetrics, QFontDatabase, {Character Map Example}
*/
diff --git a/src/widgets/widgets/qgroupbox.cpp b/src/widgets/widgets/qgroupbox.cpp
index e52b8f1a94..e303fe5d6f 100644
--- a/src/widgets/widgets/qgroupbox.cpp
+++ b/src/widgets/widgets/qgroupbox.cpp
@@ -171,10 +171,10 @@ void QGroupBoxPrivate::click()
\snippet widgets/groupbox/window.cpp 2
\table 100%
- \row \li \inlineimage windowsxp-groupbox.png Screenshot of a Windows XP style group box
+ \row \li \inlineimage windowsvista-groupbox.png Screenshot of a Windows Vista style group box
\li \inlineimage macintosh-groupbox.png Screenshot of a Macintosh style group box
\li \inlineimage fusion-groupbox.png Screenshot of a Fusion style group box
- \row \li A \l{Windows XP Style Widget Gallery}{Windows XP style} group box.
+ \row \li A \l{Windows Vista Style Widget Gallery}{Windows Vista style} group box.
\li A \l{Macintosh Style Widget Gallery}{Macintosh style} group box.
\li A \l{Fusion Style Widget Gallery}{Fusion style} group box.
\endtable
diff --git a/src/widgets/widgets/qlabel.cpp b/src/widgets/widgets/qlabel.cpp
index 9465acfdad..63596a64af 100644
--- a/src/widgets/widgets/qlabel.cpp
+++ b/src/widgets/widgets/qlabel.cpp
@@ -141,8 +141,8 @@ QT_BEGIN_NAMESPACE
\li \inlineimage fusion-label.png Screenshot of a Fusion style label
\li A label shown in the \l{Fusion Style Widget Gallery}{Fusion widget style}.
\row
- \li \inlineimage windowsxp-label.png Screenshot of a Windows XP style label
- \li A label shown in the \l{Windows XP Style Widget Gallery}{Windows XP widget style}.
+ \li \inlineimage windowsvista-label.png Screenshot of a Windows Vista style label
+ \li A label shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
\endtable
\sa QLineEdit, QTextEdit, QPixmap, QMovie,
diff --git a/src/widgets/widgets/qlcdnumber.cpp b/src/widgets/widgets/qlcdnumber.cpp
index 69d838bb00..c7a835b629 100644
--- a/src/widgets/widgets/qlcdnumber.cpp
+++ b/src/widgets/widgets/qlcdnumber.cpp
@@ -108,11 +108,11 @@ public:
\table
\row \li
\inlineimage windows-lcdnumber.png Screenshot of a Windows style LCD number widget
- \inlineimage windowsxp-lcdnumber.png Screenshot of a Windows XP style LCD number widget
+ \inlineimage windowsvista-lcdnumber.png Screenshot of a Windows Vista style LCD number widget
\inlineimage macintosh-lcdnumber.png Screenshot of a Macintosh style LCD number widget
\inlineimage fusion-lcdnumber.png Screenshot of a Fusion style LCD number widget
\row \li LCD number widgets shown in various widget styles (from left to right):
- \l{Windows Style Widget Gallery}{Windows}, \l{Windows XP Style Widget Gallery}{Windows XP},
+ \l{Windows Style Widget Gallery}{Windows}, \l{Windows Vista Style Widget Gallery}{Windows Vista},
\l{Macintosh Style Widget Gallery}{Macintosh}, \l{Fusion Style Widget Gallery}{Fusion}.
\endtable
diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp
index 23dee90406..c250c286bc 100644
--- a/src/widgets/widgets/qlineedit.cpp
+++ b/src/widgets/widgets/qlineedit.cpp
@@ -206,8 +206,8 @@ void QLineEdit::initStyleOption(QStyleOptionFrame *option) const
\table 100%
\row \li \inlineimage macintosh-lineedit.png Screenshot of a Macintosh style line edit
\li A line edit shown in the \l{Macintosh Style Widget Gallery}{Macintosh widget style}.
- \row \li \inlineimage windows-lineedit.png Screenshot of a Windows XP style line edit
- \li A line edit shown in the \l{Windows XP Style Widget Gallery}{Windows XP widget style}.
+ \row \li \inlineimage windowsvista-lineedit.png Screenshot of a Windows Vista style line edit
+ \li A line edit shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
\row \li \inlineimage fusion-lineedit.png Screenshot of a Fusion style line edit
\li A line edit shown in the \l{Fusion Style Widget Gallery}{Fusion widget style}.
\endtable
diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp
index 4d431868ac..17f9ca7911 100644
--- a/src/widgets/widgets/qmenu.cpp
+++ b/src/widgets/widgets/qmenu.cpp
@@ -1856,7 +1856,7 @@ void QMenu::popup(const QPoint &p, QAction *atAction)
QPoint mouse = QCursor::pos();
d->mousePopupPos = mouse;
- const bool snapToMouse = (QRect(p.x() - 3, p.y() - 3, 6, 6).contains(mouse));
+ const bool snapToMouse = !d->causedPopup.widget && (QRect(p.x() - 3, p.y() - 3, 6, 6).contains(mouse));
const QSize menuSize(sizeHint());
if (adjustToDesktop) {
diff --git a/src/widgets/widgets/qmenu_wince.rc b/src/widgets/widgets/qmenu_wince.rc
index 50624eef57..631cd9d47a 100644
--- a/src/widgets/widgets/qmenu_wince.rc
+++ b/src/widgets/widgets/qmenu_wince.rc
@@ -3,9 +3,9 @@
#include <commctrl.h>
#include "winuser.h"
-#if defined (_DEBUG) && defined(QT_DLL)
+#if defined (_DEBUG) && defined(QT_SHARED)
#include "Qt5Widgetsd_resource.rc"
-#elif defined(QT_DLL)
+#elif defined(QT_SHARED)
#include "Qt5Widgets_resource.rc"
#endif
diff --git a/src/widgets/widgets/qprogressbar.cpp b/src/widgets/widgets/qprogressbar.cpp
index 3292116dac..7cf564c8e7 100644
--- a/src/widgets/widgets/qprogressbar.cpp
+++ b/src/widgets/widgets/qprogressbar.cpp
@@ -198,8 +198,8 @@ bool QProgressBarPrivate::repaintRequired() const
\table
\row \li \inlineimage macintosh-progressbar.png Screenshot of a Macintosh style progress bar
\li A progress bar shown in the Macintosh widget style.
- \row \li \inlineimage windowsxp-progressbar.png Screenshot of a Windows XP style progress bar
- \li A progress bar shown in the Windows XP widget style.
+ \row \li \inlineimage windowsvista-progressbar.png Screenshot of a Windows Vista style progress bar
+ \li A progress bar shown in the Windows Vista widget style.
\row \li \inlineimage fusion-progressbar.png Screenshot of a Fusion style progress bar
\li A progress bar shown in the Fusion widget style.
\endtable
diff --git a/src/widgets/widgets/qpushbutton.cpp b/src/widgets/widgets/qpushbutton.cpp
index 0f9243a6c8..dd7c5f9d4f 100644
--- a/src/widgets/widgets/qpushbutton.cpp
+++ b/src/widgets/widgets/qpushbutton.cpp
@@ -168,8 +168,8 @@ QT_BEGIN_NAMESPACE
changed from round to square. Use the setMinimumSize()
function to prevent this behavior.
- \row \li \inlineimage windowsxp-pushbutton.png Screenshot of a Windows XP style push button
- \li A push button shown in the \l{Windows XP Style Widget Gallery}{Windows XP widget style}.
+ \row \li \inlineimage windowsvista-pushbutton.png Screenshot of a Windows Vista style push button
+ \li A push button shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
\row \li \inlineimage fusion-pushbutton.png Screenshot of a Fusion style push button
\li A push button shown in the \l{Fusion Style Widget Gallery}{Fusion widget style}.
\endtable
diff --git a/src/widgets/widgets/qradiobutton.cpp b/src/widgets/widgets/qradiobutton.cpp
index 68681a9dea..bb081ec905 100644
--- a/src/widgets/widgets/qradiobutton.cpp
+++ b/src/widgets/widgets/qradiobutton.cpp
@@ -118,8 +118,8 @@ void QRadioButtonPrivate::init()
\table 100%
\row \li \inlineimage fusion-radiobutton.png Screenshot of a Fusion radio button
\li A radio button shown in the \l{Fusion Style Widget Gallery}{Fusion widget style}.
- \row \li \inlineimage windows-radiobutton.png Screenshot of a Windows XP radio button
- \li A radio button shown in the \l{Windows XP Style Widget Gallery}{Windows XP widget style}.
+ \row \li \inlineimage windowsvista-radiobutton.png Screenshot of a Windows Vista radio button
+ \li A radio button shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
\row \li \inlineimage macintosh-radiobutton.png Screenshot of a Macintosh radio button
\li A radio button shown in the \l{Macintosh Style Widget Gallery}{Macintosh widget style}.
\endtable
diff --git a/src/widgets/widgets/qscrollbar.cpp b/src/widgets/widgets/qscrollbar.cpp
index 32cf9f4467..6ace736391 100644
--- a/src/widgets/widgets/qscrollbar.cpp
+++ b/src/widgets/widgets/qscrollbar.cpp
@@ -192,8 +192,8 @@ QT_BEGIN_NAMESPACE
\table 100%
\row \li \inlineimage macintosh-horizontalscrollbar.png Screenshot of a Macintosh style scroll bar
\li A scroll bar shown in the \l{Macintosh Style Widget Gallery}{Macintosh widget style}.
- \row \li \inlineimage windowsxp-horizontalscrollbar.png Screenshot of a Windows XP style scroll bar
- \li A scroll bar shown in the \l{Windows XP Style Widget Gallery}{Windows XP widget style}.
+ \row \li \inlineimage windowsvista-horizontalscrollbar.png Screenshot of a Windows Vista style scroll bar
+ \li A scroll bar shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
\row \li \inlineimage fusion-horizontalscrollbar.png Screenshot of a Fusion style scroll bar
\li A scroll bar shown in the \l{Fusion Style Widget Gallery}{Fusion widget style}.
\endtable
@@ -234,10 +234,10 @@ void QScrollBarPrivate::setTransient(bool value)
Q_Q(QScrollBar);
if (transient != value) {
transient = value;
- if (transient) {
- if (q->isVisible() && q->style()->styleHint(QStyle::SH_ScrollBar_Transient))
+ if (q->isVisible()) {
+ if (q->style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, q))
q->update();
- } else if (!q->isVisible()) {
+ } else if (!transient) {
q->show();
}
}
@@ -246,7 +246,7 @@ void QScrollBarPrivate::setTransient(bool value)
void QScrollBarPrivate::flash()
{
Q_Q(QScrollBar);
- if (!flashed && q->style()->styleHint(QStyle::SH_ScrollBar_Transient)) {
+ if (!flashed && q->style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, q)) {
flashed = true;
q->show();
}
@@ -325,7 +325,7 @@ void QScrollBar::initStyleOption(QStyleOptionSlider *option) const
option->upsideDown = d->invertedAppearance;
if (d->orientation == Qt::Horizontal)
option->state |= QStyle::State_Horizontal;
- if (d->flashed || !d->transient)
+ if ((d->flashed || !d->transient) && style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, this))
option->state |= QStyle::State_On;
}
@@ -384,7 +384,7 @@ void QScrollBarPrivate::init()
invertedControls = true;
pressedControl = hoverControl = QStyle::SC_None;
pointerOutsidePressedControl = false;
- transient = q->style()->styleHint(QStyle::SH_ScrollBar_Transient);
+ transient = q->style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, q);
flashed = false;
q->setFocusPolicy(Qt::NoFocus);
QSizePolicy sp(QSizePolicy::Minimum, QSizePolicy::Fixed, QSizePolicy::Slider);
@@ -484,7 +484,7 @@ bool QScrollBar::event(QEvent *event)
d_func()->updateHoverControl(he->pos());
break;
case QEvent::StyleChange:
- d_func()->setTransient(style()->styleHint(QStyle::SH_ScrollBar_Transient));
+ d_func()->setTransient(style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, this));
break;
default:
break;
@@ -531,7 +531,7 @@ void QScrollBar::paintEvent(QPaintEvent *)
opt.activeSubControls = (QStyle::SubControl)d->hoverControl;
}
style()->drawComplexControl(QStyle::CC_ScrollBar, &opt, &p, this);
- if (d->flashed && style()->styleHint(QStyle::SH_ScrollBar_Transient)) {
+ if (d->flashed && style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, this)) {
d->flashed = false;
update();
}
diff --git a/src/widgets/widgets/qslider.cpp b/src/widgets/widgets/qslider.cpp
index f96a44c29f..eb16faae2f 100644
--- a/src/widgets/widgets/qslider.cpp
+++ b/src/widgets/widgets/qslider.cpp
@@ -257,8 +257,8 @@ QStyle::SubControl QSliderPrivate::newHoverControl(const QPoint &pos)
\table 100%
\row \li \inlineimage macintosh-slider.png Screenshot of a Macintosh slider
\li A slider shown in the \l{Macintosh Style Widget Gallery}{Macintosh widget style}.
- \row \li \inlineimage windows-slider.png Screenshot of a Windows XP slider
- \li A slider shown in the \l{Windows XP Style Widget Gallery}{Windows XP widget style}.
+ \row \li \inlineimage windowsvista-slider.png Screenshot of a Windows Vista slider
+ \li A slider shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
\row \li \inlineimage fusion-slider.png Screenshot of a Fusion slider
\li A slider shown in the \l{Fusion Style Widget Gallery}{Fusion widget style}.
\endtable
diff --git a/src/widgets/widgets/qspinbox.cpp b/src/widgets/widgets/qspinbox.cpp
index 4754f5c1a6..13fbf3a781 100644
--- a/src/widgets/widgets/qspinbox.cpp
+++ b/src/widgets/widgets/qspinbox.cpp
@@ -153,8 +153,8 @@ public:
setSpecialValueText() for how to do this with QSpinBox.
\table 100%
- \row \li \inlineimage windowsxp-spinbox.png Screenshot of a Windows XP spin box
- \li A spin box shown in the \l{Windows XP Style Widget Gallery}{Windows XP widget style}.
+ \row \li \inlineimage windowsvista-spinbox.png Screenshot of a Windows Vista spin box
+ \li A spin box shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
\row \li \inlineimage fusion-spinbox.png Screenshot of a Fusion spin box
\li A spin box shown in the \l{Fusion Style Widget Gallery}{Fusion widget style}.
\row \li \inlineimage macintosh-spinbox.png Screenshot of a Macintosh spin box
diff --git a/src/widgets/widgets/qsplitter.cpp b/src/widgets/widgets/qsplitter.cpp
index 70c493cedd..9b605e4368 100644
--- a/src/widgets/widgets/qsplitter.cpp
+++ b/src/widgets/widgets/qsplitter.cpp
@@ -68,7 +68,7 @@ QT_BEGIN_NAMESPACE
/*!
\class QSplitterHandle
- \brief The QSplitterHandle class provides handle functionality of the splitter.
+ \brief The QSplitterHandle class provides handle functionality for the splitter.
\ingroup organizers
\inmodule QtWidgets
@@ -80,7 +80,7 @@ QT_BEGIN_NAMESPACE
QSplitterHandle. It is provided for developers who want splitter handles
that provide extra features, such as popup menus.
- The typical way one would create splitter handles is to subclass QSplitter then
+ The typical way one would create splitter handles is to subclass QSplitter and then
reimplement QSplitter::createHandle() to instantiate the custom splitter
handle. For example, a minimum QSplitter subclass might look like this:
@@ -113,7 +113,7 @@ QT_BEGIN_NAMESPACE
/*!
Creates a QSplitter handle with the given \a orientation and
- QSplitter \a parent.
+ \a parent.
*/
QSplitterHandle::QSplitterHandle(Qt::Orientation orientation, QSplitter *parent)
: QWidget(*new QSplitterHandlePrivate, parent, 0)
@@ -888,7 +888,7 @@ QSplitterLayoutStruct *QSplitterPrivate::insertWidget(int index, QWidget *w)
A splitter lets the user control the size of child widgets by dragging the
- boundary between the children. Any number of widgets may be controlled by a
+ boundary between them. Any number of widgets may be controlled by a
single splitter. The typical use of a QSplitter is to create several
widgets and add them using insertWidget() or addWidget().
@@ -921,7 +921,7 @@ QSplitterLayoutStruct *QSplitterPrivate::insertWidget(int index, QWidget *w)
Alternatively, you can save and restore the sizes of the widgets from a
QByteArray using saveState() and restoreState() respectively.
- When you hide() a child its space will be distributed among the
+ When you hide() a child, its space will be distributed among the
other children. It will be reinstated when you show() it again.
\note Adding a QLayout to a QSplitter is not supported (either through
@@ -987,7 +987,7 @@ void QSplitter::refresh()
\property QSplitter::orientation
\brief the orientation of the splitter
- By default the orientation is horizontal (i.e., the widgets are
+ By default, the orientation is horizontal (i.e., the widgets are
laid out side by side). The possible orientations are
Qt::Horizontal and Qt::Vertical.
@@ -1046,7 +1046,7 @@ bool QSplitter::childrenCollapsible() const
}
/*!
- Sets whether the child widget at index \a index is collapsible to \a collapse.
+ Sets whether the child widget at \a index is collapsible to \a collapse.
By default, children are collapsible, meaning that the user can
resize them down to size 0, even if they have a non-zero
@@ -1070,7 +1070,7 @@ void QSplitter::setCollapsible(int index, bool collapse)
}
/*!
- Returns true if the widget at \a index is collapsible, otherwise returns false
+ Returns true if the widget at \a index is collapsible, otherwise returns false.
*/
bool QSplitter::isCollapsible(int index) const
{
@@ -1372,7 +1372,7 @@ void QSplitter::moveSplitter(int pos, int index)
/*!
- Returns the valid range of the splitter with index \a index in
+ Returns the valid range of the splitter at \a index in
*\a{min} and *\a{max} if \a min and \a max are not 0.
*/
@@ -1384,8 +1384,7 @@ void QSplitter::getRange(int index, int *min, int *max) const
/*!
- Returns the closest legal position to \a pos of the widget with index
- \a index.
+ Returns the closest legal position to \a pos of the widget at \a index.
For right-to-left languages such as Arabic and Hebrew, the layout
of horizontal splitters is reversed. Positions are then measured
@@ -1484,7 +1483,7 @@ QSize QSplitter::minimumSizeHint() const
If the splitter's orientation is horizontal, the list contains the
widgets width in pixels, from left to right; if the orientation is
- vertical, the list contains the widgets height in pixels,
+ vertical, the list contains the widgets' heights in pixels,
from top to bottom.
Giving the values to another splitter's setSizes() function will
@@ -1509,21 +1508,21 @@ QList<int> QSplitter::sizes() const
}
/*!
- Sets the child widgets respective sizes to the values given in the \a list.
+ Sets the child widgets' respective sizes to the values given in the \a list.
- If the splitter is horizontal, the values set the widths of each
+ If the splitter is horizontal, the values set the width of each
widget in pixels, from left to right. If the splitter is vertical, the
- heights of each widget is set, from top to bottom.
+ height of each widget is set, from top to bottom.
Extra values in the \a list are ignored. If \a list contains too few
- values, the result is undefined but the program will still be well-behaved.
+ values, the result is undefined, but the program will still be well-behaved.
The overall size of the splitter widget is not affected.
Instead, any additional/missing space is distributed amongst the
widgets according to the relative weight of the sizes.
If you specify a size of 0, the widget will be invisible. The size policies
- of the widgets are preserved. That is, a value smaller then the minimal size
+ of the widgets are preserved. That is, a value smaller than the minimal size
hint of the respective widget will be replaced by the value of the hint.
\sa sizes()
@@ -1616,7 +1615,7 @@ QByteArray QSplitter::saveState() const
Typically this is used in conjunction with QSettings to restore the size
from a past session. Here is an example:
- Restore the splitters's state:
+ Restore the splitter's state:
\snippet splitter/splitter.cpp 2
diff --git a/src/widgets/widgets/qtabwidget.cpp b/src/widgets/widgets/qtabwidget.cpp
index df9ca56e88..abb781960e 100644
--- a/src/widgets/widgets/qtabwidget.cpp
+++ b/src/widgets/widgets/qtabwidget.cpp
@@ -120,10 +120,10 @@ QT_BEGIN_NAMESPACE
area, organizing the individual pages).
\table 100%
- \row \li \inlineimage windowsxp-tabwidget.png Screenshot of a Windows XP style tab widget
+ \row \li \inlineimage windowsvista-tabwidget.png Screenshot of a Windows Vista style tab widget
\li \inlineimage macintosh-tabwidget.png Screenshot of a Macintosh style tab widget
\li \inlineimage fusion-tabwidget.png Screenshot of a Fusion style tab widget
- \row \li A Windows XP style tab widget.
+ \row \li A Windows Vista style tab widget.
\li A Macintosh style tab widget.
\li A Fusion style tab widget.
\endtable
diff --git a/src/widgets/widgets/qtextedit.cpp b/src/widgets/widgets/qtextedit.cpp
index 9f7d66b344..70dcc5b506 100644
--- a/src/widgets/widgets/qtextedit.cpp
+++ b/src/widgets/widgets/qtextedit.cpp
@@ -53,6 +53,9 @@
#include <qmenu.h>
#include <qstyle.h>
#include <qtimer.h>
+#ifndef QT_NO_ACCESSIBILITY
+#include <qaccessible.h>
+#endif
#include "private/qtextdocumentlayout_p.h"
#include "qtextdocument.h"
#include "private/qtextdocument_p.h"
@@ -154,7 +157,7 @@ void QTextEditPrivate::init(const QString &html)
QObject::connect(control, SIGNAL(redoAvailable(bool)), q, SIGNAL(redoAvailable(bool)));
QObject::connect(control, SIGNAL(copyAvailable(bool)), q, SIGNAL(copyAvailable(bool)));
QObject::connect(control, SIGNAL(selectionChanged()), q, SIGNAL(selectionChanged()));
- QObject::connect(control, SIGNAL(cursorPositionChanged()), q, SIGNAL(cursorPositionChanged()));
+ QObject::connect(control, SIGNAL(cursorPositionChanged()), q, SLOT(_q_cursorPositionChanged()));
QObject::connect(control, SIGNAL(textChanged()), q, SLOT(updateMicroFocus()));
@@ -206,6 +209,16 @@ void QTextEditPrivate::_q_repaintContents(const QRectF &contentsRect)
viewport->update(r);
}
+void QTextEditPrivate::_q_cursorPositionChanged()
+{
+ Q_Q(QTextEdit);
+ emit q->cursorPositionChanged();
+#ifndef QT_NO_ACCESSIBILITY
+ QAccessibleTextCursorEvent event(q, q->textCursor().position());
+ QAccessible::updateAccessibility(&event);
+#endif
+}
+
void QTextEditPrivate::pageUpDown(QTextCursor::MoveOperation op, QTextCursor::MoveMode moveMode)
{
QTextCursor cursor = control->textCursor();
diff --git a/src/widgets/widgets/qtextedit.h b/src/widgets/widgets/qtextedit.h
index 178aa7b907..5df44da4cf 100644
--- a/src/widgets/widgets/qtextedit.h
+++ b/src/widgets/widgets/qtextedit.h
@@ -304,6 +304,7 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_currentCharFormatChanged(const QTextCharFormat &))
Q_PRIVATE_SLOT(d_func(), void _q_adjustScrollbars())
Q_PRIVATE_SLOT(d_func(), void _q_ensureVisible(const QRectF &))
+ Q_PRIVATE_SLOT(d_func(), void _q_cursorPositionChanged())
friend class QTextEditControl;
friend class QTextDocument;
friend class QWidgetTextControl;
diff --git a/src/widgets/widgets/qtextedit_p.h b/src/widgets/widgets/qtextedit_p.h
index d2dd81c13b..7038f16205 100644
--- a/src/widgets/widgets/qtextedit_p.h
+++ b/src/widgets/widgets/qtextedit_p.h
@@ -99,6 +99,7 @@ public:
{ control->processEvent(e, QPointF(horizontalOffset(), verticalOffset()), viewport); }
void _q_currentCharFormatChanged(const QTextCharFormat &format);
+ void _q_cursorPositionChanged();
void updateDefaultTextOption();
diff --git a/src/widgets/widgets/qtoolbar.cpp b/src/widgets/widgets/qtoolbar.cpp
index 2681b0ab4e..80d42e4c95 100644
--- a/src/widgets/widgets/qtoolbar.cpp
+++ b/src/widgets/widgets/qtoolbar.cpp
@@ -273,7 +273,7 @@ bool QToolBarPrivate::mousePressEvent(QMouseEvent *event)
q->initStyleOption(&opt);
if (q->style()->subElementRect(QStyle::SE_ToolBarHandle, &opt, q).contains(event->pos()) == false) {
#ifdef Q_WS_MAC
- // When using the unified toolbar on Mac OS X the user can can click and
+ // When using the unified toolbar on Mac OS X, the user can click and
// drag between toolbar contents to move the window. Make this work by
// implementing the standard mouse-dragging code and then call
// window->move() in mouseMoveEvent below.
@@ -421,13 +421,13 @@ void QToolBarPrivate::plug(const QRect &r)
or insertAction(). Groups of buttons can be separated using
addSeparator() or insertSeparator(). If a toolbar button is not
appropriate, a widget can be inserted instead using addWidget() or
- insertWidget(); examples of suitable widgets are QSpinBox,
- QDoubleSpinBox, and QComboBox. When a toolbar button is pressed it
+ insertWidget(). Examples of suitable widgets are QSpinBox,
+ QDoubleSpinBox, and QComboBox. When a toolbar button is pressed, it
emits the actionTriggered() signal.
- A toolbar can be fixed in place in a particular area (e.g. at the
- top of the window), or it can be movable (isMovable()) between
- toolbar areas; see allowedAreas() and isAreaAllowed().
+ A toolbar can be fixed in place in a particular area (e.g., at the
+ top of the window), or it can be movable between toolbar areas;
+ see setMovable(), isMovable(), allowedAreas() and isAreaAllowed().
When a toolbar is resized in such a way that it is too small to
show all the items it contains, an extension button will appear as
@@ -454,7 +454,7 @@ void QToolBarPrivate::plug(const QRect &r)
\fn void QToolBar::addAction(QAction *action)
\overload
- Appends the action \a action to the toolbar's list of actions.
+ Appends the \a action to the toolbar's list of actions.
\sa QMenu::addAction(), QWidget::addAction()
*/
@@ -464,7 +464,7 @@ void QToolBarPrivate::plug(const QRect &r)
This signal is emitted when an action in this toolbar is triggered.
This happens when the action's tool button is pressed, or when the
- action is triggered in some other way outside the tool bar. The parameter
+ action is triggered in some other way outside the toolbar. The parameter
holds the triggered \a action.
*/
@@ -481,7 +481,7 @@ void QToolBarPrivate::plug(const QRect &r)
/*!
\fn void QToolBar::iconSizeChanged(const QSize &iconSize)
- This signal is emitted when the icon size is changed. The \a
+ This signal is emitted when the icon size is changed. The \a
iconSize parameter holds the toolbar's new icon size.
\sa iconSize, QMainWindow::iconSize
@@ -501,7 +501,7 @@ void QToolBarPrivate::plug(const QRect &r)
\fn void QToolBar::orientationChanged(Qt::Orientation orientation)
This signal is emitted when the orientation of the toolbar changes.
- The new orientation is specified by the \a orientation given.
+ The \a orientation parameter holds the toolbar's new orientation.
\sa orientation
*/
@@ -583,7 +583,7 @@ QToolBar::~QToolBar()
/*! \property QToolBar::movable
\brief whether the user can move the toolbar within the toolbar area,
- or between toolbar areas
+ or between toolbar areas.
By default, this property is true.
@@ -681,8 +681,8 @@ Qt::ToolBarAreas QToolBar::allowedAreas() const
This function should not be used when the toolbar is managed
by QMainWindow. You can use QMainWindow::addToolBar() or
- QMainWindow::insertToolBar() if you wish to move a toolbar (that
- is already added to a main window) to another Qt::ToolBarArea.
+ QMainWindow::insertToolBar() if you wish to move a toolbar that
+ is already added to a main window to another Qt::ToolBarArea.
*/
void QToolBar::setOrientation(Qt::Orientation orientation)
@@ -833,7 +833,7 @@ QAction *QToolBar::addAction(const QString &text,
/*!
\overload
- Creates a new action with the icon \a icon and text \a text. This
+ Creates a new action with the given \a icon and \a text. This
action is added to the end of the toolbar. The action's
\l{QAction::triggered()}{triggered()} signal is connected to \a
member in \a receiver.
@@ -880,7 +880,7 @@ QAction *QToolBar::insertSeparator(QAction *before)
The toolbar takes ownership of \a widget.
- If you add a QToolButton with this method, the tools bar's
+ If you add a QToolButton with this method, the toolbar's
Qt::ToolButtonStyle will not be respected.
\note You should use QAction::setVisible() to change the
diff --git a/src/winmain/winmain.pro b/src/winmain/winmain.pro
index e5da5bd97f..32eae0b9fe 100644
--- a/src/winmain/winmain.pro
+++ b/src/winmain/winmain.pro
@@ -5,7 +5,7 @@ TEMPLATE = lib
TARGET = qtmain
DESTDIR = $$QT.core.libs
-CONFIG += static warn_on depend_includepath
+CONFIG += static
QT = core
contains(QT_CONFIG, build_all):CONFIG += build_all
diff --git a/src/xml/doc/qtxml.qdocconf b/src/xml/doc/qtxml.qdocconf
index 3796e4d53e..bf77059a02 100644
--- a/src/xml/doc/qtxml.qdocconf
+++ b/src/xml/doc/qtxml.qdocconf
@@ -3,21 +3,21 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
project = QtXml
description = Qt XML Reference Documentation
url = http://qt-project.org/doc/qtxml
-version = 5.0.0
+version = 5.0.1
examplesinstallpath = xml
qhp.projects = QtXml
qhp.QtXml.file = qtxml.qhp
-qhp.QtXml.namespace = org.qt-project.qtxml.500
+qhp.QtXml.namespace = org.qt-project.qtxml.501
qhp.QtXml.virtualFolder = qtxml
qhp.QtXml.indexTitle = Qt XML
qhp.QtXml.indexRoot =
-qhp.QtXml.filterAttributes = qtxml 5.0.0 qtrefdoc
-qhp.QtXml.customFilters.Qt.name = QtXml 5.0.0
-qhp.QtXml.customFilters.Qt.filterAttributes = qtxml 5.0.0
+qhp.QtXml.filterAttributes = qtxml 5.0.1 qtrefdoc
+qhp.QtXml.customFilters.Qt.name = QtXml 5.0.1
+qhp.QtXml.customFilters.Qt.filterAttributes = qtxml 5.0.1
qhp.QtXml.subprojects = classes
qhp.QtXml.subprojects.classes.title = C++ Classes
diff --git a/sync.profile b/sync.profile
index 0e1608a748..756f83e409 100644
--- a/sync.profile
+++ b/sync.profile
@@ -3,7 +3,7 @@
"QtWidgets" => "$basedir/src/widgets",
"QtPrintSupport" => "$basedir/src/printsupport",
"QtOpenGL" => "$basedir/src/opengl",
- "QtCore" => "$basedir/src/corelib",
+ "QtCore" => "$basedir/src/corelib;^$basedir/src/3rdparty/harfbuzz/src",
"QtXml" => "$basedir/src/xml",
"QtSql" => "$basedir/src/sql",
"QtNetwork" => "$basedir/src/network",
@@ -42,24 +42,6 @@
"QtGui" => {
"QGenericPlugin" => "QtGui/QGenericPlugin",
"QGenericPluginFactory" => "QtGui/QGenericPluginFactory"
- },
- "QtWidgets" => {
- "qplatformmenu_qpa.h" => "qpa/qplatformmenu.h",
- "QPlatformMenu" => "qpa/qplatformmenu.h",
- "QPlatformMenuAction" => "qpa/qplatformmenu.h",
- "QPlatformMenuBar" => "qpa/qplatformmenu.h"
- },
- "QtPrintSupport" => {
- "qplatformprintersupport_qpa.h" => "qpa/qplatformprintersupport.h",
- "QPlatformPrinterSupport" => "qpa/qplatformprintersupport.h",
- "QPlatformPrinterSupportPlugin" => "XXXXXXXXXXXXXXXXXXXX",
- "qplatformprintplugin_qpa.h" => "qpa/qplatformprintplugin.h",
- "QPlatformPrintPlugin" => "qpa/qplatformprintplugin.h"
- },
- "QtPlatformSupport" => {
- "qplatforminputcontextfactory_qpa_p.h" => "qpa/qplatforminputcontextfactory_p.h",
- "qplatforminputcontextplugin_qpa_p.h" => "qpa/qplatforminputcontextplugin_p.h",
- "QPlatformInputContextPlugin" => "qpa/qplatforminputcontextplugin_p.h"
}
);
%explicitheaders = (
@@ -74,11 +56,11 @@
my @angle_headers = ('egl.h', 'eglext.h', 'eglplatform.h', 'gl2.h', 'gl2ext.h', 'gl2platform.h', 'ShaderLang.h', 'khrplatform.h');
my @internal_zlib_headers = ( "crc32.h", "deflate.h", "gzguts.h", "inffast.h", "inffixed.h", "inflate.h", "inftrees.h", "trees.h", "zutil.h" );
my @zlib_headers = ( "zconf.h", "zlib.h" );
+my @harfbuzz_headers = ( "harfbuzz-buffer-private.h", "harfbuzz-buffer.h", "harfbuzz-dump.h", "harfbuzz-external.h", "harfbuzz-gdef-private.h", "harfbuzz-gdef.h", "harfbuzz-global.h", "harfbuzz-gpos-private.h", "harfbuzz-gpos.h", "harfbuzz-gsub-private.h", "harfbuzz-gsub.h", "harfbuzz-impl.h", "harfbuzz-open-private.h", "harfbuzz-open.h", "harfbuzz-shape.h", "harfbuzz-shaper-private.h", "harfbuzz-shaper.h", "harfbuzz-stream-private.h", "harfbuzz-stream.h", "harfbuzz.h" );
@ignore_headers = ( @internal_zlib_headers );
-@ignore_for_include_check = ( "qsystemdetection.h", "qcompilerdetection.h", "qprocessordetection.h", @zlib_headers, @angle_headers);
-@ignore_for_qt_begin_header_check = ( "qiconset.h", "qconfig.h", "qconfig-dist.h", "qconfig-large.h", "qconfig-medium.h", "qconfig-minimal.h", "qconfig-small.h", "qfeatures.h", "qt_windows.h", @zlib_headers, @angle_headers);
-@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", @zlib_headers, @angle_headers);
-@ignore_for_qt_module_check = ( "$modules{QtCore}/arch", "$modules{QtCore}/global", "$modules{QtTest}", "$modules{QtDBus}" );
+@ignore_for_include_check = ( "qsystemdetection.h", "qcompilerdetection.h", "qprocessordetection.h", @zlib_headers, @angle_headers, @harfbuzz_headers);
+@ignore_for_qt_begin_header_check = ( "qiconset.h", "qconfig.h", "qconfig-dist.h", "qconfig-large.h", "qconfig-medium.h", "qconfig-minimal.h", "qconfig-small.h", "qfeatures.h", "qt_windows.h", @zlib_headers, @angle_headers, @harfbuzz_headers);
+@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", @zlib_headers, @angle_headers, @harfbuzz_headers);
%inject_headers = ( "$basedir/src/corelib/global" => [ "qconfig.h" ] );
# Module dependencies.
# Every module that is required to build this module should have one entry.
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index b3906cc247..6ff0734186 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -18,7 +18,7 @@ SUBDIRS += \
wince*: SUBDIRS -= printsupport
cross_compile: SUBDIRS -= tools
-isEmpty(QT.opengl.name): SUBDIRS -= opengl
-!unix|embedded|!contains(QT_CONFIG, dbus): SUBDIRS -= dbus
-contains(QT_CONFIG, no-widgets): SUBDIRS -= widgets printsupport
-!contains(QT_CONFIG, concurrent): SUBDIRS -= concurrent
+!qtHaveModule(opengl): SUBDIRS -= opengl
+!unix|embedded|!qtHaveModule(dbus): SUBDIRS -= dbus
+!qtHaveModule(widgets): SUBDIRS -= widgets printsupport
+!qtHaveModule(concurrent): SUBDIRS -= concurrent
diff --git a/tests/auto/corelib/animation/animation.pro b/tests/auto/corelib/animation/animation.pro
index 563b7184bf..30c98f4a11 100644
--- a/tests/auto/corelib/animation/animation.pro
+++ b/tests/auto/corelib/animation/animation.pro
@@ -8,5 +8,5 @@ SUBDIRS=\
qsequentialanimationgroup \
qvariantanimation
-contains(QT_CONFIG, no-widgets): SUBDIRS -= \
+!qtHaveModule(widgets): SUBDIRS -= \
qpropertyanimation
diff --git a/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp b/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp
index f1e02c65a8..8539b76dc3 100644
--- a/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp
+++ b/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp
@@ -44,6 +44,8 @@
#include <QtCore/qvariantanimation.h>
#include <QtWidgets/qwidget.h>
+Q_DECLARE_METATYPE(QAbstractAnimation::State)
+
class UncontrolledAnimation : public QPropertyAnimation
{
Q_OBJECT
@@ -699,7 +701,6 @@ struct Number
};
Q_DECLARE_METATYPE(Number)
-Q_DECLARE_METATYPE(QAbstractAnimation::State)
QVariant numberInterpolator(const Number &f, const Number &t, qreal progress)
{
diff --git a/tests/auto/corelib/io/qfilesystementry/qfilesystementry.pro b/tests/auto/corelib/io/qfilesystementry/qfilesystementry.pro
index b0ad8cc5ae..99d3af1848 100644
--- a/tests/auto/corelib/io/qfilesystementry/qfilesystementry.pro
+++ b/tests/auto/corelib/io/qfilesystementry/qfilesystementry.pro
@@ -2,6 +2,6 @@ CONFIG += testcase parallel_test
TARGET = tst_qfilesystementry
QT = core-private testlib
SOURCES = tst_qfilesystementry.cpp \
- $${QT.core.sources}/io/qfilesystementry.cpp
-HEADERS = $${QT.core.sources}/io/qfilesystementry_p.h
+ $$QT_SOURCE_TREE/src/corelib/io/qfilesystementry.cpp
+HEADERS = $$QT_SOURCE_TREE/src/corelib/io/qfilesystementry_p.h
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qprocess/qprocess.pri b/tests/auto/corelib/io/qprocess/qprocess.pri
index d139b3dcef..430251fbf1 100644
--- a/tests/auto/corelib/io/qprocess/qprocess.pri
+++ b/tests/auto/corelib/io/qprocess/qprocess.pri
@@ -17,5 +17,5 @@ SUBPROGRAMS = \
!contains(QMAKE_PLATFORM, wince): SUBPROGRAMS += testForwarding
-contains(QT_CONFIG, no-widgets): SUBPROGRAMS -= \
+!qtHaveModule(widgets): SUBPROGRAMS -= \
testGuiProcess
diff --git a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
index 49188c3057..8f76945bf5 100644
--- a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
+++ b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
@@ -322,7 +322,7 @@ void tst_QProcess::crashTest()
QVERIFY(process->waitForStarted(5000));
qRegisterMetaType<QProcess::ProcessError>("QProcess::ProcessError");
- qRegisterMetaType<QProcess::ProcessError>("QProcess::ExitStatus");
+ qRegisterMetaType<QProcess::ExitStatus>("QProcess::ExitStatus");
QSignalSpy spy(process, SIGNAL(error(QProcess::ProcessError)));
QSignalSpy spy2(process, SIGNAL(finished(int,QProcess::ExitStatus)));
@@ -357,7 +357,7 @@ void tst_QProcess::crashTest2()
QVERIFY(process->waitForStarted(5000));
qRegisterMetaType<QProcess::ProcessError>("QProcess::ProcessError");
- qRegisterMetaType<QProcess::ProcessError>("QProcess::ExitStatus");
+ qRegisterMetaType<QProcess::ExitStatus>("QProcess::ExitStatus");
QSignalSpy spy(process, SIGNAL(error(QProcess::ProcessError)));
QSignalSpy spy2(process, SIGNAL(finished(int,QProcess::ExitStatus)));
diff --git a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
index b975474c8f..40208f6e6d 100644
--- a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
+++ b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
@@ -650,12 +650,12 @@ void tst_QSettings::testByteArray()
// write
{
- QSettings settings("Trolltech", "tst_qsettings");
+ QSettings settings("QtProject", "tst_qsettings");
settings.setValue("byteArray", data);
}
// read
{
- QSettings settings("Trolltech", "tst_qsettings");
+ QSettings settings("QtProject", "tst_qsettings");
QByteArray ret = settings.value("byteArray", data).toByteArray();
QCOMPARE(ret, data);
}
@@ -1896,7 +1896,7 @@ void tst_QSettings::testEmptyData()
}
{
- QSettings settings("Trolltech", "tst_qsettings");
+ QSettings settings("QtProject", "tst_qsettings");
settings.setValue("nullString", nullString);
settings.setValue("emptyString", emptyString);
settings.setValue("emptyList", emptyList);
@@ -1909,7 +1909,7 @@ void tst_QSettings::testEmptyData()
QVERIFY(settings.status() == QSettings::NoError);
}
{
- QSettings settings("Trolltech", "tst_qsettings");
+ QSettings settings("QtProject", "tst_qsettings");
QCOMPARE(settings.value("nullString").toString(), nullString);
QCOMPARE(settings.value("emptyString").toString(), emptyString);
QCOMPARE(settings.value("emptyList").toStringList(), emptyList);
diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp
index 361713bbc7..ec402dd986 100644
--- a/tests/auto/corelib/io/qurl/tst_qurl.cpp
+++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp
@@ -149,6 +149,8 @@ private slots:
void toEncoded();
void setAuthority_data();
void setAuthority();
+ void setEmptyAuthority_data();
+ void setEmptyAuthority();
void clear();
void resolvedWithAbsoluteSchemes() const;
void resolvedWithAbsoluteSchemes_data() const;
@@ -1164,8 +1166,8 @@ void tst_QUrl::compat_constructor_01_data()
//next we fill it with data
QTest::newRow( "data0" ) << QString("Makefile") << QString("Makefile"); // nolonger add file by default
QTest::newRow( "data1" ) << QString("Makefile") << QString("Makefile");
- QTest::newRow( "data2" ) << QString("ftp://ftp.qt.nokia.com/qt/INSTALL") << QString("ftp://ftp.qt.nokia.com/qt/INSTALL");
- QTest::newRow( "data3" ) << QString("ftp://ftp.qt.nokia.com/qt/INSTALL") << QString("ftp://ftp.qt.nokia.com/qt/INSTALL");
+ QTest::newRow( "data2" ) << QString("ftp://ftp.qt-project.org/qt/INSTALL") << QString("ftp://ftp.qt-project.org/qt/INSTALL");
+ QTest::newRow( "data3" ) << QString("ftp://ftp.qt-project.org/qt/INSTALL") << QString("ftp://ftp.qt-project.org/qt/INSTALL");
}
void tst_QUrl::compat_constructor_01()
@@ -1180,7 +1182,7 @@ void tst_QUrl::compat_constructor_01()
* as well as the following:
*
* QUrlOperator op;
- * op.copy(QString("ftp://ftp.qt.nokia.com/qt/INSTALL"), ".");
+ * op.copy(QString("ftp://ftp.qt-project.org/qt/INSTALL"), ".");
*/
QFETCH( QString, urlStr );
@@ -1205,15 +1207,15 @@ void tst_QUrl::compat_constructor_02_data()
QTest::addColumn<QString>("res");
//next we fill it with data
- QTest::newRow( "data0" ) << QString("ftp://ftp.qt.nokia.com/qt") << QString("INSTALL") << QString("ftp://ftp.qt.nokia.com/INSTALL");
- QTest::newRow( "data1" ) << QString("ftp://ftp.qt.nokia.com/qt/") << QString("INSTALL") << QString("ftp://ftp.qt.nokia.com/qt/INSTALL");
+ QTest::newRow( "data0" ) << QString("ftp://ftp.qt-project.org/qt") << QString("INSTALL") << QString("ftp://ftp.qt-project.org/INSTALL");
+ QTest::newRow( "data1" ) << QString("ftp://ftp.qt-project.org/qt/") << QString("INSTALL") << QString("ftp://ftp.qt-project.org/qt/INSTALL");
}
void tst_QUrl::compat_constructor_02()
{
/* The following should work as expected:
*
- * QUrlOperator op( "ftp://ftp.qt.nokia.com/qt" );
+ * QUrlOperator op( "ftp://ftp.qt-project.org/qt" );
* op.copy(QString("INSTALL"), ".");
*/
QFETCH( QString, urlStr );
@@ -1236,7 +1238,7 @@ void tst_QUrl::compat_constructor_03_data()
QTest::newRow( "protocol02" ) << QString( "http://qt.nokia.com/" ) << QString( "http://qt.nokia.com/" );
QTest::newRow( "protocol03" ) << QString( "http://qt.nokia.com/foo" ) << QString( "http://qt.nokia.com/foo" );
QTest::newRow( "protocol04" ) << QString( "http://qt.nokia.com/foo/" ) << QString( "http://qt.nokia.com/foo/" );
- QTest::newRow( "protocol05" ) << QString( "ftp://ftp.qt.nokia.com/foo/index.txt" ) << QString( "ftp://ftp.qt.nokia.com/foo/index.txt" );
+ QTest::newRow( "protocol05" ) << QString( "ftp://ftp.qt-project.org/foo/index.txt" ) << QString( "ftp://ftp.qt-project.org/foo/index.txt" );
QTest::newRow( "local00" ) << QString( "/foo" ) << QString( "/foo" );
QTest::newRow( "local01" ) << QString( "/foo/" ) << QString( "/foo/" );
@@ -1278,11 +1280,11 @@ void tst_QUrl::compat_isValid_01_data()
QTest::addColumn<QString>("urlStr");
QTest::addColumn<bool>("res");
- QTest::newRow( "ok_01" ) << QString("ftp://ftp.qt.nokia.com/qt/INSTALL") << (bool)true;
+ QTest::newRow( "ok_01" ) << QString("ftp://ftp.qt-project.org/qt/INSTALL") << (bool)true;
QTest::newRow( "ok_02" ) << QString( "file:/foo") << (bool)true;
QTest::newRow( "ok_03" ) << QString( "file:foo") << (bool)true;
- QTest::newRow( "err_01" ) << QString("#ftp://ftp.qt.nokia.com/qt/INSTALL") << (bool)true;
+ QTest::newRow( "err_01" ) << QString("#ftp://ftp.qt-project.org/qt/INSTALL") << (bool)true;
QTest::newRow( "err_02" ) << QString( "file:/::foo") << (bool)true;
}
@@ -1310,18 +1312,18 @@ void tst_QUrl::compat_isValid_02_data()
QString n = "";
QTest::newRow( "ok_01" ) << n << n << n << n << -1 << QString("path") << (bool)true;
- QTest::newRow( "ok_02" ) << QString("ftp") << n << n << QString("ftp.qt.nokia.com") << -1 << n << (bool)true;
- QTest::newRow( "ok_03" ) << QString("ftp") << QString("foo") << n << QString("ftp.qt.nokia.com") << -1 << n << (bool)true;
- QTest::newRow( "ok_04" ) << QString("ftp") << QString("foo") << QString("bar") << QString("ftp.qt.nokia.com") << -1 << n << (bool)true;
- QTest::newRow( "ok_05" ) << QString("ftp") << n << n << QString("ftp.qt.nokia.com") << -1 << QString("/path")<< (bool)true;
- QTest::newRow( "ok_06" ) << QString("ftp") << QString("foo") << n << QString("ftp.qt.nokia.com") << -1 << QString("/path") << (bool)true;
- QTest::newRow( "ok_07" ) << QString("ftp") << QString("foo") << QString("bar") << QString("ftp.qt.nokia.com") << -1 << QString("/path")<< (bool)true;
+ QTest::newRow( "ok_02" ) << QString("ftp") << n << n << QString("ftp.qt-project.org") << -1 << n << (bool)true;
+ QTest::newRow( "ok_03" ) << QString("ftp") << QString("foo") << n << QString("ftp.qt-project.org") << -1 << n << (bool)true;
+ QTest::newRow( "ok_04" ) << QString("ftp") << QString("foo") << QString("bar") << QString("ftp.qt-project.org") << -1 << n << (bool)true;
+ QTest::newRow( "ok_05" ) << QString("ftp") << n << n << QString("ftp.qt-project.org") << -1 << QString("/path")<< (bool)true;
+ QTest::newRow( "ok_06" ) << QString("ftp") << QString("foo") << n << QString("ftp.qt-project.org") << -1 << QString("/path") << (bool)true;
+ QTest::newRow( "ok_07" ) << QString("ftp") << QString("foo") << QString("bar") << QString("ftp.qt-project.org") << -1 << QString("/path")<< (bool)true;
QTest::newRow( "err_01" ) << n << n << n << n << -1 << n << (bool)false;
QTest::newRow( "err_02" ) << QString("ftp") << n << n << n << -1 << n << (bool)true;
QTest::newRow( "err_03" ) << n << QString("foo") << n << n << -1 << n << (bool)true;
QTest::newRow( "err_04" ) << n << n << QString("bar") << n << -1 << n << (bool)true;
- QTest::newRow( "err_05" ) << n << n << n << QString("ftp.qt.nokia.com") << -1 << n << (bool)true;
+ QTest::newRow( "err_05" ) << n << n << n << QString("ftp.qt-project.org") << -1 << n << (bool)true;
QTest::newRow( "err_06" ) << n << n << n << n << 80 << n << (bool)true;
QTest::newRow( "err_07" ) << QString("ftp") << QString("foo") << n << n << -1 << n << (bool)true;
QTest::newRow( "err_08" ) << QString("ftp") << n << QString("bar") << n << -1 << n << (bool)true;
@@ -1811,12 +1813,12 @@ void tst_QUrl::schemeValidator_data()
// ftp
QTest::newRow("ftp:") << QByteArray("ftp:") << true << QString("ftp:");
- QTest::newRow("ftp://ftp.qt.nokia.com")
- << QByteArray("ftp://ftp.qt.nokia.com")
- << true << QString("ftp://ftp.qt.nokia.com");
- QTest::newRow("ftp://ftp.qt.nokia.com/")
- << QByteArray("ftp://ftp.qt.nokia.com/")
- << true << QString("ftp://ftp.qt.nokia.com/");
+ QTest::newRow("ftp://ftp.qt-project.org")
+ << QByteArray("ftp://ftp.qt-project.org")
+ << true << QString("ftp://ftp.qt-project.org");
+ QTest::newRow("ftp://ftp.qt-project.org/")
+ << QByteArray("ftp://ftp.qt-project.org/")
+ << true << QString("ftp://ftp.qt-project.org/");
QTest::newRow("ftp:/index.html")
<< QByteArray("ftp:/index.html")
<< false << QString();
@@ -2498,6 +2500,28 @@ void tst_QUrl::setAuthority()
QCOMPARE(u.toString(), url);
}
+void tst_QUrl::setEmptyAuthority_data()
+{
+ QTest::addColumn<QString>("host");
+ QTest::addColumn<QString>("authority");
+ QTest::addColumn<QString>("expectedUrlString");
+
+ QTest::newRow("null host and authority") << QString() << QString() << QString("");
+ QTest::newRow("empty host and authority") << QString("") << QString("") << QString("//");
+}
+
+void tst_QUrl::setEmptyAuthority()
+{
+ QFETCH(QString, host);
+ QFETCH(QString, authority);
+ QFETCH(QString, expectedUrlString);
+ QUrl u;
+ u.setHost(host);
+ QCOMPARE(u.toString(), expectedUrlString);
+ u.setAuthority(authority);
+ QCOMPARE(u.toString(), expectedUrlString);
+}
+
void tst_QUrl::clear()
{
QUrl url("a");
@@ -2593,6 +2617,10 @@ void tst_QUrl::fromUserInput_data()
QTest::newRow("add scheme-2") << "ftp.example.org" << QUrl("ftp://ftp.example.org");
QTest::newRow("add scheme-3") << "hostname" << QUrl("http://hostname");
+ // no host
+ QTest::newRow("nohost-1") << "http://" << QUrl("http://");
+ QTest::newRow("nohost-2") << "smb:" << QUrl("smb:");
+
// QUrl's tolerant parser should already handle this
QTest::newRow("not-encoded-0") << "http://example.org/test page.html" << QUrl::fromEncoded("http://example.org/test%20page.html");
@@ -2734,10 +2762,16 @@ void tst_QUrl::acceptEmptyAuthoritySegments()
QString foo_triple_bar("foo:///bar"), foo_uni_bar("foo:/bar");
QCOMPARE(foo_triple_bar, QUrl(foo_triple_bar).toString());
+ QCOMPARE(foo_triple_bar, QString::fromUtf8(QUrl(foo_triple_bar).toEncoded()));
+
QCOMPARE(foo_uni_bar, QUrl(foo_uni_bar).toString());
+ QCOMPARE(foo_uni_bar, QString::fromUtf8(QUrl(foo_uni_bar).toEncoded()));
QCOMPARE(foo_triple_bar, QUrl(foo_triple_bar, QUrl::StrictMode).toString());
+ QCOMPARE(foo_triple_bar, QString::fromUtf8(QUrl(foo_triple_bar, QUrl::StrictMode).toEncoded()));
+
QCOMPARE(foo_uni_bar, QUrl(foo_uni_bar, QUrl::StrictMode).toString());
+ QCOMPARE(foo_uni_bar, QString::fromUtf8(QUrl(foo_uni_bar, QUrl::StrictMode).toEncoded()));
}
void tst_QUrl::effectiveTLDs_data()
@@ -3135,6 +3169,31 @@ void tst_QUrl::setComponents_data()
<< int(Scheme) << "http%61" << Strict << false
<< PrettyDecoded << "" << "";
+ QTest::newRow("invalid-username-1") << QUrl("http://example.com")
+ << int(UserName) << "{}" << Strict << false
+ << PrettyDecoded << "" << "";
+ QTest::newRow("invalid-username-2") << QUrl("http://example.com")
+ << int(UserName) << "foo/bar" << Strict << false
+ << PrettyDecoded << "" << "";
+ QTest::newRow("invalid-username-3") << QUrl("http://example.com")
+ << int(UserName) << "foo:bar" << Strict << false
+ << PrettyDecoded << "" << "";
+ QTest::newRow("invalid-password-1") << QUrl("http://example.com")
+ << int(Password) << "{}" << Strict << false
+ << PrettyDecoded << "" << "";
+ QTest::newRow("invalid-password-2") << QUrl("http://example.com")
+ << int(Password) << "foo/bar" << Strict << false
+ << PrettyDecoded << "" << "";
+ QTest::newRow("invalid-password-3") << QUrl("http://example.com")
+ << int(Password) << "foo:bar" << Strict << false
+ << PrettyDecoded << "" << "";
+ QTest::newRow("invalid-userinfo-1") << QUrl("http://example.com")
+ << int(UserInfo) << "{}" << Strict << false
+ << PrettyDecoded << "" << "";
+ QTest::newRow("invalid-userinfo-2") << QUrl("http://example.com")
+ << int(UserInfo) << "foo/bar" << Strict << false
+ << PrettyDecoded << "" << "";
+
QTest::newRow("invalid-host-1") << QUrl("http://example.com")
<< int(Host) << "-not-valid-" << Tolerant << false
<< PrettyDecoded << "" << "";
@@ -3148,6 +3207,16 @@ void tst_QUrl::setComponents_data()
<< int(Authority) << "%31%30.%30.%30.%31" << Strict << false
<< PrettyDecoded << "" << "";
+ QTest::newRow("invalid-path-0") << QUrl("http://example.com")
+ << int(Path) << "{}" << Strict << false
+ << PrettyDecoded << "" << "";
+ QTest::newRow("invalid-query-1") << QUrl("http://example.com")
+ << int(Query) << "{}" << Strict << false
+ << PrettyDecoded << "" << "";
+ QTest::newRow("invalid-fragment-1") << QUrl("http://example.com")
+ << int(Fragment) << "{}" << Strict << false
+ << PrettyDecoded << "" << "";
+
// these test cases are "compound invalid":
// they produces isValid == false, but the original is still available
QTest::newRow("invalid-path-1") << QUrl("/relative")
@@ -3157,6 +3226,49 @@ void tst_QUrl::setComponents_data()
<< int(Path) << "relative" << Strict << false
<< PrettyDecoded << "relative" << "";
+ // -- test bad percent encoding --
+ // unnecessary to test the scheme, since percent-decoding is not performed in it;
+ // see tests above
+ QTest::newRow("bad-percent-username") << QUrl("http://example.com")
+ << int(UserName) << "bar%foo" << Strict << false
+ << PrettyDecoded << "" << "";
+ QTest::newRow("bad-percent-password") << QUrl("http://user@example.com")
+ << int(Password) << "bar%foo" << Strict << false
+ << PrettyDecoded << "" << "";
+ QTest::newRow("bad-percent-userinfo-1") << QUrl("http://example.com")
+ << int(UserInfo) << "bar%foo" << Strict << false
+ << PrettyDecoded << "" << "";
+ QTest::newRow("bad-percent-userinfo-2") << QUrl("http://example.com")
+ << int(UserInfo) << "bar%:foo" << Strict << false
+ << PrettyDecoded << "" << "";
+ QTest::newRow("bad-percent-userinfo-3") << QUrl("http://example.com")
+ << int(UserInfo) << "bar:%foo" << Strict << false
+ << PrettyDecoded << "" << "";
+ QTest::newRow("bad-percent-authority-1") << QUrl("http://example.com")
+ << int(Authority) << "bar%foo@example.org" << Strict << false
+ << PrettyDecoded << "" << "";
+ QTest::newRow("bad-percent-authority-2") << QUrl("http://example.com")
+ << int(Authority) << "bar%:foo@example.org" << Strict << false
+ << PrettyDecoded << "" << "";
+ QTest::newRow("bad-percent-authority-3") << QUrl("http://example.com")
+ << int(Authority) << "bar:%foo@example.org" << Strict << false
+ << PrettyDecoded << "" << "";
+ QTest::newRow("bad-percent-authority-4") << QUrl("http://example.com")
+ << int(Authority) << "bar:foo@bar%foo" << Strict << false
+ << PrettyDecoded << "" << "";
+ QTest::newRow("bad-percent-host") << QUrl("http://example.com")
+ << int(Host) << "bar%foo" << Strict << false
+ << PrettyDecoded << "" << "";
+ QTest::newRow("bad-percent-path") << QUrl("http://example.com")
+ << int(Path) << "/bar%foo" << Strict << false
+ << PrettyDecoded << "" << "";
+ QTest::newRow("bad-percent-query") << QUrl("http://example.com")
+ << int(Query) << "bar%foo" << Strict << false
+ << PrettyDecoded << "" << "";
+ QTest::newRow("bad-percent-fragment") << QUrl("http://example.com")
+ << int(Fragment) << "bar%foo" << Strict << false
+ << PrettyDecoded << "" << "";
+
// -- test decoded behaviour --
// '%' characters are not permitted in the scheme, this tests that it fails to set anything
QTest::newRow("invalid-scheme-encode") << QUrl("http://example.com")
diff --git a/tests/auto/corelib/itemmodels/itemmodels.pro b/tests/auto/corelib/itemmodels/itemmodels.pro
index 5221bfae81..2f681c3330 100644
--- a/tests/auto/corelib/itemmodels/itemmodels.pro
+++ b/tests/auto/corelib/itemmodels/itemmodels.pro
@@ -3,7 +3,7 @@ TEMPLATE=subdirs
SUBDIRS = qabstractitemmodel \
qstringlistmodel
-!contains(QT_CONFIG, no-widgets): SUBDIRS += \
+qtHaveModule(widgets): SUBDIRS += \
qabstractproxymodel \
qidentityproxymodel \
qitemmodel \
diff --git a/tests/auto/corelib/json/tst_qtjson.cpp b/tests/auto/corelib/json/tst_qtjson.cpp
index 82656d6309..4a8ef293ff 100644
--- a/tests/auto/corelib/json/tst_qtjson.cpp
+++ b/tests/auto/corelib/json/tst_qtjson.cpp
@@ -303,12 +303,27 @@ void tst_QtJson::testObjectSimple()
QVERIFY2(!object.contains("boolean"), "key boolean should have been removed");
QJsonValue taken = object.take("value");
-// QCOMPARE(taken, value);
+ QCOMPARE(taken, value);
QVERIFY2(!object.contains("value"), "key value should have been removed");
QString before = object.value("string").toString();
object.insert("string", QString::fromLatin1("foo"));
QVERIFY2(object.value("string").toString() != before, "value should have been updated");
+
+ size = object.size();
+ QJsonObject subobject;
+ subobject.insert("number", 42);
+ subobject.insert(QLatin1String("string"), QLatin1String("foobar"));
+ object.insert("subobject", subobject);
+ QCOMPARE(object.size(), size+1);
+ QJsonValue subvalue = object.take(QLatin1String("subobject"));
+ QCOMPARE(object.size(), size);
+ QCOMPARE(subvalue.toObject(), subobject);
+ // make object detach by modifying it many times
+ for (int i = 0; i < 64; ++i)
+ object.insert(QLatin1String("string"), QLatin1String("bar"));
+ QCOMPARE(object.size(), size);
+ QCOMPARE(subvalue.toObject(), subobject);
}
void tst_QtJson::testObjectSmallKeys()
diff --git a/tests/auto/corelib/kernel/qmetatype/qmetatype.pro b/tests/auto/corelib/kernel/qmetatype/qmetatype.pro
index 13dc2a2a90..561b7ed9cc 100644
--- a/tests/auto/corelib/kernel/qmetatype/qmetatype.pro
+++ b/tests/auto/corelib/kernel/qmetatype/qmetatype.pro
@@ -5,7 +5,12 @@ SOURCES = tst_qmetatype.cpp
TESTDATA=./typeFlags.bin
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
-win32-msvc2008 {
+win32-msvc* {
# Prevents "fatal error C1128: number of sections exceeded object file format limit".
QMAKE_CXXFLAGS += /bigobj
-} \ No newline at end of file
+ # Reduce compile time
+ win32-msvc2012 {
+ QMAKE_CXXFLAGS_RELEASE -= -O2
+ QMAKE_CFLAGS_RELEASE -= -O2
+ }
+}
diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
index cefbf6a17b..581644b19f 100644
--- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
+++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
@@ -141,6 +141,7 @@ private slots:
void returnValue2();
void connectVirtualSlots();
void connectFunctorArgDifference();
+ void disconnectDoesNotLeakFunctor();
};
class SenderObject : public QObject
@@ -4892,8 +4893,6 @@ void tst_QObject::connectCxx0xTypeMatching()
QVERIFY(QObject::connect(&obj, &Foo::const_signal_vi, &obj, &Foo::slot_vi));
QVERIFY(QObject::connect(&obj, &Foo::signal_vi, &obj, &Foo::const_slot_vi));
QVERIFY(QObject::connect(&obj, &Foo::signal_vi, &obj, &Foo::const_slot_v));
-
- QVERIFY(true); //compilation only test
}
class StringVariant : public QObject
@@ -5571,5 +5570,91 @@ void tst_QObject::connectFunctorArgDifference()
QVERIFY(true);
}
+static int countedStructObjectsCount = 0;
+struct CountedStruct
+{
+ CountedStruct() { ++countedStructObjectsCount; }
+ CountedStruct(const CountedStruct &) { ++countedStructObjectsCount; }
+ CountedStruct &operator=(const CountedStruct &) { return *this; }
+ ~CountedStruct() { --countedStructObjectsCount; }
+ void operator()() const {}
+};
+
+void tst_QObject::disconnectDoesNotLeakFunctor()
+{
+ QCOMPARE(countedStructObjectsCount, 0);
+ {
+ QMetaObject::Connection c;
+ {
+ CountedStruct s;
+ QCOMPARE(countedStructObjectsCount, 1);
+ QTimer timer;
+
+ c = connect(&timer, &QTimer::timeout, s);
+ QVERIFY(c);
+ QCOMPARE(countedStructObjectsCount, 2);
+ QVERIFY(QObject::disconnect(c));
+ QCOMPARE(countedStructObjectsCount, 1);
+ }
+ QCOMPARE(countedStructObjectsCount, 0);
+ }
+ QCOMPARE(countedStructObjectsCount, 0);
+ {
+ QMetaObject::Connection c1, c2;
+ {
+ CountedStruct s;
+ QCOMPARE(countedStructObjectsCount, 1);
+ QTimer timer;
+
+ c1 = connect(&timer, &QTimer::timeout, s);
+ QVERIFY(c1);
+ c2 = c1;
+ QVERIFY(c2);
+ QCOMPARE(countedStructObjectsCount, 2);
+ QVERIFY(QObject::disconnect(c1));
+ // functor object has been destroyed
+ QCOMPARE(countedStructObjectsCount, 1);
+ }
+ QCOMPARE(countedStructObjectsCount, 0);
+ }
+ QCOMPARE(countedStructObjectsCount, 0);
+ {
+ CountedStruct s;
+ QCOMPARE(countedStructObjectsCount, 1);
+ QTimer timer;
+
+ QMetaObject::Connection c = connect(&timer, &QTimer::timeout, s);
+ QVERIFY(c);
+ QCOMPARE(countedStructObjectsCount, 2);
+ QVERIFY(QObject::disconnect(c));
+ QCOMPARE(countedStructObjectsCount, 1);
+ }
+ QCOMPARE(countedStructObjectsCount, 0);
+ {
+ QTimer timer;
+
+ QMetaObject::Connection c = connect(&timer, &QTimer::timeout, CountedStruct());
+ QVERIFY(c);
+ QCOMPARE(countedStructObjectsCount, 1); // only one instance, in Qt internals
+ QVERIFY(QObject::disconnect(c));
+ QCOMPARE(countedStructObjectsCount, 0); // functor being destroyed
+ }
+ QCOMPARE(countedStructObjectsCount, 0);
+ {
+#if defined(Q_COMPILER_LAMBDA)
+ CountedStruct s;
+ QCOMPARE(countedStructObjectsCount, 1);
+ QTimer timer;
+
+ QMetaObject::Connection c = connect(&timer, &QTimer::timeout, [s](){});
+ QVERIFY(c);
+ QCOMPARE(countedStructObjectsCount, 2);
+ QVERIFY(QObject::disconnect(c));
+ QCOMPARE(countedStructObjectsCount, 1);
+#endif // Q_COMPILER_LAMBDA
+ }
+ QCOMPARE(countedStructObjectsCount, 0);
+}
+
QTEST_MAIN(tst_QObject)
#include "tst_qobject.moc"
diff --git a/tests/auto/corelib/kernel/qpointer/qpointer.pro b/tests/auto/corelib/kernel/qpointer/qpointer.pro
index 6c076e630f..8786d07292 100644
--- a/tests/auto/corelib/kernel/qpointer/qpointer.pro
+++ b/tests/auto/corelib/kernel/qpointer/qpointer.pro
@@ -2,6 +2,6 @@ CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qpointer
QT += testlib
-!contains(QT_CONFIG, no-widgets): QT += widgets
+qtHaveModule(widgets): QT += widgets
SOURCES = tst_qpointer.cpp
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/qmimedatabase-cache.pro b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/qmimedatabase-cache.pro
index b9bee22781..9f006b4a4f 100644
--- a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/qmimedatabase-cache.pro
+++ b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/qmimedatabase-cache.pro
@@ -7,7 +7,7 @@ QT = core testlib concurrent
SOURCES = tst_qmimedatabase-cache.cpp
HEADERS = ../tst_qmimedatabase.h
-DEFINES += CORE_SOURCES='"\\"$$QT.core.sources\\""'
+DEFINES += CORE_SOURCES='"\\"$$QT_SOURCE_TREE/src/corelib\\""'
*-g++*:QMAKE_CXXFLAGS += -W -Wall -Wextra -Wshadow -Wno-long-long -Wnon-virtual-dtor
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/qmimedatabase-xml.pro b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/qmimedatabase-xml.pro
index 688affd7cf..8dd8d930c1 100644
--- a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/qmimedatabase-xml.pro
+++ b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/qmimedatabase-xml.pro
@@ -4,12 +4,10 @@ TARGET = tst_qmimedatabase-xml
QT = core testlib concurrent
-CONFIG += depend_includepath
-
SOURCES += tst_qmimedatabase-xml.cpp
HEADERS += ../tst_qmimedatabase.h
-DEFINES += CORE_SOURCES='"\\"$$QT.core.sources\\""'
+DEFINES += CORE_SOURCES='"\\"$$QT_SOURCE_TREE/src/corelib\\""'
*-g++*:QMAKE_CXXFLAGS += -W -Wall -Wextra -Wshadow -Wno-long-long -Wnon-virtual-dtor
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.pro b/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.pro
index 0004a8c712..70ab54a964 100644
--- a/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.pro
+++ b/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.pro
@@ -4,6 +4,7 @@ HEADERS = almostplugin.h
SOURCES = almostplugin.cpp
TARGET = almostplugin
DESTDIR = ../bin
+QT = core
*-g++*:QMAKE_LFLAGS -= -Wl,--no-undefined
# This is testdata for the tst_qpluginloader test.
diff --git a/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.pro b/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.pro
index b510f8fb44..2ea9c27cc9 100644
--- a/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.pro
+++ b/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.pro
@@ -2,8 +2,11 @@ TEMPLATE = lib
CONFIG += plugin
HEADERS = theplugin.h
SOURCES = theplugin.cpp
-TARGET = $$qtLibraryTarget(theplugin)
+# Use a predictable name for the plugin, no debug extension. Just like most apps do.
+#TARGET = $$qtLibraryTarget(theplugin)
+TARGET = theplugin
DESTDIR = ../bin
+QT = core
# This is testdata for the tst_qpluginloader test.
target.path = $$[QT_INSTALL_TESTS]/tst_qpluginloader/bin
diff --git a/tests/auto/corelib/plugin/qpluginloader/tst/tst.pro b/tests/auto/corelib/plugin/qpluginloader/tst/tst.pro
index 48650a5727..a7a9661a54 100644
--- a/tests/auto/corelib/plugin/qpluginloader/tst/tst.pro
+++ b/tests/auto/corelib/plugin/qpluginloader/tst/tst.pro
@@ -4,6 +4,7 @@ TARGET = ../tst_qpluginloader
QT = core testlib
SOURCES = ../tst_qpluginloader.cpp
HEADERS = ../theplugin/plugininterface.h
+CONFIG -= app_bundle
win32 {
CONFIG(debug, debug|release) {
diff --git a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp
index 155267f80b..34ec66f63f 100644
--- a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp
+++ b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp
@@ -59,7 +59,11 @@
# define bundle_VALID true
# define dylib_VALID true
# define so_VALID true
-# define SUFFIX ".dylib"
+//# ifdef QT_NO_DEBUG
+# define SUFFIX ".dylib"
+//# else
+//# define SUFFIX "_debug.dylib"
+//#endif
# define PREFIX "lib"
#elif defined(Q_OS_HPUX) && !defined(__ia64)
@@ -79,11 +83,11 @@
#elif defined(Q_OS_WIN)
# undef dll_VALID
# define dll_VALID true
-# ifdef QT_NO_DEBUG
+//# ifdef QT_NO_DEBUG
# define SUFFIX ".dll"
-# else
-# define SUFFIX "d.dll"
-# endif
+//# else
+//# define SUFFIX "d.dll"
+//# endif
# define PREFIX ""
#else // all other Unix
@@ -111,6 +115,7 @@ private slots:
#if defined (Q_OS_UNIX)
void loadGarbage();
#endif
+ void relativePath();
void reloadPlugin();
};
@@ -294,6 +299,20 @@ void tst_QPluginLoader::loadGarbage()
}
#endif
+void tst_QPluginLoader::relativePath()
+{
+ // Windows binaries run from release and debug subdirs, so we can't rely on the current dir.
+ const QString binDir = QFINDTESTDATA("bin");
+ QVERIFY(!binDir.isEmpty());
+ QCoreApplication::addLibraryPath(binDir);
+ QPluginLoader loader("theplugin");
+ loader.load(); // not recommended, instance() should do the job.
+ PluginInterface *instance = qobject_cast<PluginInterface*>(loader.instance());
+ QVERIFY(instance);
+ QCOMPARE(instance->pluginName(), QLatin1String("Plugin ok"));
+ QVERIFY(loader.unload());
+}
+
void tst_QPluginLoader::reloadPlugin()
{
QPluginLoader loader;
diff --git a/tests/auto/corelib/statemachine/qstatemachine/qstatemachine.pro b/tests/auto/corelib/statemachine/qstatemachine/qstatemachine.pro
index 1708735c52..b830efe3a5 100644
--- a/tests/auto/corelib/statemachine/qstatemachine/qstatemachine.pro
+++ b/tests/auto/corelib/statemachine/qstatemachine/qstatemachine.pro
@@ -2,6 +2,6 @@ CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qstatemachine
QT = core-private testlib gui
-!contains(QT_CONFIG, no-widgets): QT += widgets
+qtHaveModule(widgets): QT += widgets
SOURCES = tst_qstatemachine.cpp
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/thread/qmutex/tst_qmutex.cpp b/tests/auto/corelib/thread/qmutex/tst_qmutex.cpp
index 7e3e720739..e51f8c9a23 100644
--- a/tests/auto/corelib/thread/qmutex/tst_qmutex.cpp
+++ b/tests/auto/corelib/thread/qmutex/tst_qmutex.cpp
@@ -57,6 +57,8 @@ private slots:
void stressTest();
void tryLockRace();
void tryLockDeadlock();
+ void tryLockNegative_data();
+ void tryLockNegative();
void moreStress();
};
@@ -579,6 +581,55 @@ void tst_QMutex::tryLockDeadlock()
QCOMPARE(tryLockDeadlockFailureCount, 0);
}
+void tst_QMutex::tryLockNegative_data()
+{
+ QTest::addColumn<int>("timeout");
+ QTest::newRow("-1") << -1;
+ QTest::newRow("-2") << -2;
+ QTest::newRow("INT_MIN/2") << INT_MIN/2;
+ QTest::newRow("INT_MIN") << INT_MIN;
+}
+
+void tst_QMutex::tryLockNegative()
+{
+ // the documentation says tryLock() with a negative number is the same as lock()
+ struct TrylockThread : QThread {
+ TrylockThread(QMutex &mut, int timeout)
+ : mut(mut), timeout(timeout), tryLockResult(-1)
+ {}
+ QMutex &mut;
+ int timeout;
+ int tryLockResult;
+ void run() {
+ tryLockResult = mut.tryLock(timeout);
+ mut.unlock();
+ }
+ };
+
+ QFETCH(int, timeout);
+
+ QMutex mutex;
+ TrylockThread thr(mutex, timeout);
+ QSignalSpy spy(&thr, SIGNAL(started()));
+ mutex.lock();
+ thr.start();
+
+ // the thread should have stopped in tryLock(), waiting for us to unlock
+ // the mutex. The following test can be falsely positive due to timing:
+ // tryLock may still fail but hasn't failed yet. But it certainly cannot be
+ // a false negative: if wait() returns, tryLock failed.
+ QVERIFY(!thr.wait(200));
+
+ // after we unlock the mutex, the thread should succeed in locking, then
+ // unlock and exit. Do this before more tests to avoid deadlocking due to
+ // ~QThread waiting forever on a thread that won't exit.
+ mutex.unlock();
+
+ QCOMPARE(spy.count(), 1);
+ QVERIFY(thr.wait());
+ QCOMPARE(thr.tryLockResult, 1);
+}
+
class MoreStressTestThread : public QThread
{
diff --git a/tests/auto/corelib/thread/qthread/tst_qthread.cpp b/tests/auto/corelib/thread/qthread/tst_qthread.cpp
index bdfb980357..eaae3d49d3 100644
--- a/tests/auto/corelib/thread/qthread/tst_qthread.cpp
+++ b/tests/auto/corelib/thread/qthread/tst_qthread.cpp
@@ -1300,9 +1300,10 @@ class Job : public QObject
{
Q_OBJECT
public:
- Job(QThread *thread, int deleteDelay, QObject *parent = 0)
- : QObject(parent), quitLocker(thread), exitThreadCalled(false)
+ Job(QThread *thread, int deleteDelay, bool *flag, QObject *parent = 0)
+ : QObject(parent), quitLocker(thread), exitThreadCalled(*flag)
{
+ exitThreadCalled = false;
moveToThread(thread);
QTimer::singleShot(deleteDelay, this, SLOT(deleteLater()));
QTimer::singleShot(1000, this, SLOT(exitThread()));
@@ -1318,12 +1319,13 @@ private slots:
private:
QEventLoopLocker quitLocker;
public:
- bool exitThreadCalled;
+ bool &exitThreadCalled;
};
void tst_QThread::quitLock()
{
QThread thread;
+ bool exitThreadCalled;
QEventLoop loop;
connect(&thread, SIGNAL(finished()), &loop, SLOT(quit()));
@@ -1331,16 +1333,16 @@ void tst_QThread::quitLock()
Job *job;
thread.start();
- job = new Job(&thread, 500);
+ job = new Job(&thread, 500, &exitThreadCalled);
QCOMPARE(job->thread(), &thread);
loop.exec();
- QVERIFY(!job->exitThreadCalled);
+ QVERIFY(!exitThreadCalled);
thread.start();
- job = new Job(&thread, 2500);
+ job = new Job(&thread, 2500, &exitThreadCalled);
QCOMPARE(job->thread(), &thread);
loop.exec();
- QVERIFY(job->exitThreadCalled);
+ QVERIFY(exitThreadCalled);
}
QTEST_MAIN(tst_QThread)
diff --git a/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp b/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp
index ad7d8b2ab9..ade8cc0ad0 100644
--- a/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp
+++ b/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp
@@ -1561,7 +1561,7 @@ void tst_QArrayData::literals()
#endif
QVERIFY(v.isSharable());
- QCOMPARE((const char *)(v.constBegin() + v.size()), (const char *)v.constEnd());
+ QCOMPARE((void*)(v.constBegin() + v.size()), (void*)v.constEnd());
for (int i = 0; i < 10; ++i)
QCOMPARE(const_(v)[i], char('A' + i));
diff --git a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
index 848fdb14a4..1084b5a7b1 100644
--- a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
+++ b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
@@ -68,6 +68,7 @@ private slots:
void constByteArray();
void leftJustified();
void rightJustified();
+ void setNum();
void startsWith_data();
void startsWith();
void startsWith_char();
@@ -397,6 +398,49 @@ void tst_QByteArray::rightJustified()
QCOMPARE(a,QByteArray("ABC"));
}
+void tst_QByteArray::setNum()
+{
+ QByteArray a;
+ QCOMPARE(a.setNum(-1), QByteArray("-1"));
+ QCOMPARE(a.setNum(0), QByteArray("0"));
+ QCOMPARE(a.setNum(0, 2), QByteArray("0"));
+ QCOMPARE(a.setNum(0, 36), QByteArray("0"));
+ QCOMPARE(a.setNum(1), QByteArray("1"));
+ QCOMPARE(a.setNum(35, 36), QByteArray("z"));
+ QCOMPARE(a.setNum(37, 2), QByteArray("100101"));
+ QCOMPARE(a.setNum(37, 36), QByteArray("11"));
+
+ // Negative numbers are only properly supported for base 10.
+ QCOMPARE(a.setNum(short(-1), 16), QByteArray("ffff"));
+ QCOMPARE(a.setNum(int(-1), 16), QByteArray("ffffffff"));
+ QCOMPARE(a.setNum(qlonglong(-1), 16), QByteArray("ffffffffffffffff"));
+
+ QCOMPARE(a.setNum(short(-1), 10), QByteArray("-1"));
+ QCOMPARE(a.setNum(int(-1), 10), QByteArray("-1"));
+ QCOMPARE(a.setNum(qlonglong(-1), 10), QByteArray("-1"));
+
+ QCOMPARE(a.setNum(-123), QByteArray("-123"));
+ QCOMPARE(a.setNum(0x123,16), QByteArray("123"));
+ QCOMPARE(a.setNum((short)123), QByteArray("123"));
+
+ QCOMPARE(a.setNum(1.23), QByteArray("1.23"));
+ QCOMPARE(a.setNum(1.234567), QByteArray("1.23457"));
+
+ // Note that there are no 'long' overloads, so not all of the
+ // QString::setNum() tests can be re-used.
+ QCOMPARE(a.setNum(Q_INT64_C(123)), QByteArray("123"));
+ // 2^40 == 1099511627776
+ QCOMPARE(a.setNum(Q_INT64_C(-1099511627776)), QByteArray("-1099511627776"));
+ QCOMPARE(a.setNum(Q_UINT64_C(1099511627776)), QByteArray("1099511627776"));
+ QCOMPARE(a.setNum(Q_INT64_C(9223372036854775807)), // LLONG_MAX
+ QByteArray("9223372036854775807"));
+ QCOMPARE(a.setNum(-Q_INT64_C(9223372036854775807) - Q_INT64_C(1)),
+ QByteArray("-9223372036854775808"));
+ QCOMPARE(a.setNum(Q_UINT64_C(18446744073709551615)), // ULLONG_MAX
+ QByteArray("18446744073709551615"));
+ QCOMPARE(a.setNum(0.000000000931322574615478515625), QByteArray("9.31323e-10"));
+}
+
void tst_QByteArray::startsWith_data()
{
QTest::addColumn<QByteArray>("ba");
diff --git a/tests/auto/corelib/tools/qfreelist/qfreelist.pro b/tests/auto/corelib/tools/qfreelist/qfreelist.pro
index e1effd30a0..60ae819f87 100644
--- a/tests/auto/corelib/tools/qfreelist/qfreelist.pro
+++ b/tests/auto/corelib/tools/qfreelist/qfreelist.pro
@@ -3,5 +3,5 @@ CONFIG += parallel_test
TARGET = tst_qfreelist
QT = core-private testlib
SOURCES = tst_qfreelist.cpp
-!contains(QT_CONFIG,private_tests): SOURCES += $$QT.core.sources/tools/qfreelist.cpp
+!contains(QT_CONFIG,private_tests): SOURCES += $$QT_SOURCE_TREE/src/corelib/tools/qfreelist.cpp
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/dbus/qdbusxmlparser/qdbusxmlparser.pro b/tests/auto/dbus/qdbusxmlparser/qdbusxmlparser.pro
index 4b3415612a..a7186c341b 100644
--- a/tests/auto/dbus/qdbusxmlparser/qdbusxmlparser.pro
+++ b/tests/auto/dbus/qdbusxmlparser/qdbusxmlparser.pro
@@ -1,5 +1,5 @@
CONFIG += testcase
TARGET = tst_qdbusxmlparser
-QT = core-private dbus-private testlib
+QT = core-private dbus-private xml testlib
SOURCES += tst_qdbusxmlparser.cpp
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp b/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp
index 5f03600b89..ef7b020d89 100644
--- a/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp
+++ b/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp
@@ -44,6 +44,7 @@
#include <qmetatype.h>
#include <QtTest/QtTest>
#include <QtDBus/QtDBus>
+#include <QtXml/QDomDocument>
#define USE_PRIVATE_CODE
#include "../qdbusmarshall/common.h"
@@ -54,8 +55,10 @@ class tst_QDBusXmlParser: public QObject
private:
void parsing_common(const QString&);
+ QString clean_xml(const QString&);
private slots:
+ void initTestCase();
void parsing_data();
void parsing();
void parsingWithDoctype_data();
@@ -69,42 +72,76 @@ private slots:
void properties();
};
+QT_BEGIN_NAMESPACE
+// Avoid QHash randomization so that the order of the XML attributes is stable
+extern Q_CORE_EXPORT QBasicAtomicInt qt_qhash_seed; // from qhash.cpp
+QT_END_NAMESPACE
+
+void tst_QDBusXmlParser::initTestCase()
+{
+ // If the seed not initialized yet (-1), set it to 0
+ // otherwise abort, so we don't get unexplained test failures later.
+ QVERIFY(qt_qhash_seed.testAndSetRelaxed(-1, 0));
+}
+
void tst_QDBusXmlParser::parsing_data()
{
QTest::addColumn<QString>("xmlData");
QTest::addColumn<int>("interfaceCount");
QTest::addColumn<int>("objectCount");
QTest::addColumn<int>("annotationCount");
+ QTest::addColumn<QStringList>("introspection");
- QTest::newRow("null") << QString() << 0 << 0 << 0;
- QTest::newRow("empty") << QString("") << 0 << 0 << 0;
+ QStringList introspection;
+
+ QTest::newRow("null") << QString() << 0 << 0 << 0 << introspection;
+ QTest::newRow("empty") << QString("") << 0 << 0 << 0 << introspection;
- QTest::newRow("junk") << "<junk/>" << 0 << 0 << 0;
+ QTest::newRow("junk") << "<junk/>" << 0 << 0 << 0 << introspection;
QTest::newRow("interface-inside-junk") << "<junk><interface name=\"iface.iface1\" /></junk>"
- << 0 << 0 << 0;
+ << 0 << 0 << 0 << introspection;
QTest::newRow("object-inside-junk") << "<junk><node name=\"obj1\" /></junk>"
- << 0 << 0 << 0;
+ << 0 << 0 << 0 << introspection;
- QTest::newRow("zero-interfaces") << "<node/>" << 0 << 0 << 0;
- QTest::newRow("one-interface") << "<node><interface name=\"iface.iface1\" /></node>" << 1 << 0 << 0;
+ QTest::newRow("zero-interfaces") << "<node/>" << 0 << 0 << 0 << introspection;
-
+ introspection << "<interface name=\"iface.iface1\"/>";
+ QTest::newRow("one-interface") << "<node><interface name=\"iface.iface1\" /></node>"
+ << 1 << 0 << 0 << introspection;
+ introspection.clear();
+
+ introspection << "<interface name=\"iface.iface1\"/>"
+ << "<interface name=\"iface.iface2\"/>";
QTest::newRow("two-interfaces") << "<node><interface name=\"iface.iface1\" />"
"<interface name=\"iface.iface2\" /></node>"
- << 2 << 0 << 0;
+ << 2 << 0 << 0 << introspection;
+ introspection.clear();
- QTest::newRow("one-object") << "<node><node name=\"obj1\"/></node>" << 0 << 1 << 0;
- QTest::newRow("two-objects") << "<node><node name=\"obj1\"/><node name=\"obj2\"/></node>" << 0 << 2 << 0;
+ QTest::newRow("one-object") << "<node><node name=\"obj1\"/></node>"
+ << 0 << 1 << 0 << introspection;
+ QTest::newRow("two-objects") << "<node><node name=\"obj1\"/><node name=\"obj2\"/></node>"
+ << 0 << 2 << 0 << introspection;
- QTest::newRow("i1o1") << "<node><interface name=\"iface.iface1\"/><node name=\"obj1\"/></node>" << 1 << 1 << 0;
+ introspection << "<interface name=\"iface.iface1\"/>";
+ QTest::newRow("i1o1") << "<node><interface name=\"iface.iface1\"/><node name=\"obj1\"/></node>"
+ << 1 << 1 << 0 << introspection;
+ introspection.clear();
+ introspection << "<interface name=\"iface.iface1\">"
+ " <annotation name=\"foo.testing\" value=\"nothing to see here\"/>"
+ "</interface>";
QTest::newRow("one-interface-annotated") << "<node><interface name=\"iface.iface1\">"
"<annotation name=\"foo.testing\" value=\"nothing to see here\" />"
- "</interface></node>" << 1 << 0 << 1;
+ "</interface></node>" << 1 << 0 << 1 << introspection;
+ introspection.clear();
+
+
+ introspection << "<interface name=\"iface.iface1\"/>";
QTest::newRow("one-interface-docnamespace") << "<?xml version=\"1.0\" xmlns:doc=\"foo\" ?><node>"
"<interface name=\"iface.iface1\"><doc:something />"
- "</interface></node>" << 1 << 0 << 0;
+ "</interface></node>" << 1 << 0 << 0 << introspection;
+ introspection.clear();
}
void tst_QDBusXmlParser::parsing_common(const QString &xmlData)
@@ -114,20 +151,36 @@ void tst_QDBusXmlParser::parsing_common(const QString &xmlData)
QFETCH(int, interfaceCount);
QFETCH(int, objectCount);
QFETCH(int, annotationCount);
+ QFETCH(QStringList, introspection);
QCOMPARE(obj.interfaces.count(), interfaceCount);
QCOMPARE(obj.childObjects.count(), objectCount);
QCOMPARE(QDBusIntrospection::parseInterface(xmlData).annotations.count(), annotationCount);
+ QDBusIntrospection::Interfaces ifaces = QDBusIntrospection::parseInterfaces(xmlData);
+
// also verify the naming
int i = 0;
- foreach (QString name, obj.interfaces)
- QCOMPARE(name, QString("iface.iface%1").arg(++i));
+ foreach (QString name, obj.interfaces) {
+ const QString expectedName = QString("iface.iface%1").arg(i+1);
+ QCOMPARE(name, expectedName);
+
+ const QString expectedIntrospection = clean_xml(introspection.at(i++));
+ const QString resultIntrospection = clean_xml(ifaces.value(expectedName)->introspection);
+ QCOMPARE(resultIntrospection, expectedIntrospection);
+ }
i = 0;
foreach (QString name, obj.childObjects)
QCOMPARE(name, QString("obj%1").arg(++i));
}
+QString tst_QDBusXmlParser::clean_xml(const QString &xmlData)
+{
+ QDomDocument dom;
+ dom.setContent(xmlData);
+ return dom.toString();
+}
+
void tst_QDBusXmlParser::parsing()
{
QFETCH(QString, xmlData);
@@ -304,10 +357,10 @@ void tst_QDBusXmlParser::methods_data()
void tst_QDBusXmlParser::methods()
{
- QString xmlHeader = "<node>"
- "<interface name=\"iface.iface1\">",
- xmlFooter = "</interface>"
- "</node>";
+ QString intHeader = "<interface name=\"iface.iface1\">",
+ intFooter = "</interface>",
+ xmlHeader = "<node>" + intHeader,
+ xmlFooter = intFooter + "</node>";
QFETCH(QString, xmlDataFragment);
@@ -315,6 +368,7 @@ void tst_QDBusXmlParser::methods()
QDBusIntrospection::parseInterface(xmlHeader + xmlDataFragment + xmlFooter);
QCOMPARE(iface.name, QString("iface.iface1"));
+ QCOMPARE(clean_xml(iface.introspection), clean_xml(intHeader + xmlDataFragment + intFooter));
QFETCH(MethodMap, methodMap);
MethodMap parsedMap = iface.methods;
@@ -417,10 +471,10 @@ void tst_QDBusXmlParser::signals__data()
void tst_QDBusXmlParser::signals_()
{
- QString xmlHeader = "<node>"
- "<interface name=\"iface.iface1\">",
- xmlFooter = "</interface>"
- "</node>";
+ QString intHeader = "<interface name=\"iface.iface1\">",
+ intFooter = "</interface>",
+ xmlHeader = "<node>" + intHeader,
+ xmlFooter = intFooter + "</node>";
QFETCH(QString, xmlDataFragment);
@@ -428,6 +482,7 @@ void tst_QDBusXmlParser::signals_()
QDBusIntrospection::parseInterface(xmlHeader + xmlDataFragment + xmlFooter);
QCOMPARE(iface.name, QString("iface.iface1"));
+ QCOMPARE(clean_xml(iface.introspection), clean_xml(intHeader + xmlDataFragment + intFooter));
QFETCH(SignalMap, signalMap);
SignalMap parsedMap = iface.signals_;
@@ -506,10 +561,10 @@ void tst_QDBusXmlParser::properties_data()
void tst_QDBusXmlParser::properties()
{
- QString xmlHeader = "<node>"
- "<interface name=\"iface.iface1\">",
- xmlFooter = "</interface>"
- "</node>";
+ QString intHeader = "<interface name=\"iface.iface1\">",
+ intFooter = "</interface>",
+ xmlHeader = "<node>" + intHeader,
+ xmlFooter = intFooter + "</node>";
QFETCH(QString, xmlDataFragment);
@@ -517,6 +572,7 @@ void tst_QDBusXmlParser::properties()
QDBusIntrospection::parseInterface(xmlHeader + xmlDataFragment + xmlFooter);
QCOMPARE(iface.name, QString("iface.iface1"));
+ QCOMPARE(clean_xml(iface.introspection), clean_xml(intHeader + xmlDataFragment + intFooter));
QFETCH(PropertyMap, propertyMap);
PropertyMap parsedMap = iface.properties;
diff --git a/tests/auto/gui/image/qicon/qicon.pro b/tests/auto/gui/image/qicon/qicon.pro
index d4ade0e8ab..337b938915 100644
--- a/tests/auto/gui/image/qicon/qicon.pro
+++ b/tests/auto/gui/image/qicon/qicon.pro
@@ -3,7 +3,7 @@ CONFIG += parallel_test
TARGET = tst_qicon
QT += testlib
-!contains(QT_CONFIG, no-widgets): QT += widgets
+qtHaveModule(widgets): QT += widgets
SOURCES += tst_qicon.cpp
RESOURCES = tst_qicon.qrc
diff --git a/tests/auto/gui/image/qimage/tst_qimage.cpp b/tests/auto/gui/image/qimage/tst_qimage.cpp
index 1b0dbf754b..9cebdf3114 100644
--- a/tests/auto/gui/image/qimage/tst_qimage.cpp
+++ b/tests/auto/gui/image/qimage/tst_qimage.cpp
@@ -773,7 +773,7 @@ void tst_QImage::convertToFormat()
int dp = (src.depth() < 8 || result.depth() < 8) ? 8 : 1;
QImage src2(src.bits() + (dp*src.depth())/8,
src.width() - dp*2,
- src.height(), src.bytesPerLine(),
+ src.height() - 1, src.bytesPerLine(),
src.format());
if (src.depth() < 8)
src2.setColorTable(src.colorTable());
@@ -785,7 +785,7 @@ void tst_QImage::convertToFormat()
QImage expected2(result.bits() + (dp*result.depth())/8,
result.width() - dp*2,
- result.height(), result.bytesPerLine(),
+ result.height() - 1, result.bytesPerLine(),
result.format());
if (result.depth() < 8)
expected2.setColorTable(result.colorTable());
diff --git a/tests/auto/gui/image/qmovie/qmovie.pro b/tests/auto/gui/image/qmovie/qmovie.pro
index a511f0b258..9290588625 100644
--- a/tests/auto/gui/image/qmovie/qmovie.pro
+++ b/tests/auto/gui/image/qmovie/qmovie.pro
@@ -2,7 +2,7 @@ CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qmovie
QT += testlib
-!contains(QT_CONFIG, no-widgets): QT += widgets
+qtHaveModule(widgets): QT += widgets
SOURCES += tst_qmovie.cpp
MOC_DIR=tmp
diff --git a/tests/auto/gui/image/qpicture/qpicture.pro b/tests/auto/gui/image/qpicture/qpicture.pro
index 8a93584aaa..b4927b4536 100644
--- a/tests/auto/gui/image/qpicture/qpicture.pro
+++ b/tests/auto/gui/image/qpicture/qpicture.pro
@@ -2,7 +2,7 @@ CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qpicture
QT += testlib
-!contains(QT_CONFIG, no-widgets): QT += widgets
+qtHaveModule(widgets): QT += widgets
SOURCES += tst_qpicture.cpp
diff --git a/tests/auto/gui/image/qpixmap/qpixmap.pro b/tests/auto/gui/image/qpixmap/qpixmap.pro
index f079f56864..6188bf2c6e 100644
--- a/tests/auto/gui/image/qpixmap/qpixmap.pro
+++ b/tests/auto/gui/image/qpixmap/qpixmap.pro
@@ -2,7 +2,7 @@ CONFIG += testcase
TARGET = tst_qpixmap
QT += core-private gui-private testlib
-!contains(QT_CONFIG, no-widgets): QT += widgets widgets-private
+qtHaveModule(widgets): QT += widgets widgets-private
SOURCES += tst_qpixmap.cpp
!wince* {
diff --git a/tests/auto/gui/itemmodels/itemmodels.pro b/tests/auto/gui/itemmodels/itemmodels.pro
index 169100f486..8a300d0210 100644
--- a/tests/auto/gui/itemmodels/itemmodels.pro
+++ b/tests/auto/gui/itemmodels/itemmodels.pro
@@ -3,5 +3,5 @@ SUBDIRS= \
qstandarditem \
qstandarditemmodel
-isEmpty(QT.widgets.name):SUBDIRS -= \
+!qtHaveModule(widgets): SUBDIRS -= \
qstandarditemmodel
diff --git a/tests/auto/gui/kernel/kernel.pro b/tests/auto/gui/kernel/kernel.pro
index fb8cd2d566..7e3f25d377 100644
--- a/tests/auto/gui/kernel/kernel.pro
+++ b/tests/auto/gui/kernel/kernel.pro
@@ -19,6 +19,6 @@ SUBDIRS=\
qwindow \
qguiapplication \
-contains(QT_CONFIG, no-widgets): SUBDIRS -= \
+!qtHaveModule(widgets): SUBDIRS -= \
qmouseevent_modal \
qtouchevent
diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
index 55d8ceedf6..8962f00a75 100644
--- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
+++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
@@ -731,10 +731,6 @@ void tst_QWindow::orientation()
window.reportContentOrientationChange(Qt::PrimaryOrientation);
QCOMPARE(window.contentOrientation(), Qt::PrimaryOrientation);
- QVERIFY(!window.requestOrientation(Qt::LandscapeOrientation) || window.orientation() == Qt::LandscapeOrientation);
- QVERIFY(!window.requestOrientation(Qt::PortraitOrientation) || window.orientation() == Qt::PortraitOrientation);
- QVERIFY(!window.requestOrientation(Qt::PrimaryOrientation) || window.orientation() == Qt::PrimaryOrientation);
-
QSignalSpy spy(&window, SIGNAL(contentOrientationChanged(Qt::ScreenOrientation)));
window.reportContentOrientationChange(Qt::LandscapeOrientation);
QCOMPARE(spy.count(), 1);
diff --git a/tests/auto/gui/painting/qpainter/qpainter.pro b/tests/auto/gui/painting/qpainter/qpainter.pro
index 90a801ecb3..a30564cc50 100644
--- a/tests/auto/gui/painting/qpainter/qpainter.pro
+++ b/tests/auto/gui/painting/qpainter/qpainter.pro
@@ -3,8 +3,8 @@ CONFIG += parallel_test
TARGET = tst_qpainter
QT += testlib
-!contains(QT_CONFIG, no-widgets): QT += widgets widgets-private
-!contains(QT_CONFIG, no-widgets):!wince*: QT += printsupport
+qtHaveModule(widgets): QT += widgets widgets-private
+qtHaveModule(widgets):!wince*: QT += printsupport
SOURCES += tst_qpainter.cpp
diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
index 51c261fc6a..085aef6019 100644
--- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
+++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
@@ -229,6 +229,7 @@ private slots:
void drawImage_task217400();
void drawImage_1x1();
void drawImage_task258776();
+ void drawImage_QTBUG28324();
void drawRect_task215378();
void drawRect_task247505();
@@ -3233,6 +3234,25 @@ void tst_QPainter::drawImage_task258776()
QCOMPARE(dest, expected);
}
+void tst_QPainter::drawImage_QTBUG28324()
+{
+ QImage dest(512, 512, QImage::Format_ARGB32_Premultiplied);
+ dest.fill(0x0);
+
+ int x = 263; int y = 89; int w = 61; int h = 39;
+
+ QImage source(w, h, QImage::Format_ARGB32_Premultiplied);
+ quint32 *b = (quint32 *)source.bits();
+ for (int j = 0; j < w * h; ++j)
+ b[j] = 0x7f7f7f7f;
+
+ // nothing to test here since the bug is about
+ // an invalid memory read, which valgrind
+ // would complain about
+ QPainter p(&dest);
+ p.drawImage(x, y, source);
+}
+
void tst_QPainter::clipRectSaveRestore()
{
QImage img(64, 64, QImage::Format_ARGB32_Premultiplied);
diff --git a/tests/auto/gui/text/qabstracttextdocumentlayout/qabstracttextdocumentlayout.pro b/tests/auto/gui/text/qabstracttextdocumentlayout/qabstracttextdocumentlayout.pro
index 801e9dc7be..bb6457853e 100644
--- a/tests/auto/gui/text/qabstracttextdocumentlayout/qabstracttextdocumentlayout.pro
+++ b/tests/auto/gui/text/qabstracttextdocumentlayout/qabstracttextdocumentlayout.pro
@@ -7,6 +7,6 @@ CONFIG += parallel_test
TARGET = tst_qabstracttextdocumentlayout
QT += testlib
SOURCES += tst_qabstracttextdocumentlayout.cpp
-
+linux: CONFIG += insignificant_test
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/gui/text/qfont/qfont.pro b/tests/auto/gui/text/qfont/qfont.pro
index 562294dd66..ced66c226c 100644
--- a/tests/auto/gui/text/qfont/qfont.pro
+++ b/tests/auto/gui/text/qfont/qfont.pro
@@ -3,7 +3,7 @@ CONFIG += parallel_test
TARGET = tst_qfont
QT += testlib
QT += core-private gui-private
-!contains(QT_CONFIG, no-widgets): QT += widgets
+qtHaveModule(widgets): QT += widgets
SOURCES += tst_qfont.cpp
diff --git a/tests/auto/gui/text/qglyphrun/qglyphrun.pro b/tests/auto/gui/text/qglyphrun/qglyphrun.pro
index 67eb1d1b2b..45680febf3 100644
--- a/tests/auto/gui/text/qglyphrun/qglyphrun.pro
+++ b/tests/auto/gui/text/qglyphrun/qglyphrun.pro
@@ -3,6 +3,8 @@ CONFIG += parallel_test
TARGET = tst_qglyphrun
QT = core gui testlib
+linux: CONFIG += insignificant_test
+
SOURCES += \
tst_qglyphrun.cpp
diff --git a/tests/auto/gui/text/qrawfont/qrawfont.pro b/tests/auto/gui/text/qrawfont/qrawfont.pro
index b764cfbee0..ce4d0aec40 100644
--- a/tests/auto/gui/text/qrawfont/qrawfont.pro
+++ b/tests/auto/gui/text/qrawfont/qrawfont.pro
@@ -7,7 +7,5 @@ QT = core core-private gui gui-private testlib
SOURCES += \
tst_qrawfont.cpp
-INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty/harfbuzz/src
-
TESTDATA += testfont_bold_italic.ttf testfont.ttf
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/gui/text/qstatictext/qstatictext.pro b/tests/auto/gui/text/qstatictext/qstatictext.pro
index 38ab120985..772b68cfff 100644
--- a/tests/auto/gui/text/qstatictext/qstatictext.pro
+++ b/tests/auto/gui/text/qstatictext/qstatictext.pro
@@ -1,5 +1,6 @@
CONFIG += testcase
CONFIG += parallel_test
+linux: CONFIG += insignificant_test
TARGET = tst_qstatictext
QT += testlib
QT += core core-private gui gui-private
diff --git a/tests/auto/gui/text/qsyntaxhighlighter/qsyntaxhighlighter.pro b/tests/auto/gui/text/qsyntaxhighlighter/qsyntaxhighlighter.pro
index c8db4df90e..24b58c7d3e 100644
--- a/tests/auto/gui/text/qsyntaxhighlighter/qsyntaxhighlighter.pro
+++ b/tests/auto/gui/text/qsyntaxhighlighter/qsyntaxhighlighter.pro
@@ -3,5 +3,5 @@ CONFIG += parallel_test
TARGET = tst_qsyntaxhighlighter
SOURCES += tst_qsyntaxhighlighter.cpp
QT += testlib
-!contains(QT_CONFIG, no-widgets) QT += widgets
+qtHaveModule(widgets) QT += widgets
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/gui/text/qtextdocumentlayout/qtextdocumentlayout.pro b/tests/auto/gui/text/qtextdocumentlayout/qtextdocumentlayout.pro
index d439e0deb9..76dd370a8d 100644
--- a/tests/auto/gui/text/qtextdocumentlayout/qtextdocumentlayout.pro
+++ b/tests/auto/gui/text/qtextdocumentlayout/qtextdocumentlayout.pro
@@ -2,7 +2,7 @@ CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qtextdocumentlayout
QT += testlib
-!contains(QT_CONFIG, no-widgets) QT += widgets
+qtHaveModule(widgets) QT += widgets
SOURCES += tst_qtextdocumentlayout.cpp
diff --git a/tests/auto/gui/text/qtextlayout/qtextlayout.pro b/tests/auto/gui/text/qtextlayout/qtextlayout.pro
index 696fae0a9c..9833a5bd1a 100644
--- a/tests/auto/gui/text/qtextlayout/qtextlayout.pro
+++ b/tests/auto/gui/text/qtextlayout/qtextlayout.pro
@@ -4,5 +4,4 @@ QT += core-private gui-private testlib
HEADERS +=
SOURCES += tst_qtextlayout.cpp
DEFINES += QT_COMPILES_IN_HARFBUZZ
-INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty/harfbuzz/src
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/gui/text/qtextobject/qtextobject.pro b/tests/auto/gui/text/qtextobject/qtextobject.pro
index 59312ac1d5..ebeba2a64a 100644
--- a/tests/auto/gui/text/qtextobject/qtextobject.pro
+++ b/tests/auto/gui/text/qtextobject/qtextobject.pro
@@ -6,7 +6,7 @@ CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qtextobject
QT += testlib
-!contains(QT_CONFIG, no-widgets): QT += widgets
+qtHaveModule(widgets): QT += widgets
SOURCES += tst_qtextobject.cpp
diff --git a/tests/auto/gui/text/qtextscriptengine/generate/generate.pro b/tests/auto/gui/text/qtextscriptengine/generate/generate.pro
index 94500e4195..bd85c108c2 100644
--- a/tests/auto/gui/text/qtextscriptengine/generate/generate.pro
+++ b/tests/auto/gui/text/qtextscriptengine/generate/generate.pro
@@ -1,6 +1,6 @@
CONFIG -= moc
+QT += core-private # for harfbuzz
INCLUDEPATH += . /usr/include/freetype2
-INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty/harfbuzz/src
SOURCES += main.cpp
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/gui/text/qtextscriptengine/qtextscriptengine.pro b/tests/auto/gui/text/qtextscriptengine/qtextscriptengine.pro
index 37eab00c8d..e355a90e5c 100644
--- a/tests/auto/gui/text/qtextscriptengine/qtextscriptengine.pro
+++ b/tests/auto/gui/text/qtextscriptengine/qtextscriptengine.pro
@@ -6,5 +6,4 @@ QT += core-private gui-private testlib
HEADERS +=
SOURCES += tst_qtextscriptengine.cpp
-INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty/harfbuzz/src
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/gui/text/qtexttable/qtexttable.pro b/tests/auto/gui/text/qtexttable/qtexttable.pro
index a1034dac67..1c59bf1471 100644
--- a/tests/auto/gui/text/qtexttable/qtexttable.pro
+++ b/tests/auto/gui/text/qtexttable/qtexttable.pro
@@ -2,7 +2,7 @@ CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qtexttable
QT += testlib
-!contains(QT_CONFIG, no-widgets): QT += widgets
+qtHaveModule(widgets): QT += widgets
SOURCES += tst_qtexttable.cpp
diff --git a/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp b/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp
index 76c047a076..1b53eabdde 100644
--- a/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp
+++ b/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp
@@ -121,7 +121,7 @@ public:
tst_QAbstractNetworkCache::tst_QAbstractNetworkCache()
{
- QCoreApplication::setOrganizationName(QLatin1String("Trolltech"));
+ QCoreApplication::setOrganizationName(QLatin1String("QtProject"));
QCoreApplication::setApplicationName(QLatin1String("autotest_qabstractnetworkcache"));
QCoreApplication::setApplicationVersion(QLatin1String("1.0"));
}
diff --git a/tests/auto/network/access/qftp/tst_qftp.cpp b/tests/auto/network/access/qftp/tst_qftp.cpp
index 702d56db54..bd922d4223 100644
--- a/tests/auto/network/access/qftp/tst_qftp.cpp
+++ b/tests/auto/network/access/qftp/tst_qftp.cpp
@@ -2077,7 +2077,7 @@ void tst_QFtp::queueMoreCommandsInDoneSlot()
this->ftp = &ftp;
connect(&ftp, SIGNAL(done(bool)), this, SLOT(cdUpSlot(bool)));
- ftp.connectToHost("ftp.qt.nokia.com");
+ ftp.connectToHost("ftp.qt-project.org");
ftp.login();
ftp.cd("qt");
ftp.rmdir("qtest-removedir-noexist");
diff --git a/tests/auto/network/access/qhttpnetworkconnection/qhttpnetworkconnection.pro b/tests/auto/network/access/qhttpnetworkconnection/qhttpnetworkconnection.pro
index 925b72ac92..5f5966e90d 100644
--- a/tests/auto/network/access/qhttpnetworkconnection/qhttpnetworkconnection.pro
+++ b/tests/auto/network/access/qhttpnetworkconnection/qhttpnetworkconnection.pro
@@ -2,7 +2,6 @@ CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qhttpnetworkconnection
SOURCES += tst_qhttpnetworkconnection.cpp
-INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty/zlib
requires(contains(QT_CONFIG,private_tests))
QT = core-private network-private testlib
diff --git a/tests/auto/network/access/qhttpnetworkreply/qhttpnetworkreply.pro b/tests/auto/network/access/qhttpnetworkreply/qhttpnetworkreply.pro
index 5325b76726..2eb0944e44 100644
--- a/tests/auto/network/access/qhttpnetworkreply/qhttpnetworkreply.pro
+++ b/tests/auto/network/access/qhttpnetworkreply/qhttpnetworkreply.pro
@@ -2,7 +2,6 @@ CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qhttpnetworkreply
SOURCES += tst_qhttpnetworkreply.cpp
-INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty/zlib
requires(contains(QT_CONFIG,private_tests))
QT = core-private network-private testlib
diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
index b3282beaf5..240a459fe4 100644
--- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
@@ -6497,7 +6497,7 @@ void tst_QNetworkReply::qtbug27161httpHeaderMayBeDamaged_data(){
/*
* Purpose of this test is to check whether a content from server is parsed correctly
- * if it is splitted into two parts.
+ * if it is split into two parts.
*/
void tst_QNetworkReply::qtbug27161httpHeaderMayBeDamaged(){
QFETCH(QByteArray, firstPacket);
diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
index 5af7efd805..df84b7e7d8 100644
--- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
@@ -231,7 +231,6 @@ tst_QSslSocket::tst_QSslSocket()
qRegisterMetaType<QSslError>("QSslError");
qRegisterMetaType<QAbstractSocket::SocketState>("QAbstractSocket::SocketState");
qRegisterMetaType<QAbstractSocket::SocketError>("QAbstractSocket::SocketError");
- qRegisterMetaType<QAbstractSocket::SocketState>("QSslSocket::SslMode");
#endif
}
@@ -731,7 +730,7 @@ void tst_QSslSocket::peerCertificateChain()
QVERIFY(socket->waitForDisconnected());
// connect again to a different server
- socket->connectToHostEncrypted("trolltech.com", 443);
+ socket->connectToHostEncrypted("qt-project.org", 443);
socket->ignoreSslErrors();
QCOMPARE(socket->mode(), QSslSocket::UnencryptedMode);
QVERIFY(socket->peerCertificateChain().isEmpty());
diff --git a/tests/auto/opengl/qgl/qgl.pro b/tests/auto/opengl/qgl/qgl.pro
index e5aff000ac..311e41a624 100644
--- a/tests/auto/opengl/qgl/qgl.pro
+++ b/tests/auto/opengl/qgl/qgl.pro
@@ -4,7 +4,7 @@
CONFIG += testcase
TARGET = tst_qgl
-requires(contains(QT_CONFIG,opengl))
+requires(qtHaveModule(opengl))
QT += widgets widgets-private opengl-private gui-private core-private testlib
SOURCES += tst_qgl.cpp
diff --git a/tests/auto/opengl/qglbuffer/qglbuffer.pro b/tests/auto/opengl/qglbuffer/qglbuffer.pro
index 4d102415a8..72117322da 100644
--- a/tests/auto/opengl/qglbuffer/qglbuffer.pro
+++ b/tests/auto/opengl/qglbuffer/qglbuffer.pro
@@ -5,7 +5,7 @@
CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qglbuffer
-requires(contains(QT_CONFIG,opengl))
+requires(qtHaveModule(opengl))
QT += opengl widgets testlib
SOURCES += tst_qglbuffer.cpp
diff --git a/tests/auto/opengl/qglfunctions/qglfunctions.pro b/tests/auto/opengl/qglfunctions/qglfunctions.pro
index 321f62534e..a512ea0dd9 100644
--- a/tests/auto/opengl/qglfunctions/qglfunctions.pro
+++ b/tests/auto/opengl/qglfunctions/qglfunctions.pro
@@ -1,7 +1,7 @@
CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qglfunctions
-requires(contains(QT_CONFIG,opengl))
+requires(qtHaveModule(opengl))
QT += opengl widgets testlib
SOURCES += tst_qglfunctions.cpp
diff --git a/tests/auto/opengl/qglthreads/qglthreads.pro b/tests/auto/opengl/qglthreads/qglthreads.pro
index d5cbd0d9ed..3502c41c87 100644
--- a/tests/auto/opengl/qglthreads/qglthreads.pro
+++ b/tests/auto/opengl/qglthreads/qglthreads.pro
@@ -1,6 +1,6 @@
CONFIG += testcase
TARGET = tst_qglthreads
-requires(contains(QT_CONFIG,opengl))
+requires(qtHaveModule(opengl))
QT += opengl widgets testlib gui-private core-private
HEADERS += tst_qglthreads.h
diff --git a/tests/auto/other/atwrapper/atWrapper.pro b/tests/auto/other/atwrapper/atWrapper.pro
index d14293302e..1617ae89d1 100644
--- a/tests/auto/other/atwrapper/atWrapper.pro
+++ b/tests/auto/other/atwrapper/atWrapper.pro
@@ -6,7 +6,7 @@ DEFINES += SRCDIR=\\\"$$PWD\\\"
QT += xml svg network testlib
-contains(QT_CONFIG, opengl):QT += opengl
+qtHaveModule(opengl): QT += opengl
include($$ARTHUR/datagenerator/datagenerator.pri)
diff --git a/tests/auto/other/headersclean/headersclean.pro b/tests/auto/other/headersclean/headersclean.pro
index 419c2e97d5..4965064b88 100644
--- a/tests/auto/other/headersclean/headersclean.pro
+++ b/tests/auto/other/headersclean/headersclean.pro
@@ -1,3 +1,3 @@
-QT = core testlib gui widgets
-include(headersclean.pri)
+QT = core concurrent network dbus xml sql testlib gui opengl widgets printsupport platformsupport
+load(qt_headersclean)
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/other/other.pro b/tests/auto/other/other.pro
index eb6ed667a8..ea6290db42 100644
--- a/tests/auto/other/other.pro
+++ b/tests/auto/other/other.pro
@@ -26,7 +26,7 @@ SUBDIRS=\
qtokenautomaton \
windowsmobile \
-contains(QT_CONFIG, no-widgets): SUBDIRS -= \
+!qtHaveModule(widgets): SUBDIRS -= \
baselineexample \
gestures \
headersclean \
diff --git a/tests/auto/other/qaccessibility/qaccessibility.pro b/tests/auto/other/qaccessibility/qaccessibility.pro
index 919c24d80b..54a076b8fa 100644
--- a/tests/auto/other/qaccessibility/qaccessibility.pro
+++ b/tests/auto/other/qaccessibility/qaccessibility.pro
@@ -17,6 +17,6 @@ win32 {
include(../../../../src/3rdparty/iaccessible2/iaccessible2.pri)
DEFINES += QT_SUPPORTS_IACCESSIBLE2
}
- LIBS += -loleacc -loleaut32 -lole32
+ LIBS += -loleacc -loleaut32 -lole32 -luuid
}
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
index fd2ce7b810..9302828196 100644
--- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
+++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
@@ -69,6 +69,16 @@
#include "QtTest/qtestaccessible.h"
+// Make a widget frameless to prevent size constraints of title bars
+// from interfering (Windows).
+static inline void setFrameless(QWidget *w)
+{
+ Qt::WindowFlags flags = w->windowFlags();
+ flags |= Qt::FramelessWindowHint;
+ flags &= ~(Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint);
+ w->setWindowFlags(flags);
+}
+
#if defined(Q_OS_WINCE)
extern "C" bool SystemParametersInfo(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni);
#define SPI_GETPLATFORMTYPE 257
@@ -363,6 +373,7 @@ void tst_QAccessibility::eventTest()
{
QPushButton* button = new QPushButton(0);
button->setObjectName(QString("Olaf"));
+ setFrameless(button);
button->show();
QAccessibleEvent showEvent(button, QAccessible::ObjectShow);
@@ -440,6 +451,7 @@ void tst_QAccessibility::sliderTest()
{
{
QSlider *slider = new QSlider(0);
+ setFrameless(slider);
slider->setObjectName(QString("Slidy"));
slider->show();
QAIPtr iface(QAccessible::queryAccessibleInterface(slider));
@@ -453,6 +465,7 @@ void tst_QAccessibility::sliderTest()
QVERIFY(valueIface != 0);
QCOMPARE(valueIface->minimumValue().toInt(), slider->minimum());
QCOMPARE(valueIface->maximumValue().toInt(), slider->maximum());
+ QCOMPARE(valueIface->minimumStepSize().toInt(), slider->singleStep());
slider->setValue(50);
QCOMPARE(valueIface->currentValue().toInt(), slider->value());
slider->setValue(0);
@@ -461,6 +474,8 @@ void tst_QAccessibility::sliderTest()
QCOMPARE(valueIface->currentValue().toInt(), slider->value());
valueIface->setCurrentValue(77);
QCOMPARE(77, slider->value());
+ slider->setSingleStep(2);
+ QCOMPARE(valueIface->minimumStepSize().toInt(), 2);
delete slider;
}
@@ -664,6 +679,7 @@ void tst_QAccessibility::textAttributes()
void tst_QAccessibility::hideShowTest()
{
QWidget * const window = new QWidget();
+ window->resize(200, 200);
QWidget * const child = new QWidget(window);
QVERIFY(state(window).invisible);
@@ -724,6 +740,7 @@ void tst_QAccessibility::actionTest()
{
QPushButton *button = new QPushButton;
+ setFrameless(button);
button->show();
QVERIFY(QTest::qWaitForWindowExposed(button));
button->clearFocus();
@@ -909,6 +926,7 @@ void tst_QAccessibility::buttonTest()
QMenu *menu = new QMenu();
menu->addAction(foo);
QPushButton menuButton;
+ setFrameless(&menuButton);
menuButton.setMenu(menu);
menuButton.show();
QAccessibleInterface *interface = QAccessible::queryAccessibleInterface(&menuButton);
@@ -1064,6 +1082,7 @@ void tst_QAccessibility::scrollBarTest()
void tst_QAccessibility::tabTest()
{
QTabBar *tabBar = new QTabBar();
+ setFrameless(tabBar);
tabBar->show();
QAccessibleInterface * const interface = QAccessible::queryAccessibleInterface(tabBar);
@@ -1440,6 +1459,7 @@ void tst_QAccessibility::menuTest()
void tst_QAccessibility::spinBoxTest()
{
QSpinBox * const spinBox = new QSpinBox();
+ setFrameless(spinBox);
spinBox->setValue(3);
spinBox->show();
@@ -1482,6 +1502,7 @@ void tst_QAccessibility::spinBoxTest()
void tst_QAccessibility::doubleSpinBoxTest()
{
QDoubleSpinBox *doubleSpinBox = new QDoubleSpinBox;
+ setFrameless(doubleSpinBox);
doubleSpinBox->show();
QAccessibleInterface *interface = QAccessible::queryAccessibleInterface(doubleSpinBox);
@@ -1530,6 +1551,7 @@ void tst_QAccessibility::textEditTest()
for (int pass = 0; pass < 2; ++pass) {
{
QTextEdit edit;
+ setFrameless(&edit);
int startOffset;
int endOffset;
// create two blocks of text. The first block has two lines.
@@ -1580,6 +1602,8 @@ void tst_QAccessibility::textEditTest()
edit.setTextCursor(c);
QAccessibleTextSelectionEvent sel(&edit, 2, 4);
QVERIFY_EVENT(&sel);
+ QAccessibleTextCursorEvent cursor(&edit, 4);
+ QVERIFY_EVENT(&cursor);
edit.selectAll();
int end = edit.textCursor().position();
@@ -2126,6 +2150,7 @@ void tst_QAccessibility::dialogButtonBoxTest()
QDialogButtonBox box(QDialogButtonBox::Reset |
QDialogButtonBox::Help |
QDialogButtonBox::Ok, Qt::Horizontal);
+ setFrameless(&box);
// Test up and down navigation
@@ -2167,6 +2192,7 @@ void tst_QAccessibility::dialTest()
{
{
QDial dial;
+ setFrameless(&dial);
dial.setMinimum(23);
dial.setMaximum(121);
dial.setValue(42);
@@ -2925,6 +2951,7 @@ void tst_QAccessibility::labelTest()
{
QString text = "Hello World";
QLabel *label = new QLabel(text);
+ setFrameless(label);
label->show();
#if defined(Q_OS_UNIX)
diff --git a/tests/auto/other/qcomplextext/qcomplextext.pro b/tests/auto/other/qcomplextext/qcomplextext.pro
index f6c0c261be..7848028134 100644
--- a/tests/auto/other/qcomplextext/qcomplextext.pro
+++ b/tests/auto/other/qcomplextext/qcomplextext.pro
@@ -4,5 +4,4 @@ TARGET = tst_qcomplextext
QT += widgets widgets-private testlib
QT += core-private gui-private
SOURCES += tst_qcomplextext.cpp
-INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty/harfbuzz/src
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/sql/kernel/kernel.pro b/tests/auto/sql/kernel/kernel.pro
index 74e98c0dde..312f8fcfde 100644
--- a/tests/auto/sql/kernel/kernel.pro
+++ b/tests/auto/sql/kernel/kernel.pro
@@ -8,3 +8,4 @@ SUBDIRS=\
qsqlrecord \
qsqlthread \
qsql \
+ qsqlresult \
diff --git a/tests/auto/sql/kernel/qsql/qsql.pro b/tests/auto/sql/kernel/qsql/qsql.pro
index 5847bd74b1..980a35b99f 100644
--- a/tests/auto/sql/kernel/qsql/qsql.pro
+++ b/tests/auto/sql/kernel/qsql/qsql.pro
@@ -8,4 +8,6 @@ QT += sql sql-private gui testlib
wince*: {
DEPLOYMENT_PLUGIN += qsqlite
}
+win32-g++*: LIBS += -lws2_32
+
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/sql/kernel/qsqldatabase/tst_databases.h b/tests/auto/sql/kernel/qsqldatabase/tst_databases.h
index fee1d006b2..f20b2dae2a 100644
--- a/tests/auto/sql/kernel/qsqldatabase/tst_databases.h
+++ b/tests/auto/sql/kernel/qsqldatabase/tst_databases.h
@@ -463,6 +463,13 @@ public:
return "blob";
}
+ static QString dateTimeTypeName(QSqlDatabase db)
+ {
+ if (db.driverName().startsWith("QPSQL"))
+ return QLatin1String("timestamp");
+ return QLatin1String("datetime");
+ }
+
static QString autoFieldName( QSqlDatabase db )
{
if ( db.driverName().startsWith( "QMYSQL" ) )
diff --git a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp
index 5cb7c27387..d6216ee8f3 100644
--- a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp
+++ b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp
@@ -579,7 +579,7 @@ void tst_QSqlQuery::mysqlOutValues()
void tst_QSqlQuery::bindBool()
{
- // QTBUG-27763: bool value got converted to int 127 by mysql driver becuase sizeof(bool) < sizeof(int).
+ // QTBUG-27763: bool value got converted to int 127 by mysql driver because sizeof(bool) < sizeof(int).
// The problem was the way the bool value from the application was handled. It doesn't matter
// whether the table column type is BOOL or INT. Use INT here because all DBMSs have it and all
// should pass this test.
@@ -3406,7 +3406,7 @@ void tst_QSqlQuery::QTBUG_2192()
tst_Databases::safeDropTable( db, tableName );
QSqlQuery q(db);
- QVERIFY_SQL(q, exec("CREATE TABLE " + tableName + " (dt DATETIME)"));
+ QVERIFY_SQL(q, exec(QString("CREATE TABLE " + tableName + " (dt %1)").arg(tst_Databases::dateTimeTypeName(db))));
QVERIFY_SQL(q, prepare("INSERT INTO " + tableName + " (dt) VALUES (?)"));
q.bindValue(0, QVariant(QDateTime(QDate(2012, 7, 4), QTime(23, 59, 59, 999))));
@@ -3578,6 +3578,10 @@ void tst_QSqlQuery::aggregateFunctionTypes()
QFETCH(QString, dbName);
QSqlDatabase db = QSqlDatabase::database(dbName);
CHECK_DATABASE(db);
+ QVariant::Type intType = QVariant::Int;
+ // QPSQL uses LongLong for manipulation of integers
+ if (db.driverName().startsWith("QPSQL"))
+ intType = QVariant::LongLong;
{
const QString tableName(qTableName("numericFunctionsWithIntValues", __FILE__));
tst_Databases::safeDropTable( db, tableName );
@@ -3591,7 +3595,7 @@ void tst_QSqlQuery::aggregateFunctionTypes()
if (db.driverName().startsWith("QSQLITE"))
QCOMPARE(q.record().field(0).type(), QVariant::Invalid);
else
- QCOMPARE(q.record().field(0).type(), QVariant::Int);
+ QCOMPARE(q.record().field(0).type(), intType);
QVERIFY_SQL(q, exec("INSERT INTO " + tableName + " (id) VALUES (1)"));
QVERIFY_SQL(q, exec("INSERT INTO " + tableName + " (id) VALUES (2)"));
@@ -3599,11 +3603,11 @@ void tst_QSqlQuery::aggregateFunctionTypes()
QVERIFY_SQL(q, exec("SELECT SUM(id) FROM " + tableName));
QVERIFY(q.next());
QCOMPARE(q.value(0).toInt(), 3);
- QCOMPARE(q.record().field(0).type(), QVariant::Int);
+ QCOMPARE(q.record().field(0).type(), intType);
QVERIFY_SQL(q, exec("SELECT AVG(id) FROM " + tableName));
QVERIFY(q.next());
- if (db.driverName().startsWith("QSQLITE")) {
+ if (db.driverName().startsWith("QSQLITE") || db.driverName().startsWith("QPSQL")) {
QCOMPARE(q.value(0).toDouble(), 1.5);
QCOMPARE(q.record().field(0).type(), QVariant::Double);
} else {
@@ -3614,7 +3618,7 @@ void tst_QSqlQuery::aggregateFunctionTypes()
QVERIFY_SQL(q, exec("SELECT COUNT(id) FROM " + tableName));
QVERIFY(q.next());
QCOMPARE(q.value(0).toInt(), 2);
- QCOMPARE(q.record().field(0).type(), QVariant::Int);
+ QCOMPARE(q.record().field(0).type(), intType);
QVERIFY_SQL(q, exec("SELECT MIN(id) FROM " + tableName));
QVERIFY(q.next());
@@ -3657,7 +3661,7 @@ void tst_QSqlQuery::aggregateFunctionTypes()
QVERIFY_SQL(q, exec("SELECT COUNT(id) FROM " + tableName));
QVERIFY(q.next());
QCOMPARE(q.value(0).toInt(), 2);
- QCOMPARE(q.record().field(0).type(), QVariant::Int);
+ QCOMPARE(q.record().field(0).type(), intType);
QVERIFY_SQL(q, exec("SELECT MIN(id) FROM " + tableName));
QVERIFY(q.next());
@@ -3669,15 +3673,18 @@ void tst_QSqlQuery::aggregateFunctionTypes()
QCOMPARE(q.value(0).toDouble(), 2.5);
QCOMPARE(q.record().field(0).type(), QVariant::Double);
- QVERIFY_SQL(q, exec("SELECT ROUND(id, 1) FROM " + tableName + " WHERE id=1.5"));
- QVERIFY(q.next());
- QCOMPARE(q.value(0).toDouble(), 1.5);
- QCOMPARE(q.record().field(0).type(), QVariant::Double);
+ // PSQL does not have support for the round() function
+ if (!db.driverName().startsWith("QPSQL")) {
+ QVERIFY_SQL(q, exec("SELECT ROUND(id, 1) FROM " + tableName + " WHERE id=1.5"));
+ QVERIFY(q.next());
+ QCOMPARE(q.value(0).toDouble(), 1.5);
+ QCOMPARE(q.record().field(0).type(), QVariant::Double);
- QVERIFY_SQL(q, exec("SELECT ROUND(id, 0) FROM " + tableName + " WHERE id=2.5"));
- QVERIFY(q.next());
- QCOMPARE(q.value(0).toDouble(), 3.0);
- QCOMPARE(q.record().field(0).type(), QVariant::Double);
+ QVERIFY_SQL(q, exec("SELECT ROUND(id, 0) FROM " + tableName + " WHERE id=2.5"));
+ QVERIFY(q.next());
+ QCOMPARE(q.value(0).toDouble(), 3.0);
+ QCOMPARE(q.record().field(0).type(), QVariant::Double);
+ }
}
{
const QString tableName(qTableName("stringFunctions", __FILE__));
diff --git a/tests/auto/sql/kernel/qsqlresult/qsqlresult.pro b/tests/auto/sql/kernel/qsqlresult/qsqlresult.pro
new file mode 100644
index 0000000000..abd32ee017
--- /dev/null
+++ b/tests/auto/sql/kernel/qsqlresult/qsqlresult.pro
@@ -0,0 +1,11 @@
+TARGET = tst_qsqlresult
+CONFIG += testcase
+
+QT = core sql testlib
+
+SOURCES += tst_qsqlresult.cpp
+HEADERS += testsqldriver.h
+
+win32-g++*: LIBS += -lws2_32
+
+DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/sql/kernel/qsqlresult/testsqldriver.h b/tests/auto/sql/kernel/qsqlresult/testsqldriver.h
new file mode 100644
index 0000000000..bf088354f1
--- /dev/null
+++ b/tests/auto/sql/kernel/qsqlresult/testsqldriver.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** 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, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TESTSQLDRIVER_H
+#define TESTSQLDRIVER_H
+
+#include <QtSql/QSqlResult>
+#include <QtSql/QSqlDriver>
+#include <QtSql/QSqlRecord>
+
+class TestSqlDriverResult : public QSqlResult
+{
+public:
+ TestSqlDriverResult(const QSqlDriver *driver)
+ : QSqlResult(driver) {}
+ ~TestSqlDriverResult() {}
+
+ bool savePrepare(const QString& sqlquery)
+ {
+ return QSqlResult::savePrepare(sqlquery);
+ }
+
+protected:
+ QVariant data(int /* index */) { return QVariant(); }
+ bool isNull(int /* index */) { return false; }
+ bool reset(const QString & /* query */) { return false; }
+ bool fetch(int /* index */) { return false; }
+ bool fetchFirst() { return false; }
+ bool fetchLast() { return false; }
+ int size() { return 0; }
+ int numRowsAffected() { return 0; }
+ QSqlRecord record() const { return QSqlRecord(); }
+};
+
+class TestSqlDriver : public QSqlDriver
+{
+public:
+ TestSqlDriver() {}
+ ~TestSqlDriver() {}
+
+ bool hasFeature(DriverFeature f) const {
+ switch (f) {
+ case QSqlDriver::PreparedQueries:
+ case QSqlDriver::NamedPlaceholders:
+ return true;
+ }
+ return false;
+ }
+ bool open(const QString & /* db */, const QString & /* user */,
+ const QString & /* password */, const QString & /* host */,
+ int /* port */, const QString & /* options */)
+ { return false; }
+ void close() {}
+ QSqlResult *createResult() const { return new TestSqlDriverResult(this); }
+};
+
+#endif // TESTSQLDRIVER_H
diff --git a/tests/auto/other/headersclean/qt_headersclean_headers.h b/tests/auto/sql/kernel/qsqlresult/tst_qsqlresult.cpp
index cab5770790..6f2d0ab941 100644
--- a/tests/auto/other/headersclean/qt_headersclean_headers.h
+++ b/tests/auto/sql/kernel/qsqlresult/tst_qsqlresult.cpp
@@ -39,32 +39,34 @@
**
****************************************************************************/
-#ifndef QT_HEADERSCLEAN_HEADERS
-#define QT_HEADERSCLEAN_HEADERS
+#include <QtTest/QtTest>
+#include <QtSql/QtSql>
-/*
- This file should include all the headers to be tested by the headersclean
- test. It may be copied and customized for each module.
-*/
+#include "testsqldriver.h"
-#include <QtCore/QtCore>
-#include <QtConcurrent/QtConcurrent>
-#include <QtTest/QtTest>
+class tst_QSqlResult : public QObject
+{
+ Q_OBJECT
-#include <QtNetwork/QtNetwork>
-#include <QtXml/QtXml>
-#include <QtSql/QtSql>
-#include <QtGui/QtGui>
-#include <QtWidgets/QtWidgets>
-#include <QtPrintSupport/QtPrintSupport>
-#include <QtPlatformSupport/QtPlatformSupport>
+public:
+ tst_QSqlResult();
+
+private slots:
+ void positionalToNamedBinding();
+
+};
-#ifndef QT_NO_OPENGL
-#include <QtOpenGL/QtOpenGL>
-#endif
+tst_QSqlResult::tst_QSqlResult()
+{
+}
-#if !defined(QT_NO_DBUS) && defined(Q_OS_UNIX)
-#include <QtDBus/QtDBus>
-#endif
+void tst_QSqlResult::positionalToNamedBinding()
+{
+ TestSqlDriver testDriver;
+ TestSqlDriverResult result(&testDriver);
+ QString query("INSERT INTO MYTABLE (ID, NAME, BIRTH) VALUES(?, ?, ?)");
+ QVERIFY(result.savePrepare(query));
+}
-#endif
+QTEST_MAIN( tst_QSqlResult )
+#include "tst_qsqlresult.moc"
diff --git a/tests/auto/sql/models/models.pro b/tests/auto/sql/models/models.pro
index c00ec2c935..2c3ae4ef0a 100644
--- a/tests/auto/sql/models/models.pro
+++ b/tests/auto/sql/models/models.pro
@@ -4,5 +4,5 @@ SUBDIRS=\
qsqlrelationaltablemodel \
qsqltablemodel \
-contains(QT_CONFIG, no-widgets): SUBDIRS -= \
+!qtHaveModule(widgets): SUBDIRS -= \
qsqlquerymodel
diff --git a/tests/auto/tools/moc/moc.pro b/tests/auto/tools/moc/moc.pro
index d91ae378da..772086d3c4 100644
--- a/tests/auto/tools/moc/moc.pro
+++ b/tests/auto/tools/moc/moc.pro
@@ -31,7 +31,7 @@ SOURCES += tst_moc.cpp
QT -= gui
QT += sql network testlib
-contains(QT_CONFIG, dbus){
+qtHaveModule(dbus) {
DEFINES += WITH_DBUS
QT += dbus
}
diff --git a/tests/auto/tools/qmake/testdata/one_space/one_space.pro b/tests/auto/tools/qmake/testdata/one_space/one_space.pro
index 651035df69..5f48aef119 100644
--- a/tests/auto/tools/qmake/testdata/one_space/one_space.pro
+++ b/tests/auto/tools/qmake/testdata/one_space/one_space.pro
@@ -1,5 +1,4 @@
TEMPLATE = app
-CONFIG += qt warn_on
SOURCES = main.cpp
TARGET = "one space"
DESTDIR = ./
diff --git a/tests/auto/tools/qmake/testdata/quotedfilenames/quotedfilenames.pro b/tests/auto/tools/qmake/testdata/quotedfilenames/quotedfilenames.pro
index c3dd252d25..139c4153f5 100644
--- a/tests/auto/tools/qmake/testdata/quotedfilenames/quotedfilenames.pro
+++ b/tests/auto/tools/qmake/testdata/quotedfilenames/quotedfilenames.pro
@@ -1,5 +1,4 @@
TEMPLATE = app
-CONFIG += qt warn_on
TARGET = quotedfilenames
SOURCES = main.cpp
diff --git a/tests/auto/tools/qmake/testdata/simple_app/simple_app.pro b/tests/auto/tools/qmake/testdata/simple_app/simple_app.pro
index a677388fae..3d30e25b68 100644
--- a/tests/auto/tools/qmake/testdata/simple_app/simple_app.pro
+++ b/tests/auto/tools/qmake/testdata/simple_app/simple_app.pro
@@ -1,5 +1,4 @@
TEMPLATE = app
-CONFIG += qt warn_on
HEADERS = test_file.h
SOURCES = test_file.cpp \
main.cpp
diff --git a/tests/auto/tools/qmake/testdata/simple_dll/simple_dll.pro b/tests/auto/tools/qmake/testdata/simple_dll/simple_dll.pro
index f74067e2c9..4b7b3f31ce 100644
--- a/tests/auto/tools/qmake/testdata/simple_dll/simple_dll.pro
+++ b/tests/auto/tools/qmake/testdata/simple_dll/simple_dll.pro
@@ -1,5 +1,5 @@
TEMPLATE = lib
-CONFIG += qt warn_on dll
+CONFIG += dll
win32:DEFINES += SIMPLEDLL_MAKEDLL
diff --git a/tests/auto/tools/qmake/testdata/simple_lib/simple_lib.pro b/tests/auto/tools/qmake/testdata/simple_lib/simple_lib.pro
index bc239ad1a8..c04ed05ff3 100644
--- a/tests/auto/tools/qmake/testdata/simple_lib/simple_lib.pro
+++ b/tests/auto/tools/qmake/testdata/simple_lib/simple_lib.pro
@@ -1,5 +1,5 @@
TEMPLATE = lib
-CONFIG += qt warn_on release staticlib
+CONFIG += release staticlib
CONFIG -= dll
HEADERS = simple.h
diff --git a/tests/auto/tools/qmake/testdata/subdirs/simple_app/simple_app.pro b/tests/auto/tools/qmake/testdata/subdirs/simple_app/simple_app.pro
index df8e81aa7b..db1d57b502 100644
--- a/tests/auto/tools/qmake/testdata/subdirs/simple_app/simple_app.pro
+++ b/tests/auto/tools/qmake/testdata/subdirs/simple_app/simple_app.pro
@@ -1,5 +1,4 @@
TEMPLATE = app
-CONFIG += qt warn_on
HEADERS = test_file.h
SOURCES = test_file.cpp \
main.cpp
diff --git a/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple_dll.pro b/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple_dll.pro
index f74067e2c9..4b7b3f31ce 100644
--- a/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple_dll.pro
+++ b/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple_dll.pro
@@ -1,5 +1,5 @@
TEMPLATE = lib
-CONFIG += qt warn_on dll
+CONFIG += dll
win32:DEFINES += SIMPLEDLL_MAKEDLL
diff --git a/tests/auto/tools/rcc/data/images/images.expected b/tests/auto/tools/rcc/data/images/images.expected
index 4ebf066568..9334443ccc 100644
--- a/tests/auto/tools/rcc/data/images/images.expected
+++ b/tests/auto/tools/rcc/data/images/images.expected
@@ -1,8 +1,7 @@
/****************************************************************************
** Resource object code
**
-IGNORE: ** Created: Sun Apr 1 21:20:28 2012
-IGNORE: ** by: The Resource Compiler for Qt version 5.0.0
+IGNORE: ** Created by: The Resource Compiler for Qt version 5.0.0
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
diff --git a/tests/auto/tools/tools.pro b/tests/auto/tools/tools.pro
index 4cc3d62a43..9b4d2ca22a 100644
--- a/tests/auto/tools/tools.pro
+++ b/tests/auto/tools/tools.pro
@@ -5,4 +5,4 @@ SUBDIRS=\
moc \
rcc \
-contains(QT_CONFIG, dbus):SUBDIRS += qdbuscpp2xml qdbusxml2cpp
+qtHaveModule(dbus): SUBDIRS += qdbuscpp2xml qdbusxml2cpp
diff --git a/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Bottom.ui.h b/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Bottom.ui.h
index f3f3ad3f52..37f02008f1 100644
--- a/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Bottom.ui.h
+++ b/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Bottom.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'Dialog_with_Buttons_Bottom.ui'
**
-** Created: Fri Sep 4 10:17:13 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Right.ui.h b/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Right.ui.h
index 132c050793..17647ba5f5 100644
--- a/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Right.ui.h
+++ b/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Right.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'Dialog_with_Buttons_Right.ui'
**
-** Created: Fri Sep 4 10:17:13 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/Dialog_without_Buttons.ui.h b/tests/auto/tools/uic/baseline/Dialog_without_Buttons.ui.h
index 4c246a8efc..08b751a34c 100644
--- a/tests/auto/tools/uic/baseline/Dialog_without_Buttons.ui.h
+++ b/tests/auto/tools/uic/baseline/Dialog_without_Buttons.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'Dialog_without_Buttons.ui'
**
-** Created: Fri Sep 4 10:17:13 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/Main_Window.ui.h b/tests/auto/tools/uic/baseline/Main_Window.ui.h
index 1d42a47aee..43459280a4 100644
--- a/tests/auto/tools/uic/baseline/Main_Window.ui.h
+++ b/tests/auto/tools/uic/baseline/Main_Window.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'Main_Window.ui'
**
-** Created: Fri Sep 4 10:17:13 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/Widget.ui.h b/tests/auto/tools/uic/baseline/Widget.ui.h
index a4b32f9eae..b5bb974423 100644
--- a/tests/auto/tools/uic/baseline/Widget.ui.h
+++ b/tests/auto/tools/uic/baseline/Widget.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'Widget.ui'
**
-** Created: Fri Sep 4 10:17:15 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/addlinkdialog.ui.h b/tests/auto/tools/uic/baseline/addlinkdialog.ui.h
index cfc5aef35f..5a26984c70 100644
--- a/tests/auto/tools/uic/baseline/addlinkdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/addlinkdialog.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'addlinkdialog.ui'
**
-** Created: Fri Sep 4 10:17:12 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/addtorrentform.ui.h b/tests/auto/tools/uic/baseline/addtorrentform.ui.h
index acf2366d76..29bae9735c 100644
--- a/tests/auto/tools/uic/baseline/addtorrentform.ui.h
+++ b/tests/auto/tools/uic/baseline/addtorrentform.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'addtorrentform.ui'
**
-** Created: Fri Sep 4 10:17:12 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/authenticationdialog.ui.h b/tests/auto/tools/uic/baseline/authenticationdialog.ui.h
index 16095b1f47..ba888c30d6 100644
--- a/tests/auto/tools/uic/baseline/authenticationdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/authenticationdialog.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'authenticationdialog.ui'
**
-** Created: Fri Sep 4 10:17:12 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/backside.ui.h b/tests/auto/tools/uic/baseline/backside.ui.h
index d59d47f59e..9ac2d6a442 100644
--- a/tests/auto/tools/uic/baseline/backside.ui.h
+++ b/tests/auto/tools/uic/baseline/backside.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'backside.ui'
**
-** Created: Fri Sep 4 10:17:12 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/batchtranslation.ui.h b/tests/auto/tools/uic/baseline/batchtranslation.ui.h
index a977e37003..6741c40f8a 100644
--- a/tests/auto/tools/uic/baseline/batchtranslation.ui.h
+++ b/tests/auto/tools/uic/baseline/batchtranslation.ui.h
@@ -44,8 +44,7 @@
/********************************************************************************
** Form generated from reading UI file 'batchtranslation.ui'
**
-** Created: Fri Sep 4 10:17:12 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/bookmarkdialog.ui.h b/tests/auto/tools/uic/baseline/bookmarkdialog.ui.h
index 1650b17099..fa18ba5cda 100644
--- a/tests/auto/tools/uic/baseline/bookmarkdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/bookmarkdialog.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'bookmarkdialog.ui'
**
-** Created: Fri Sep 4 10:17:12 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/bookwindow.ui.h b/tests/auto/tools/uic/baseline/bookwindow.ui.h
index 8ddd186ff0..1f498421c9 100644
--- a/tests/auto/tools/uic/baseline/bookwindow.ui.h
+++ b/tests/auto/tools/uic/baseline/bookwindow.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'bookwindow.ui'
**
-** Created: Fri Sep 4 10:17:12 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/browserwidget.ui.h b/tests/auto/tools/uic/baseline/browserwidget.ui.h
index ae535f5f07..aa0e6786a0 100644
--- a/tests/auto/tools/uic/baseline/browserwidget.ui.h
+++ b/tests/auto/tools/uic/baseline/browserwidget.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'browserwidget.ui'
**
-** Created: Fri Sep 4 10:17:12 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/bug18156QTreeWidget.ui.h b/tests/auto/tools/uic/baseline/bug18156QTreeWidget.ui.h
index 5be6215888..8bee2c3a02 100644
--- a/tests/auto/tools/uic/baseline/bug18156QTreeWidget.ui.h
+++ b/tests/auto/tools/uic/baseline/bug18156QTreeWidget.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'bug18156QTreeWidget.ui'
**
-** Created: Tue Nov 20 20:12:59 2012
-** by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/calculator.ui.h b/tests/auto/tools/uic/baseline/calculator.ui.h
index 6e5f65eea3..7ac878e3fb 100644
--- a/tests/auto/tools/uic/baseline/calculator.ui.h
+++ b/tests/auto/tools/uic/baseline/calculator.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'calculator.ui'
**
-** Created: Fri Sep 4 10:17:12 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/calculatorform.ui.h b/tests/auto/tools/uic/baseline/calculatorform.ui.h
index 331fbbaa4f..1383244504 100644
--- a/tests/auto/tools/uic/baseline/calculatorform.ui.h
+++ b/tests/auto/tools/uic/baseline/calculatorform.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'calculatorform.ui'
**
-** Created: Fri Sep 4 10:17:12 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/certificateinfo.ui.h b/tests/auto/tools/uic/baseline/certificateinfo.ui.h
index 4f94e56cdc..9b16110d33 100644
--- a/tests/auto/tools/uic/baseline/certificateinfo.ui.h
+++ b/tests/auto/tools/uic/baseline/certificateinfo.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'certificateinfo.ui'
**
-** Created: Fri Sep 4 10:17:12 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/chatdialog.ui.h b/tests/auto/tools/uic/baseline/chatdialog.ui.h
index d6b22293ca..e917eb9fb1 100644
--- a/tests/auto/tools/uic/baseline/chatdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/chatdialog.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'chatdialog.ui'
**
-** Created: Fri Sep 4 10:17:12 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/chatmainwindow.ui.h b/tests/auto/tools/uic/baseline/chatmainwindow.ui.h
index 0600d596c4..a2aaeeb333 100644
--- a/tests/auto/tools/uic/baseline/chatmainwindow.ui.h
+++ b/tests/auto/tools/uic/baseline/chatmainwindow.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'chatmainwindow.ui'
**
-** Created: Fri Sep 4 10:17:12 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/chatsetnickname.ui.h b/tests/auto/tools/uic/baseline/chatsetnickname.ui.h
index 9553c0366a..e9ebca5f7f 100644
--- a/tests/auto/tools/uic/baseline/chatsetnickname.ui.h
+++ b/tests/auto/tools/uic/baseline/chatsetnickname.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'chatsetnickname.ui'
**
-** Created: Fri Sep 4 10:17:12 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/config.ui.h b/tests/auto/tools/uic/baseline/config.ui.h
index f01f65f1db..715a9c0d2b 100644
--- a/tests/auto/tools/uic/baseline/config.ui.h
+++ b/tests/auto/tools/uic/baseline/config.ui.h
@@ -44,8 +44,7 @@
/********************************************************************************
** Form generated from reading UI file 'config.ui'
**
-** Created: Fri Sep 4 10:17:12 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/connectdialog.ui.h b/tests/auto/tools/uic/baseline/connectdialog.ui.h
index 2be8798545..b01238c344 100644
--- a/tests/auto/tools/uic/baseline/connectdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/connectdialog.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'connectdialog.ui'
**
-** Created: Fri Sep 4 10:17:12 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/controller.ui.h b/tests/auto/tools/uic/baseline/controller.ui.h
index cd0619c9fc..e66c3622be 100644
--- a/tests/auto/tools/uic/baseline/controller.ui.h
+++ b/tests/auto/tools/uic/baseline/controller.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'controller.ui'
**
-** Created: Fri Sep 4 10:17:13 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/cookies.ui.h b/tests/auto/tools/uic/baseline/cookies.ui.h
index c2b4953620..a47b2b9969 100644
--- a/tests/auto/tools/uic/baseline/cookies.ui.h
+++ b/tests/auto/tools/uic/baseline/cookies.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'cookies.ui'
**
-** Created: Fri Sep 4 10:17:13 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/cookiesexceptions.ui.h b/tests/auto/tools/uic/baseline/cookiesexceptions.ui.h
index 1977cf8dc4..0c6c6cf307 100644
--- a/tests/auto/tools/uic/baseline/cookiesexceptions.ui.h
+++ b/tests/auto/tools/uic/baseline/cookiesexceptions.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'cookiesexceptions.ui'
**
-** Created: Fri Sep 4 10:17:13 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/default.ui.h b/tests/auto/tools/uic/baseline/default.ui.h
index 6503b8ebf8..b9e1475d70 100644
--- a/tests/auto/tools/uic/baseline/default.ui.h
+++ b/tests/auto/tools/uic/baseline/default.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'default.ui'
**
-** Created: Fri Sep 4 10:17:13 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/dialog.ui.h b/tests/auto/tools/uic/baseline/dialog.ui.h
index 51685ff95b..ef587f9d9d 100644
--- a/tests/auto/tools/uic/baseline/dialog.ui.h
+++ b/tests/auto/tools/uic/baseline/dialog.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'dialog.ui'
**
-** Created: Fri Sep 4 10:17:13 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/downloaditem.ui.h b/tests/auto/tools/uic/baseline/downloaditem.ui.h
index 7128b08f60..b0f5106246 100644
--- a/tests/auto/tools/uic/baseline/downloaditem.ui.h
+++ b/tests/auto/tools/uic/baseline/downloaditem.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'downloaditem.ui'
**
-** Created: Fri Sep 4 10:17:13 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/downloads.ui.h b/tests/auto/tools/uic/baseline/downloads.ui.h
index 8418a1828c..7e688669e4 100644
--- a/tests/auto/tools/uic/baseline/downloads.ui.h
+++ b/tests/auto/tools/uic/baseline/downloads.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'downloads.ui'
**
-** Created: Fri Sep 4 10:17:13 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/embeddeddialog.ui.h b/tests/auto/tools/uic/baseline/embeddeddialog.ui.h
index 73d8b99e53..872dc7db87 100644
--- a/tests/auto/tools/uic/baseline/embeddeddialog.ui.h
+++ b/tests/auto/tools/uic/baseline/embeddeddialog.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'embeddeddialog.ui'
**
-** Created: Fri Sep 4 10:17:13 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/filespage.ui.h b/tests/auto/tools/uic/baseline/filespage.ui.h
index b1b5ce0719..ee4f702233 100644
--- a/tests/auto/tools/uic/baseline/filespage.ui.h
+++ b/tests/auto/tools/uic/baseline/filespage.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'filespage.ui'
**
-** Created: Fri Sep 4 10:17:13 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/filternamedialog.ui.h b/tests/auto/tools/uic/baseline/filternamedialog.ui.h
index 7563489ff9..7b10ceb7ec 100644
--- a/tests/auto/tools/uic/baseline/filternamedialog.ui.h
+++ b/tests/auto/tools/uic/baseline/filternamedialog.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'filternamedialog.ui'
**
-** Created: Fri Sep 4 10:17:13 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/filterpage.ui.h b/tests/auto/tools/uic/baseline/filterpage.ui.h
index fec0134548..fb12686a83 100644
--- a/tests/auto/tools/uic/baseline/filterpage.ui.h
+++ b/tests/auto/tools/uic/baseline/filterpage.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'filterpage.ui'
**
-** Created: Fri Sep 4 10:17:13 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/finddialog.ui.h b/tests/auto/tools/uic/baseline/finddialog.ui.h
index 2d63cd7ec6..2faf83baa4 100644
--- a/tests/auto/tools/uic/baseline/finddialog.ui.h
+++ b/tests/auto/tools/uic/baseline/finddialog.ui.h
@@ -44,8 +44,7 @@
/********************************************************************************
** Form generated from reading UI file 'finddialog.ui'
**
-** Created: Fri Sep 4 10:17:13 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/form.ui.h b/tests/auto/tools/uic/baseline/form.ui.h
index 9b298ea184..0b82a41f5d 100644
--- a/tests/auto/tools/uic/baseline/form.ui.h
+++ b/tests/auto/tools/uic/baseline/form.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'form.ui'
**
-** Created: Fri Sep 4 10:17:13 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/formwindowsettings.ui.h b/tests/auto/tools/uic/baseline/formwindowsettings.ui.h
index 4fff798f34..2c3a4a1eae 100644
--- a/tests/auto/tools/uic/baseline/formwindowsettings.ui.h
+++ b/tests/auto/tools/uic/baseline/formwindowsettings.ui.h
@@ -44,8 +44,7 @@
/********************************************************************************
** Form generated from reading UI file 'formwindowsettings.ui'
**
-** Created: Fri Sep 4 10:17:13 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/generalpage.ui.h b/tests/auto/tools/uic/baseline/generalpage.ui.h
index 60051abfb2..ec51c40ab5 100644
--- a/tests/auto/tools/uic/baseline/generalpage.ui.h
+++ b/tests/auto/tools/uic/baseline/generalpage.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'generalpage.ui'
**
-** Created: Fri Sep 4 10:17:13 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/gridalignment.ui.h b/tests/auto/tools/uic/baseline/gridalignment.ui.h
index 4045efa8c5..8e82d5460d 100644
--- a/tests/auto/tools/uic/baseline/gridalignment.ui.h
+++ b/tests/auto/tools/uic/baseline/gridalignment.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'gridalignment.ui'
**
-** Created: Fri Oct 22 14:33:59 2010
-** by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/gridpanel.ui.h b/tests/auto/tools/uic/baseline/gridpanel.ui.h
index aef5e2e0fc..c289914aaf 100644
--- a/tests/auto/tools/uic/baseline/gridpanel.ui.h
+++ b/tests/auto/tools/uic/baseline/gridpanel.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'gridpanel.ui'
**
-** Created: Fri Sep 4 10:17:13 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/helpdialog.ui.h b/tests/auto/tools/uic/baseline/helpdialog.ui.h
index 7fddcc094c..0f66349118 100644
--- a/tests/auto/tools/uic/baseline/helpdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/helpdialog.ui.h
@@ -44,8 +44,7 @@
/********************************************************************************
** Form generated from reading UI file 'helpdialog.ui'
**
-** Created: Fri Sep 4 10:17:13 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/history.ui.h b/tests/auto/tools/uic/baseline/history.ui.h
index 786c181663..e4c4c7d1b5 100644
--- a/tests/auto/tools/uic/baseline/history.ui.h
+++ b/tests/auto/tools/uic/baseline/history.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'history.ui'
**
-** Created: Fri Sep 4 10:17:13 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/icontheme.ui.h b/tests/auto/tools/uic/baseline/icontheme.ui.h
index 047f65b73a..28fd27475d 100644
--- a/tests/auto/tools/uic/baseline/icontheme.ui.h
+++ b/tests/auto/tools/uic/baseline/icontheme.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'icontheme.ui'
**
-** Created: Thu Sep 2 10:28:19 2010
-** by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/identifierpage.ui.h b/tests/auto/tools/uic/baseline/identifierpage.ui.h
index e6f94e7369..9f92608c62 100644
--- a/tests/auto/tools/uic/baseline/identifierpage.ui.h
+++ b/tests/auto/tools/uic/baseline/identifierpage.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'identifierpage.ui'
**
-** Created: Fri Sep 4 10:17:13 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/imagedialog.ui.h b/tests/auto/tools/uic/baseline/imagedialog.ui.h
index ddc78d638d..c02c40c2c1 100644
--- a/tests/auto/tools/uic/baseline/imagedialog.ui.h
+++ b/tests/auto/tools/uic/baseline/imagedialog.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'imagedialog.ui'
**
-** Created: Fri Sep 4 10:17:13 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/inputpage.ui.h b/tests/auto/tools/uic/baseline/inputpage.ui.h
index 37821120e9..b064f94c20 100644
--- a/tests/auto/tools/uic/baseline/inputpage.ui.h
+++ b/tests/auto/tools/uic/baseline/inputpage.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'inputpage.ui'
**
-** Created: Fri Sep 4 10:17:13 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/installdialog.ui.h b/tests/auto/tools/uic/baseline/installdialog.ui.h
index 404e1e5ad8..6ba51c7404 100644
--- a/tests/auto/tools/uic/baseline/installdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/installdialog.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'installdialog.ui'
**
-** Created: Fri Sep 4 10:17:13 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/languagesdialog.ui.h b/tests/auto/tools/uic/baseline/languagesdialog.ui.h
index 10cfe41a08..dfdc1d1ac6 100644
--- a/tests/auto/tools/uic/baseline/languagesdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/languagesdialog.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'languagesdialog.ui'
**
-** Created: Fri Sep 4 10:17:13 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/listwidgeteditor.ui.h b/tests/auto/tools/uic/baseline/listwidgeteditor.ui.h
index e95cfae7fe..d3d8916701 100644
--- a/tests/auto/tools/uic/baseline/listwidgeteditor.ui.h
+++ b/tests/auto/tools/uic/baseline/listwidgeteditor.ui.h
@@ -44,8 +44,7 @@
/********************************************************************************
** Form generated from reading UI file 'listwidgeteditor.ui'
**
-** Created: Fri Sep 4 10:17:13 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/mainwindow.ui.h b/tests/auto/tools/uic/baseline/mainwindow.ui.h
index bf6efc9798..bb6c8641a1 100644
--- a/tests/auto/tools/uic/baseline/mainwindow.ui.h
+++ b/tests/auto/tools/uic/baseline/mainwindow.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'mainwindow.ui'
**
-** Created: Fri Sep 4 10:17:13 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/mydialog.ui.h b/tests/auto/tools/uic/baseline/mydialog.ui.h
index 7791b10580..6f2462611b 100644
--- a/tests/auto/tools/uic/baseline/mydialog.ui.h
+++ b/tests/auto/tools/uic/baseline/mydialog.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'mydialog.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/myform.ui.h b/tests/auto/tools/uic/baseline/myform.ui.h
index 43671f0852..4c58bceed9 100644
--- a/tests/auto/tools/uic/baseline/myform.ui.h
+++ b/tests/auto/tools/uic/baseline/myform.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'myform.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/newactiondialog.ui.h b/tests/auto/tools/uic/baseline/newactiondialog.ui.h
index c053a7865d..95ecf485e5 100644
--- a/tests/auto/tools/uic/baseline/newactiondialog.ui.h
+++ b/tests/auto/tools/uic/baseline/newactiondialog.ui.h
@@ -44,8 +44,7 @@
/********************************************************************************
** Form generated from reading UI file 'newactiondialog.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/newdynamicpropertydialog.ui.h b/tests/auto/tools/uic/baseline/newdynamicpropertydialog.ui.h
index bfb1115f77..ca7bd253a8 100644
--- a/tests/auto/tools/uic/baseline/newdynamicpropertydialog.ui.h
+++ b/tests/auto/tools/uic/baseline/newdynamicpropertydialog.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'newdynamicpropertydialog.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/newform.ui.h b/tests/auto/tools/uic/baseline/newform.ui.h
index 130fc9aff3..71af9d6d2c 100644
--- a/tests/auto/tools/uic/baseline/newform.ui.h
+++ b/tests/auto/tools/uic/baseline/newform.ui.h
@@ -44,8 +44,7 @@
/********************************************************************************
** Form generated from reading UI file 'newform.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/orderdialog.ui.h b/tests/auto/tools/uic/baseline/orderdialog.ui.h
index 2e81973820..4f5514b441 100644
--- a/tests/auto/tools/uic/baseline/orderdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/orderdialog.ui.h
@@ -44,8 +44,7 @@
/********************************************************************************
** Form generated from reading UI file 'orderdialog.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/outputpage.ui.h b/tests/auto/tools/uic/baseline/outputpage.ui.h
index c051143eaf..4adb76e642 100644
--- a/tests/auto/tools/uic/baseline/outputpage.ui.h
+++ b/tests/auto/tools/uic/baseline/outputpage.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'outputpage.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/pagefold.ui.h b/tests/auto/tools/uic/baseline/pagefold.ui.h
index d9909383bb..e9ec66f4e9 100644
--- a/tests/auto/tools/uic/baseline/pagefold.ui.h
+++ b/tests/auto/tools/uic/baseline/pagefold.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'pagefold.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/paletteeditor.ui.h b/tests/auto/tools/uic/baseline/paletteeditor.ui.h
index a3a7a124ac..045441d9c1 100644
--- a/tests/auto/tools/uic/baseline/paletteeditor.ui.h
+++ b/tests/auto/tools/uic/baseline/paletteeditor.ui.h
@@ -44,8 +44,7 @@
/********************************************************************************
** Form generated from reading UI file 'paletteeditor.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/passworddialog.ui.h b/tests/auto/tools/uic/baseline/passworddialog.ui.h
index 497fa6c0e8..b99954ab88 100644
--- a/tests/auto/tools/uic/baseline/passworddialog.ui.h
+++ b/tests/auto/tools/uic/baseline/passworddialog.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'passworddialog.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/pathpage.ui.h b/tests/auto/tools/uic/baseline/pathpage.ui.h
index d46807f1b4..018e62c091 100644
--- a/tests/auto/tools/uic/baseline/pathpage.ui.h
+++ b/tests/auto/tools/uic/baseline/pathpage.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'pathpage.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/phrasebookbox.ui.h b/tests/auto/tools/uic/baseline/phrasebookbox.ui.h
index 2d49a64f4c..04a03f3d6c 100644
--- a/tests/auto/tools/uic/baseline/phrasebookbox.ui.h
+++ b/tests/auto/tools/uic/baseline/phrasebookbox.ui.h
@@ -44,8 +44,7 @@
/********************************************************************************
** Form generated from reading UI file 'phrasebookbox.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/plugindialog.ui.h b/tests/auto/tools/uic/baseline/plugindialog.ui.h
index 4c34c33a43..4130a3d1d9 100644
--- a/tests/auto/tools/uic/baseline/plugindialog.ui.h
+++ b/tests/auto/tools/uic/baseline/plugindialog.ui.h
@@ -44,8 +44,7 @@
/********************************************************************************
** Form generated from reading UI file 'plugindialog.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/preferencesdialog.ui.h b/tests/auto/tools/uic/baseline/preferencesdialog.ui.h
index e20ab517f2..2c4d08c547 100644
--- a/tests/auto/tools/uic/baseline/preferencesdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/preferencesdialog.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'preferencesdialog.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/previewconfigurationwidget.ui.h b/tests/auto/tools/uic/baseline/previewconfigurationwidget.ui.h
index 88a042504b..11051c7a15 100644
--- a/tests/auto/tools/uic/baseline/previewconfigurationwidget.ui.h
+++ b/tests/auto/tools/uic/baseline/previewconfigurationwidget.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'previewconfigurationwidget.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/previewdialogbase.ui.h b/tests/auto/tools/uic/baseline/previewdialogbase.ui.h
index bfe8d8a3a3..d717ac91af 100644
--- a/tests/auto/tools/uic/baseline/previewdialogbase.ui.h
+++ b/tests/auto/tools/uic/baseline/previewdialogbase.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'previewdialogbase.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/previewwidget.ui.h b/tests/auto/tools/uic/baseline/previewwidget.ui.h
index fe06ccb40e..d7baf51d97 100644
--- a/tests/auto/tools/uic/baseline/previewwidget.ui.h
+++ b/tests/auto/tools/uic/baseline/previewwidget.ui.h
@@ -44,8 +44,7 @@
/********************************************************************************
** Form generated from reading UI file 'previewwidget.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/proxy.ui.h b/tests/auto/tools/uic/baseline/proxy.ui.h
index e153694884..d311478853 100644
--- a/tests/auto/tools/uic/baseline/proxy.ui.h
+++ b/tests/auto/tools/uic/baseline/proxy.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'proxy.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/qfiledialog.ui.h b/tests/auto/tools/uic/baseline/qfiledialog.ui.h
index 93ca89fe43..afe81d2332 100644
--- a/tests/auto/tools/uic/baseline/qfiledialog.ui.h
+++ b/tests/auto/tools/uic/baseline/qfiledialog.ui.h
@@ -44,8 +44,7 @@
/********************************************************************************
** Form generated from reading UI file 'qfiledialog.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/qpagesetupwidget.ui.h b/tests/auto/tools/uic/baseline/qpagesetupwidget.ui.h
index 08bd12da9e..48f840f2f8 100644
--- a/tests/auto/tools/uic/baseline/qpagesetupwidget.ui.h
+++ b/tests/auto/tools/uic/baseline/qpagesetupwidget.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'qpagesetupwidget.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/qprintpropertieswidget.ui.h b/tests/auto/tools/uic/baseline/qprintpropertieswidget.ui.h
index 5f58d0b6d4..7251f05300 100644
--- a/tests/auto/tools/uic/baseline/qprintpropertieswidget.ui.h
+++ b/tests/auto/tools/uic/baseline/qprintpropertieswidget.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'qprintpropertieswidget.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/qprintsettingsoutput.ui.h b/tests/auto/tools/uic/baseline/qprintsettingsoutput.ui.h
index 20f75e10c7..f3816965dd 100644
--- a/tests/auto/tools/uic/baseline/qprintsettingsoutput.ui.h
+++ b/tests/auto/tools/uic/baseline/qprintsettingsoutput.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'qprintsettingsoutput.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/qprintwidget.ui.h b/tests/auto/tools/uic/baseline/qprintwidget.ui.h
index d6bfdb52f6..0358176321 100644
--- a/tests/auto/tools/uic/baseline/qprintwidget.ui.h
+++ b/tests/auto/tools/uic/baseline/qprintwidget.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'qprintwidget.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/qsqlconnectiondialog.ui.h b/tests/auto/tools/uic/baseline/qsqlconnectiondialog.ui.h
index 7ed3bc9984..484c0877bc 100644
--- a/tests/auto/tools/uic/baseline/qsqlconnectiondialog.ui.h
+++ b/tests/auto/tools/uic/baseline/qsqlconnectiondialog.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'qsqlconnectiondialog.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/qtgradientdialog.ui.h b/tests/auto/tools/uic/baseline/qtgradientdialog.ui.h
index 603852c1a7..ab03c4cd46 100644
--- a/tests/auto/tools/uic/baseline/qtgradientdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/qtgradientdialog.ui.h
@@ -44,8 +44,7 @@
/********************************************************************************
** Form generated from reading UI file 'qtgradientdialog.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/qtgradienteditor.ui.h b/tests/auto/tools/uic/baseline/qtgradienteditor.ui.h
index b8353c96aa..839eb7eba1 100644
--- a/tests/auto/tools/uic/baseline/qtgradienteditor.ui.h
+++ b/tests/auto/tools/uic/baseline/qtgradienteditor.ui.h
@@ -44,8 +44,7 @@
/********************************************************************************
** Form generated from reading UI file 'qtgradienteditor.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/qtgradientview.ui.h b/tests/auto/tools/uic/baseline/qtgradientview.ui.h
index 3d2ae98b94..5847730235 100644
--- a/tests/auto/tools/uic/baseline/qtgradientview.ui.h
+++ b/tests/auto/tools/uic/baseline/qtgradientview.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'qtgradientview.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h b/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h
index 4af597ec33..cfb0a5dfb3 100644
--- a/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h
@@ -44,8 +44,7 @@
/********************************************************************************
** Form generated from reading UI file 'qtgradientviewdialog.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/qtresourceeditordialog.ui.h b/tests/auto/tools/uic/baseline/qtresourceeditordialog.ui.h
index ec5e51d785..6d5f25872b 100644
--- a/tests/auto/tools/uic/baseline/qtresourceeditordialog.ui.h
+++ b/tests/auto/tools/uic/baseline/qtresourceeditordialog.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'qtresourceeditordialog.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/qttoolbardialog.ui.h b/tests/auto/tools/uic/baseline/qttoolbardialog.ui.h
index 877b3aa7e2..9439b6b1d3 100644
--- a/tests/auto/tools/uic/baseline/qttoolbardialog.ui.h
+++ b/tests/auto/tools/uic/baseline/qttoolbardialog.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'qttoolbardialog.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/querywidget.ui.h b/tests/auto/tools/uic/baseline/querywidget.ui.h
index 5521fbc4fa..1dcf7befdd 100644
--- a/tests/auto/tools/uic/baseline/querywidget.ui.h
+++ b/tests/auto/tools/uic/baseline/querywidget.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'querywidget.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/remotecontrol.ui.h b/tests/auto/tools/uic/baseline/remotecontrol.ui.h
index 92e47cdb52..b25f940450 100644
--- a/tests/auto/tools/uic/baseline/remotecontrol.ui.h
+++ b/tests/auto/tools/uic/baseline/remotecontrol.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'remotecontrol.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/saveformastemplate.ui.h b/tests/auto/tools/uic/baseline/saveformastemplate.ui.h
index a85b1ed91d..cee1d03a31 100644
--- a/tests/auto/tools/uic/baseline/saveformastemplate.ui.h
+++ b/tests/auto/tools/uic/baseline/saveformastemplate.ui.h
@@ -44,8 +44,7 @@
/********************************************************************************
** Form generated from reading UI file 'saveformastemplate.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/settings.ui.h b/tests/auto/tools/uic/baseline/settings.ui.h
index 2e3150e561..aa03609e98 100644
--- a/tests/auto/tools/uic/baseline/settings.ui.h
+++ b/tests/auto/tools/uic/baseline/settings.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'settings.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/signalslotdialog.ui.h b/tests/auto/tools/uic/baseline/signalslotdialog.ui.h
index d6eeb89ae0..c0a72b3c91 100644
--- a/tests/auto/tools/uic/baseline/signalslotdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/signalslotdialog.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'signalslotdialog.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/sslclient.ui.h b/tests/auto/tools/uic/baseline/sslclient.ui.h
index f4d2c25a04..a74a465955 100644
--- a/tests/auto/tools/uic/baseline/sslclient.ui.h
+++ b/tests/auto/tools/uic/baseline/sslclient.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'sslclient.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/sslerrors.ui.h b/tests/auto/tools/uic/baseline/sslerrors.ui.h
index 865d78557e..c52c71f3aa 100644
--- a/tests/auto/tools/uic/baseline/sslerrors.ui.h
+++ b/tests/auto/tools/uic/baseline/sslerrors.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'sslerrors.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/statistics.ui.h b/tests/auto/tools/uic/baseline/statistics.ui.h
index 6f0a42bad3..5a360a7ded 100644
--- a/tests/auto/tools/uic/baseline/statistics.ui.h
+++ b/tests/auto/tools/uic/baseline/statistics.ui.h
@@ -44,8 +44,7 @@
/********************************************************************************
** Form generated from reading UI file 'statistics.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/stringlisteditor.ui.h b/tests/auto/tools/uic/baseline/stringlisteditor.ui.h
index 8afdfc2ec1..27b78519a4 100644
--- a/tests/auto/tools/uic/baseline/stringlisteditor.ui.h
+++ b/tests/auto/tools/uic/baseline/stringlisteditor.ui.h
@@ -44,8 +44,7 @@
/********************************************************************************
** Form generated from reading UI file 'stringlisteditor.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/stylesheeteditor.ui.h b/tests/auto/tools/uic/baseline/stylesheeteditor.ui.h
index 21c22c3eb0..35b45f7e94 100644
--- a/tests/auto/tools/uic/baseline/stylesheeteditor.ui.h
+++ b/tests/auto/tools/uic/baseline/stylesheeteditor.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'stylesheeteditor.ui'
**
-** Created: Fri Sep 4 10:17:14 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h b/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h
index 777e0a402e..e2d7060dbb 100644
--- a/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h
+++ b/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h
@@ -44,8 +44,7 @@
/********************************************************************************
** Form generated from reading UI file 'tabbedbrowser.ui'
**
-** Created: Fri Sep 4 10:17:15 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h b/tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h
index 28c667a3a3..036f0a6c20 100644
--- a/tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h
+++ b/tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h
@@ -44,8 +44,7 @@
/********************************************************************************
** Form generated from reading UI file 'tablewidgeteditor.ui'
**
-** Created: Fri Sep 4 10:17:15 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/tetrixwindow.ui.h b/tests/auto/tools/uic/baseline/tetrixwindow.ui.h
index 3846429ab6..0f945fab35 100644
--- a/tests/auto/tools/uic/baseline/tetrixwindow.ui.h
+++ b/tests/auto/tools/uic/baseline/tetrixwindow.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'tetrixwindow.ui'
**
-** Created: Fri Sep 4 10:17:15 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/textfinder.ui.h b/tests/auto/tools/uic/baseline/textfinder.ui.h
index aea49f76c1..148bf11dbc 100644
--- a/tests/auto/tools/uic/baseline/textfinder.ui.h
+++ b/tests/auto/tools/uic/baseline/textfinder.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'textfinder.ui'
**
-** Created: Fri Sep 4 10:17:15 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/topicchooser.ui.h b/tests/auto/tools/uic/baseline/topicchooser.ui.h
index 1f54cd3d64..06d34e9c63 100644
--- a/tests/auto/tools/uic/baseline/topicchooser.ui.h
+++ b/tests/auto/tools/uic/baseline/topicchooser.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'topicchooser.ui'
**
-** Created: Fri Sep 4 10:17:15 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/translatedialog.ui.h b/tests/auto/tools/uic/baseline/translatedialog.ui.h
index 71c10f1ce8..c8c91f712b 100644
--- a/tests/auto/tools/uic/baseline/translatedialog.ui.h
+++ b/tests/auto/tools/uic/baseline/translatedialog.ui.h
@@ -44,8 +44,7 @@
/********************************************************************************
** Form generated from reading UI file 'translatedialog.ui'
**
-** Created: Fri Sep 4 10:17:15 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/translationsettings.ui.h b/tests/auto/tools/uic/baseline/translationsettings.ui.h
index 5a86ac5a03..e67cba5289 100644
--- a/tests/auto/tools/uic/baseline/translationsettings.ui.h
+++ b/tests/auto/tools/uic/baseline/translationsettings.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'translationsettings.ui'
**
-** Created: Fri Sep 4 10:17:15 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/treewidgeteditor.ui.h b/tests/auto/tools/uic/baseline/treewidgeteditor.ui.h
index 0e483eea1e..4e3af66ea6 100644
--- a/tests/auto/tools/uic/baseline/treewidgeteditor.ui.h
+++ b/tests/auto/tools/uic/baseline/treewidgeteditor.ui.h
@@ -44,8 +44,7 @@
/********************************************************************************
** Form generated from reading UI file 'treewidgeteditor.ui'
**
-** Created: Fri Sep 4 10:17:15 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/trpreviewtool.ui.h b/tests/auto/tools/uic/baseline/trpreviewtool.ui.h
index 628bb4c617..4248181b0b 100644
--- a/tests/auto/tools/uic/baseline/trpreviewtool.ui.h
+++ b/tests/auto/tools/uic/baseline/trpreviewtool.ui.h
@@ -44,8 +44,7 @@
/********************************************************************************
** Form generated from reading UI file 'trpreviewtool.ui'
**
-** Created: Fri Sep 4 10:17:15 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/validators.ui.h b/tests/auto/tools/uic/baseline/validators.ui.h
index 7cc4de9dd0..3770c45dcb 100644
--- a/tests/auto/tools/uic/baseline/validators.ui.h
+++ b/tests/auto/tools/uic/baseline/validators.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'validators.ui'
**
-** Created: Fri Sep 4 10:17:15 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/wateringconfigdialog.ui.h b/tests/auto/tools/uic/baseline/wateringconfigdialog.ui.h
index 1bb8b8f837..705c7bb142 100644
--- a/tests/auto/tools/uic/baseline/wateringconfigdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/wateringconfigdialog.ui.h
@@ -1,8 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'wateringconfigdialog.ui'
**
-** Created: Fri Sep 4 10:17:15 2009
-** by: Qt User Interface Compiler version 4.6.0
+** Created by: Qt User Interface Compiler version 5.0.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/auto/tools/uic/tst_uic.cpp b/tests/auto/tools/uic/tst_uic.cpp
index 6092b7b778..c5315fad8a 100644
--- a/tests/auto/tools/uic/tst_uic.cpp
+++ b/tests/auto/tools/uic/tst_uic.cpp
@@ -195,12 +195,10 @@ void tst_uic::compare()
}
originalFile = orgFile.readAll();
- originalFile.replace(QRegExp(QLatin1String("Created:.{0,25}[\\d]{4,4}")), "");
- originalFile.replace(QRegExp(QLatin1String("by: Qt User Interface Compiler version [.\\d]{5,5}")), "");
+ originalFile.replace(QRegExp(QLatin1String("Created by: Qt User Interface Compiler version [.\\d]{5,5}")), "");
generatedFile = genFile.readAll();
- generatedFile.replace(QRegExp(QLatin1String("Created:.{0,25}[\\d]{4,4}")), "");
- generatedFile.replace(QRegExp(QLatin1String("by: Qt User Interface Compiler version [.\\d]{5,5}")), "");
+ generatedFile.replace(QRegExp(QLatin1String("Created by: Qt User Interface Compiler version [.\\d]{5,5}")), "");
QCOMPARE(generatedFile, originalFile);
}
diff --git a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
index 8ce0742854..952f5eaeea 100644
--- a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
+++ b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
@@ -166,7 +166,7 @@ tst_QFiledialog::~tst_QFiledialog()
void tst_QFiledialog::init()
{
// Save the developers settings so they don't get mad when their sidebar folders are gone.
- QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
+ QSettings settings(QSettings::UserScope, QLatin1String("QtProject"));
settings.beginGroup(QLatin1String("Qt"));
userSettings = settings.value(QLatin1String("filedialog")).toByteArray();
settings.remove(QLatin1String("filedialog"));
@@ -180,7 +180,7 @@ void tst_QFiledialog::init()
void tst_QFiledialog::cleanup()
{
- QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
+ QSettings settings(QSettings::UserScope, QLatin1String("QtProject"));
settings.beginGroup(QLatin1String("Qt"));
settings.setValue(QLatin1String("filedialog"), userSettings);
}
diff --git a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
index 6b0888f68a..b0c48a6558 100644
--- a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
+++ b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
@@ -165,7 +165,7 @@ void tst_QFileDialog2::init()
QVERIFY(tempDir.isValid());
// Save the developers settings so they don't get mad when their sidebar folders are gone.
- QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
+ QSettings settings(QSettings::UserScope, QLatin1String("QtProject"));
settings.beginGroup(QLatin1String("Qt"));
userSettings = settings.value(QLatin1String("filedialog")).toByteArray();
settings.remove(QLatin1String("filedialog"));
@@ -179,7 +179,7 @@ void tst_QFileDialog2::init()
void tst_QFileDialog2::cleanup()
{
- QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
+ QSettings settings(QSettings::UserScope, QLatin1String("QtProject"));
settings.beginGroup(QLatin1String("Qt"));
settings.setValue(QLatin1String("filedialog"), userSettings);
}
diff --git a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
index cd246ac25d..a0bd7f72a4 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -8486,7 +8486,9 @@ void tst_QGraphicsItem::focusProxyDeletion()
rect2 = new QGraphicsRectItem;
rect->setFocusProxy(rect2);
+ QGraphicsItem **danglingFocusProxyRef = &rect->d_ptr->focusProxy;
delete rect; // don't crash
+ QVERIFY(!rect2->d_ptr->focusProxyRefs.contains(danglingFocusProxyRef));
rect = new QGraphicsRectItem;
rect->setFocusProxy(rect2);
@@ -9263,6 +9265,45 @@ void tst_QGraphicsItem::focusScope()
scope3->setFocus();
QVERIFY(scope3->hasFocus());
+ // clearFocus() on a focus scope will remove focus from its children.
+ scope1->clearFocus();
+ QVERIFY(!scope1->hasFocus());
+ QVERIFY(!scope2->hasFocus());
+ QVERIFY(!scope3->hasFocus());
+
+ scope1->setFocus();
+ QVERIFY(!scope1->hasFocus());
+ QVERIFY(!scope2->hasFocus());
+ QVERIFY(scope3->hasFocus());
+
+ scope2->clearFocus();
+ QVERIFY(scope1->hasFocus());
+ QVERIFY(!scope2->hasFocus());
+ QVERIFY(!scope3->hasFocus());
+
+ scope2->setFocus();
+ QVERIFY(!scope1->hasFocus());
+ QVERIFY(!scope2->hasFocus());
+ QVERIFY(scope3->hasFocus());
+
+ // Focus cleared while a parent doesn't have focus remains cleared
+ // when the parent regains focus.
+ scope1->clearFocus();
+ scope3->clearFocus();
+ QVERIFY(!scope1->hasFocus());
+ QVERIFY(!scope2->hasFocus());
+ QVERIFY(!scope3->hasFocus());
+
+ scope1->setFocus();
+ QVERIFY(!scope1->hasFocus());
+ QVERIFY(scope2->hasFocus());
+ QVERIFY(!scope3->hasFocus());
+
+ scope3->setFocus();
+ QVERIFY(!scope1->hasFocus());
+ QVERIFY(!scope2->hasFocus());
+ QVERIFY(scope3->hasFocus());
+
QGraphicsRectItem *rect4 = new QGraphicsRectItem;
rect4->setData(0, "rect4");
rect4->setParentItem(scope3);
diff --git a/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp b/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
index e52ff3fa8b..dc7318ca64 100644
--- a/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
+++ b/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
@@ -54,6 +54,16 @@
#include <QStyleFactory>
#include <QSharedPointer>
+// Make a widget frameless to prevent size constraints of title bars
+// from interfering (Windows).
+static inline void setFrameless(QWidget *w)
+{
+ Qt::WindowFlags flags = w->windowFlags();
+ flags |= Qt::FramelessWindowHint;
+ flags &= ~(Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint);
+ w->setWindowFlags(flags);
+}
+
class tst_QGridLayout : public QObject
{
Q_OBJECT
@@ -256,6 +266,7 @@ void tst_QGridLayout::badDistributionBug()
void tst_QGridLayout::setMinAndMaxSize()
{
QWidget widget;
+ setFrameless(&widget);
QGridLayout layout(&widget);
layout.setMargin(0);
layout.setSpacing(0);
@@ -412,6 +423,7 @@ private:
void tst_QGridLayout::spacingAndSpacers()
{
QWidget widget;
+ setFrameless(&widget);
QGridLayout layout(&widget);
layout.setMargin(0);
layout.setSpacing(0);
@@ -667,6 +679,8 @@ void tst_QGridLayout::spacingsAndMargins()
QApplication::setStyle(new Qt42Style);
QWidget toplevel;
+ setFrameless(&toplevel);
+
QVBoxLayout vbox(&toplevel);
QGridLayout grid1;
vbox.addLayout(&grid1);
@@ -853,8 +867,10 @@ void tst_QGridLayout::minMaxSize()
QApplication::setStyle(style);
if (!m_grid)
m_grid = new QGridLayout();
- if (!m_toplevel)
+ if (!m_toplevel) {
m_toplevel = new QWidget();
+ setFrameless(m_toplevel);
+ }
if (fixedSize.isValid()) {
m_toplevel->setFixedSize(fixedSize);
} else {
@@ -1061,6 +1077,7 @@ void tst_QGridLayout::styleDependentSpacingsAndMargins()
QApplication::setStyle(new CustomLayoutStyle());
QWidget widget;
+ setFrameless(&widget);
QGridLayout layout(&widget);
QList<QPointer<SizeHinterFrame> > sizehinters;
for (int i = 0; i < rows; ++i) {
@@ -1101,6 +1118,7 @@ void tst_QGridLayout::layoutSpacing_data()
style->reimplementSubelementRect = false;
QApplication::setStyle(style);
QWidget *w = new QWidget();
+ setFrameless(w);
QVBoxLayout *layout = new QVBoxLayout();
QRadioButton *rb1 = new QRadioButton(QLatin1String("Radio 1"), w);
QRadioButton *rb2 = new QRadioButton(QLatin1String("Radio 2"), w);
@@ -1137,6 +1155,7 @@ void tst_QGridLayout::layoutSpacing_data()
style->reimplementSubelementRect = false;
QApplication::setStyle(style);
QWidget *w = new QWidget();
+ setFrameless(w);
QHBoxLayout *layout = new QHBoxLayout();
QLineEdit *le1 = new QLineEdit(w);
QLineEdit *le2 = new QLineEdit(w);
@@ -1174,6 +1193,7 @@ void tst_QGridLayout::layoutSpacing_data()
style->reimplementSubelementRect = true;
QApplication::setStyle(style);
QWidget *w = new QWidget();
+ setFrameless(w);
QVBoxLayout *layout = new QVBoxLayout();
QPushButton *pb1 = new QPushButton(QLatin1String("Push 1"), w);
@@ -1210,6 +1230,7 @@ void tst_QGridLayout::layoutSpacing_data()
style->reimplementSubelementRect = true;
QApplication::setStyle(style);
QWidget *w = new QWidget();
+ setFrameless(w);
QGridLayout *layout = new QGridLayout();
QPushButton *pb1 = new QPushButton(QLatin1String("Push 1"), w);
QPushButton *pb2 = new QPushButton(QLatin1String("Push 2"), w);
@@ -1277,6 +1298,7 @@ void tst_QGridLayout::layoutSpacing_data()
style->reimplementSubelementRect = true;
QApplication::setStyle(style);
QWidget *w = new QWidget();
+ setFrameless(w);
QVBoxLayout *layout = new QVBoxLayout();
QPushButton *pb1 = new QPushButton(QLatin1String("Push 1"), w);
@@ -1316,6 +1338,7 @@ void tst_QGridLayout::layoutSpacing_data()
style->reimplementSubelementRect = true;
QApplication::setStyle(style);
QWidget *w = new QWidget();
+ setFrameless(w);
QVBoxLayout *layout = new QVBoxLayout();
QPushButton *pb1 = new QPushButton(QLatin1String("Push 1"), w);
@@ -1364,6 +1387,7 @@ void tst_QGridLayout::layoutSpacing_data()
style->reimplementSubelementRect = false;
QApplication::setStyle(style);
QWidget *w = new QWidget();
+ setFrameless(w);
QGridLayout *layout = new QGridLayout();
QPushButton *left = new QPushButton(w);
QPushButton *up = new QPushButton(w);
@@ -1405,6 +1429,7 @@ void tst_QGridLayout::layoutSpacing_data()
style->reimplementSubelementRect = false;
QApplication::setStyle(style);
QWidget *w = new QWidget();
+ setFrameless(w);
QGridLayout *layout = new QGridLayout();
QPushButton *left = new QPushButton(w);
QPushButton *up = new QPushButton(w);
@@ -1442,6 +1467,7 @@ void tst_QGridLayout::layoutSpacing()
QFETCH(bool, customSubElementRect);
QWidget toplevel;
+ setFrameless(&toplevel);
CustomLayoutStyle *style = new CustomLayoutStyle();
style->hspacing = hSpacing;
@@ -1466,6 +1492,7 @@ void tst_QGridLayout::layoutSpacing()
void tst_QGridLayout::spacing()
{
QWidget w;
+ setFrameless(&w);
CustomLayoutStyle *style = new CustomLayoutStyle();
style->hspacing = 5;
style->vspacing = 10;
@@ -1569,6 +1596,7 @@ void tst_QGridLayout::spacerWithSpacing()
void tst_QGridLayout::contentsRect()
{
QWidget w;
+ setFrameless(&w);
QGridLayout grid;
w.setLayout(&grid);
grid.addWidget(new QPushButton(&w));
diff --git a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
index 230fcebfcb..058831af2e 100644
--- a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
+++ b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
@@ -230,28 +230,16 @@ void tst_QWidget_window::tst_windowFilePathAndwindowTitle_data()
QString validPath = QApplication::applicationFilePath();
QString fileNameOnly = QFileInfo(validPath).fileName() + QLatin1String("[*]");
- QString fileAndSep = fileNameOnly + QLatin1String(" ") + QChar(0x2014) + QLatin1String(" ");
QString windowTitle = QLatin1String("Here is a Window Title");
-
- QString defaultPlatString =
-#if 0 // was ifdef Q_OS_MAC, but that code is disabled in qwidget.cpp and caption handling should move to QPA anyway
- fileNameOnly;
-#else
- fileAndSep + "tst_qwidget_window"; // default app name in Qt5
-#endif
+ QString defaultPlatString = fileNameOnly;
QTest::newRow("never Set Title nor AppName") << false << false << validPath << QString() << windowTitle << defaultPlatString << defaultPlatString;
QTest::newRow("set title after only, but no AppName") << false << true << validPath << QString() << windowTitle << defaultPlatString << windowTitle;
QTest::newRow("set title before only, not AppName") << true << false << validPath << QString() << windowTitle << windowTitle << windowTitle;
QTest::newRow("always set title, not appName") << true << true << validPath << QString() << windowTitle << windowTitle << windowTitle;
- QString appName = QLatin1String("Killer App");
- QString platString =
-#if 0 // was ifdef Q_OS_MAC, but that code is disabled in qwidget.cpp and caption handling should move to QPA anyway
- fileNameOnly;
-#else
- fileAndSep + appName;
-#endif
+ QString appName = QLatin1String("Killer App"); // Qt4 used to make it part of windowTitle(), Qt5 doesn't anymore, the QPA plugin takes care of it.
+ QString platString = fileNameOnly;
QTest::newRow("never Set Title, yes AppName") << false << false << validPath << appName << windowTitle << platString << platString;
QTest::newRow("set title after only, yes AppName") << false << true << validPath << appName << windowTitle << platString << windowTitle;
diff --git a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
index d266692096..9dee368768 100644
--- a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
+++ b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
@@ -85,6 +85,16 @@ static bool qt_wince_is_smartphone() {
#include <qwidget.h>
+// Make a widget frameless to prevent size constraints of title bars
+// from interfering (Windows).
+static inline void setFrameless(QWidget *w)
+{
+ Qt::WindowFlags flags = w->windowFlags();
+ flags |= Qt::FramelessWindowHint;
+ flags &= ~(Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint);
+ w->setWindowFlags(flags);
+}
+
class tst_QStyle : public QObject
{
Q_OBJECT
@@ -337,6 +347,7 @@ bool tst_QStyle::testScrollBarSubControls(QStyle* style)
#endif
QScrollBar scrollBar;
+ setFrameless(&scrollBar);
scrollBar.show();
const QStyleOptionSlider opt = qt_qscrollbarStyleOption(&scrollBar);
foreach (int subControl, QList<int>() << 1 << 2 << 4 << 8) {
@@ -586,8 +597,8 @@ public:
};
-int Qt42Style::pixelMetric(PixelMetric metric, const QStyleOption * option /*= 0*/,
- const QWidget * widget /*= 0*/ ) const
+int Qt42Style::pixelMetric(PixelMetric metric, const QStyleOption * /* option = 0*/,
+ const QWidget * /* widget = 0*/ ) const
{
switch (metric) {
case QStyle::PM_DefaultTopLevelMargin:
@@ -660,6 +671,7 @@ void tst_QStyle::progressBarChangeStyle()
void tst_QStyle::lineUpLayoutTest(QStyle *style)
{
QWidget widget;
+ setFrameless(&widget);
QHBoxLayout layout;
QFont font;
font.setPointSize(9); //Plastique is lined up for odd numbers...
@@ -677,10 +689,21 @@ void tst_QStyle::lineUpLayoutTest(QStyle *style)
foreach (QWidget *w, qFindChildren<QWidget *>(&widget))
w->setStyle(style);
widget.show();
- QTest::qWait( 500 );
+ QVERIFY(QTest::qWaitForWindowExposed(&widget));
- QVERIFY(qAbs(spinbox.height() - lineedit.height()) <= 1);
- QVERIFY(qAbs(spinbox.height() - combo.height()) <= 1);
+#ifdef Q_OS_WIN
+ const int limit = 2; // Aero style has larger margins
+#else
+ const int limit = 1;
+#endif
+ const int slDiff = qAbs(spinbox.height() - lineedit.height());
+ const int scDiff = qAbs(spinbox.height() - combo.height());
+ QVERIFY2(slDiff <= limit,
+ qPrintable(QString::fromLatin1("%1 exceeds %2 for %3")
+ .arg(slDiff).arg(limit).arg(style->objectName())));
+ QVERIFY2(scDiff <= limit,
+ qPrintable(QString::fromLatin1("%1 exceeds %2 for %3")
+ .arg(scDiff).arg(limit).arg(style->objectName())));
}
void tst_QStyle::defaultFont()
@@ -690,6 +713,7 @@ void tst_QStyle::defaultFont()
pointFont.setPixelSize(9);
qApp->setFont(pointFont);
QPushButton button;
+ setFrameless(&button);
button.show();
qApp->processEvents();
qApp->setFont(defaultFont);
@@ -716,6 +740,7 @@ void tst_QStyle::testDrawingShortcuts()
{
{
QWidget w;
+ setFrameless(&w);
QToolButton *tb = new QToolButton(&w);
tb->setText("&abc");
DrawTextStyle *dts = new DrawTextStyle;
@@ -730,6 +755,7 @@ void tst_QStyle::testDrawingShortcuts()
}
{
QToolBar w;
+ setFrameless(&w);
QToolButton *tb = new QToolButton(&w);
tb->setText("&abc");
DrawTextStyle *dts = new DrawTextStyle;
diff --git a/tests/auto/widgets/widgets/qabstractscrollarea/tst_qabstractscrollarea.cpp b/tests/auto/widgets/widgets/qabstractscrollarea/tst_qabstractscrollarea.cpp
index 0420ecf1e0..d39b187c8b 100644
--- a/tests/auto/widgets/widgets/qabstractscrollarea/tst_qabstractscrollarea.cpp
+++ b/tests/auto/widgets/widgets/qabstractscrollarea/tst_qabstractscrollarea.cpp
@@ -238,17 +238,17 @@ void tst_QAbstractScrollArea::setScrollBars2()
// Hide the OLD scroll bar and ensure that the NEW one is hidden.
hbar->hide();
- scrollArea.setHorizontalScrollBar(new QScrollBar);
- qApp->processEvents();
- QVERIFY(!scrollArea.horizontalScrollBar()->isVisible());
+ hbar = new QScrollBar(&scrollArea);
+ scrollArea.setHorizontalScrollBar(hbar);
+ QVERIFY(!hbar->isVisibleTo(hbar->parentWidget()));
vbar->hide();
- scrollArea.setVerticalScrollBar(new QScrollBar);
- qApp->processEvents();
- QVERIFY(!scrollArea.verticalScrollBar()->isVisible());
+ vbar = new QScrollBar(&scrollArea);
+ scrollArea.setVerticalScrollBar(vbar);
+ QVERIFY(!vbar->isVisibleTo(vbar->parentWidget()));
- scrollArea.verticalScrollBar()->show();
- scrollArea.horizontalScrollBar()->show();
+ vbar->show();
+ hbar->show();
// Hide the NEW scroll bar and ensure that it's visible
// (because the OLD one is visible).
diff --git a/tests/auto/widgets/widgets/qmdiarea/qmdiarea.pro b/tests/auto/widgets/widgets/qmdiarea/qmdiarea.pro
index 141392b251..cc2bcb3c30 100644
--- a/tests/auto/widgets/widgets/qmdiarea/qmdiarea.pro
+++ b/tests/auto/widgets/widgets/qmdiarea/qmdiarea.pro
@@ -6,7 +6,7 @@ QT += gui-private widgets testlib
INCLUDEPATH += .
SOURCES += tst_qmdiarea.cpp
DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
-contains(QT_CONFIG, opengl):QT += opengl
+qtHaveModule(opengl): QT += opengl
mac {
LIBS += -framework Security
diff --git a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
index 5aa7b19917..ba5c461223 100644
--- a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
+++ b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
@@ -1733,9 +1733,9 @@ void tst_QMdiArea::tileSubWindows()
QTRY_COMPARE(workspace.viewport()->rect().size(), expectedViewportSize);
// Not enough space for all sub-windows to be visible -> provide scroll bars.
- workspace.resize(150, 150);
+ workspace.resize(160, 150);
qApp->processEvents();
- QTRY_COMPARE(workspace.size(), QSize(150, 150));
+ QTRY_COMPARE(workspace.size(), QSize(160, 150));
// Horizontal scroll bar.
QScrollBar *hBar = workspace.horizontalScrollBar();
@@ -2594,7 +2594,10 @@ void tst_QMdiArea::nativeSubWindows()
const QString platformName = QGuiApplication::platformName();
if (platformName != QLatin1String("xcb") && platformName != QLatin1String("windows"))
QSKIP(qPrintable(QString::fromLatin1("nativeSubWindows() does not work on this platform (%1).").arg(platformName)));
-
+#ifdef QT_OPENGL_ES_2_ANGLE
+ if (platformName == QLatin1String("windows"))
+ QSKIP("nativeSubWindows() does not work with ANGLE on Windows, QTBUG-28545.");
+#endif
{ // Add native widgets after show.
QMdiArea mdiArea;
mdiArea.addSubWindow(new QWidget);
diff --git a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
index 2535e23ab8..3aefe26b1c 100644
--- a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
+++ b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
@@ -1016,6 +1016,25 @@ void tst_QMenuBar::check_shortcutPress()
}
#endif
+class LayoutDirectionSaver
+{
+ Q_DISABLE_COPY(LayoutDirectionSaver)
+public:
+ explicit LayoutDirectionSaver(Qt::LayoutDirection direction)
+ : m_oldDirection(qApp->layoutDirection())
+ {
+ qApp->setLayoutDirection(direction);
+ }
+
+ ~LayoutDirectionSaver()
+ {
+ qApp->setLayoutDirection(m_oldDirection);
+ }
+
+private:
+ const Qt::LayoutDirection m_oldDirection;
+};
+
// Qt/Mac,WinCE does not use the native popups/menubar
#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
void tst_QMenuBar::check_menuPosition()
@@ -1070,10 +1089,9 @@ void tst_QMenuBar::check_menuPosition()
menu.close();
}
- //in RTL, the menu should be stuck at the right of the action geometry
+ // QTBUG-2596: in RTL, the menu should be stuck at the right of the action geometry
{
- Qt::LayoutDirection dir = qApp->layoutDirection();
- qApp->setLayoutDirection(Qt::RightToLeft);
+ LayoutDirectionSaver directionSaver(Qt::RightToLeft);
menu.clear();
QObject::connect(&menu, SIGNAL(aboutToShow()), &menu, SLOT(addActions()));
QRect mbItemRect = mw->menuBar()->actionGeometry(menu_action);
@@ -1082,8 +1100,23 @@ void tst_QMenuBar::check_menuPosition()
QVERIFY(menu.isActiveWindow());
QCOMPARE(menu.geometry().right(), mbItemRect.right());
menu.close();
- qApp->setLayoutDirection(dir);
}
+
+# ifndef QTEST_NO_CURSOR
+ // QTBUG-28031: Click at bottom-right corner.
+ {
+ mw->move(400, 200);
+ LayoutDirectionSaver directionSaver(Qt::RightToLeft);
+ QMenuBar *mb = mw->menuBar();
+ const QPoint localPos = mb->actionGeometry(menu.menuAction()).bottomRight() - QPoint(1, 1);
+ const QPoint globalPos = mb->mapToGlobal(localPos);
+ QCursor::setPos(globalPos);
+ QTest::mouseClick(mb, Qt::LeftButton, 0, localPos);
+ QTRY_VERIFY(menu.isActiveWindow());
+ QCOMPARE(menu.geometry().right() - 1, globalPos.x());
+ menu.close();
+ }
+# endif // QTEST_NO_CURSOR
}
#endif
diff --git a/tests/auto/xml/sax/qxmlsimplereader/qxmlsimplereader.pro b/tests/auto/xml/sax/qxmlsimplereader/qxmlsimplereader.pro
index 371e12a0eb..298e41fc89 100644
--- a/tests/auto/xml/sax/qxmlsimplereader/qxmlsimplereader.pro
+++ b/tests/auto/xml/sax/qxmlsimplereader/qxmlsimplereader.pro
@@ -1,6 +1,5 @@
CONFIG += testcase
TARGET = tst_qxmlsimplereader
-DEPENDPATH += parser
INCLUDEPATH += parser
HEADERS += parser/parser.h
diff --git a/tests/baselineserver/shared/baselineprotocol.pri b/tests/baselineserver/shared/baselineprotocol.pri
index 62e38a6ab5..996f9d5a1f 100644
--- a/tests/baselineserver/shared/baselineprotocol.pri
+++ b/tests/baselineserver/shared/baselineprotocol.pri
@@ -1,5 +1,4 @@
INCLUDEPATH += $$PWD
-DEPENDPATH += $$PWD
QT *= network
diff --git a/tests/benchmarks/benchmarks.pro b/tests/benchmarks/benchmarks.pro
index e685c3d7b2..5fd8ff6368 100644
--- a/tests/benchmarks/benchmarks.pro
+++ b/tests/benchmarks/benchmarks.pro
@@ -5,8 +5,8 @@ SUBDIRS = \
network \
sql \
-# removed-by-refactor contains(QT_CONFIG, opengl): SUBDIRS += opengl
-contains(QT_CONFIG, dbus): SUBDIRS += dbus
+# removed-by-refactor qtHaveModule(opengl): SUBDIRS += opengl
+qtHaveModule(dbus): SUBDIRS += dbus
check-trusted.CONFIG += recursive
QMAKE_EXTRA_TARGETS += check-trusted
diff --git a/tests/benchmarks/corelib/kernel/kernel.pro b/tests/benchmarks/corelib/kernel/kernel.pro
index a55135b74d..02eeeaa254 100644
--- a/tests/benchmarks/corelib/kernel/kernel.pro
+++ b/tests/benchmarks/corelib/kernel/kernel.pro
@@ -7,6 +7,6 @@ SUBDIRS = \
qvariant \
qcoreapplication
-isEmpty(QT.widgets.name): SUBDIRS -= \
+!qtHaveModule(widgets): SUBDIRS -= \
qmetaobject \
qobject
diff --git a/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/qtimer_vs_qmetaobject.pro b/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/qtimer_vs_qmetaobject.pro
index d43342cd50..16539c0198 100644
--- a/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/qtimer_vs_qmetaobject.pro
+++ b/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/qtimer_vs_qmetaobject.pro
@@ -1,6 +1,5 @@
TEMPLATE = app
TARGET = qtimer_vs_qmetaobject
-DEPENDPATH += .
INCLUDEPATH += .
CONFIG += release
diff --git a/tests/benchmarks/corelib/tools/qregexp/qregexp.pro b/tests/benchmarks/corelib/tools/qregexp/qregexp.pro
index 6e466aeab6..74544519f3 100644
--- a/tests/benchmarks/corelib/tools/qregexp/qregexp.pro
+++ b/tests/benchmarks/corelib/tools/qregexp/qregexp.pro
@@ -1,13 +1,12 @@
TEMPLATE = app
TARGET = tst_bench_qregexp
QT = core testlib
-CONFIG += release
+CONFIG += release exceptions
SOURCES += main.cpp
RESOURCES += qregexp.qrc
-!isEmpty(QT.webkit.sources):exists($${QT.webkit.sources}/../JavaScriptCore/JavaScriptCore.pri) {
- include( $${QT.webkit.sources}/../JavaScriptCore/JavaScriptCore.pri )
+qtHaveModule(script):!pcre {
DEFINES += HAVE_JSC
QT += script
}
diff --git a/tests/benchmarks/corelib/tools/qstring/fromlatin1.cpp b/tests/benchmarks/corelib/tools/qstring/fromlatin1.cpp
index 9a44b26505..660eb075b2 100644
--- a/tests/benchmarks/corelib/tools/qstring/fromlatin1.cpp
+++ b/tests/benchmarks/corelib/tools/qstring/fromlatin1.cpp
@@ -629,7 +629,7 @@ static const char charData[] __attribute__((aligned(64))) = {
// #126
"\377\376"
- "Trolltech"
+ "QtProject"
"\377\376\375\374\373" // 3328
// #127
@@ -827,7 +827,7 @@ static const char charData[] __attribute__((aligned(64))) = {
"\377\376\375\374\373\372\371\370\367\366\365\364\363\362\361\360" // 4544
// #166
- "Trolltech"
+ "QtProject"
"\377\376\375\374\373\372\371" // 4560
// #167
@@ -980,7 +980,7 @@ static const char charData[] __attribute__((aligned(64))) = {
"\377\376\375\374\373" // 5488
// #197
- "Trolltech"
+ "QtProject"
"\377\376\375\374\373\372\371" // 5504
// #198
@@ -6955,7 +6955,7 @@ static const char charData[] __attribute__((aligned(64))) = {
"\377\376\375" // 58688
// #1425
- "Trolltech"
+ "QtProject"
"\377\376\375\374\373\372\371" // 58704
// #1426
@@ -28453,7 +28453,7 @@ static const char charData[] __attribute__((aligned(64))) = {
"\377\376" // 268688
// #5853
- "Trolltech"
+ "QtProject"
"\377\376\375\374\373\372\371" // 268704
// #5854
diff --git a/tests/benchmarks/gui/animation/animation.pro b/tests/benchmarks/gui/animation/animation.pro
index 1c9a7c3c08..76c1a49e5c 100644
--- a/tests/benchmarks/gui/animation/animation.pro
+++ b/tests/benchmarks/gui/animation/animation.pro
@@ -1,2 +1,2 @@
TEMPLATE = subdirs
-!isEmpty(QT.widgets.name):SUBDIRS = qanimation
+qtHaveModule(widgets): SUBDIRS = qanimation
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/GraphicsViewBenchmark.pro b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/GraphicsViewBenchmark.pro
index b0bc021b0a..a6ed4b84fb 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/GraphicsViewBenchmark.pro
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/GraphicsViewBenchmark.pro
@@ -1,7 +1,7 @@
TEMPLATE = app
QT += svg testlib
-contains(QT_CONFIG, opengl):QT += opengl
+qtHaveModule(opengl): QT += opengl
HEADERS += widgets/gvbwidget.h \
widgets/abstractscrollarea.h \
diff --git a/tests/benchmarks/gui/graphicsview/graphicsview.pro b/tests/benchmarks/gui/graphicsview/graphicsview.pro
index f8ba062829..d89a00c4b9 100644
--- a/tests/benchmarks/gui/graphicsview/graphicsview.pro
+++ b/tests/benchmarks/gui/graphicsview/graphicsview.pro
@@ -8,7 +8,7 @@ SUBDIRS = \
qgraphicsview \
qgraphicswidget
-isEmpty(QT.widgets.name): SUBDIRS -= \
+!qtHaveModule(widgets): SUBDIRS -= \
qgraphicsanchorlayout \
qgraphicsitem \
qgraphicsscene \
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.pro b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.pro
index 759216d46d..4047bad1ca 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.pro
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.pro
@@ -4,7 +4,7 @@ HEADERS += mainwindow.h view.h chip.h
SOURCES += main.cpp
SOURCES += mainwindow.cpp view.cpp chip.cpp
-contains(QT_CONFIG, opengl):QT += opengl
+qtHaveModule(opengl): QT += opengl
build_all:!build_pass {
CONFIG -= build_all
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.pri b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.pri
index 8d02504b73..105117de30 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.pri
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.pri
@@ -10,4 +10,4 @@ RESOURCES += \
chiptester/images.qrc
QT += widgets
-contains(QT_CONFIG, opengl) QT += opengl
+qtHaveModule(opengl): QT += opengl
diff --git a/tests/benchmarks/gui/gui.pro b/tests/benchmarks/gui/gui.pro
index f4b84f0428..e943347938 100644
--- a/tests/benchmarks/gui/gui.pro
+++ b/tests/benchmarks/gui/gui.pro
@@ -17,5 +17,5 @@ TRUSTED_BENCHMARKS += \
include(../trusted-benchmarks.pri)
-isEmpty(QT.widgets.name): SUBDIRS -= \
+!qtHaveModule(widgets): SUBDIRS -= \
itemviews
diff --git a/tests/benchmarks/gui/image/image.pro b/tests/benchmarks/gui/image/image.pro
index fa26f3ec4c..2d5db35a73 100644
--- a/tests/benchmarks/gui/image/image.pro
+++ b/tests/benchmarks/gui/image/image.pro
@@ -6,5 +6,5 @@ SUBDIRS = \
qpixmap \
qpixmapcache
-isEmpty(QT.widgets.name): SUBDIRS -= \
+!qtHaveModule(widgets): SUBDIRS -= \
qimagereader
diff --git a/tests/benchmarks/gui/kernel/kernel.pro b/tests/benchmarks/gui/kernel/kernel.pro
index 303eff9759..cd7235cff8 100644
--- a/tests/benchmarks/gui/kernel/kernel.pro
+++ b/tests/benchmarks/gui/kernel/kernel.pro
@@ -1,4 +1,4 @@
TEMPLATE = subdirs
-!isEmpty(QT.widgets.name):SUBDIRS = \
+qtHaveModule(widgets): SUBDIRS = \
qapplication \
qwidget
diff --git a/tests/benchmarks/gui/painting/painting.pro b/tests/benchmarks/gui/painting/painting.pro
index e55222a2c2..b3fb34757c 100644
--- a/tests/benchmarks/gui/painting/painting.pro
+++ b/tests/benchmarks/gui/painting/painting.pro
@@ -6,7 +6,7 @@ SUBDIRS = \
qtracebench \
qtbench
-isEmpty(QT.widgets.name): SUBDIRS -= \
+!qtHaveModule(widgets): SUBDIRS -= \
qpainter \
qtracebench \
qtbench
diff --git a/tests/benchmarks/gui/painting/qtracebench/qtracebench.pro b/tests/benchmarks/gui/painting/qtracebench/qtracebench.pro
index f5ec44f4d8..d8c5c8e85b 100644
--- a/tests/benchmarks/gui/painting/qtracebench/qtracebench.pro
+++ b/tests/benchmarks/gui/painting/qtracebench/qtracebench.pro
@@ -4,8 +4,6 @@ QT += core-private gui-private widgets-private
TEMPLATE = app
TARGET = tst_qtracebench
-INCLUDEPATH += . $$QT_SOURCE_TREE/src/3rdparty/harfbuzz/src
-
RESOURCES += qtracebench.qrc
SOURCES += tst_qtracebench.cpp
diff --git a/tests/benchmarks/gui/styles/styles.pro b/tests/benchmarks/gui/styles/styles.pro
index 8930de127b..2c1d10b48c 100644
--- a/tests/benchmarks/gui/styles/styles.pro
+++ b/tests/benchmarks/gui/styles/styles.pro
@@ -1,3 +1,3 @@
TEMPLATE = subdirs
-!isEmpty(QT.widgets.name):SUBDIRS = \
+qtHaveModule(widgets): SUBDIRS = \
qstylesheetstyle
diff --git a/tests/manual/cocoa/qmaccocoaviewcontainer/qmaccocoaviewcontainer.pro b/tests/manual/cocoa/qmaccocoaviewcontainer/qmaccocoaviewcontainer.pro
index a7aa675d87..9546adea1c 100644
--- a/tests/manual/cocoa/qmaccocoaviewcontainer/qmaccocoaviewcontainer.pro
+++ b/tests/manual/cocoa/qmaccocoaviewcontainer/qmaccocoaviewcontainer.pro
@@ -1,6 +1,5 @@
TEMPLATE = app
TARGET = qmaccocoaviewcontainer
-DEPENDPATH += .
INCLUDEPATH += .
QT += widgets
LIBS += -framework Cocoa
diff --git a/tests/manual/cocoa/wheelevent/wheelevent.pro b/tests/manual/cocoa/wheelevent/wheelevent.pro
index cf32954750..f90302da95 100644
--- a/tests/manual/cocoa/wheelevent/wheelevent.pro
+++ b/tests/manual/cocoa/wheelevent/wheelevent.pro
@@ -3,5 +3,5 @@ TEMPLATE = app
HEADERS += window.h
SOURCES += window.cpp main.cpp
-QT += core gui gui-private core-private
+QT += core core-private gui gui-private widgets
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/manual/cocoa/wheelevent/window.cpp b/tests/manual/cocoa/wheelevent/window.cpp
index ecf337f85b..70ce41d094 100644
--- a/tests/manual/cocoa/wheelevent/window.cpp
+++ b/tests/manual/cocoa/wheelevent/window.cpp
@@ -80,7 +80,6 @@ void Window::initialize()
setSizeIncrement(QSize(10, 10));
setBaseSize(QSize(640, 480));
setMinimumSize(QSize(240, 160));
- setMaximumSize(QSize(800, 600));
}
create();
@@ -102,6 +101,12 @@ void Window::mouseMoveEvent(QMouseEvent *event)
{
if (m_lastPos != QPoint(-1, -1)) {
QPainter p(&m_image);
+
+ QPen pen;
+ pen.setCosmetic(true);
+ pen.setWidth(1);
+ p.setPen(pen);
+
p.setRenderHint(QPainter::Antialiasing);
p.drawLine(m_lastPos, event->pos());
m_lastPos = event->pos();
@@ -153,13 +158,16 @@ void Window::resizeEvent(QResizeEvent *)
{
QImage old = m_image;
- //qDebug() << "Window::resizeEvent" << width << height;
+ qDebug() << "Window::resizeEvent" << geometry();
+
+ int width = qMax(geometry().width() * devicePixelRatio(), qreal(old.width()));
+ int height = qMax(geometry().height() * devicePixelRatio(), qreal(old.height()));
- int width = qMax(geometry().width(), old.width());
- int height = qMax(geometry().height(), old.height());
+ qDebug() << "Window::resizeEvent" << width << height;
if (width > old.width() || height > old.height()) {
m_image = QImage(width, height, QImage::Format_RGB32);
+ m_image.setDevicePixelRatio(devicePixelRatio());
m_image.fill(colorTable[(m_backgroundColorIndex) % (sizeof(colorTable) / sizeof(colorTable[0]))].rgba());
QPainter p(&m_image);
@@ -221,6 +229,12 @@ void Window::render()
// draw grid:
int gridSpace = 80;
+ QPen pen;
+ pen.setCosmetic(true);
+ pen.setWidth(1);
+ p.setPen(pen);
+
+
for (int y = 0; y < geometry().height() + gridSpace; y+= gridSpace) {
int offset = scrollOffset.y() % gridSpace;
//int color = ((y + offset) %255);// + scrollOffset.y()) % 255);
@@ -229,6 +243,7 @@ void Window::render()
//p.fillRect(0, y + offset, geometry().width(), gridSpace,QColor(color,0, 0));
}
+
for (int x = 0; x < geometry().width() + gridSpace; x+= gridSpace) {
p.drawLine(x + scrollOffset.x() % gridSpace, 0, x + scrollOffset.x() % gridSpace, geometry().height());
}
diff --git a/tests/manual/dialogs/filedialogpanel.cpp b/tests/manual/dialogs/filedialogpanel.cpp
index 4da3d6ee42..f33c27f502 100644
--- a/tests/manual/dialogs/filedialogpanel.cpp
+++ b/tests/manual/dialogs/filedialogpanel.cpp
@@ -105,9 +105,9 @@ inline void setComboBoxValue(QComboBox *c, int v)
c->setCurrentIndex(c->findData(QVariant(v)));
}
-static inline void addButton(const QString &desription, QBoxLayout *layout, QObject *receiver, const char *slotFunc)
+static inline void addButton(const QString &description, QBoxLayout *layout, QObject *receiver, const char *slotFunc)
{
- QPushButton *button = new QPushButton(desription);
+ QPushButton *button = new QPushButton(description);
QObject::connect(button, SIGNAL(clicked()), receiver, slotFunc);
layout->addWidget(button);
}
diff --git a/tests/manual/filetest/filetest.pro b/tests/manual/filetest/filetest.pro
new file mode 100644
index 0000000000..5d2ba9b82b
--- /dev/null
+++ b/tests/manual/filetest/filetest.pro
@@ -0,0 +1,6 @@
+TEMPLATE = app
+QT = core
+CONFIG += console
+CONFIG -= app_bundle
+
+SOURCES += main.cpp
diff --git a/tests/manual/filetest/main.cpp b/tests/manual/filetest/main.cpp
new file mode 100644
index 0000000000..857d6c05a3
--- /dev/null
+++ b/tests/manual/filetest/main.cpp
@@ -0,0 +1,142 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** 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, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QDebug>
+#include <QCoreApplication>
+#include <QFileInfo>
+#include <QFile>
+#include <QDir>
+
+#include <iostream>
+
+static const char usage1[] =
+"\nTests various file functionality in Qt\n\n"
+"Usage: ";
+static const char usage2[] =" [KEYWORD] [ARGUMENTS]\n\n"
+"Keywords: ls FILES list file information\n"
+" mv SOURCE TARGET rename files using QFile::rename\n"
+" cp SOURCE TARGET copy files using QFile::copy\n"
+" rm FILE remove file using QFile::remove\n"
+" rmr DIR remove directory recursively\n"
+" using QDir::removeRecursively\n";
+
+static int ls(int argCount, char **args)
+{
+ for (int i = 0 ; i < argCount; ++i) {
+ const QFileInfo fi(QString::fromLocal8Bit(args[i]));
+ std::cout << QDir::toNativeSeparators(fi.absoluteFilePath()).toStdString() << ' ' << fi.size();
+ if (fi.exists())
+ std::cout << " [exists]";
+ if (fi.isFile())
+ std::cout << " [file]";
+ if (fi.isSymLink()) {
+ std::cout << " [symlink to "
+ << QDir::toNativeSeparators(fi.symLinkTarget()).toStdString() << ']';
+ }
+ if (fi.isDir())
+ std::cout << " [dir]";
+ std::cout << std::endl;
+ }
+ return 0;
+}
+
+static int mv(const char *sourceFileName, const char *targetFileName)
+{
+ QFile sourceFile(QString::fromLocal8Bit(sourceFileName));
+ if (!sourceFile.rename(QString::fromLocal8Bit(targetFileName))) {
+ qWarning().nospace() << sourceFile.errorString();
+ return -1;
+ }
+ return 0;
+}
+
+static int cp(const char *sourceFileName, const char *targetFileName)
+{
+ QFile sourceFile(QString::fromLocal8Bit(sourceFileName));
+ if (!sourceFile.copy(QString::fromLocal8Bit(targetFileName))) {
+ qWarning().nospace() << sourceFile.errorString();
+ return -1;
+ }
+ return 0;
+}
+
+static int rm(const char *fileName)
+{
+ QFile file(QString::fromLocal8Bit(fileName));
+ if (!file.remove()) {
+ qWarning().nospace() << file.errorString();
+ return -1;
+ }
+ return 0;
+}
+
+static int rmr(const char *dirName)
+{
+ QDir dir(QString::fromLocal8Bit(dirName));
+ if (!dir.removeRecursively()) {
+ qWarning().nospace() << "Failed to remove " << dir.absolutePath();
+ return -1;
+ }
+ return 0;
+}
+
+int main(int argc, char *argv[])
+{
+ QCoreApplication a(argc, argv);
+ Q_UNUSED(a)
+ if (argc >= 3 && !qstrcmp(argv[1], "ls"))
+ return ls(argc -2, argv + 2);
+
+ if (argc == 4 && !qstrcmp(argv[1], "mv"))
+ return mv(argv[2], argv[3]);
+
+ if (argc == 4 && !qstrcmp(argv[1], "cp"))
+ return cp(argv[2], argv[3]);
+
+ if (argc == 3 && !qstrcmp(argv[1], "rm"))
+ return rm(argv[2]);
+
+ if (argc == 3 && !qstrcmp(argv[1], "rmr"))
+ return rmr(argv[2]);
+
+ std::cerr << usage1 << argv[0] << usage2;
+ return 0;
+}
diff --git a/tests/manual/highdpi/highdpi.pro b/tests/manual/highdpi/highdpi.pro
index 635ba37a38..b827456f9b 100644
--- a/tests/manual/highdpi/highdpi.pro
+++ b/tests/manual/highdpi/highdpi.pro
@@ -1,6 +1,5 @@
TEMPLATE = app
TARGET = highdpi
-DEPENDPATH += .
INCLUDEPATH += .
QT += widgets
diff --git a/tests/manual/lance/lance.pro b/tests/manual/lance/lance.pro
index 6d1d7fa392..177ca0e40e 100644
--- a/tests/manual/lance/lance.pro
+++ b/tests/manual/lance/lance.pro
@@ -13,6 +13,6 @@ SOURCES += interactivewidget.cpp \
RESOURCES += icons.qrc \
$$LANCELOT_DIR/images.qrc
-contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2):QT += opengl
+qtHaveModule(opengl): QT += opengl
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/manual/lance/widgets.h b/tests/manual/lance/widgets.h
index e5e21f4b35..a95658d215 100644
--- a/tests/manual/lance/widgets.h
+++ b/tests/manual/lance/widgets.h
@@ -99,7 +99,7 @@ public:
m_filename(file),
m_view_mode(RenderView)
{
- QSettings settings("Trolltech", "lance");
+ QSettings settings("QtProject", "lance");
for (int i=0; i<10; ++i) {
QPointF suggestion(100 + i * 40, 100 + 100 * qSin(i * 3.1415 / 10.0));
m_controlPoints << settings.value("cp" + QString::number(i), suggestion).toPointF();
@@ -154,7 +154,7 @@ public:
~OnScreenWidget()
{
- QSettings settings("Trolltech", "lance");
+ QSettings settings("QtProject", "lance");
for (int i=0; i<10; ++i) {
settings.setValue("cp" + QString::number(i), m_controlPoints.at(i));
}
diff --git a/tests/manual/manual.pro b/tests/manual/manual.pro
index cfa812aaba..525f596d0e 100644
--- a/tests/manual/manual.pro
+++ b/tests/manual/manual.pro
@@ -1,6 +1,7 @@
TEMPLATE=subdirs
SUBDIRS = bearerex \
+filetest \
gestures \
inputmethodhints \
keypadnavigation \
diff --git a/tests/manual/network_remote_stresstest/network_remote_stresstest.pro b/tests/manual/network_remote_stresstest/network_remote_stresstest.pro
index 02836f0a5d..736747e486 100644
--- a/tests/manual/network_remote_stresstest/network_remote_stresstest.pro
+++ b/tests/manual/network_remote_stresstest/network_remote_stresstest.pro
@@ -1,4 +1,3 @@
-CONFIG += testcase
TARGET = tst_network_remote_stresstest
QT = core core-private network network-private testlib
diff --git a/tests/manual/network_stresstest/network_stresstest.pro b/tests/manual/network_stresstest/network_stresstest.pro
index 15a9156597..cefb064020 100644
--- a/tests/manual/network_stresstest/network_stresstest.pro
+++ b/tests/manual/network_stresstest/network_stresstest.pro
@@ -1,4 +1,3 @@
-CONFIG += testcase
TARGET = tst_network_stresstest
QT = core-private network-private testlib
diff --git a/tests/manual/qhttpnetworkconnection/qhttpnetworkconnection.pro b/tests/manual/qhttpnetworkconnection/qhttpnetworkconnection.pro
index c33c87cd04..8440453cb7 100644
--- a/tests/manual/qhttpnetworkconnection/qhttpnetworkconnection.pro
+++ b/tests/manual/qhttpnetworkconnection/qhttpnetworkconnection.pro
@@ -1,4 +1,3 @@
-CONFIG += testcase
TEMPLATE = app
TARGET = tst_qhttpnetworkconnection
diff --git a/tests/auto/other/headersclean/tst_headersclean.cpp b/tests/manual/qmetatype/declare_metatype_noninline.cpp
index 01661a32ea..8054daba06 100644
--- a/tests/auto/other/headersclean/tst_headersclean.cpp
+++ b/tests/manual/qmetatype/declare_metatype_noninline.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@kdab.com>
** Contact: http://www.qt-project.org/legal
**
** This file is part of the test suite of the Qt Toolkit.
@@ -39,12 +39,11 @@
**
****************************************************************************/
-#include "tst_headersclean.h"
-#include <QTest>
+#include "declare_metatype_noninline.h"
-void tst_HeadersClean::initTestCase()
+Q_DECLARE_METATYPE(ToBeDeclaredMetaTypeNonInline)
+
+int ToBeDeclaredMetaTypeNonInline::triggerRegistration()
{
- QWARN("This is a compile test only");
+ return qMetaTypeId<ToBeDeclaredMetaTypeNonInline>();
}
-
-QTEST_MAIN(tst_HeadersClean)
diff --git a/tests/manual/qmetatype/declare_metatype_noninline.h b/tests/manual/qmetatype/declare_metatype_noninline.h
new file mode 100644
index 0000000000..74244a3fcf
--- /dev/null
+++ b/tests/manual/qmetatype/declare_metatype_noninline.h
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@kdab.com>
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** 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, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DECLARE_METATYPE_NONINLINE_H
+#define DECLARE_METATYPE_NONINLINE_H
+
+#include <QtCore/qmetatype.h>
+
+struct ToBeDeclaredMetaTypeNonInline {
+ static int triggerRegistration();
+};
+
+#endif // DECLARE_METATYPE_NONINLINE_H
+
diff --git a/tests/manual/qmetatype/qmetatype.pro b/tests/manual/qmetatype/qmetatype.pro
new file mode 100644
index 0000000000..a4f941e577
--- /dev/null
+++ b/tests/manual/qmetatype/qmetatype.pro
@@ -0,0 +1,5 @@
+CONFIG += testcase
+TARGET = tst_qmetatype_expect_fail
+QT = core
+HEADERS = declare_metatype_noninline.h
+SOURCES = tst_qmetatype.cpp declare_metatype_noninline.cpp
diff --git a/tests/manual/qmetatype/tst_qmetatype.cpp b/tests/manual/qmetatype/tst_qmetatype.cpp
new file mode 100644
index 0000000000..bd17ca260c
--- /dev/null
+++ b/tests/manual/qmetatype/tst_qmetatype.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@kdab.com>
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** 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, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore>
+
+#include "declare_metatype_noninline.h"
+
+int main(int argc, char **argv)
+{
+ qDebug("expect no warning here");
+ const int id = qRegisterMetaType<ToBeDeclaredMetaTypeNonInline>("ToBeDeclaredMetaTypeNonInline");
+ qDebug("expect a qfatal now");
+ const int result = ToBeDeclaredMetaTypeNonInline::triggerRegistration();
+ Q_ASSERT(id == result);
+ qDebug("if you read this, check that a qFatal was seen, "
+ "otherwise the test failed.");
+}
diff --git a/tests/manual/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro b/tests/manual/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro
index 09cf2255f2..79de15933e 100644
--- a/tests/manual/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro
+++ b/tests/manual/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro
@@ -1,4 +1,3 @@
-CONFIG += testcase
TEMPLATE = app
TARGET = tst_qnetworkconfigurationmanager
diff --git a/tests/manual/qnetworkreply/qnetworkreply.pro b/tests/manual/qnetworkreply/qnetworkreply.pro
index 2897e55857..3d98ee429f 100644
--- a/tests/manual/qnetworkreply/qnetworkreply.pro
+++ b/tests/manual/qnetworkreply/qnetworkreply.pro
@@ -1,4 +1,3 @@
-CONFIG += testcase
TEMPLATE = app
TARGET = tst_qnetworkreply
diff --git a/tests/manual/qssloptions/qssloptions.pro b/tests/manual/qssloptions/qssloptions.pro
index c3487aa844..d4325b0fd1 100644
--- a/tests/manual/qssloptions/qssloptions.pro
+++ b/tests/manual/qssloptions/qssloptions.pro
@@ -1,4 +1,3 @@
-CONFIG += testcase
TARGET = tst_qssloptions
QT -= gui
diff --git a/tests/manual/socketengine/socketengine.pro b/tests/manual/socketengine/socketengine.pro
index d9ac4cd2ca..3da17c2d49 100644
--- a/tests/manual/socketengine/socketengine.pro
+++ b/tests/manual/socketengine/socketengine.pro
@@ -1,4 +1,3 @@
-CONFIG += testcase
TEMPLATE = app
TARGET = tst_socketengine
diff --git a/tests/manual/widgets/qgraphicsview/rubberband/rubberbandtest.cpp b/tests/manual/widgets/qgraphicsview/rubberband/rubberbandtest.cpp
index d8c2de6398..186203e7d8 100644
--- a/tests/manual/widgets/qgraphicsview/rubberband/rubberbandtest.cpp
+++ b/tests/manual/widgets/qgraphicsview/rubberband/rubberbandtest.cpp
@@ -69,11 +69,17 @@ public:
protected:
void mouseMoveEvent(QMouseEvent *event)
{
+ QGraphicsView::mouseMoveEvent(event);
+
int rightmostInView = viewport()->mapToGlobal(viewport()->geometry().topRight()).x();
int xglobal = event->globalX();
if (xglobal > rightmostInView)
horizontalScrollBar()->setValue(horizontalScrollBar()->value() + 10);
- QGraphicsView::mouseMoveEvent(event);
+
+ int bottomPos = viewport()->mapToGlobal(viewport()->geometry().bottomRight()).y();
+ int yglobal = event->globalY();
+ if (yglobal > bottomPos)
+ verticalScrollBar()->setValue(verticalScrollBar()->value() + 10);
}
};
@@ -82,17 +88,18 @@ int main(int argc, char *argv[])
QApplication app(argc, argv);
MyGraphicsView v;
- QGraphicsScene s(0.0, 0.0, 10000.0, 100.0);
+ QGraphicsScene s(0.0, 0.0, 5000.0, 5000.0);
v.setScene(&s);
v.setInteractive(true);
v.setRubberBandSelectionMode(Qt::IntersectsItemBoundingRect);
s.addRect( (qreal) 0.0, 0.0, 1000.0, 50.0, QPen(),QBrush(QColor(0,0,255)));
- for (int u = 0; u < 100; ++u) {
- MyGraphicsItem *item = new MyGraphicsItem();
- item->setRect(QRectF(u * 100, 50.0, 50.0, 20.0));
- s.addItem(item);
- }
+ for (int u = 0; u < 100; ++u)
+ for (int v = 0; v < 100; ++v) {
+ MyGraphicsItem *item = new MyGraphicsItem();
+ item->setRect(QRectF(v * 80.0, u * 80.0, 50.0, 20.0));
+ s.addItem(item);
+ }
v.show();
app.exec();
return 0;
diff --git a/tests/manual/windowgeometry/windowgeometry.pro b/tests/manual/windowgeometry/windowgeometry.pro
index f339dc4d09..c0c7ef0217 100644
--- a/tests/manual/windowgeometry/windowgeometry.pro
+++ b/tests/manual/windowgeometry/windowgeometry.pro
@@ -1,4 +1,5 @@
QT += core gui
+greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = windowgeometry
TEMPLATE = app
@@ -6,5 +7,4 @@ INCLUDEPATH += ../windowflags
SOURCES += $$PWD/main.cpp controllerwidget.cpp ../windowflags/controls.cpp
HEADERS += controllerwidget.h ../windowflags/controls.h
-greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 7937573e05..df0f82532e 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -210,7 +210,6 @@ Configure::Configure(int& argc, char** argv)
dictionary[ "BUILD_QMAKE" ] = "yes";
dictionary[ "VCPROJFILES" ] = "yes";
dictionary[ "QMAKE_INTERNAL" ] = "no";
- dictionary[ "FAST" ] = "no";
dictionary[ "PROCESS" ] = "partial";
dictionary[ "WIDGETS" ] = "yes";
dictionary[ "RTTI" ] = "yes";
@@ -802,11 +801,6 @@ void Configure::parseCmdLine()
dictionary[ "NATIVE_GESTURES" ] = "no";
#if !defined(EVAL)
// Others ---------------------------------------------------
- else if (configCmdLine.at(i) == "-fast")
- dictionary[ "FAST" ] = "yes";
- else if (configCmdLine.at(i) == "-no-fast")
- dictionary[ "FAST" ] = "no";
-
else if (configCmdLine.at(i) == "-widgets")
dictionary[ "WIDGETS" ] = "yes";
else if (configCmdLine.at(i) == "-no-widgets")
@@ -1649,11 +1643,6 @@ bool Configure::displayHelp()
desc("LTCG", "yes", "-ltcg", "Use Link Time Code Generation. (Release builds only)");
desc("LTCG", "no", "-no-ltcg", "Do not use Link Time Code Generation.\n");
- desc("FAST", "no", "-no-fast", "Configure Qt normally by generating Makefiles for all project files.");
- desc("FAST", "yes", "-fast", "Configure Qt quickly by generating Makefiles only for library and "
- "subdirectory targets. All other Makefiles are created as wrappers "
- "which will in turn run qmake.\n");
-
desc( "-make <part>", "Add part to the list of parts to be built at make time");
for (int i=0; i<defaultBuildParts.size(); ++i)
desc( "", qPrintable(QString(" %1").arg(defaultBuildParts.at(i))), false, ' ');
@@ -1790,7 +1779,7 @@ bool Configure::displayHelp()
desc("PROCESS", "partial", "-process", "Generate top-level Makefiles/Project files.");
desc("PROCESS", "full", "-fully-process", "Generate Makefiles/Project files for the entire Qt\ntree.");
- desc("PROCESS", "no", "-dont-process", "Do not generate Makefiles/Project files. This will override -no-fast if specified.\n");
+ desc("PROCESS", "no", "-dont-process", "Do not generate Makefiles/Project files.\n");
desc("RTTI", "no", "-no-rtti", "Do not compile runtime type information.");
desc("RTTI", "yes", "-rtti", "Compile runtime type information.");
@@ -2632,6 +2621,9 @@ void Configure::generateOutputVars()
else if (dictionary["QT_ICONV"] == "gnu")
qtConfig += "gnu-libiconv";
+ if (dictionary["QT_INOTIFY"] == "yes")
+ qtConfig += "inotify";
+
if (dictionary["FONT_CONFIG"] == "yes") {
qtConfig += "fontconfig";
qmakeVars += "QMAKE_CFLAGS_FONTCONFIG =";
@@ -2681,9 +2673,9 @@ void Configure::generateOutputVars()
if (dictionary.contains("XQMAKESPEC") && dictionary[ "XQMAKESPEC" ].startsWith("linux"))
qtConfig += "rpath";
- qmakeVars += QString("OBJECTS_DIR = ") + formatPath("tmp/obj/" + dictionary["QMAKE_OUTDIR"]);
- qmakeVars += QString("MOC_DIR = ") + formatPath("tmp/moc/" + dictionary["QMAKE_OUTDIR"]);
- qmakeVars += QString("RCC_DIR = ") + formatPath("tmp/rcc/" + dictionary["QMAKE_OUTDIR"]);
+ qmakeVars += QString("OBJECTS_DIR = ") + formatPath(".obj/" + dictionary["QMAKE_OUTDIR"]);
+ qmakeVars += QString("MOC_DIR = ") + formatPath(".moc/" + dictionary["QMAKE_OUTDIR"]);
+ qmakeVars += QString("RCC_DIR = ") + formatPath(".rcc/" + dictionary["QMAKE_OUTDIR"]);
if (!qmakeDefines.isEmpty())
qmakeVars += QString("DEFINES += ") + qmakeDefines.join(' ');
@@ -2771,7 +2763,8 @@ void Configure::generateCachefile()
if (cacheFile.open(QFile::WriteOnly | QFile::Text)) { // Truncates any existing file.
QTextStream cacheStream(&cacheFile);
- // nothing left here
+ cacheStream << "QT_SOURCE_TREE = " << formatPath(dictionary["QT_SOURCE_TREE"]) << endl;
+ cacheStream << "QT_BUILD_TREE = " << formatPath(dictionary["QT_BUILD_TREE"]) << endl;
cacheStream.flush();
cacheFile.close();
@@ -2782,9 +2775,6 @@ void Configure::generateCachefile()
if (moduleFile.open(QFile::WriteOnly | QFile::Text)) { // Truncates any existing file.
QTextStream moduleStream(&moduleFile);
- moduleStream << "#paths" << endl;
- moduleStream << "QT_BUILD_TREE = " << formatPath(dictionary["QT_BUILD_TREE"]) << endl;
- moduleStream << "QT_SOURCE_TREE = " << formatPath(dictionary["QT_SOURCE_TREE"]) << endl;
moduleStream << "QT_BUILD_PARTS += " << buildParts.join(' ') << endl << endl;
if (dictionary["QT_EDITION"] != "QT_EDITION_OPENSOURCE")
@@ -3098,6 +3088,9 @@ void Configure::generateQConfigPri()
if (!dictionary["QT_NAMESPACE"].isEmpty())
configStream << "#namespaces" << endl << "QT_NAMESPACE = " << dictionary["QT_NAMESPACE"] << endl;
+ if (dictionary[ "SHARED" ] == "no")
+ configStream << "QT_DEFAULT_QPA_PLUGIN = q" << qpaPlatformName() << endl;
+
configStream.flush();
configFile.close();
}
@@ -3751,43 +3744,6 @@ void Configure::buildQmake()
}
#endif
-void Configure::findProjects(const QString& dirName)
-{
- if (dictionary[ "PROCESS" ] != "no") {
- QDir dir(dirName);
- QString entryName;
- int makeListNumber;
- ProjectType qmakeTemplate;
- const QFileInfoList &list = dir.entryInfoList(QStringList(QLatin1String("*.pro")),
- QDir::AllDirs | QDir::Files | QDir::NoDotAndDotDot);
- for (int i = 0; i < list.size(); ++i) {
- const QFileInfo &fi = list.at(i);
- if (fi.fileName() != "qmake.pro") {
- entryName = dirName + "/" + fi.fileName();
- if (fi.isDir()) {
- findProjects(entryName);
- } else {
- qmakeTemplate = projectType(fi.absoluteFilePath());
- switch (qmakeTemplate) {
- case Lib:
- case Subdirs:
- makeListNumber = 1;
- break;
- default:
- makeListNumber = 2;
- break;
- }
- makeList[makeListNumber].append(new MakeItem(sourceDir.relativeFilePath(fi.absolutePath()),
- fi.fileName(),
- "Makefile",
- qmakeTemplate));
- }
- }
-
- }
- }
-}
-
void Configure::appendMakeItem(int inList, const QString &item)
{
QString dir;
@@ -3809,9 +3765,8 @@ void Configure::generateMakefiles()
if (spec != "win32-msvc.net" && !spec.startsWith("win32-msvc2") && !spec.startsWith(QLatin1String("wince")))
dictionary[ "VCPROJFILES" ] = "no";
- int i = 0;
QString pwd = QDir::currentPath();
- if (dictionary["FAST"] != "yes") {
+ {
QString dirName;
bool generate = true;
bool doDsp = (dictionary["VCPROJFILES"] == "yes");
@@ -3844,51 +3799,6 @@ void Configure::generateMakefiles()
dictionary[ "DONE" ] = "error";
}
}
- } else {
- findProjects(sourcePath);
- for (i=0; i<3; i++) {
- for (int j=0; j<makeList[i].size(); ++j) {
- MakeItem *it=makeList[i][j];
- if (it->directory == "tools/configure")
- continue; // don't overwrite our own Makefile
-
- QString dirPath = it->directory + '/';
- QString projectName = it->proFile;
- QString makefileName = buildPath + "/" + dirPath + it->target;
-
- // For shadowbuilds, we need to create the path first
- QDir buildPathDir(buildPath);
- if (sourcePath != buildPath && !buildPathDir.exists(dirPath))
- buildPathDir.mkpath(dirPath);
-
- QStringList args;
-
- args << QDir::toNativeSeparators(buildPath + "/bin/qmake.exe");
- args << sourcePath + "/" + dirPath + projectName;
-
- cout << "For " << qPrintable(QDir::toNativeSeparators(dirPath + projectName)) << endl;
- args << "-o";
- args << it->target;
-
- QDir::setCurrent(dirPath);
-
- QFile file(makefileName);
- if (!file.open(QFile::WriteOnly | QFile::Text)) {
- printf("failed on dirPath=%s, makefile=%s\n",
- qPrintable(QDir::toNativeSeparators(dirPath)),
- qPrintable(QDir::toNativeSeparators(makefileName)));
- continue;
- }
- QTextStream txt(&file);
- txt << "all:\n";
- txt << "\t" << args.join(' ') << "\n";
- txt << "\t$(MAKE) -$(MAKEFLAGS) -f " << it->target << "\n";
- txt << "first: all\n";
- txt << "qmake: FORCE\n";
- txt << "\t" << args.join(' ') << "\n";
- txt << "FORCE:\n";
- }
- }
}
QDir::setCurrent(pwd);
} else {
diff --git a/tools/configure/configureapp.h b/tools/configure/configureapp.h
index dc79e3ff58..3f4987f689 100644
--- a/tools/configure/configureapp.h
+++ b/tools/configure/configureapp.h
@@ -85,7 +85,6 @@ public:
void generateSystemVars();
#endif
void showSummary();
- void findProjects( const QString& dirName );
QString firstLicensePath();
#if !defined(EVAL)