summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/findtr229
-rwxr-xr-xbin/syncqt.pl2
-rw-r--r--config.tests/arch/arch.cpp51
-rw-r--r--config.tests/common/c++11/c++11.cpp4
-rw-r--r--config.tests/common/c++11/c++11.pro2
-rw-r--r--config.tests/unix/harfbuzz/harfbuzz.cpp2
-rw-r--r--config.tests/unix/opengles3/opengles3.cpp57
-rw-r--r--config.tests/unix/opengles3/opengles3.pro16
-rw-r--r--config.tests/unix/opengles31/opengles31.cpp50
-rw-r--r--config.tests/unix/opengles31/opengles31.pro13
-rw-r--r--config.tests/unix/pcre/pcre.cpp2
-rwxr-xr-xconfigure120
-rw-r--r--dist/changes-5.4.026
-rw-r--r--doc/global/config.qdocconf2
-rw-r--r--doc/global/html-config.qdocconf2
-rw-r--r--doc/global/qt-cpp-defines.qdocconf3
-rw-r--r--examples/gui/analogclock/main.cpp4
-rw-r--r--examples/gui/openglwindow/main.cpp4
-rw-r--r--examples/gui/openglwindow/openglwindow.h4
-rw-r--r--examples/gui/rasterwindow/rasterwindow.h6
-rw-r--r--examples/network/bearermonitor/sessionwidget.h2
-rw-r--r--examples/network/blockingfortuneclient/fortunethread.h2
-rw-r--r--examples/network/googlesuggest/googlesuggest.h2
-rw-r--r--examples/network/network-chat/connection.h2
-rw-r--r--examples/network/network-chat/server.h2
-rw-r--r--examples/network/threadedfortuneserver/fortuneserver.h2
-rw-r--r--examples/network/threadedfortuneserver/fortunethread.h2
-rw-r--r--examples/network/torrent/filemanager.h2
-rw-r--r--examples/network/torrent/mainwindow.cpp12
-rw-r--r--examples/network/torrent/mainwindow.h4
-rw-r--r--examples/network/torrent/peerwireclient.h14
-rw-r--r--examples/network/torrent/torrentclient.h2
-rw-r--r--examples/network/torrent/torrentserver.h2
-rw-r--r--examples/network/torrent/trackerclient.h2
-rw-r--r--examples/opengl/2dpainting/glwidget.h2
-rw-r--r--examples/opengl/2dpainting/widget.h2
-rw-r--r--examples/opengl/cube/mainwidget.h12
-rw-r--r--examples/opengl/doc/src/hellogl.qdoc22
-rw-r--r--examples/opengl/framebufferobject2/glwidget.h12
-rw-r--r--examples/opengl/grabber/glwidget.h10
-rw-r--r--examples/opengl/hellogl/glwidget.cpp6
-rw-r--r--examples/opengl/hellogl/glwidget.h14
-rw-r--r--examples/opengl/hellogl/window.h2
-rw-r--r--examples/opengl/hellogl_es2/hellogl_es2.pro23
-rw-r--r--examples/opengl/hellogl_es2/mainwindow.cpp107
-rw-r--r--examples/opengl/hellowindow/hellowindow.cpp2
-rw-r--r--examples/opengl/hellowindow/hellowindow.h4
-rw-r--r--examples/opengl/opengl.pro15
-rw-r--r--examples/opengl/overpainting/glwidget.h14
-rw-r--r--examples/opengl/paintedwindow/paintedwindow.h4
-rw-r--r--examples/opengl/pbuffers/glwidget.h10
-rw-r--r--examples/opengl/qopenglwidget/bubble.cpp (renamed from examples/opengl/hellogl_es2/bubble.cpp)2
-rw-r--r--examples/opengl/qopenglwidget/bubble.h (renamed from examples/opengl/hellogl_es2/bubble.h)2
-rw-r--r--examples/opengl/qopenglwidget/glwidget.cpp (renamed from examples/opengl/hellogl_es2/glwidget.cpp)84
-rw-r--r--examples/opengl/qopenglwidget/glwidget.h (renamed from examples/opengl/hellogl_es2/glwidget.h)46
-rw-r--r--examples/opengl/qopenglwidget/main.cpp (renamed from examples/opengl/hellogl_es2/main.cpp)2
-rw-r--r--examples/opengl/qopenglwidget/mainwindow.cpp152
-rw-r--r--examples/opengl/qopenglwidget/mainwindow.h66
-rw-r--r--examples/opengl/qopenglwidget/qopenglwidget.pro15
-rw-r--r--examples/opengl/qopenglwidget/qt.png (renamed from examples/opengl/hellogl_es2/qt.png)bin5174 -> 5174 bytes
-rw-r--r--examples/opengl/qopenglwidget/texture.qrc (renamed from examples/opengl/hellogl_es2/texture.qrc)0
-rw-r--r--examples/opengl/samplebuffers/glwidget.h8
-rw-r--r--examples/opengl/textures/glwidget.h16
-rw-r--r--examples/opengl/threadedqopenglwidget/glwidget.cpp356
-rw-r--r--examples/opengl/threadedqopenglwidget/glwidget.h124
-rw-r--r--examples/opengl/threadedqopenglwidget/main.cpp69
-rw-r--r--examples/opengl/threadedqopenglwidget/mainwindow.cpp52
-rw-r--r--examples/opengl/threadedqopenglwidget/mainwindow.h (renamed from examples/opengl/hellogl_es2/mainwindow.h)8
-rw-r--r--examples/opengl/threadedqopenglwidget/threadedqopenglwidget.pro11
-rw-r--r--examples/qpa/windows/window.h14
-rw-r--r--examples/sql/books/bookdelegate.h8
-rw-r--r--examples/sql/drilldown/imageitem.h4
-rw-r--r--examples/sql/drilldown/view.h2
-rw-r--r--examples/sql/querymodel/customsqlmodel.h2
-rw-r--r--examples/sql/querymodel/editablesqlmodel.h4
-rw-r--r--examples/sql/sqlbrowser/browser.h2
-rw-r--r--examples/threads/mandelbrot/mandelbrotwidget.h14
-rw-r--r--examples/threads/mandelbrot/renderthread.h2
-rw-r--r--examples/threads/semaphores/semaphores.cpp4
-rw-r--r--examples/threads/waitconditions/waitconditions.cpp4
-rw-r--r--examples/tools/contiguouscache/randomlistmodel.h4
-rw-r--r--examples/touch/fingerpaint/mainwindow.h2
-rw-r--r--examples/touch/fingerpaint/scribblearea.h6
-rw-r--r--examples/touch/knobs/knob.h2
-rw-r--r--examples/touch/pinchzoom/graphicsview.h2
-rw-r--r--examples/touch/pinchzoom/mouse.h8
-rw-r--r--examples/widgets/animation/animatedtiles/main.cpp12
-rw-r--r--examples/widgets/animation/appchooser/main.cpp8
-rw-r--r--examples/widgets/animation/easing/animation.h2
-rw-r--r--examples/widgets/animation/moveblocks/main.cpp12
-rw-r--r--examples/widgets/animation/states/main.cpp6
-rw-r--r--examples/widgets/animation/stickman/graphicsview.h4
-rw-r--r--examples/widgets/animation/stickman/lifecycle.cpp4
-rw-r--r--examples/widgets/animation/stickman/node.h12
-rw-r--r--examples/widgets/animation/stickman/rectbutton.h6
-rw-r--r--examples/widgets/animation/stickman/stickman.h6
-rw-r--r--examples/widgets/animation/sub-attaq/boat.h2
-rw-r--r--examples/widgets/animation/sub-attaq/boat_p.h18
-rw-r--r--examples/widgets/animation/sub-attaq/pixmapitem.h4
-rw-r--r--examples/widgets/animation/sub-attaq/qanimationstate.h6
-rw-r--r--examples/widgets/animation/sub-attaq/states.h22
-rw-r--r--examples/widgets/animation/sub-attaq/submarine.h2
-rw-r--r--examples/widgets/animation/sub-attaq/submarine_p.h6
-rw-r--r--examples/widgets/desktop/screenshot/screenshot.h2
-rw-r--r--examples/widgets/desktop/systray/window.h4
-rw-r--r--examples/widgets/dialogs/classwizard/classwizard.h8
-rw-r--r--examples/widgets/dialogs/licensewizard/licensewizard.h14
-rw-r--r--examples/widgets/draganddrop/draggableicons/dragwidget.h8
-rw-r--r--examples/widgets/draganddrop/draggabletext/dragwidget.h6
-rw-r--r--examples/widgets/draganddrop/dropsite/droparea.h8
-rw-r--r--examples/widgets/draganddrop/fridgemagnets/dragwidget.h8
-rw-r--r--examples/widgets/draganddrop/puzzle/pieceslist.h8
-rw-r--r--examples/widgets/draganddrop/puzzle/puzzlewidget.h12
-rw-r--r--examples/widgets/effects/blurpicker/blureffect.h2
-rw-r--r--examples/widgets/effects/blurpicker/blurpicker.h6
-rw-r--r--examples/widgets/effects/lighting/lighting.h2
-rw-r--r--examples/widgets/gestures/imagegestures/imagewidget.h8
-rw-r--r--examples/widgets/graphicsview/basicgraphicslayouts/layoutitem.h8
-rw-r--r--examples/widgets/graphicsview/boxes/glbuffers.h14
-rw-r--r--examples/widgets/graphicsview/boxes/main.cpp2
-rw-r--r--examples/widgets/graphicsview/boxes/qtbox.h32
-rw-r--r--examples/widgets/graphicsview/boxes/scene.h26
-rw-r--r--examples/widgets/graphicsview/chip/chip.h12
-rw-r--r--examples/widgets/graphicsview/chip/view.h2
-rw-r--r--examples/widgets/graphicsview/collidingmice/mouse.h8
-rw-r--r--examples/widgets/graphicsview/diagramscene/arrow.h8
-rw-r--r--examples/widgets/graphicsview/diagramscene/diagramitem.h6
-rw-r--r--examples/widgets/graphicsview/diagramscene/diagramscene.h6
-rw-r--r--examples/widgets/graphicsview/diagramscene/diagramtextitem.h8
-rw-r--r--examples/widgets/graphicsview/dragdroprobot/coloritem.h10
-rw-r--r--examples/widgets/graphicsview/dragdroprobot/main.cpp2
-rw-r--r--examples/widgets/graphicsview/dragdroprobot/robot.h26
-rw-r--r--examples/widgets/graphicsview/elasticnodes/edge.h6
-rw-r--r--examples/widgets/graphicsview/elasticnodes/graphwidget.h8
-rw-r--r--examples/widgets/graphicsview/elasticnodes/node.h14
-rw-r--r--examples/widgets/graphicsview/embeddeddialogs/customproxy.h12
-rw-r--r--examples/widgets/graphicsview/flowlayout/flowlayout.h10
-rw-r--r--examples/widgets/graphicsview/graphicsview.pro2
-rw-r--r--examples/widgets/graphicsview/padnavigator/padnavigator.cpp2
-rw-r--r--examples/widgets/graphicsview/padnavigator/padnavigator.h2
-rw-r--r--examples/widgets/graphicsview/padnavigator/roundrectitem.h4
-rw-r--r--examples/widgets/graphicsview/padnavigator/splashitem.h4
-rw-r--r--examples/widgets/graphicsview/simpleanchorlayout/main.cpp2
-rw-r--r--examples/widgets/graphicsview/weatheranchorlayout/main.cpp12
-rw-r--r--examples/widgets/itemviews/addressbook/tablemodel.h16
-rw-r--r--examples/widgets/itemviews/chart/pieview.h40
-rw-r--r--examples/widgets/itemviews/customsortfiltermodel/mysortfilterproxymodel.h4
-rw-r--r--examples/widgets/itemviews/editabletreemodel/treemodel.h26
-rw-r--r--examples/widgets/itemviews/fetchmore/filelistmodel.h8
-rw-r--r--examples/widgets/itemviews/frozencolumn/freezetablewidget.h6
-rw-r--r--examples/widgets/itemviews/interview/model.h16
-rw-r--r--examples/widgets/itemviews/pixelator/imagemodel.h8
-rw-r--r--examples/widgets/itemviews/pixelator/pixeldelegate.h4
-rw-r--r--examples/widgets/itemviews/puzzle/piecesmodel.h16
-rw-r--r--examples/widgets/itemviews/puzzle/puzzlewidget.h12
-rw-r--r--examples/widgets/itemviews/simpledommodel/dommodel.h14
-rw-r--r--examples/widgets/itemviews/simpletreemodel/treeitem.cpp24
-rw-r--r--examples/widgets/itemviews/simpletreemodel/treeitem.h10
-rw-r--r--examples/widgets/itemviews/simpletreemodel/treemodel.cpp2
-rw-r--r--examples/widgets/itemviews/simpletreemodel/treemodel.h14
-rw-r--r--examples/widgets/itemviews/spinboxdelegate/delegate.h8
-rw-r--r--examples/widgets/itemviews/spreadsheet/spreadsheetdelegate.h6
-rw-r--r--examples/widgets/itemviews/spreadsheet/spreadsheetitem.h6
-rw-r--r--examples/widgets/itemviews/stardelegate/stardelegate.h10
-rw-r--r--examples/widgets/itemviews/stardelegate/stareditor.h8
-rw-r--r--examples/widgets/layouts/borderlayout/borderlayout.h18
-rw-r--r--examples/widgets/layouts/flowlayout/flowlayout.h20
-rw-r--r--examples/widgets/mainwindows/application/mainwindow.h2
-rw-r--r--examples/widgets/mainwindows/mainwindow/colorswatch.cpp6
-rw-r--r--examples/widgets/mainwindows/mainwindow/colorswatch.h12
-rw-r--r--examples/widgets/mainwindows/mainwindow/mainwindow.cpp13
-rw-r--r--examples/widgets/mainwindows/mainwindow/mainwindow.h2
-rw-r--r--examples/widgets/mainwindows/mainwindow/toolbar.h4
-rw-r--r--examples/widgets/mainwindows/mdi/mainwindow.h2
-rw-r--r--examples/widgets/mainwindows/mdi/mdichild.h2
-rw-r--r--examples/widgets/mainwindows/menus/mainwindow.h2
-rw-r--r--examples/widgets/mainwindows/sdi/mainwindow.h2
-rw-r--r--examples/widgets/painting/affine/xform.h12
-rw-r--r--examples/widgets/painting/basicdrawing/renderarea.h6
-rw-r--r--examples/widgets/painting/composition/composition.cpp12
-rw-r--r--examples/widgets/painting/composition/composition.h12
-rw-r--r--examples/widgets/painting/composition/composition.pro6
-rw-r--r--examples/widgets/painting/concentriccircles/circlewidget.h6
-rw-r--r--examples/widgets/painting/deform/pathdeform.h12
-rw-r--r--examples/widgets/painting/gradients/gradients.h10
-rw-r--r--examples/widgets/painting/painterpaths/renderarea.h6
-rw-r--r--examples/widgets/painting/pathstroke/pathstroke.h16
-rw-r--r--examples/widgets/painting/shared/arthurstyle.h20
-rw-r--r--examples/widgets/painting/shared/arthurwidgets.h8
-rw-r--r--examples/widgets/painting/shared/hoverpoints.h2
-rw-r--r--examples/widgets/painting/transformations/renderarea.h6
-rw-r--r--examples/widgets/richtext/syntaxhighlighter/highlighter.h2
-rw-r--r--examples/widgets/richtext/textedit/textedit.cpp4
-rw-r--r--examples/widgets/richtext/textedit/textedit.h2
-rw-r--r--examples/widgets/scroller/graphicsview/main.cpp18
-rw-r--r--examples/widgets/statemachine/factorial/main.cpp8
-rw-r--r--examples/widgets/statemachine/pingpong/main.cpp10
-rw-r--r--examples/widgets/statemachine/rogue/movementtransition.h4
-rw-r--r--examples/widgets/statemachine/rogue/window.h4
-rw-r--r--examples/widgets/statemachine/trafficlight/main.cpp2
-rw-r--r--examples/widgets/tools/completer/fsmodel.h2
-rw-r--r--examples/widgets/tools/customcompleter/textedit.h4
-rw-r--r--examples/widgets/tools/echoplugin/plugin/echoplugin.h2
-rw-r--r--examples/widgets/tools/i18n/languagechooser.h4
-rw-r--r--examples/widgets/tools/plugandpaint/paintarea.h10
-rw-r--r--examples/widgets/tools/plugandpaintplugins/basictools/basictoolsplugin.h16
-rw-r--r--examples/widgets/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.h4
-rw-r--r--examples/widgets/tools/settingseditor/settingstree.h4
-rw-r--r--examples/widgets/tools/settingseditor/variantdelegate.h8
-rw-r--r--examples/widgets/tools/styleplugin/plugin/simplestyle.h2
-rw-r--r--examples/widgets/tools/styleplugin/plugin/simplestyleplugin.h2
-rw-r--r--examples/widgets/tools/treemodelcompleter/treemodelcompleter.h4
-rw-r--r--examples/widgets/tools/undo/commands.h24
-rw-r--r--examples/widgets/tools/undo/document.h8
-rw-r--r--examples/widgets/tools/undoframework/commands.h16
-rw-r--r--examples/widgets/tools/undoframework/diagramitem.h2
-rw-r--r--examples/widgets/tools/undoframework/diagramscene.h4
-rw-r--r--examples/widgets/tutorials/modelview/1_readonly/mymodel.h6
-rw-r--r--examples/widgets/tutorials/modelview/2_formatting/mymodel.h6
-rw-r--r--examples/widgets/tutorials/modelview/3_changingmodel/mymodel.h6
-rw-r--r--examples/widgets/tutorials/modelview/4_headers/mymodel.h8
-rw-r--r--examples/widgets/tutorials/modelview/5_edit/mymodel.h10
-rw-r--r--examples/widgets/widgets/analogclock/analogclock.h2
-rw-r--r--examples/widgets/widgets/calculator/button.h2
-rw-r--r--examples/widgets/widgets/charactermap/characterwidget.h8
-rw-r--r--examples/widgets/widgets/codeeditor/codeeditor.h6
-rw-r--r--examples/widgets/widgets/elidedlabel/elidedlabel.h2
-rw-r--r--examples/widgets/widgets/elidedlabel/testwidget.h2
-rw-r--r--examples/widgets/widgets/icons/iconsizespinbox.h4
-rw-r--r--examples/widgets/widgets/icons/imagedelegate.h6
-rw-r--r--examples/widgets/widgets/mousebuttons/buttontester.h8
-rw-r--r--examples/widgets/widgets/scribble/mainwindow.h2
-rw-r--r--examples/widgets/widgets/scribble/scribblearea.h10
-rw-r--r--examples/widgets/widgets/shapedclock/shapedclock.h10
-rw-r--r--examples/widgets/widgets/styles/norwegianwoodstyle.h14
-rw-r--r--examples/widgets/widgets/tablet/tabletapplication.h2
-rw-r--r--examples/widgets/widgets/tablet/tabletcanvas.h6
-rw-r--r--examples/widgets/widgets/tetrix/tetrixboard.h10
-rw-r--r--examples/widgets/widgets/tooltips/sortingbox.h12
-rw-r--r--examples/widgets/widgets/wiggly/dialog.cpp22
-rw-r--r--examples/widgets/widgets/wiggly/dialog.h4
-rw-r--r--examples/widgets/widgets/wiggly/main.cpp11
-rw-r--r--examples/widgets/widgets/wiggly/wigglywidget.h4
-rw-r--r--examples/widgets/windowcontainer/windowcontainer.cpp16
-rw-r--r--examples/xml/saxbookmarks/xbelhandler.h10
-rw-r--r--mkspecs/common/clang.conf6
-rw-r--r--mkspecs/common/gcc-base-unix.conf1
-rw-r--r--mkspecs/common/gcc-base.conf3
-rw-r--r--mkspecs/common/qnx/qplatformdefs.h (renamed from src/gui/text/qfont_qpa.cpp)96
-rw-r--r--mkspecs/features/android/android_deployment_settings.prf13
-rw-r--r--mkspecs/features/c++14.prf17
-rw-r--r--mkspecs/features/default_post.prf2
-rw-r--r--mkspecs/features/ltcg.prf54
-rw-r--r--mkspecs/features/qt.prf6
-rw-r--r--mkspecs/features/qt_build_config.prf6
-rw-r--r--mkspecs/features/qt_common.prf2
-rw-r--r--mkspecs/features/qt_module_headers.prf9
-rw-r--r--mkspecs/features/qt_module_pris.prf8
-rw-r--r--mkspecs/features/resources.prf48
-rw-r--r--mkspecs/features/simd.prf369
-rw-r--r--mkspecs/features/win32/ltcg.prf5
-rw-r--r--mkspecs/features/winrt/package_manifest.prf41
-rw-r--r--mkspecs/linux-icc/qmake.conf3
-rw-r--r--mkspecs/macx-icc/qmake.conf20
-rw-r--r--mkspecs/macx-ios-clang/features/default_pre.prf2
-rwxr-xr-xmkspecs/macx-ios-clang/rename_main.sh21
-rw-r--r--mkspecs/qnx-armle-v7-qcc/qplatformdefs.h66
-rw-r--r--mkspecs/qnx-armv7le-qcc/qplatformdefs.h2
-rw-r--r--mkspecs/qnx-x86-qcc/qplatformdefs.h68
-rw-r--r--mkspecs/win32-g++/qmake.conf1
-rw-r--r--mkspecs/win32-icc/qmake.conf17
-rw-r--r--mkspecs/win32-msvc2013/qmake.conf4
-rw-r--r--qmake/Makefile.unix9
-rw-r--r--qmake/Makefile.win328
-rw-r--r--qmake/doc/qmake.qdocconf1
-rw-r--r--qmake/doc/snippets/code/doc_src_qmake-manual.pro9
-rw-r--r--qmake/doc/src/qmake-manual.qdoc34
-rw-r--r--qmake/generators/mac/pbuilder_pbx.cpp153
-rw-r--r--qmake/generators/mac/pbuilder_pbx.h1
-rw-r--r--qmake/generators/makefile.cpp95
-rw-r--r--qmake/generators/makefile.h3
-rw-r--r--qmake/generators/metamakefile.cpp4
-rw-r--r--qmake/generators/unix/unixmake.cpp2
-rw-r--r--qmake/generators/unix/unixmake.h2
-rw-r--r--qmake/generators/unix/unixmake2.cpp131
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp28
-rw-r--r--qmake/generators/win32/msvc_nmake.h1
-rw-r--r--qmake/generators/win32/msvc_objectmodel.cpp2
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp4
-rw-r--r--qmake/generators/win32/winmakefile.cpp4
-rw-r--r--qmake/library/qmakebuiltins.cpp29
-rw-r--r--qmake/library/qmakeevaluator.h6
-rw-r--r--qmake/qmake.pri2
-rw-r--r--src/3rdparty/android/extract.h170
-rw-r--r--src/3rdparty/angle/src/common/angleutils.h2
-rw-r--r--src/3rdparty/harfbuzz-ng/AUTHORS1
-rw-r--r--src/3rdparty/harfbuzz-ng/NEWS119
-rw-r--r--src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro7
-rw-r--r--src/3rdparty/harfbuzz-ng/include/harfbuzz/hb-ot-font.h1
-rw-r--r--src/3rdparty/harfbuzz-ng/src/config.h14
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-atomic-private.hh14
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-blob.cc2
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-blob.h7
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-buffer-private.hh1
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-buffer-serialize.cc2
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-buffer.cc87
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-buffer.h23
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-common.cc28
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-common.h27
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-coretext.cc200
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-coretext.h6
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-open-file-private.hh12
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-open-type-private.hh125
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-cmap-table.hh517
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-font.cc289
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-font.h41
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-head-table.hh6
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-hhea-table.hh4
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-hmtx-table.hh2
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-layout-common-private.hh37
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-layout-gdef-table.hh10
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-layout-gpos-table.hh28
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-layout-gsub-table.hh58
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-layout-gsubgpos-private.hh57
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-layout-jstf-table.hh2
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-layout-private.hh64
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-layout.cc34
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-layout.h14
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-map-private.hh18
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-map.cc54
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-maxp-table.hh4
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-name-table.hh2
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-arabic-fallback.hh2
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-arabic-table.hh1239
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-arabic.cc150
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-hangul.cc36
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-hebrew.cc136
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic-machine.hh1920
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic-private.hh111
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic-table.cc721
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-indic.cc334
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-myanmar-machine.hh14
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-myanmar.cc73
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-private.hh4
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-sea.cc15
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-thai.cc89
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-fallback.cc70
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape-private.hh2
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape.cc98
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-shape.h21
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot-tag.cc62
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-ot.h1
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-private.hh186
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-shape-plan.cc4
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-shaper-list.hh12
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-unicode-private.hh111
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-unicode.cc11
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-utf-private.hh319
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-version.h14
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-warning.cc11
-rw-r--r--src/3rdparty/pcre/AUTHORS6
-rw-r--r--src/3rdparty/pcre/LICENCE6
-rw-r--r--src/3rdparty/pcre/config.h10
-rwxr-xr-xsrc/3rdparty/pcre/import_from_pcre_tarball.sh8
-rw-r--r--src/3rdparty/pcre/patches/bug_1423_jit_condition_misoptimization_fix.diff15
-rw-r--r--src/3rdparty/pcre/pcre.h12
-rw-r--r--src/3rdparty/pcre/pcre_byte_order.c6
-rw-r--r--src/3rdparty/pcre/pcre_compile.c141
-rw-r--r--src/3rdparty/pcre/pcre_dfa_exec.c69
-rw-r--r--src/3rdparty/pcre/pcre_exec.c102
-rw-r--r--src/3rdparty/pcre/pcre_globals.c4
-rw-r--r--src/3rdparty/pcre/pcre_internal.h118
-rw-r--r--src/3rdparty/pcre/pcre_jit_compile.c1923
-rw-r--r--src/3rdparty/pcre/pcre_string_utils.c8
-rw-r--r--src/3rdparty/pcre/pcre_study.c62
-rw-r--r--src/3rdparty/pcre/pcre_xclass.c5
-rw-r--r--src/3rdparty/pcre/sljit/sljitConfig.h11
-rw-r--r--src/3rdparty/pcre/sljit/sljitConfigInternal.h31
-rw-r--r--src/3rdparty/pcre/sljit/sljitLir.c214
-rw-r--r--src/3rdparty/pcre/sljit/sljitLir.h43
-rw-r--r--src/3rdparty/pcre/sljit/sljitNativeARM_32.c (renamed from src/3rdparty/pcre/sljit/sljitNativeARM_v5.c)201
-rw-r--r--src/3rdparty/pcre/sljit/sljitNativeARM_64.c1902
-rw-r--r--src/3rdparty/pcre/sljit/sljitNativeARM_T2_32.c (renamed from src/3rdparty/pcre/sljit/sljitNativeARM_Thumb2.c)479
-rw-r--r--src/3rdparty/pcre/sljit/sljitNativeMIPS_32.c122
-rw-r--r--src/3rdparty/pcre/sljit/sljitNativeMIPS_64.c469
-rw-r--r--src/3rdparty/pcre/sljit/sljitNativeMIPS_common.c323
-rw-r--r--src/3rdparty/pcre/sljit/sljitNativePPC_32.c2
-rw-r--r--src/3rdparty/pcre/sljit/sljitNativePPC_64.c4
-rw-r--r--src/3rdparty/pcre/sljit/sljitNativePPC_common.c598
-rw-r--r--src/3rdparty/pcre/sljit/sljitNativeSPARC_common.c86
-rw-r--r--src/3rdparty/pcre/sljit/sljitNativeTILEGX-encoder.c10159
-rw-r--r--src/3rdparty/pcre/sljit/sljitNativeTILEGX_64.c2580
-rw-r--r--src/3rdparty/pcre/sljit/sljitNativeX86_32.c40
-rw-r--r--src/3rdparty/pcre/sljit/sljitNativeX86_64.c50
-rw-r--r--src/3rdparty/pcre/sljit/sljitNativeX86_common.c386
-rw-r--r--src/3rdparty/sqlite.pri1
-rw-r--r--src/3rdparty/sqlite/shell.c370
-rw-r--r--src/3rdparty/sqlite/sqlite3.c5216
-rw-r--r--src/3rdparty/sqlite/sqlite3.h118
-rw-r--r--src/android/accessibility/jar/src/org/qtproject/qt5/android/accessibility/QtAccessibilityDelegate.java17
-rw-r--r--src/android/accessibility/jar/src/org/qtproject/qt5/android/accessibility/QtNativeAccessibility.java2
-rw-r--r--src/android/jar/jar.pri3
-rw-r--r--src/android/jar/src/org/qtproject/qt5/android/ExtractStyle.java1749
-rw-r--r--src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java14
-rw-r--r--src/android/java/AndroidManifest.xml8
-rw-r--r--src/android/java/src/org/qtproject/qt5/android/bindings/QtActivity.java24
-rw-r--r--src/angle/patches/0019-Fix-ANGLE-build-with-Microsoft-Visual-Studio-14-CTP.patch28
-rw-r--r--src/concurrent/doc/qtconcurrent.qdocconf1
-rw-r--r--src/corelib/animation/qvariantanimation.cpp6
-rw-r--r--src/corelib/codecs/qutfcodec.cpp47
-rw-r--r--src/corelib/corelib.pro16
-rw-r--r--src/corelib/doc/qtcore.qdocconf1
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp8
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_tools_qhash.cpp10
-rw-r--r--src/corelib/doc/snippets/qloggingcategory/main.cpp31
-rw-r--r--src/corelib/global/archdetect.cpp133
-rw-r--r--src/corelib/global/global.pri7
-rw-r--r--src/corelib/global/qcompilerdetection.h106
-rw-r--r--src/corelib/global/qflags.h17
-rw-r--r--src/corelib/global/qglobal.cpp723
-rw-r--r--src/corelib/global/qglobal.h41
-rw-r--r--src/corelib/global/qglobalstatic.h2
-rw-r--r--src/corelib/global/qhooks.cpp69
-rw-r--r--src/corelib/global/qhooks_p.h (renamed from src/corelib/io/qloggingcategory_p.h)42
-rw-r--r--src/corelib/global/qlibraryinfo.cpp65
-rw-r--r--src/corelib/global/qlogging.cpp240
-rw-r--r--src/corelib/global/qlogging.h8
-rw-r--r--src/corelib/global/qnamespace.h12
-rw-r--r--src/corelib/global/qnamespace.qdoc27
-rw-r--r--src/corelib/global/qnumeric.cpp2
-rw-r--r--src/corelib/global/qsysinfo.h15
-rw-r--r--src/corelib/global/qsystemdetection.h12
-rw-r--r--src/corelib/global/qtypeinfo.h2
-rw-r--r--src/corelib/io/io.pri1
-rw-r--r--src/corelib/io/qdatastream.cpp36
-rw-r--r--src/corelib/io/qdatastream.h8
-rw-r--r--src/corelib/io/qdebug.cpp96
-rw-r--r--src/corelib/io/qdebug.h99
-rw-r--r--src/corelib/io/qfiledevice.cpp11
-rw-r--r--src/corelib/io/qfiledevice.h4
-rw-r--r--src/corelib/io/qfileselector.cpp9
-rw-r--r--src/corelib/io/qfsfileengine.cpp16
-rw-r--r--src/corelib/io/qfsfileengine_p.h1
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp8
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp20
-rw-r--r--src/corelib/io/qlockfile_win.cpp25
-rw-r--r--src/corelib/io/qloggingcategory.cpp88
-rw-r--r--src/corelib/io/qloggingcategory.h32
-rw-r--r--src/corelib/io/qloggingregistry.cpp52
-rw-r--r--src/corelib/io/qloggingregistry_p.h6
-rw-r--r--src/corelib/io/qnoncontiguousbytedevice.cpp39
-rw-r--r--src/corelib/io/qnoncontiguousbytedevice_p.h6
-rw-r--r--src/corelib/io/qsavefile.cpp24
-rw-r--r--src/corelib/io/qsavefile_p.h1
-rw-r--r--src/corelib/io/qsettings.cpp297
-rw-r--r--src/corelib/io/qstandardpaths.cpp35
-rw-r--r--src/corelib/io/qstandardpaths.h4
-rw-r--r--src/corelib/io/qstandardpaths_android.cpp5
-rw-r--r--src/corelib/io/qstandardpaths_blackberry.cpp5
-rw-r--r--src/corelib/io/qstandardpaths_ios.mm3
-rw-r--r--src/corelib/io/qstandardpaths_mac.cpp16
-rw-r--r--src/corelib/io/qstandardpaths_unix.cpp8
-rw-r--r--src/corelib/io/qstandardpaths_win.cpp34
-rw-r--r--src/corelib/io/qstandardpaths_winrt.cpp7
-rw-r--r--src/corelib/io/qtemporaryfile.cpp3
-rw-r--r--src/corelib/io/qtextstream.cpp4
-rw-r--r--src/corelib/io/qurl.cpp64
-rw-r--r--src/corelib/io/qurl.h9
-rw-r--r--src/corelib/io/qwinoverlappedionotifier.cpp60
-rw-r--r--src/corelib/io/qwinoverlappedionotifier_p.h1
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel.cpp4
-rw-r--r--src/corelib/itemmodels/qabstractproxymodel.cpp24
-rw-r--r--src/corelib/itemmodels/qabstractproxymodel.h4
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel.cpp24
-rw-r--r--src/corelib/json/qjson_p.h71
-rw-r--r--src/corelib/json/qjsonarray.cpp25
-rw-r--r--src/corelib/json/qjsonarray.h14
-rw-r--r--src/corelib/json/qjsondocument.cpp2
-rw-r--r--src/corelib/json/qjsonobject.cpp43
-rw-r--r--src/corelib/json/qjsonobject.h15
-rw-r--r--src/corelib/json/qjsonvalue.cpp19
-rw-r--r--src/corelib/json/qjsonvalue.h8
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp9
-rw-r--r--src/corelib/kernel/qcoreapplication.h1
-rw-r--r--src/corelib/kernel/qcoreapplication_p.h1
-rw-r--r--src/corelib/kernel/qcoreapplication_win.cpp30
-rw-r--r--src/corelib/kernel/qcorecmdlineargs_p.h38
-rw-r--r--src/corelib/kernel/qcoreevent.cpp102
-rw-r--r--src/corelib/kernel/qcoreevent.h11
-rw-r--r--src/corelib/kernel/qeventdispatcher_unix_p.h2
-rw-r--r--src/corelib/kernel/qeventdispatcher_winrt.cpp250
-rw-r--r--src/corelib/kernel/qfunctions_winrt.h95
-rw-r--r--src/corelib/kernel/qmath.h52
-rw-r--r--src/corelib/kernel/qmath.qdoc33
-rw-r--r--src/corelib/kernel/qmetaobject.cpp57
-rw-r--r--src/corelib/kernel/qmetatype.cpp5
-rw-r--r--src/corelib/kernel/qmetatype.h53
-rw-r--r--src/corelib/kernel/qmimedata.cpp2
-rw-r--r--src/corelib/kernel/qobject.cpp37
-rw-r--r--src/corelib/kernel/qtimer.cpp185
-rw-r--r--src/corelib/kernel/qtimer.h64
-rw-r--r--src/corelib/mimetypes/qmimetype.cpp13
-rw-r--r--src/corelib/mimetypes/qmimetype.h5
-rw-r--r--src/corelib/plugin/qlibrary.cpp39
-rw-r--r--src/corelib/plugin/qlibrary_p.h7
-rw-r--r--src/corelib/plugin/qlibrary_unix.cpp1
-rw-r--r--src/corelib/plugin/qpluginloader.cpp11
-rw-r--r--src/corelib/statemachine/qabstractstate.cpp39
-rw-r--r--src/corelib/statemachine/qabstractstate.h4
-rw-r--r--src/corelib/statemachine/qabstractstate_p.h3
-rw-r--r--src/corelib/statemachine/qabstracttransition.cpp33
-rw-r--r--src/corelib/statemachine/qabstracttransition.h14
-rw-r--r--src/corelib/statemachine/qhistorystate.cpp28
-rw-r--r--src/corelib/statemachine/qhistorystate.h16
-rw-r--r--src/corelib/statemachine/qsignaltransition.cpp21
-rw-r--r--src/corelib/statemachine/qsignaltransition.h17
-rw-r--r--src/corelib/statemachine/qstate.cpp42
-rw-r--r--src/corelib/statemachine/qstate.h21
-rw-r--r--src/corelib/statemachine/qstatemachine.cpp42
-rw-r--r--src/corelib/statemachine/qstatemachine.h4
-rw-r--r--src/corelib/thread/qgenericatomic.h12
-rw-r--r--src/corelib/thread/qthread_p.h23
-rw-r--r--src/corelib/thread/qthread_win.cpp147
-rw-r--r--src/corelib/thread/qthread_winrt.cpp458
-rw-r--r--src/corelib/thread/thread.pri5
-rw-r--r--src/corelib/tools/qarraydata.cpp33
-rw-r--r--src/corelib/tools/qarraydata.h16
-rw-r--r--src/corelib/tools/qarraydataops.h16
-rw-r--r--src/corelib/tools/qbytearray.cpp81
-rw-r--r--src/corelib/tools/qbytearray.h50
-rw-r--r--src/corelib/tools/qchar.cpp8
-rw-r--r--src/corelib/tools/qchar.h66
-rw-r--r--src/corelib/tools/qcommandlineparser.cpp22
-rw-r--r--src/corelib/tools/qcommandlineparser.h1
-rw-r--r--src/corelib/tools/qdatetime.cpp8
-rw-r--r--src/corelib/tools/qdatetime.h20
-rw-r--r--src/corelib/tools/qfreelist_p.h4
-rw-r--r--src/corelib/tools/qhash.cpp39
-rw-r--r--src/corelib/tools/qhash.h105
-rw-r--r--src/corelib/tools/qiterator.h13
-rw-r--r--src/corelib/tools/qiterator.qdoc20
-rw-r--r--src/corelib/tools/qline.cpp14
-rw-r--r--src/corelib/tools/qline.h14
-rw-r--r--src/corelib/tools/qlist.cpp6
-rw-r--r--src/corelib/tools/qlist.h16
-rw-r--r--src/corelib/tools/qlocale.cpp14
-rw-r--r--src/corelib/tools/qlocale_p.h27
-rw-r--r--src/corelib/tools/qlocale_tools.cpp6
-rw-r--r--src/corelib/tools/qpoint.cpp13
-rw-r--r--src/corelib/tools/qrect.cpp12
-rw-r--r--src/corelib/tools/qrect.h36
-rw-r--r--src/corelib/tools/qregularexpression.cpp114
-rw-r--r--src/corelib/tools/qregularexpression.h9
-rw-r--r--src/corelib/tools/qringbuffer_p.h318
-rw-r--r--src/corelib/tools/qscopedvaluerollback.cpp11
-rw-r--r--src/corelib/tools/qscopedvaluerollback.h9
-rw-r--r--src/corelib/tools/qset.h9
-rw-r--r--src/corelib/tools/qshareddata.cpp32
-rw-r--r--src/corelib/tools/qshareddata.h19
-rw-r--r--src/corelib/tools/qsharedpointer.cpp104
-rw-r--r--src/corelib/tools/qsharedpointer.h11
-rw-r--r--src/corelib/tools/qsharedpointer_impl.h108
-rw-r--r--src/corelib/tools/qsimd.cpp162
-rw-r--r--src/corelib/tools/qsimd_p.h127
-rw-r--r--src/corelib/tools/qsize.cpp12
-rw-r--r--src/corelib/tools/qstring.cpp308
-rw-r--r--src/corelib/tools/qstring.h9
-rw-r--r--src/corelib/tools/qstringlist.cpp72
-rw-r--r--src/corelib/tools/qstringlist.h13
-rw-r--r--src/corelib/tools/qtimezoneprivate.cpp55
-rw-r--r--src/corelib/tools/qtimezoneprivate_p.h11
-rw-r--r--src/corelib/tools/qtimezoneprivate_tz.cpp2
-rw-r--r--src/corelib/tools/qtimezoneprivate_win.cpp4
-rw-r--r--src/corelib/tools/qtools_p.h2
-rw-r--r--src/corelib/tools/qunicodetables.cpp8
-rw-r--r--src/corelib/tools/qvector.cpp28
-rw-r--r--src/corelib/tools/qvector.h54
-rw-r--r--src/corelib/tools/tools.pri16
-rw-r--r--src/corelib/xml/qxmlstream.cpp8
-rw-r--r--src/dbus/qdbusintegrator.cpp89
-rw-r--r--src/gui/accessible/qaccessible.cpp59
-rw-r--r--src/gui/accessible/qaccessible.h7
-rw-r--r--src/gui/accessible/qaccessiblebridge.cpp2
-rw-r--r--src/gui/accessible/qaccessiblebridge.h2
-rw-r--r--src/gui/accessible/qaccessiblecache.cpp2
-rw-r--r--src/gui/accessible/qaccessiblecache_mac.mm10
-rw-r--r--src/gui/accessible/qaccessiblecache_p.h12
-rw-r--r--src/gui/accessible/qaccessibleobject.cpp2
-rw-r--r--src/gui/accessible/qaccessibleobject.h2
-rw-r--r--src/gui/accessible/qaccessibleplugin.cpp2
-rw-r--r--src/gui/accessible/qaccessibleplugin.h2
-rw-r--r--src/gui/accessible/qplatformaccessibility.cpp2
-rw-r--r--src/gui/accessible/qplatformaccessibility.h2
-rw-r--r--src/gui/doc/images/qpixelformat-argb32buffer.pngbin0 -> 14282 bytes
-rw-r--r--src/gui/doc/qtgui.qdocconf1
-rw-r--r--src/gui/doc/src/dnd.qdoc10
-rw-r--r--src/gui/image/image.pri10
-rw-r--r--src/gui/image/qbmphandler.cpp4
-rw-r--r--src/gui/image/qicon.cpp18
-rw-r--r--src/gui/image/qicon_p.h4
-rw-r--r--src/gui/image/qimage.cpp485
-rw-r--r--src/gui/image/qimage.h9
-rw-r--r--src/gui/image/qimage_conversions.cpp615
-rw-r--r--src/gui/image/qimage_mips_dspr2.cpp20
-rw-r--r--src/gui/image/qimage_mips_dspr2_asm.S92
-rw-r--r--src/gui/image/qimage_p.h6
-rw-r--r--src/gui/image/qimagereader.cpp37
-rw-r--r--src/gui/image/qimagereader.h2
-rw-r--r--src/gui/image/qimagewriter.cpp41
-rw-r--r--src/gui/image/qimagewriter.h2
-rw-r--r--src/gui/image/qjpeghandler.cpp6
-rw-r--r--src/gui/image/qpicture.cpp2
-rw-r--r--src/gui/image/qpixmap.cpp20
-rw-r--r--src/gui/image/qppmhandler.cpp4
-rw-r--r--src/gui/kernel/kernel.pri11
-rw-r--r--src/gui/kernel/qclipboard.cpp32
-rw-r--r--src/gui/kernel/qclipboard_qpa.cpp89
-rw-r--r--src/gui/kernel/qcursor.cpp127
-rw-r--r--src/gui/kernel/qcursor_qpa.cpp135
-rw-r--r--src/gui/kernel/qdnd.cpp1
-rw-r--r--src/gui/kernel/qevent.cpp308
-rw-r--r--src/gui/kernel/qevent.h19
-rw-r--r--src/gui/kernel/qevent_p.h14
-rw-r--r--src/gui/kernel/qguiapplication.cpp93
-rw-r--r--src/gui/kernel/qguiapplication.h7
-rw-r--r--src/gui/kernel/qguiapplication_p.h5
-rw-r--r--src/gui/kernel/qkeymapper.cpp31
-rw-r--r--src/gui/kernel/qkeysequence.cpp32
-rw-r--r--src/gui/kernel/qoffscreensurface.cpp3
-rw-r--r--src/gui/kernel/qopenglcontext.cpp91
-rw-r--r--src/gui/kernel/qopenglcontext.h5
-rw-r--r--src/gui/kernel/qopenglcontext_p.h4
-rw-r--r--src/gui/kernel/qpalette.cpp30
-rw-r--r--src/gui/kernel/qpixelformat.cpp630
-rw-r--r--src/gui/kernel/qpixelformat.h452
-rw-r--r--src/gui/kernel/qplatformintegration.cpp21
-rw-r--r--src/gui/kernel/qplatformnativeinterface.cpp6
-rw-r--r--src/gui/kernel/qplatformnativeinterface.h2
-rw-r--r--src/gui/kernel/qplatformsystemtrayicon.cpp (renamed from src/gui/kernel/qplatformsystemtrayicon_qpa.cpp)0
-rw-r--r--src/gui/kernel/qplatformwindow.cpp23
-rw-r--r--src/gui/kernel/qplatformwindow.h1
-rw-r--r--src/gui/kernel/qscreen.cpp10
-rw-r--r--src/gui/kernel/qscreen.h1
-rw-r--r--src/gui/kernel/qwindow.cpp167
-rw-r--r--src/gui/kernel/qwindow_p.h10
-rw-r--r--src/gui/kernel/qwindowdefs_win.h4
-rw-r--r--src/gui/kernel/qwindowsysteminterface.cpp32
-rw-r--r--src/gui/kernel/qwindowsysteminterface.h14
-rw-r--r--src/gui/kernel/qwindowsysteminterface_p.h17
-rw-r--r--src/gui/math3d/qmatrix4x4.cpp46
-rw-r--r--src/gui/math3d/qmatrix4x4.h7
-rw-r--r--src/gui/opengl/opengl.pri1
-rw-r--r--src/gui/opengl/qopengl.cpp11
-rw-r--r--src/gui/opengl/qopengl.h32
-rw-r--r--src/gui/opengl/qopenglextensions_p.h2
-rw-r--r--src/gui/opengl/qopenglframebufferobject.cpp250
-rw-r--r--src/gui/opengl/qopenglframebufferobject.h1
-rw-r--r--src/gui/opengl/qopenglfunctions.cpp52
-rw-r--r--src/gui/opengl/qopenglpaintdevice.cpp12
-rw-r--r--src/gui/opengl/qopenglpaintengine.cpp14
-rw-r--r--src/gui/opengl/qopenglpaintengine_p.h2
-rw-r--r--src/gui/opengl/qopengltexture.cpp397
-rw-r--r--src/gui/opengl/qopengltexture.h14
-rw-r--r--src/gui/opengl/qopengltextureblitter.cpp21
-rw-r--r--src/gui/opengl/qopengltextureblitter_p.h1
-rw-r--r--src/gui/opengl/qopengltexturecache.cpp180
-rw-r--r--src/gui/opengl/qopengltexturecache_p.h18
-rw-r--r--src/gui/opengl/qopenglversionfunctions.cpp16
-rw-r--r--src/gui/opengl/qopenglvertexarrayobject.cpp82
-rw-r--r--src/gui/opengl/qopenglvertexarrayobject.h2
-rw-r--r--src/gui/opengl/qopenglvertexarrayobject_p.h119
-rw-r--r--src/gui/painting/painting.pri13
-rw-r--r--src/gui/painting/qblendfunctions.cpp809
-rw-r--r--src/gui/painting/qcolor.h10
-rw-r--r--src/gui/painting/qcolor_p.cpp10
-rw-r--r--src/gui/painting/qdrawhelper.cpp163
-rw-r--r--src/gui/painting/qdrawhelper_p.h117
-rw-r--r--src/gui/painting/qmatrix.h2
-rw-r--r--src/gui/painting/qmemrotate.cpp5
-rw-r--r--src/gui/painting/qpaintengine.h2
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp6
-rw-r--r--src/gui/painting/qpaintengine_raster_p.h2
-rw-r--r--src/gui/painting/qpainter.cpp2
-rw-r--r--src/gui/painting/qpainterpath.cpp3
-rw-r--r--src/gui/painting/qpen.cpp18
-rw-r--r--src/gui/painting/qpen.h2
-rw-r--r--src/gui/painting/qplatformbackingstore.cpp97
-rw-r--r--src/gui/painting/qplatformbackingstore.h3
-rw-r--r--src/gui/painting/qpolygon.h10
-rw-r--r--src/gui/painting/qregion.h28
-rw-r--r--src/gui/painting/qtextureglyphcache.cpp20
-rw-r--r--src/gui/painting/qtransform.h6
-rw-r--r--src/gui/text/qfont.cpp240
-rw-r--r--src/gui/text/qfont.h1
-rw-r--r--src/gui/text/qfont_p.h2
-rw-r--r--src/gui/text/qfontdatabase.h2
-rw-r--r--src/gui/text/qfontengine.cpp115
-rw-r--r--src/gui/text/qfontengine_p.h23
-rw-r--r--src/gui/text/qfontengine_qpf2.cpp (renamed from src/gui/text/qfontengine_qpa.cpp)286
-rw-r--r--src/gui/text/qfontengine_qpf2_p.h (renamed from src/gui/text/qfontengine_qpa_p.h)49
-rw-r--r--src/gui/text/qplatformfontdatabase.cpp18
-rw-r--r--src/gui/text/qrawfont.cpp18
-rw-r--r--src/gui/text/qrawfont_p.h3
-rw-r--r--src/gui/text/qtextengine.cpp266
-rw-r--r--src/gui/text/qtextengine_p.h39
-rw-r--r--src/gui/text/qtextlayout.cpp25
-rw-r--r--src/gui/text/text.pri6
-rw-r--r--src/gui/util/qdesktopservices.cpp2
-rw-r--r--src/gui/util/qgridlayoutengine.cpp26
-rw-r--r--src/gui/util/qgridlayoutengine_p.h12
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp6
-rw-r--r--src/network/access/qhttpthreaddelegate.cpp2
-rw-r--r--src/network/access/qnetworkaccessbackend.cpp4
-rw-r--r--src/network/access/qnetworkaccessmanager_p.h2
-rw-r--r--src/network/access/qnetworkreplyhttpimpl.cpp16
-rw-r--r--src/network/access/qnetworkreplyimpl.cpp4
-rw-r--r--src/network/access/qspdyprotocolhandler.cpp20
-rw-r--r--src/network/doc/qtnetwork.qdocconf1
-rw-r--r--src/network/kernel/qauthenticator.cpp9
-rw-r--r--src/network/kernel/qauthenticator.h1
-rw-r--r--src/network/kernel/qdnslookup.cpp14
-rw-r--r--src/network/kernel/qdnslookup_winrt.cpp30
-rw-r--r--src/network/kernel/qhostinfo_winrt.cpp43
-rw-r--r--src/network/kernel/qnetworkinterface_winrt.cpp28
-rw-r--r--src/network/network.pro11
-rw-r--r--src/network/socket/qnativesocketengine.cpp4
-rw-r--r--src/network/socket/qnativesocketengine_unix.cpp31
-rw-r--r--src/network/socket/qnativesocketengine_winrt.cpp20
-rw-r--r--src/network/socket/qnativesocketengine_winrt_p.h6
-rw-r--r--src/network/ssl/qsslcertificate.cpp36
-rw-r--r--src/network/ssl/qsslcertificate.h6
-rw-r--r--src/network/ssl/qsslconfiguration.cpp13
-rw-r--r--src/network/ssl/qsslconfiguration.h1
-rw-r--r--src/network/ssl/qsslconfiguration_p.h4
-rw-r--r--src/network/ssl/qsslkey.cpp32
-rw-r--r--src/network/ssl/qsslkey.h1
-rw-r--r--src/network/ssl/qsslkey_p.h1
-rw-r--r--src/network/ssl/qsslsocket.cpp42
-rw-r--r--src/network/ssl/qsslsocket.h3
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp101
-rw-r--r--src/network/ssl/qsslsocket_openssl_p.h5
-rw-r--r--src/network/ssl/qsslsocket_openssl_symbols.cpp16
-rw-r--r--src/network/ssl/qsslsocket_openssl_symbols_p.h10
-rw-r--r--src/network/ssl/qsslsocket_p.h3
-rw-r--r--src/opengl/gl2paintengineex/qglgradientcache.cpp14
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp95
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h8
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp81
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h2
-rw-r--r--src/opengl/opengl.pro3
-rw-r--r--src/opengl/qgl.cpp710
-rw-r--r--src/opengl/qgl_p.h2
-rw-r--r--src/opengl/qgl_qpa.cpp466
-rw-r--r--src/opengl/qglbuffer.cpp4
-rw-r--r--src/opengl/qglframebufferobject.cpp36
-rw-r--r--src/opengl/qglpaintdevice.cpp9
-rw-r--r--src/opengl/qglpixelbuffer.cpp33
-rw-r--r--src/opengl/qglshaderprogram.cpp5
-rw-r--r--src/platformheaders/doc/qtplatformheaders.qdocconf53
-rw-r--r--src/platformheaders/doc/snippets/qxcbwindowfunctions/main.cpp61
-rw-r--r--src/platformheaders/doc/src/qtplatformheaders.qdoc82
-rw-r--r--src/platformheaders/eglfsfunctions/eglfsfunctions.pri1
-rw-r--r--src/platformheaders/eglfsfunctions/qeglfsfunctions.h (renamed from src/plugins/platforms/winrt/qwinrtplatformtheme.cpp)45
-rw-r--r--src/platformheaders/eglfsfunctions/qeglfsfunctions.qdoc67
-rw-r--r--src/platformheaders/nativecontexts/nativecontexts.pri4
-rw-r--r--src/platformheaders/nativecontexts/qcocoanativecontext.h70
-rw-r--r--src/platformheaders/nativecontexts/qcocoanativecontext.qdoc58
-rw-r--r--src/platformheaders/nativecontexts/qeglnativecontext.h74
-rw-r--r--src/platformheaders/nativecontexts/qeglnativecontext.qdoc64
-rw-r--r--src/platformheaders/nativecontexts/qglxnativecontext.h83
-rw-r--r--src/platformheaders/nativecontexts/qglxnativecontext.qdoc83
-rw-r--r--src/platformheaders/nativecontexts/qwglnativecontext.h76
-rw-r--r--src/platformheaders/nativecontexts/qwglnativecontext.qdoc131
-rw-r--r--src/platformheaders/platformheaders.pro14
-rw-r--r--src/platformheaders/xcbfunctions/qxcbwindowfunctions.h88
-rw-r--r--src/platformheaders/xcbfunctions/qxcbwindowfunctions.qdoc83
-rw-r--r--src/platformheaders/xcbfunctions/xcbfunctions.pri1
-rw-r--r--src/platformsupport/accessibility/accessibility.pri9
-rw-r--r--src/platformsupport/accessibility/qaccessiblebridgeutils.cpp119
-rw-r--r--src/platformsupport/accessibility/qaccessiblebridgeutils_p.h (renamed from src/gui/text/qrawfont_qpa.cpp)33
-rw-r--r--src/platformsupport/eglconvenience/eglconvenience.pri11
-rw-r--r--src/platformsupport/eglconvenience/qeglcompositor.cpp54
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformbackingstore.cpp22
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformbackingstore_p.h2
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformcontext.cpp82
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformcontext_p.h7
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformintegration.cpp82
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformintegration_p.h11
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformwindow.cpp8
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformwindow_p.h1
-rw-r--r--src/platformsupport/fbconvenience/qfbscreen.cpp6
-rw-r--r--src/platformsupport/fbconvenience/qfbscreen_p.h2
-rw-r--r--src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp5
-rw-r--r--src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig.cpp2
-rw-r--r--src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig_p.h4
-rw-r--r--src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm2
-rw-r--r--src/platformsupport/glxconvenience/qglxconvenience.cpp39
-rw-r--r--src/platformsupport/glxconvenience/qglxconvenience_p.h3
-rw-r--r--src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp6
-rw-r--r--src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler_p.h9
-rw-r--r--src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager.cpp26
-rw-r--r--src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager_p.h3
-rw-r--r--src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp75
-rw-r--r--src/platformsupport/input/evdevmouse/qevdevmousehandler_p.h10
-rw-r--r--src/platformsupport/input/evdevmouse/qevdevmousemanager.cpp19
-rw-r--r--src/platformsupport/input/evdevmouse/qevdevmousemanager_p.h2
-rw-r--r--src/platformsupport/input/evdevtouch/qevdevtouch.cpp12
-rw-r--r--src/platformsupport/linuxaccessibility/application.cpp43
-rw-r--r--src/platformsupport/linuxaccessibility/application_p.h3
-rw-r--r--src/platformsupport/linuxaccessibility/atspiadaptor.cpp49
-rw-r--r--src/platformsupport/linuxaccessibility/atspiadaptor_p.h7
-rw-r--r--src/platformsupport/linuxaccessibility/bridge.cpp8
-rw-r--r--src/platformsupport/linuxaccessibility/bridge_p.h2
-rw-r--r--src/platformsupport/linuxaccessibility/cache.cpp2
-rw-r--r--src/platformsupport/linuxaccessibility/cache_p.h2
-rw-r--r--src/platformsupport/linuxaccessibility/constant_mappings.cpp2
-rw-r--r--src/platformsupport/linuxaccessibility/constant_mappings_p.h2
-rw-r--r--src/platformsupport/linuxaccessibility/dbusconnection.cpp10
-rw-r--r--src/platformsupport/linuxaccessibility/dbusconnection_p.h2
-rw-r--r--src/platformsupport/linuxaccessibility/struct_marshallers.cpp2
-rw-r--r--src/platformsupport/linuxaccessibility/struct_marshallers_p.h2
-rw-r--r--src/platformsupport/platformsupport.pro1
-rw-r--r--src/platformsupport/themes/genericunix/qgenericunixthemes.cpp167
-rw-r--r--src/platformsupport/themes/genericunix/qgenericunixthemes_p.h2
-rw-r--r--src/plugins/accessible/accessible.pro5
-rw-r--r--src/plugins/accessible/widgets/widgets.json54
-rw-r--r--src/plugins/bearer/android/android.pro4
-rw-r--r--src/plugins/bearer/android/jar/bundledjar.pro3
-rw-r--r--src/plugins/bearer/android/jar/distributedjar.pro2
-rw-r--r--src/plugins/bearer/android/jar/jar.pri13
-rw-r--r--src/plugins/bearer/android/jar/jar.pro2
-rw-r--r--src/plugins/bearer/android/jar/src/org/qtproject/qt5/android/bearer/QtNetworkReceiver.java95
-rw-r--r--src/plugins/bearer/android/src/android.json3
-rw-r--r--src/plugins/bearer/android/src/main.cpp65
-rw-r--r--src/plugins/bearer/android/src/qandroidbearerengine.cpp405
-rw-r--r--src/plugins/bearer/android/src/qandroidbearerengine.h97
-rw-r--r--src/plugins/bearer/android/src/src.pro17
-rw-r--r--src/plugins/bearer/android/src/wrappers/androidconnectivitymanager.cpp394
-rw-r--r--src/plugins/bearer/android/src/wrappers/androidconnectivitymanager.h170
-rw-r--r--src/plugins/bearer/android/src/wrappers/wrappers.pri6
-rw-r--r--src/plugins/bearer/bearer.pro1
-rw-r--r--src/plugins/bearer/connman/qconnmanengine.cpp29
-rw-r--r--src/plugins/imageformats/ico/ico.json2
-rw-r--r--src/plugins/imageformats/ico/main.cpp2
-rw-r--r--src/plugins/imageformats/ico/qicohandler.cpp10
-rw-r--r--src/plugins/platforminputcontexts/ibus/interfaces/org.freedesktop.IBus.InputContext.xml10
-rw-r--r--src/plugins/platforminputcontexts/ibus/main.cpp9
-rw-r--r--src/plugins/platforminputcontexts/ibus/qibusinputcontextproxy.cpp2
-rw-r--r--src/plugins/platforminputcontexts/ibus/qibusinputcontextproxy.h15
-rw-r--r--src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp61
-rw-r--r--src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h2
-rw-r--r--src/plugins/platforminputcontexts/ibus/qibustypes.cpp140
-rw-r--r--src/plugins/platforminputcontexts/ibus/qibustypes.h27
-rw-r--r--src/plugins/platforms/android/android.pro11
-rw-r--r--src/plugins/platforms/android/androidjniaccessibility.cpp48
-rw-r--r--src/plugins/platforms/android/androidjnimain.cpp124
-rw-r--r--src/plugins/platforms/android/androidjnimain.h3
-rw-r--r--src/plugins/platforms/android/extract.cpp193
-rw-r--r--src/plugins/platforms/android/qandroideventdispatcher.cpp149
-rw-r--r--src/plugins/platforms/android/qandroideventdispatcher.h89
-rw-r--r--src/plugins/platforms/android/qandroidplatformbackingstore.h2
-rw-r--r--src/plugins/platforms/android/qandroidplatformintegration.cpp5
-rw-r--r--src/plugins/platforms/android/qandroidplatformopenglcontext.cpp4
-rw-r--r--src/plugins/platforms/android/qandroidplatformopenglwindow.cpp29
-rw-r--r--src/plugins/platforms/android/qandroidplatformopenglwindow.h2
-rw-r--r--src/plugins/platforms/android/qandroidplatformscreen.cpp51
-rw-r--r--src/plugins/platforms/android/qandroidplatformscreen.h2
-rw-r--r--src/plugins/platforms/android/qandroidplatformwindow.cpp18
-rw-r--r--src/plugins/platforms/android/qandroidplatformwindow.h2
-rw-r--r--src/plugins/platforms/cocoa/cocoa.pro8
-rw-r--r--src/plugins/platforms/cocoa/qcocoaaccessibility.mm11
-rw-r--r--src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h8
-rw-r--r--src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm58
-rw-r--r--src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm22
-rw-r--r--src/plugins/platforms/cocoa/qcocoabackingstore.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoabackingstore.mm2
-rw-r--r--src/plugins/platforms/cocoa/qcocoaglcontext.h4
-rw-r--r--src/plugins/platforms/cocoa/qcocoaglcontext.mm30
-rw-r--r--src/plugins/platforms/cocoa/qcocoahelpers.h1
-rw-r--r--src/plugins/platforms/cocoa/qcocoahelpers.mm18
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintegration.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintegration.mm13
-rw-r--r--src/plugins/platforms/cocoa/qcocoanativeinterface.h4
-rw-r--r--src/plugins/platforms/cocoa/qcocoanativeinterface.mm16
-rw-r--r--src/plugins/platforms/cocoa/qcocoasystemsettings.mm23
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.h6
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm8
-rw-r--r--src/plugins/platforms/cocoa/qnsview.h4
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm29
-rw-r--r--src/plugins/platforms/cocoa/qnsviewaccessibility.mm2
-rw-r--r--src/plugins/platforms/cocoa/qpaintengine_mac.mm7
-rw-r--r--src/plugins/platforms/direct2d/direct2d.pro2
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dplatformpixmap.h18
-rw-r--r--src/plugins/platforms/eglfs/qeglfscontext.cpp7
-rw-r--r--src/plugins/platforms/eglfs/qeglfscontext.h4
-rw-r--r--src/plugins/platforms/eglfs/qeglfsintegration.cpp16
-rw-r--r--src/plugins/platforms/eglfs/qeglfsintegration.h3
-rw-r--r--src/plugins/platforms/eglfs/qeglfswindow.cpp4
-rw-r--r--src/plugins/platforms/ios/ios.pro12
-rw-r--r--src/plugins/platforms/ios/qiosapplicationdelegate.h3
-rw-r--r--src/plugins/platforms/ios/qiosapplicationdelegate.mm45
-rw-r--r--src/plugins/platforms/ios/qioscontext.mm1
-rw-r--r--src/plugins/platforms/ios/qiosintegration.h8
-rw-r--r--src/plugins/platforms/ios/qiosintegration.mm32
-rw-r--r--src/plugins/platforms/ios/qiosplatformaccessibility.h (renamed from src/plugins/platforms/winrt/qwinrtplatformtheme.h)16
-rw-r--r--src/plugins/platforms/ios/qiosplatformaccessibility.mm85
-rw-r--r--src/plugins/platforms/ios/qiosscreen.h5
-rw-r--r--src/plugins/platforms/ios/qiosscreen.mm121
-rw-r--r--src/plugins/platforms/ios/qiosviewcontroller.h8
-rw-r--r--src/plugins/platforms/ios/qiosviewcontroller.mm32
-rw-r--r--src/plugins/platforms/ios/qioswindow.h2
-rw-r--r--src/plugins/platforms/ios/qioswindow.mm317
-rw-r--r--src/plugins/platforms/ios/quiaccessibilityelement.h58
-rw-r--r--src/plugins/platforms/ios/quiaccessibilityelement.mm193
-rw-r--r--src/plugins/platforms/ios/quiview.h28
-rw-r--r--src/plugins/platforms/ios/quiview.mm345
-rw-r--r--src/plugins/platforms/ios/quiview_accessibility.mm117
-rw-r--r--src/plugins/platforms/ios/quiview_textinput.mm3
-rw-r--r--src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp2
-rw-r--r--src/plugins/platforms/qnx/qqnxscreen.cpp99
-rw-r--r--src/plugins/platforms/qnx/qqnxscreen.h4
-rw-r--r--src/plugins/platforms/windows/accessible/comutils.cpp2
-rw-r--r--src/plugins/platforms/windows/accessible/comutils.h2
-rw-r--r--src/plugins/platforms/windows/accessible/iaccessible2.cpp65
-rw-r--r--src/plugins/platforms/windows/accessible/iaccessible2.h2
-rw-r--r--src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp2
-rw-r--r--src/plugins/platforms/windows/accessible/qwindowsaccessibility.h2
-rw-r--r--src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp11
-rw-r--r--src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h2
-rw-r--r--src/plugins/platforms/windows/cursors.qrc25
-rw-r--r--src/plugins/platforms/windows/images/closedhandcursor_32.pngbin0 -> 278 bytes
-rw-r--r--src/plugins/platforms/windows/images/closedhandcursor_48.pngbin0 -> 350 bytes
-rw-r--r--src/plugins/platforms/windows/images/closedhandcursor_64.pngbin0 -> 418 bytes
-rw-r--r--src/plugins/platforms/windows/images/dragcopycursor_32.pngbin0 -> 300 bytes
-rw-r--r--src/plugins/platforms/windows/images/dragcopycursor_48.pngbin0 -> 376 bytes
-rw-r--r--src/plugins/platforms/windows/images/dragcopycursor_64.pngbin0 -> 444 bytes
-rw-r--r--src/plugins/platforms/windows/images/draglinkcursor_32.pngbin0 -> 345 bytes
-rw-r--r--src/plugins/platforms/windows/images/draglinkcursor_48.pngbin0 -> 394 bytes
-rw-r--r--src/plugins/platforms/windows/images/draglinkcursor_64.pngbin0 -> 470 bytes
-rw-r--r--src/plugins/platforms/windows/images/dragmovecursor_32.pngbin0 -> 322 bytes
-rw-r--r--src/plugins/platforms/windows/images/dragmovecursor_48.pngbin0 -> 390 bytes
-rw-r--r--src/plugins/platforms/windows/images/dragmovecursor_64.pngbin0 -> 463 bytes
-rw-r--r--src/plugins/platforms/windows/images/openhandcursor_32.pngbin0 -> 315 bytes
-rw-r--r--src/plugins/platforms/windows/images/openhandcursor_48.pngbin0 -> 363 bytes
-rw-r--r--src/plugins/platforms/windows/images/openhandcursor_64.pngbin0 -> 452 bytes
-rw-r--r--src/plugins/platforms/windows/images/splithcursor_32.pngbin0 -> 178 bytes
-rw-r--r--src/plugins/platforms/windows/images/splithcursor_48.pngbin0 -> 210 bytes
-rw-r--r--src/plugins/platforms/windows/images/splithcursor_64.pngbin0 -> 243 bytes
-rw-r--r--src/plugins/platforms/windows/images/splitvcursor_32.pngbin0 -> 187 bytes
-rw-r--r--src/plugins/platforms/windows/images/splitvcursor_48.pngbin0 -> 212 bytes
-rw-r--r--src/plugins/platforms/windows/images/splitvcursor_64.pngbin0 -> 211 bytes
-rw-r--r--src/plugins/platforms/windows/qtwindowsglobal.h15
-rw-r--r--src/plugins/platforms/windows/qwindowsbackingstore.h10
-rw-r--r--src/plugins/platforms/windows/qwindowsclipboard.cpp40
-rw-r--r--src/plugins/platforms/windows/qwindowsclipboard.h15
-rw-r--r--src/plugins/platforms/windows/qwindowscontext.cpp60
-rw-r--r--src/plugins/platforms/windows/qwindowscontext.h24
-rw-r--r--src/plugins/platforms/windows/qwindowscursor.cpp509
-rw-r--r--src/plugins/platforms/windows/qwindowscursor.h11
-rw-r--r--src/plugins/platforms/windows/qwindowsdialoghelpers.h4
-rw-r--r--src/plugins/platforms/windows/qwindowsdrag.cpp214
-rw-r--r--src/plugins/platforms/windows/qwindowsdrag.h6
-rw-r--r--src/plugins/platforms/windows/qwindowseglcontext.cpp829
-rw-r--r--src/plugins/platforms/windows/qwindowseglcontext.h257
-rw-r--r--src/plugins/platforms/windows/qwindowsfontdatabase.cpp76
-rw-r--r--src/plugins/platforms/windows/qwindowsfontdatabase.h23
-rw-r--r--src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp25
-rw-r--r--src/plugins/platforms/windows/qwindowsfontdatabase_ft.h4
-rw-r--r--src/plugins/platforms/windows/qwindowsfontengine.cpp7
-rw-r--r--src/plugins/platforms/windows/qwindowsfontengine.h62
-rw-r--r--src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h2
-rw-r--r--src/plugins/platforms/windows/qwindowsglcontext.cpp387
-rw-r--r--src/plugins/platforms/windows/qwindowsglcontext.h132
-rw-r--r--src/plugins/platforms/windows/qwindowsguieventdispatcher.cpp3
-rw-r--r--src/plugins/platforms/windows/qwindowsguieventdispatcher.h4
-rw-r--r--src/plugins/platforms/windows/qwindowsinputcontext.cpp25
-rw-r--r--src/plugins/platforms/windows/qwindowsinputcontext.h6
-rw-r--r--src/plugins/platforms/windows/qwindowsintegration.cpp190
-rw-r--r--src/plugins/platforms/windows/qwindowsintegration.h29
-rw-r--r--src/plugins/platforms/windows/qwindowsinternalmimedata.h6
-rw-r--r--src/plugins/platforms/windows/qwindowskeymapper.cpp85
-rw-r--r--src/plugins/platforms/windows/qwindowskeymapper.h1
-rw-r--r--src/plugins/platforms/windows/qwindowsmime.cpp32
-rw-r--r--src/plugins/platforms/windows/qwindowsmime.h6
-rw-r--r--src/plugins/platforms/windows/qwindowsnativeinterface.cpp110
-rw-r--r--src/plugins/platforms/windows/qwindowsnativeinterface.h18
-rw-r--r--src/plugins/platforms/windows/qwindowsopenglcontext.h89
-rw-r--r--src/plugins/platforms/windows/qwindowsopengltester.cpp146
-rw-r--r--src/plugins/platforms/windows/qwindowsopengltester.h52
-rw-r--r--src/plugins/platforms/windows/qwindowsscreen.cpp52
-rw-r--r--src/plugins/platforms/windows/qwindowsscreen.h28
-rw-r--r--src/plugins/platforms/windows/qwindowstabletsupport.cpp7
-rw-r--r--src/plugins/platforms/windows/qwindowstheme.h12
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp124
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.h79
-rw-r--r--src/plugins/platforms/windows/windows.pri11
-rw-r--r--src/plugins/platforms/winrt/qwinrtcursor.cpp60
-rw-r--r--src/plugins/platforms/winrt/qwinrtcursor.h24
-rw-r--r--src/plugins/platforms/winrt/qwinrtintegration.cpp58
-rw-r--r--src/plugins/platforms/winrt/qwinrtmessagedialoghelper.cpp232
-rw-r--r--src/plugins/platforms/winrt/qwinrtmessagedialoghelper.h (renamed from src/plugins/platforms/winrt/qwinrtplatformmessagedialoghelper.h)29
-rw-r--r--src/plugins/platforms/winrt/qwinrtplatformmessagedialoghelper.cpp204
-rw-r--r--src/plugins/platforms/winrt/qwinrtscreen.cpp544
-rw-r--r--src/plugins/platforms/winrt/qwinrtscreen.h84
-rw-r--r--src/plugins/platforms/winrt/qwinrtservices.cpp122
-rw-r--r--src/plugins/platforms/winrt/qwinrtservices.h27
-rw-r--r--src/plugins/platforms/winrt/qwinrttheme.cpp211
-rw-r--r--src/plugins/platforms/winrt/qwinrttheme.h70
-rw-r--r--src/plugins/platforms/winrt/winrt.pro10
-rw-r--r--src/plugins/platforms/xcb/qglxintegration.cpp172
-rw-r--r--src/plugins/platforms/xcb/qglxintegration.h11
-rw-r--r--src/plugins/platforms/xcb/qxcbclipboard.cpp5
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp21
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.h21
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection_xi2.cpp52
-rw-r--r--src/plugins/platforms/xcb/qxcbdrag.cpp7
-rw-r--r--src/plugins/platforms/xcb/qxcbdrag.h5
-rw-r--r--src/plugins/platforms/xcb/qxcbimage.cpp15
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.cpp23
-rw-r--r--src/plugins/platforms/xcb/qxcbkeyboard.cpp4
-rw-r--r--src/plugins/platforms/xcb/qxcbmime.cpp7
-rw-r--r--src/plugins/platforms/xcb/qxcbmime.h4
-rw-r--r--src/plugins/platforms/xcb/qxcbnativeinterface.cpp140
-rw-r--r--src/plugins/platforms/xcb/qxcbnativeinterface.h23
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.cpp9
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp199
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.h14
-rw-r--r--src/plugins/platforms/xcb/qxcbxsettings.cpp45
-rw-r--r--src/plugins/plugins.pro1
-rw-r--r--src/printsupport/doc/qtprintsupport.qdocconf1
-rw-r--r--src/printsupport/kernel/qcups.cpp152
-rw-r--r--src/printsupport/kernel/qpaintengine_alpha.cpp40
-rw-r--r--src/printsupport/kernel/qpaintengine_alpha_p.h4
-rw-r--r--src/printsupport/kernel/qprintengine_win.cpp8
-rw-r--r--src/sql/doc/qtsql.qdocconf1
-rw-r--r--src/sql/kernel/qsqlquery.cpp26
-rw-r--r--src/src.pro12
-rw-r--r--src/testlib/doc/qttestlib.qdocconf1
-rw-r--r--src/testlib/doc/snippets/code/doc_src_qsignalspy.cpp5
-rw-r--r--src/testlib/qplaintestlogger.cpp18
-rw-r--r--src/testlib/qsignalspy.h57
-rw-r--r--src/testlib/qsignalspy.qdoc14
-rw-r--r--src/testlib/qtestaccessible.h51
-rw-r--r--src/testlib/qtestcase.cpp2
-rw-r--r--src/testlib/qtestcase.h2
-rw-r--r--src/testlib/qtestlog.cpp14
-rw-r--r--src/testlib/qxmltestlogger.cpp7
-rw-r--r--src/testlib/qxunittestlogger.cpp14
-rw-r--r--src/tools/bootstrap/bootstrap.pro1
-rw-r--r--src/tools/moc/generator.cpp6
-rw-r--r--src/tools/moc/moc.cpp7
-rw-r--r--src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp6
-rw-r--r--src/tools/qdoc/atom.cpp76
-rw-r--r--src/tools/qdoc/atom.h87
-rw-r--r--src/tools/qdoc/codemarker.cpp19
-rw-r--r--src/tools/qdoc/codemarker.h3
-rw-r--r--src/tools/qdoc/codeparser.cpp61
-rw-r--r--src/tools/qdoc/codeparser.h2
-rw-r--r--src/tools/qdoc/config.cpp117
-rw-r--r--src/tools/qdoc/config.h10
-rw-r--r--src/tools/qdoc/cppcodemarker.cpp46
-rw-r--r--src/tools/qdoc/cppcodemarker.h2
-rw-r--r--src/tools/qdoc/cppcodeparser.cpp226
-rw-r--r--src/tools/qdoc/ditaxmlgenerator.cpp871
-rw-r--r--src/tools/qdoc/ditaxmlgenerator.h16
-rw-r--r--src/tools/qdoc/doc.cpp174
-rw-r--r--src/tools/qdoc/doc/config/qdoc.qdocconf1
-rw-r--r--src/tools/qdoc/doc/files/qtgui.qdocconf1
-rw-r--r--src/tools/qdoc/doc/qdoc-manual-markupcmds.qdoc28
-rw-r--r--src/tools/qdoc/doc/qdoc-manual-qdocconf.qdoc9
-rw-r--r--src/tools/qdoc/doc/qdoc-manual-topiccmds.qdoc4
-rw-r--r--src/tools/qdoc/generator.cpp299
-rw-r--r--src/tools/qdoc/generator.h30
-rw-r--r--src/tools/qdoc/helpprojectwriter.cpp111
-rw-r--r--src/tools/qdoc/htmlgenerator.cpp1114
-rw-r--r--src/tools/qdoc/htmlgenerator.h23
-rw-r--r--src/tools/qdoc/location.cpp2
-rw-r--r--src/tools/qdoc/location.h2
-rw-r--r--src/tools/qdoc/main.cpp312
-rw-r--r--src/tools/qdoc/node.cpp889
-rw-r--r--src/tools/qdoc/node.h338
-rw-r--r--src/tools/qdoc/puredocparser.cpp2
-rw-r--r--src/tools/qdoc/puredocparser.h1
-rw-r--r--src/tools/qdoc/qdocdatabase.cpp1525
-rw-r--r--src/tools/qdoc/qdocdatabase.h384
-rw-r--r--src/tools/qdoc/qdocindexfiles.cpp634
-rw-r--r--src/tools/qdoc/qdocindexfiles.h8
-rw-r--r--src/tools/qdoc/qdoctagfiles.cpp38
-rw-r--r--src/tools/qdoc/qmlcodeparser.h1
-rw-r--r--src/tools/qdoc/qmlvisitor.cpp14
-rw-r--r--src/tools/qdoc/text.cpp16
-rw-r--r--src/tools/qdoc/text.h1
-rw-r--r--src/tools/qdoc/tree.cpp1137
-rw-r--r--src/tools/qdoc/tree.h141
-rw-r--r--src/tools/rcc/main.cpp73
-rw-r--r--src/tools/rcc/rcc.cpp188
-rw-r--r--src/tools/rcc/rcc.h11
-rw-r--r--src/tools/uic/uic.cpp2
-rw-r--r--src/widgets/accessible/accessible.pri21
-rw-r--r--src/widgets/accessible/complexwidgets.cpp (renamed from src/plugins/accessible/widgets/complexwidgets.cpp)16
-rw-r--r--src/widgets/accessible/complexwidgets.h (renamed from src/plugins/accessible/widgets/complexwidgets.h)2
-rw-r--r--src/widgets/accessible/itemviews.cpp (renamed from src/plugins/accessible/widgets/itemviews.cpp)4
-rw-r--r--src/widgets/accessible/itemviews.h (renamed from src/plugins/accessible/widgets/itemviews.h)2
-rw-r--r--src/widgets/accessible/qaccessiblemenu.cpp (renamed from src/plugins/accessible/widgets/qaccessiblemenu.cpp)6
-rw-r--r--src/widgets/accessible/qaccessiblemenu.h (renamed from src/plugins/accessible/widgets/qaccessiblemenu.h)2
-rw-r--r--src/widgets/accessible/qaccessiblewidget.cpp20
-rw-r--r--src/widgets/accessible/qaccessiblewidget.h2
-rw-r--r--src/widgets/accessible/qaccessiblewidgetfactory.cpp (renamed from src/plugins/accessible/widgets/main.cpp)25
-rw-r--r--src/widgets/accessible/qaccessiblewidgetfactory_p.h53
-rw-r--r--src/widgets/accessible/qaccessiblewidgets.cpp (renamed from src/plugins/accessible/widgets/qaccessiblewidgets.cpp)121
-rw-r--r--src/widgets/accessible/qaccessiblewidgets.h (renamed from src/plugins/accessible/widgets/qaccessiblewidgets.h)2
-rw-r--r--src/widgets/accessible/rangecontrols.cpp (renamed from src/plugins/accessible/widgets/rangecontrols.cpp)19
-rw-r--r--src/widgets/accessible/rangecontrols.h (renamed from src/plugins/accessible/widgets/rangecontrols.h)2
-rw-r--r--src/widgets/accessible/simplewidgets.cpp (renamed from src/plugins/accessible/widgets/simplewidgets.cpp)34
-rw-r--r--src/widgets/accessible/simplewidgets.h (renamed from src/plugins/accessible/widgets/simplewidgets.h)3
-rw-r--r--src/widgets/accessible/widgets.pro (renamed from src/plugins/accessible/widgets/widgets.pro)0
-rw-r--r--src/widgets/dialogs/qcolordialog.cpp77
-rw-r--r--src/widgets/dialogs/qfiledialog.cpp78
-rw-r--r--src/widgets/dialogs/qfiledialog.h4
-rw-r--r--src/widgets/dialogs/qfiledialog_p.h6
-rw-r--r--src/widgets/dialogs/qinputdialog.cpp40
-rw-r--r--src/widgets/dialogs/qprogressdialog.cpp40
-rw-r--r--src/widgets/dialogs/qsidebar.cpp3
-rw-r--r--src/widgets/dialogs/qwizard.cpp2
-rw-r--r--src/widgets/doc/qtwidgets.qdocconf1
-rw-r--r--src/widgets/doc/snippets/code/doc_gui_widgets_qopenglwidget.cpp109
-rw-r--r--src/widgets/doc/snippets/code/doc_src_stylesheet.qdoc5
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc20
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.cpp43
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.h3
-rw-r--r--src/widgets/graphicsview/qgraphicsitem_p.h15
-rw-r--r--src/widgets/graphicsview/qgraphicsscene.cpp88
-rw-r--r--src/widgets/graphicsview/qgraphicsscene.h5
-rw-r--r--src/widgets/graphicsview/qgraphicsscene_p.h2
-rw-r--r--src/widgets/graphicsview/qgraphicsscenebsptreeindex.cpp24
-rw-r--r--src/widgets/graphicsview/qgraphicssceneevent.cpp58
-rw-r--r--src/widgets/graphicsview/qgraphicssceneevent.h6
-rw-r--r--src/widgets/graphicsview/qgraphicssceneindex.cpp3
-rw-r--r--src/widgets/graphicsview/qgraphicsscenelinearindex_p.h45
-rw-r--r--src/widgets/graphicsview/qgraphicsview.cpp10
-rw-r--r--src/widgets/itemviews/qabstractitemview.cpp25
-rw-r--r--src/widgets/itemviews/qfileiconprovider.cpp6
-rw-r--r--src/widgets/itemviews/qtableview.cpp9
-rw-r--r--src/widgets/kernel/kernel.pri9
-rw-r--r--src/widgets/kernel/qapplication.cpp430
-rw-r--r--src/widgets/kernel/qapplication.h1
-rw-r--r--src/widgets/kernel/qapplication_qpa.cpp493
-rw-r--r--src/widgets/kernel/qdesktopwidget.cpp142
-rw-r--r--src/widgets/kernel/qdesktopwidget_p.h (renamed from src/widgets/kernel/qdesktopwidget_qpa_p.h)4
-rw-r--r--src/widgets/kernel/qdesktopwidget_qpa.cpp193
-rw-r--r--src/widgets/kernel/qgesturemanager.cpp2
-rw-r--r--src/widgets/kernel/qopenglwidget.cpp852
-rw-r--r--src/widgets/kernel/qopenglwidget.h100
-rw-r--r--src/widgets/kernel/qopenglwidget_p.h135
-rw-r--r--src/widgets/kernel/qshortcut.cpp2
-rw-r--r--src/widgets/kernel/qwidget.cpp1157
-rw-r--r--src/widgets/kernel/qwidget.h1
-rw-r--r--src/widgets/kernel/qwidget_p.h15
-rw-r--r--src/widgets/kernel/qwidget_qpa.cpp1126
-rw-r--r--src/widgets/kernel/qwidgetbackingstore.cpp100
-rw-r--r--src/widgets/kernel/qwidgetbackingstore_p.h17
-rw-r--r--src/widgets/kernel/qwidgetwindow.cpp6
-rw-r--r--src/widgets/kernel/qwidgetwindow_p.h (renamed from src/widgets/kernel/qwidgetwindow_qpa_p.h)6
-rw-r--r--src/widgets/statemachine/qguistatemachine.cpp2
-rw-r--r--src/widgets/styles/qandroidstyle.cpp386
-rw-r--r--src/widgets/styles/qandroidstyle_p.h9
-rw-r--r--src/widgets/styles/qcommonstyle.cpp5
-rw-r--r--src/widgets/styles/qfusionstyle.cpp144
-rw-r--r--src/widgets/styles/qmacstyle_mac.mm65
-rw-r--r--src/widgets/styles/qstyle.cpp3
-rw-r--r--src/widgets/styles/qstyle.h1
-rw-r--r--src/widgets/styles/qstyleanimation.cpp25
-rw-r--r--src/widgets/styles/qstyleanimation_p.h15
-rw-r--r--src/widgets/styles/qstyleoption.cpp2
-rw-r--r--src/widgets/styles/qstylesheetstyle.cpp21
-rw-r--r--src/widgets/styles/qwindowsvistastyle.cpp8
-rw-r--r--src/widgets/util/qflickgesture.cpp2
-rw-r--r--src/widgets/util/qsystemtrayicon.cpp68
-rw-r--r--src/widgets/util/qsystemtrayicon_p.h9
-rw-r--r--src/widgets/util/qsystemtrayicon_qpa.cpp51
-rw-r--r--src/widgets/util/qsystemtrayicon_x11.cpp72
-rw-r--r--src/widgets/widgets.pro3
-rw-r--r--src/widgets/widgets/qabstractscrollarea.cpp4
-rw-r--r--src/widgets/widgets/qabstractspinbox.cpp2
-rw-r--r--src/widgets/widgets/qcheckbox.h1
-rw-r--r--src/widgets/widgets/qdockarealayout.cpp8
-rw-r--r--src/widgets/widgets/qdockwidget.cpp22
-rw-r--r--src/widgets/widgets/qdockwidget_p.h8
-rw-r--r--src/widgets/widgets/qgroupbox.cpp2
-rw-r--r--src/widgets/widgets/qlineedit.cpp3
-rw-r--r--src/widgets/widgets/qlineedit.h3
-rw-r--r--src/widgets/widgets/qlineedit_p.cpp14
-rw-r--r--src/widgets/widgets/qlineedit_p.h1
-rw-r--r--src/widgets/widgets/qmainwindow.cpp4
-rw-r--r--src/widgets/widgets/qmainwindow.h7
-rw-r--r--src/widgets/widgets/qmainwindowlayout.cpp68
-rw-r--r--src/widgets/widgets/qmainwindowlayout_p.h18
-rw-r--r--src/widgets/widgets/qmdiarea.cpp75
-rw-r--r--src/widgets/widgets/qmdiarea_p.h22
-rw-r--r--src/widgets/widgets/qmdisubwindow.cpp42
-rw-r--r--src/widgets/widgets/qmdisubwindow_p.h3
-rw-r--r--src/widgets/widgets/qmenu.cpp4
-rw-r--r--src/widgets/widgets/qplaintextedit.cpp2
-rw-r--r--src/widgets/widgets/qradiobutton.h1
-rw-r--r--src/widgets/widgets/qtabbar.cpp40
-rw-r--r--src/widgets/widgets/qtabbar.h4
-rw-r--r--src/widgets/widgets/qtabbar_p.h4
-rw-r--r--src/widgets/widgets/qtabwidget.cpp23
-rw-r--r--src/widgets/widgets/qtabwidget.h4
-rw-r--r--src/widgets/widgets/qtextedit.cpp2
-rw-r--r--src/widgets/widgets/qtoolbar.cpp4
-rw-r--r--src/widgets/widgets/qtoolbutton.cpp5
-rw-r--r--src/widgets/widgets/qwidgetlinecontrol.cpp6
-rw-r--r--src/widgets/widgets/qwidgetlinecontrol_p.h5
-rw-r--r--src/widgets/widgets/qwidgetresizehandler.cpp4
-rw-r--r--src/widgets/widgets/qwidgettextcontrol.cpp10
-rw-r--r--src/winmain/qtmain_win.cpp50
-rw-r--r--src/winmain/qtmain_winrt.cpp4
-rw-r--r--src/winmain/winmain.pro2
-rw-r--r--src/xml/doc/qtxml.qdocconf1
-rw-r--r--sync.profile1
-rwxr-xr-xtests/auto/android/runtests_androiddeployqt.pl13
-rw-r--r--tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp2
-rw-r--r--tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp32
-rw-r--r--tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp32
-rw-r--r--tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp36
-rw-r--r--tests/auto/corelib/global/global.pro2
-rw-r--r--tests/auto/corelib/global/qflags/tst_qflags.cpp24
-rw-r--r--tests/auto/corelib/global/qglobal/tst_qglobal.cpp64
-rw-r--r--tests/auto/corelib/global/qhooks/qhooks.pro4
-rw-r--r--tests/auto/corelib/global/qhooks/tst_qhooks.cpp90
-rw-r--r--tests/auto/corelib/global/qlogging/app/app.pro3
-rw-r--r--tests/auto/corelib/global/qlogging/app/main.cpp31
-rw-r--r--tests/auto/corelib/global/qlogging/tst_qlogging.cpp260
-rw-r--r--tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp4
-rw-r--r--tests/auto/corelib/io/qdebug/tst_qdebug.cpp161
-rw-r--r--tests/auto/corelib/io/qfile/tst_qfile.cpp22
-rw-r--r--tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp76
-rw-r--r--tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp12
-rw-r--r--tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp40
-rw-r--r--tests/auto/corelib/io/qprocess/tst_qprocess.cpp56
-rw-r--r--tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp17
-rw-r--r--tests/auto/corelib/io/qsavefile/tst_qsavefile.cpp139
-rw-r--r--tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp20
-rw-r--r--tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp17
-rw-r--r--tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp257
-rw-r--r--tests/auto/corelib/io/qurl/tst_qurl.cpp53
-rw-r--r--tests/auto/corelib/io/qwinoverlappedionotifier/tst_qwinoverlappedionotifier.cpp40
-rw-r--r--tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp86
-rw-r--r--tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp36
-rw-r--r--tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp30
-rw-r--r--tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp21
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp115
-rw-r--r--tests/auto/corelib/json/tst_qtjson.cpp324
-rw-r--r--tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp10
-rw-r--r--tests/auto/corelib/kernel/qmath/tst_qmath.cpp119
-rw-r--r--tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp14
-rw-r--r--tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp4
-rw-r--r--tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp19
-rw-r--r--tests/auto/corelib/kernel/qobject/tst_qobject.cpp33
-rw-r--r--tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp20
-rw-r--r--tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp6
-rw-r--r--tests/auto/corelib/kernel/qsystemsemaphore/test/tst_qsystemsemaphore.cpp25
-rw-r--r--tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp99
-rw-r--r--tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp6
-rw-r--r--tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp11
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp6
-rw-r--r--tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp1336
-rw-r--r--tests/auto/corelib/thread/qfuturewatcher/tst_qfuturewatcher.cpp38
-rw-r--r--tests/auto/corelib/thread/qthread/tst_qthread.cpp57
-rw-r--r--tests/auto/corelib/tools/collections/.gitignore (renamed from tests/auto/other/collections/.gitignore)0
-rw-r--r--tests/auto/corelib/tools/collections/collections.pro (renamed from tests/auto/other/collections/collections.pro)0
-rw-r--r--tests/auto/corelib/tools/collections/tst_collections.cpp (renamed from tests/auto/other/collections/tst_collections.cpp)156
-rw-r--r--tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp46
-rw-r--r--tests/auto/corelib/tools/qdate/tst_qdate.cpp9
-rw-r--r--tests/auto/corelib/tools/qregularexpression/.gitignore1
-rw-r--r--tests/auto/corelib/tools/qregularexpression/forceoptimize/forceoptimize.pro8
-rw-r--r--tests/auto/corelib/tools/qregularexpression/forceoptimize/tst_qregularexpression_forceoptimize.cpp52
-rw-r--r--tests/auto/corelib/tools/qregularexpression/qregularexpression.pro2
-rw-r--r--tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.cpp71
-rw-r--r--tests/auto/corelib/tools/qringbuffer/tst_qringbuffer.cpp135
-rw-r--r--tests/auto/corelib/tools/qscopedvaluerollback/tst_qscopedvaluerollback.cpp6
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp285
-rw-r--r--tests/auto/corelib/tools/qstring/tst_qstring.cpp144
-rw-r--r--tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp30
-rw-r--r--tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp24
-rw-r--r--tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp61
-rw-r--r--tests/auto/corelib/tools/qvector/tst_qvector.cpp164
-rw-r--r--tests/auto/corelib/tools/tools.pro1
-rw-r--r--tests/auto/corelib/xml/qxmlstream/data/009.ref2
-rw-r--r--tests/auto/corelib/xml/qxmlstream/data/010.ref2
-rw-r--r--tests/auto/corelib/xml/qxmlstream/data/011.ref2
-rw-r--r--tests/auto/corelib/xml/qxmlstream/data/012.ref2
-rw-r--r--tests/auto/corelib/xml/qxmlstream/data/035.ref2
-rw-r--r--tests/auto/corelib/xml/qxmlstream/data/036.ref2
-rw-r--r--tests/auto/gui/image/qicoimageformat/icons/valid/yellow.curbin0 -> 4286 bytes
-rw-r--r--tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp19
-rw-r--r--tests/auto/gui/image/qimage/tst_qimage.cpp163
-rw-r--r--tests/auto/gui/image/qpicture/tst_qpicture.cpp107
-rw-r--r--tests/auto/gui/image/qpixmap/tst_qpixmap.cpp100
-rw-r--r--tests/auto/gui/kernel/kernel.pro1
-rw-r--r--tests/auto/gui/kernel/qclipboard/paster/main.cpp55
-rw-r--r--tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp79
-rw-r--r--tests/auto/gui/kernel/qguiapplication/icons/appicon.pngbin0 -> 175 bytes
-rw-r--r--tests/auto/gui/kernel/qguiapplication/icons/usericon.pngbin0 -> 14743 bytes
-rw-r--r--tests/auto/gui/kernel/qguiapplication/qguiapplication.pro2
-rw-r--r--tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp79
-rw-r--r--tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.qrc6
-rw-r--r--tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp6
-rw-r--r--tests/auto/gui/kernel/qpalette/tst_qpalette.cpp61
-rw-r--r--tests/auto/gui/kernel/qpixelformat/qpixelformat.pro6
-rw-r--r--tests/auto/gui/kernel/qpixelformat/tst_qpixelformat.cpp243
-rw-r--r--tests/auto/gui/kernel/qwindow/tst_qwindow.cpp155
-rw-r--r--tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp35
-rw-r--r--tests/auto/gui/painting/qcolor/tst_qcolor.cpp13
-rw-r--r--tests/auto/gui/painting/qpainter/tst_qpainter.cpp50
-rw-r--r--tests/auto/gui/painting/qpen/tst_qpen.cpp53
-rw-r--r--tests/auto/gui/qopengl/qopengl.pro2
-rw-r--r--tests/auto/gui/qopengl/tst_qopengl.cpp283
-rw-r--r--tests/auto/gui/text/qfont/tst_qfont.cpp134
-rw-r--r--tests/auto/gui/text/qrawfont/tst_qrawfont.cpp39
-rw-r--r--tests/auto/network/access/spdy/tst_spdy.cpp15
-rw-r--r--tests/auto/network/ssl/qsslcertificate/pkcs12/README8
-rw-r--r--tests/auto/network/ssl/qsslcertificate/pkcs12/inter.crt22
-rw-r--r--tests/auto/network/ssl/qsslcertificate/pkcs12/leaf.crt23
-rw-r--r--tests/auto/network/ssl/qsslcertificate/pkcs12/leaf.key32
-rw-r--r--tests/auto/network/ssl/qsslcertificate/pkcs12/leaf.p12bin0 -> 3821 bytes
-rw-r--r--tests/auto/network/ssl/qsslcertificate/qsslcertificate.pro3
-rw-r--r--tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp51
-rw-r--r--tests/auto/opengl/qgl/tst_qgl.cpp35
-rw-r--r--tests/auto/opengl/qglfunctions/tst_qglfunctions.cpp20
-rw-r--r--tests/auto/opengl/qglthreads/tst_qglthreads.cpp53
-rw-r--r--tests/auto/other/compiler/compiler.pro4
-rw-r--r--tests/auto/other/compiler/othersource.cpp51
-rw-r--r--tests/auto/other/compiler/tst_compiler.cpp758
-rw-r--r--tests/auto/other/lancelot/scripts/text.qps12
-rw-r--r--tests/auto/other/other.pro1
-rw-r--r--tests/auto/other/qaccessibility/tst_qaccessibility.cpp237
-rw-r--r--tests/auto/other/qaccessibilitylinux/tst_qaccessibilitylinux.cpp76
-rw-r--r--tests/auto/other/qobjectrace/tst_qobjectrace.cpp25
-rw-r--r--tests/auto/other/qvariant_common/tst_qvariant_common.h27
-rw-r--r--tests/auto/testlib/qsignalspy/tst_qsignalspy.cpp168
-rw-r--r--tests/auto/testlib/selftests/expected_assert.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_assert.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_assert.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_badxml.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_badxml.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_badxml.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_benchlibcounting.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_benchlibcounting.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_benchlibcounting.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_benchlibeventcounter.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_benchlibeventcounter.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_benchlibeventcounter.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_benchlibtickcounter.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_benchlibtickcounter.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_benchlibtickcounter.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_benchlibwalltime.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_benchlibwalltime.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_benchlibwalltime.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_commandlinedata.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_commandlinedata.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_commandlinedata.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_counting.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_counting.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_counting.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_datatable.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_datatable.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_datatable.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_datetime.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_datetime.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_datetime.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_exceptionthrow.lightxml3
-rw-r--r--tests/auto/testlib/selftests/expected_exceptionthrow.xml3
-rw-r--r--tests/auto/testlib/selftests/expected_exceptionthrow.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_expectfail.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_expectfail.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_expectfail.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_failcleanup.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_failcleanup.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_failcleanup.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_failinit.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_failinit.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_failinit.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_failinitdata.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_failinitdata.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_failinitdata.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_fetchbogus.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_fetchbogus.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_fetchbogus.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_findtestdata.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_findtestdata.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_findtestdata.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_globaldata.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_globaldata.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_globaldata.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_longstring.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_longstring.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_longstring.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_maxwarnings.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_maxwarnings.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_maxwarnings.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_singleskip.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_singleskip.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_singleskip.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_skip.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_skip.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_skip.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_skipcleanup.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_skipcleanup.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_skipcleanup.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_skipinit.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_skipinit.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_skipinit.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_skipinitdata.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_skipinitdata.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_skipinitdata.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_strcmp.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_strcmp.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_strcmp.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_subtest.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_subtest.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_subtest.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_verbose1.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_verbose1.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_verbose1.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_verbose2.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_verbose2.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_verbose2.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_verifyexceptionthrown.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_verifyexceptionthrown.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_verifyexceptionthrown.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_warnings.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_warnings.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_warnings.xunitxml1
-rw-r--r--tests/auto/testlib/selftests/expected_xunit.lightxml1
-rw-r--r--tests/auto/testlib/selftests/expected_xunit.xml1
-rw-r--r--tests/auto/testlib/selftests/expected_xunit.xunitxml1
-rwxr-xr-xtests/auto/testlib/selftests/generate_expected_output.py3
-rw-r--r--tests/auto/testlib/selftests/tst_selftests.cpp28
-rw-r--r--tests/auto/tools/moc/tst_moc.cpp19
-rw-r--r--tests/auto/tools/qmake/testdata/functions/functions.pro9
-rw-r--r--tests/auto/tools/rcc/data/images/images.expected47
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp40
-rw-r--r--tests/auto/widgets/dialogs/qprogressdialog/tst_qprogressdialog.cpp113
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp124
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp40
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp73
-rw-r--r--tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp18
-rw-r--r--tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp163
-rw-r--r--tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp18
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp243
-rw-r--r--tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp11
-rw-r--r--tests/auto/widgets/kernel/qwidgetsvariant/tst_qwidgetsvariant.cpp6
-rw-r--r--tests/auto/widgets/widgets/qgroupbox/tst_qgroupbox.cpp19
-rw-r--r--tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp10
-rw-r--r--tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp15
-rw-r--r--tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp47
-rw-r--r--tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp14
-rw-r--r--tests/auto/widgets/widgets/qopenglwidget/qopenglwidget.pro8
-rw-r--r--tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp266
-rw-r--r--tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp15
-rw-r--r--tests/auto/widgets/widgets/qtabbar/tst_qtabbar.cpp28
-rw-r--r--tests/auto/widgets/widgets/widgets.pro2
-rw-r--r--tests/benchmarks/corelib/kernel/qmetatype/tst_qmetatype.cpp90
-rw-r--r--tests/benchmarks/corelib/tools/qdatetime/main.cpp6
-rw-r--r--tests/benchmarks/corelib/tools/qregexp/qregexp.pro2
-rw-r--r--tests/benchmarks/corelib/tools/qringbuffer/main.cpp84
-rw-r--r--tests/benchmarks/corelib/tools/qringbuffer/qringbuffer.pro7
-rw-r--r--tests/benchmarks/corelib/tools/qstring/main.cpp6
-rw-r--r--tests/benchmarks/corelib/tools/tools.pro1
-rw-r--r--tests/benchmarks/gui/kernel/kernel.pro4
-rw-r--r--tests/benchmarks/gui/kernel/qapplication/main.cpp2
-rw-r--r--tests/benchmarks/gui/kernel/qguimetatype/tst_qguimetatype.cpp60
-rw-r--r--tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp4
-rw-r--r--tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp2
-rw-r--r--tests/benchmarks/gui/text/qfontmetrics/main.cpp1
-rw-r--r--tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp2
-rw-r--r--tests/manual/cocoa/qt_on_cocoa/main.mm2
-rw-r--r--tests/manual/dialogs/filedialogpanel.cpp15
-rw-r--r--tests/manual/dialogs/filedialogpanel.h3
-rw-r--r--tests/manual/dialogs/printdialogpanel.cpp12
-rw-r--r--tests/manual/highdpi/highdpi.pro2
-rw-r--r--tests/manual/highdpi/main.cpp176
-rw-r--r--tests/manual/manual.pro5
-rw-r--r--tests/manual/qopenglcontext/main.cpp54
-rw-r--r--tests/manual/qopenglcontext/qopenglcontext.pro9
-rw-r--r--tests/manual/qopenglcontext/qopenglcontextwindow.cpp173
-rw-r--r--tests/manual/qopenglcontext/qopenglcontextwindow.h76
-rw-r--r--tests/manual/qopenglcontext/qticon64.pngbin0 -> 6474 bytes
-rw-r--r--tests/manual/qopenglwidget/openglwidget/main.cpp17
-rw-r--r--tests/manual/qopenglwidget/openglwidget/openglwidget.cpp7
-rw-r--r--tests/manual/qopenglwidget/openglwidget/openglwidget.h2
-rw-r--r--tests/manual/qscreen/main.cpp11
-rw-r--r--tests/manual/qscreen/propertywatcher.cpp3
-rw-r--r--tests/manual/qtabletevent/device_information/main.cpp20
-rw-r--r--tests/manual/qtabletevent/device_information/tabletwidget.cpp34
-rw-r--r--tests/manual/qtabletevent/device_information/tabletwidget.h7
-rw-r--r--tests/manual/qtabletevent/regular_widgets/main.cpp105
-rw-r--r--tests/manual/widgets/itemviews/itemviews.pro2
-rw-r--r--tests/manual/widgets/itemviews/qheaderview/qheaderview.pro (renamed from tests/manual/widgets/itemviews/qheaderview/qheaderviewtest.pro)0
-rw-r--r--tests/manual/widgets/itemviews/qtreeview/qtreeview.pro (renamed from tests/manual/widgets/itemviews/qtreeview/qtreeviewtest.pro)0
-rw-r--r--tests/manual/widgets/itemviews/qtreewidget/qtreewidget.pro (renamed from tests/manual/widgets/itemviews/qtreewidget/qtreewidgettest.pro)0
-rw-r--r--tests/manual/widgets/itemviews/tableview-span-navigation/main.cpp (renamed from src/gui/kernel/qkeymapper_qpa.cpp)55
-rw-r--r--tests/manual/widgets/itemviews/tableview-span-navigation/tableview-span-navigation.pro8
-rw-r--r--tests/manual/widgets/kernel/layoutreplace/layoutreplace.pro (renamed from tests/manual/widgets/kernel/layoutreplace/main.pro)0
-rw-r--r--tests/manual/widgets/kernel/qtooltip/qtooltip.pro (renamed from tests/manual/widgets/kernel/qtooltip/main.pro)0
-rw-r--r--tests/manual/widgets/qgraphicsview/rubberband/rubberband.pro (renamed from tests/manual/widgets/qgraphicsview/rubberband/rubberbandtest.pro)0
-rw-r--r--tools/configure/Makefile.mingw1
-rw-r--r--tools/configure/Makefile.win322
-rw-r--r--tools/configure/configure.pro1
-rw-r--r--tools/configure/configureapp.cpp147
-rw-r--r--tools/configure/configureapp.h23
-rw-r--r--util/unicode/main.cpp8
1518 files changed, 73317 insertions, 24795 deletions
diff --git a/bin/findtr b/bin/findtr
deleted file mode 100755
index 975485f94d..0000000000
--- a/bin/findtr
+++ /dev/null
@@ -1,229 +0,0 @@
-#!/usr/bin/perl -w
-# vi:wrap:
-#############################################################################
-##
-## Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-## Contact: http://www.qt-project.org/legal
-##
-## This file is part of the translations 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$
-##
-#############################################################################
-
-# See Qt I18N documentation for usage information.
-
-use POSIX qw(strftime);
-
-$projectid='PROJECT VERSION';
-$datetime = strftime "%Y-%m-%d %X %Z", localtime;
-$charset='iso-8859-1';
-$translator='FULLNAME <EMAIL@ADDRESS>';
-$revision_date='YYYY-MM-DD';
-
-$real_mark = "tr";
-$noop_mark = "QT_TR_NOOP";
-$scoped_mark = "qApp->translate";
-$noop_scoped_mark = "QT_TRANSLATE_NOOP";
-
-$header=
-'# This is a Qt message file in .po format. Each msgid starts with
-# a scope. This scope should *NOT* be translated - eg. translating
-# from French to English, "Foo::Bar" would be translated to "Pub",
-# not "Foo::Pub".
-msgid ""
-msgstr ""
-"Project-Id-Version: '.$projectid.'\n"
-"POT-Creation-Date: '.$datetime.'\n"
-"PO-Revision-Date: '.$revision_date.'\n"
-"Last-Translator: '.$translator.'\n"
-"Content-Type: text/plain; charset='.$charset.'\n"
-
-';
-
-
-
-
-$scope = "";
-
-if ( $#ARGV < 0 ) {
- print STDERR "Usage: findtr sourcefile ... >project.po\n";
- exit 1;
-}
-
-
-sub outmsg {
- my ($file, $line, $scope, $msgid) = @_;
- # unesc
- $msgid =~ s/$esc:$esc:$esc/::/gs;
- $msgid =~ s|$esc/$esc/$esc|//|gs;
-
- # Remove blank lines
- $msgid =~ s/\n\n+/\n/gs;
- $msgid = "\"\"\n$msgid" if $msgid =~ /\n/s;
- print "#: $file:$line\n";
- $msgid =~ s/^"//; #"emacs bug
- print "msgid \"${scope}::$msgid\n";
- #print "msgstr \"$msgid\n";
- print "msgstr \"\"\n";
- print "\n";
-}
-
-sub justlines {
- my $l = @_;
- $l =~ tr|\n||dc;
- return $l;
-}
-
-print $header;
-
-
-foreach $file ( @ARGV ) {
- next unless open( I, "< $file" );
-
- $source = join( "", <I> );
-
- # Find esc. Avoid bad case 1/// -> 1/1/1/1 -> ///1
- $esc = 1;
- while ( $source =~ m!(?:$esc/$esc/$esc)|(?:$esc///)
- |(?:$esc:$esc:$esc)|(?:$esc:\:\:)! ) {
- $esc++;
- }
-
- # Hide quoted :: in practically all strings
- $source =~ s/\"([^"\n]*)::([^"\n]*)\"/\"$1$esc:$esc:$esc$2\"/g;
-
- # Hide quoted // in practically all strings
- $source =~ s|\"([^"\n]*)//([^"\n]*)\"|\"$1$esc/$esc/$esc$2\"|g;
-
-
- # strip comments -- does not handle "/*" in strings
- while( $source =~ s|/\*(.*?)\*/|justlines($1)|ges ) { }
- while( $source =~ s|//(.*?)\n|\n|g ) { }
-
- while( $source =~ /
- (?:
- # Some doublequotes are "escaped" to help vim syntax highlight
-
- # $1 = scope; $2 = parameters etc.
- (?:
- # Scoped function name ($1 is scope).
- (\w+)::(?:\w+)
- \s*
- # Parameters etc up to open-curly - no semicolons
- \(([^();]*)\)
- \s*
- (?:\{|:)
- )
- |
- # $3 - one-argument msgid
- (?:\b
- # One of the marks
- (?:$real_mark|$noop_mark)
- \s*
- # The parameter
- \(\s*((?:"(?:[^"]|[^\\]\\")*"\s*)+)\)
- )
- |
- # $4,$5 - two-argument msgid
- (?:\b
- # One of the scoped marks
- (?:$scoped_mark|$noop_scoped_mark)
- \s*
- # The parameters
- \(
- # The scope parameter
- \s*"([^\"]*)"
- \s*,\s*
- # The msgid parameter
- \s*((?:\"(?:[^"]|[^\\]\\")*"\s*)+) #"emacs
- \)
- )
- |
- # $6,$7 - scoped one-argument msgid
- (?:\b
- # The scope
- (\w+)::
- # One of the marks
- (?:$real_mark)
- \s*
- # The parameter
- \(\s*((?:"(?:[^"]|[^\\]\\")*"\s*)+)\)
- )
- )/gsx )
- {
- @lines = split /^/m, "$`";
- $line = @lines;
- if ( defined( $1 ) ) {
- if ( $scope ne $1 ) {
- $sc=$1;
- $etc=$2;
- # remove strings
- $etc =~ s/"(?:[^"]|[^\\]\\")"//g;
- # count ( and )
- @open = split /\(/m, $etc;
- @close = split /\)/m, $etc;
- if ( $#open == $#close ) {
- $scope = $sc;
- }
- }
- next;
- }
-
- if ( defined( $3 ) ) {
- $this_scope = $scope;
- $msgid = $3;
- } elsif ( defined( $4 ) ) {
- $this_scope = $4;
- $msgid = $5;
- } elsif ( defined( $6 ) ) {
- $this_scope = $6;
- $msgid = $7;
- } else {
- next;
- }
-
- $msgid =~ s/^\s*//;
- $msgid =~ s/\s*$//;
-
- # Might still be non-unique eg. tr("A" "B") vs. tr("A" "B").
-
- $location{"${this_scope}::${msgid}"} = "$file:$line";
- }
-}
-
-for $scoped_msgid ( sort keys %location ) {
- ($scope,$msgid) = $scoped_msgid =~ m/([^:]*)::(.*)/s;
- ($file,$line) = $location{$scoped_msgid} =~ m/([^:]*):(.*)/s;
- outmsg($file,$line,$scope,$msgid);
-}
diff --git a/bin/syncqt.pl b/bin/syncqt.pl
index 826d3fc6fa..a394ffac0d 100755
--- a/bin/syncqt.pl
+++ b/bin/syncqt.pl
@@ -299,7 +299,7 @@ sub classNames {
push @symbols, $1;
} elsif($definition =~ m/^ *typedef +(.*) +([^ ]*);$/) {
push @symbols, $2;
- } elsif($definition =~ m/^ *(template *<.*> *)?(class|struct) +([^ ]* +)?((?!$post_kw)[^<\s]+) ?(<[^>]*> ?)?\s*(?:$post_kw)?\s*((,|:)\s*(public|protected|private) *.*)? *\{\}$/o) {
+ } elsif($definition =~ m/^ *(template *<.*> *)?(class|struct) +([^ <>]* +)?((?!$post_kw)[^<\s]+) ?(<[^>]*> ?)?\s*(?:$post_kw)?\s*((,|:)\s*(public|protected|private) *.*)? *\{\}$/o) {
push @symbols, $4;
} elsif($definition =~ m/^ *Q_DECLARE_.*ITERATOR\((.*)\);$/) {
push @symbols, "Q" . $1 . "Iterator";
diff --git a/config.tests/arch/arch.cpp b/config.tests/arch/arch.cpp
index e08183c193..35bf2be91c 100644
--- a/config.tests/arch/arch.cpp
+++ b/config.tests/arch/arch.cpp
@@ -41,46 +41,11 @@
****************************************************************************/
#define QGLOBAL_H
-#include "../../src/corelib/global/qprocessordetection.h"
+#include "../../src/corelib/global/archdetect.cpp"
#include <stdio.h>
extern const char msg[];
-const char msg[] = "==Qt=magic=Qt== Architecture:"
-
-#if defined(Q_PROCESSOR_ALPHA)
-"alpha"
-#elif defined(Q_PROCESSOR_ARM)
-"arm"
-#elif defined(Q_PROCESSOR_AVR32)
-"avr32"
-#elif defined(Q_PROCESSOR_BLACKFIN)
-"bfin"
-#elif defined(Q_PROCESSOR_X86_32)
-"i386"
-#elif defined(Q_PROCESSOR_X86_64)
-"x86_64"
-#elif defined(Q_PROCESSOR_IA64)
-"ia64"
-#elif defined(Q_PROCESSOR_MIPS_64)
-"mips64"
-#elif defined(Q_PROCESSOR_MIPS)
-"mips"
-#elif defined(Q_PROCESSOR_POWER)
-"power"
-#elif defined(Q_PROCESSOR_S390_X)
-"s390x"
-#elif defined(Q_PROCESSOR_S390)
-"s390"
-#elif defined(Q_PROCESSOR_SH)
-"sh"
-#elif defined(Q_PROCESSORS_SPARC_64)
-"sparc64"
-#elif defined(Q_PROCESSOR_SPARC)
-"sparc"
-#else
-"unknown"
-#endif
- ;
+const char msg[] = "==Qt=magic=Qt== Architecture:" ARCH_PROCESSOR;
extern const char msg2[];
const char msg2[] = "==Qt=magic=Qt== Sub-architecture:"
@@ -120,6 +85,14 @@ const char msg2[] = "==Qt=magic=Qt== Sub-architecture:"
// AVX512 Conflict Detection, Intel Xeon Phi codename "Knights Landing"
" avx512cd"
#endif
+#ifdef __AVX512DQ__
+// AVX512 Double & Quadword, future Intel Xeon processor
+" avx512dq"
+#endif
+#ifdef __AVX512BW__
+// AVX512 Byte & Word, future Intel Xeon processor
+" avx512bw"
+#endif
#ifdef __AVX512ER__
// AVX512 Exponentiation & Reciprocal, Intel Xeon Phi codename "Knights Landing"
" avx512ef"
@@ -128,6 +101,10 @@ const char msg2[] = "==Qt=magic=Qt== Sub-architecture:"
// AVX512 Prefetch, Intel Xeon Phi codename "Knights Landing"
" avx512pf"
#endif
+#ifdef __AVX512VL__
+// AVX512 Vector Length, future Intel Xeon processor
+" avx512vl"
+#endif
#ifdef __BMI__
// Bit Manipulation Instructions 1, Intel Core 4th Generation ("Haswell"), AMD "Bulldozer 2"
" bmi"
diff --git a/config.tests/common/c++11/c++11.cpp b/config.tests/common/c++11/c++11.cpp
index 2c501ad6ca..b41ac7001b 100644
--- a/config.tests/common/c++11/c++11.cpp
+++ b/config.tests/common/c++11/c++11.cpp
@@ -39,10 +39,10 @@
**
****************************************************************************/
-#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
+#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(__INTEL_CXX11_MODE__)
// Compiler claims to support C++11, trust it
#else
-# error "__cplusplus must be >= 201103L, or __GXX_EXPERIMENTAL_CXX0X__ must be defined"
+# error "__cplusplus must be >= 201103L, or one of __GXX_EXPERIMENTAL_CXX0X__ or __INTEL_CXX11_MODE__ must be defined"
#endif
#include <utility>
diff --git a/config.tests/common/c++11/c++11.pro b/config.tests/common/c++11/c++11.pro
index dbe764ba84..3620f99c71 100644
--- a/config.tests/common/c++11/c++11.pro
+++ b/config.tests/common/c++11/c++11.pro
@@ -1,3 +1,3 @@
SOURCES = c++11.cpp
-CONFIG += c++11
+CONFIG += c++11 console
CONFIG -= qt
diff --git a/config.tests/unix/harfbuzz/harfbuzz.cpp b/config.tests/unix/harfbuzz/harfbuzz.cpp
index 9e26b04499..43daf48344 100644
--- a/config.tests/unix/harfbuzz/harfbuzz.cpp
+++ b/config.tests/unix/harfbuzz/harfbuzz.cpp
@@ -41,7 +41,7 @@
#include <harfbuzz/hb.h>
-#if ((HB_VERSION_MAJOR*10000 + HB_VERSION_MINOR*100 + HB_VERSION_MICRO) < 912)
+#if !HB_VERSION_ATLEAST(0, 9, 31)
# error "This version of harfbuzz is too old."
#endif
diff --git a/config.tests/unix/opengles3/opengles3.cpp b/config.tests/unix/opengles3/opengles3.cpp
new file mode 100644
index 0000000000..d82dca4416
--- /dev/null
+++ b/config.tests/unix/opengles3/opengles3.cpp
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the config.tests 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$
+**
+****************************************************************************/
+
+#ifdef BUILD_ON_MAC
+ #include <OpenGLES/ES3/gl.h>
+#else
+ #include <GLES3/gl3.h>
+#endif
+
+int main(int, char **)
+{
+ glGetStringi(GL_EXTENSIONS, 0);
+ glReadBuffer(GL_COLOR_ATTACHMENT1);
+ static GLfloat f[6];
+ glUniformMatrix2x3fv(0, 0, GL_FALSE, f);
+ glMapBufferRange(GL_ARRAY_BUFFER, 0, 0, GL_MAP_READ_BIT);
+
+ return 0;
+}
diff --git a/config.tests/unix/opengles3/opengles3.pro b/config.tests/unix/opengles3/opengles3.pro
new file mode 100644
index 0000000000..6942b57327
--- /dev/null
+++ b/config.tests/unix/opengles3/opengles3.pro
@@ -0,0 +1,16 @@
+# The library is expected to be the same as in ES 2.0 (libGLESv2).
+# The difference is the header and the presence of the functions in
+# the library.
+
+SOURCES = opengles3.cpp
+INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES2
+
+for(p, QMAKE_LIBDIR_OPENGL_ES2) {
+ exists($$p):LIBS += -L$$p
+}
+
+CONFIG -= qt
+LIBS += $$QMAKE_LIBS_OPENGL_ES2
+mac {
+ DEFINES += BUILD_ON_MAC
+}
diff --git a/config.tests/unix/opengles31/opengles31.cpp b/config.tests/unix/opengles31/opengles31.cpp
new file mode 100644
index 0000000000..c4f27a3be8
--- /dev/null
+++ b/config.tests/unix/opengles31/opengles31.cpp
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the config.tests 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 <GLES3/gl31.h>
+
+int main(int, char **)
+{
+ glDispatchCompute(1, 1, 1);
+ glProgramUniform1i(0, 0, 0);
+
+ return 0;
+}
diff --git a/config.tests/unix/opengles31/opengles31.pro b/config.tests/unix/opengles31/opengles31.pro
new file mode 100644
index 0000000000..1df9cedfcd
--- /dev/null
+++ b/config.tests/unix/opengles31/opengles31.pro
@@ -0,0 +1,13 @@
+# The library is expected to be the same as in ES 2.0 (libGLESv2).
+# The difference is the header and the presence of the functions in
+# the library.
+
+SOURCES = opengles31.cpp
+INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES2
+
+for(p, QMAKE_LIBDIR_OPENGL_ES2) {
+ exists($$p):LIBS += -L$$p
+}
+
+CONFIG -= qt
+LIBS += $$QMAKE_LIBS_OPENGL_ES2
diff --git a/config.tests/unix/pcre/pcre.cpp b/config.tests/unix/pcre/pcre.cpp
index 9c765715d3..bb13106c1e 100644
--- a/config.tests/unix/pcre/pcre.cpp
+++ b/config.tests/unix/pcre/pcre.cpp
@@ -41,7 +41,7 @@
#include <pcre.h>
-#if (PCRE_MAJOR < 8) || ((PCRE_MAJOR == 8) && (PCRE_MINOR < 30))
+#if (PCRE_MAJOR < 8) || ((PCRE_MAJOR == 8) && (PCRE_MINOR < 31))
#error This PCRE version is not supported
#endif
diff --git a/configure b/configure
index cb8d78fd3c..8b95c805b7 100755
--- a/configure
+++ b/configure
@@ -364,6 +364,7 @@ filterDefaultPaths()
{
local path
path=`cat`
+ path=`"$relpath/config.tests/unix/makeabs" "$path"`
echo "$1" | grep "^$path\$" > /dev/null || echo "$path"
}
@@ -697,6 +698,7 @@ CFG_INOTIFY=auto
CFG_EVENTFD=auto
CFG_RPATH=yes
CFG_FRAMEWORK=auto
+CFG_USE_GOLD_LINKER=auto
DEFINES=
INCLUDES=
D_FLAGS=
@@ -722,7 +724,6 @@ CFG_SILENT=no
CFG_ALSA=auto
CFG_PULSEAUDIO=auto
CFG_COREWLAN=auto
-CFG_PROCESS=yes
CFG_ICU=auto
CFG_FORCE_ASSERTS=no
CFG_PCRE=auto
@@ -1149,6 +1150,23 @@ while [ "$#" -gt 0 ]; do
;;
qreal)
CFG_QREAL="$VAL"
+ if [ "$CFG_QREAL" = "float" ]; then
+ CFG_QREAL_STRING="\"float\""
+ elif [ "$CFG_QREAL" != "double" ]; then
+ if [ -z "$PERL" ]; then
+ echo "configure needs perl in \$PATH if the -qreal option is used with" >&2
+ echo "a value different from \"float\"" >&2
+ exit 1
+ fi
+ CFG_QREAL_STRING=`perl -e '$_ = $ARGV[0];
+ s/ +/ /g; s/^ +//; s/ +$//;
+ while (/(.)/g) {
+ $c = $1;
+ if ($c =~ /[a-zA-Z0-9]/) { $result .= $c; }
+ else { $result .= "_" . unpack("H*", $c); }
+ }
+ print "\"$result\"";' "$CFG_QREAL"`
+ fi
;;
sysroot)
CFG_SYSROOT="$VAL"
@@ -1329,6 +1347,7 @@ while [ "$#" -gt 0 ]; do
XPLATFORM_MINGW=yes
CFG_RPATH=no
CFG_REDUCE_EXPORTS=no
+ CFG_ICU=no
;;
esac
;;
@@ -1574,6 +1593,13 @@ while [ "$#" -gt 0 ]; do
UNKNOWN_OPT=yes
fi
;;
+ use-gold-linker)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_USE_GOLD_LINKER="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
zlib)
[ "$VAL" = "qt" ] && VAL=yes
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
@@ -2050,15 +2076,6 @@ while [ "$#" -gt 0 ]; do
silent)
CFG_SILENT="$VAL"
;;
- dont-process)
- CFG_PROCESS=no
- ;;
- process)
- CFG_PROCESS=partial
- ;;
- fully-process)
- CFG_PROCESS=full
- ;;
audio-backend)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_AUDIO_BACKEND="$VAL"
@@ -2257,10 +2274,6 @@ Configure options:
* -shared ............ Create and use shared Qt libraries.
-static ............ Create and use static Qt libraries.
- * -process ........... Generate only a top-level Makefile.
- -fully-process ..... Generate Makefiles for the entire Qt tree.
- -dont-process ...... Do not generate any Makefiles.
-
-no-largefile ...... Disables large file support.
+ -largefile ......... Enables Qt to access files larger than 4 GB.
@@ -2460,6 +2473,9 @@ Additional options:
linker optimizations (Qt/X11 and Qt for Embedded Linux only;
experimental; needs GNU ld >= 2.18).
+ -no-use-gold-linker ..... Do not link using the GNU gold linker.
+ + -use-gold-linker ........ Link using the GNU gold linker if available.
+
-force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
-device <name> ............... Cross-compile for device <name> (experimental)
@@ -2504,7 +2520,7 @@ Additional options:
-no-opengl .......... Do not support OpenGL.
-opengl <api> ....... Enable OpenGL support
With no parameter, this will attempt to auto-detect
- OpenGL ES 2, or regular desktop OpenGL.
+ OpenGL ES 2.0 and higher, or regular desktop OpenGL.
Use es2 for <api> to override auto-detection.
* -no-system-proxies .. Do not use system network proxies by default.
@@ -3225,6 +3241,19 @@ if [ "$CFG_REDUCE_EXPORTS" != "no" ]; then
fi
fi
+# auto-detect -fuse-ld=gold support
+if [ "$CFG_USE_GOLD_LINKER" != "no" ]; then
+ if linkerSupportsFlag $TEST_COMPILER -fuse-ld=gold; then
+ CFG_USE_GOLD_LINKER=yes
+ else
+ if [ "$CFG_USE_GOLD_LINKER" = "yes" ]; then
+ echo "-use-gold-linker was requested but this compiler does not support it"
+ exit 1
+ fi
+ CFG_USE_GOLD_LINKER=no
+ fi
+fi
+
# auto-detect -fstack-protector-strong support (for QNX only currently)
if [ "$XPLATFORM_QNX" = "yes" ]; then
if compilerSupportsFlag $TEST_COMPILER -fstack-protector-strong; then
@@ -4098,6 +4127,16 @@ if [ "$CFG_IWMMXT" = "yes" ]; then
fi
fi
+# check Neon support
+if [ "$CFG_NEON" = "auto" ]; then
+ # no compile test, just check what the compiler has
+ case "$CFG_CPUFEATURES" in
+ *neon*)
+ CFG_NEON=yes
+ ;;
+ esac
+fi
+
# detect mips_dsp support
if [ "$CFG_ARCH" = "mips" ] && [ "${CFG_MIPS_DSP}" = "auto" ]; then
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mips_dsp "mips_dsp" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
@@ -4708,7 +4747,7 @@ fi
# X11/MINGW OpenGL
if [ "$XPLATFORM_MINGW" = "yes" ]; then
- # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
+ # auto-detect OpenGL support (es2 = OpenGL ES 2.0 or higher)
if [ "$CFG_GUI" = "no" ]; then
if [ "$CFG_OPENGL" = "auto" ]; then
CFG_OPENGL=no
@@ -4722,7 +4761,7 @@ if [ "$XPLATFORM_MINGW" = "yes" ]; then
if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
if compileTest x11/opengl "OpenGL"; then
CFG_OPENGL=desktop
- elif compileTest unix/opengles2 "OpenGL ES 2.x"; then
+ elif compileTest unix/opengles2 "OpenGL ES 2.0"; then
CFG_OPENGL=es2
else
if [ "$CFG_OPENGL" = "yes" ]; then
@@ -4748,8 +4787,8 @@ if [ "$XPLATFORM_MINGW" = "yes" ]; then
;;
esac
elif [ "$CFG_OPENGL" = "es2" ]; then
- #OpenGL ES 2.x
- compileTest unix/opengles2 "OpenGL ES 2.x"
+ #OpenGL ES 2.0
+ compileTest unix/opengles2 "OpenGL ES 2.0"
if [ $? != "0" ]; then
echo "The OpenGL ES 2.0 functionality test failed!"
echo " You might need to modify the include and library search paths by editing"
@@ -4791,11 +4830,11 @@ if [ "$XPLATFORM_MAC" = "yes" ]; then
fi
fi
-# auto-detect OpenGL support (es2 = OpenGL ES 2.x)
+# auto-detect OpenGL support (es2 = OpenGL ES 2.0 or higher)
if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
if compileTest unix/opengldesktop "OpenGL"; then
CFG_OPENGL=desktop
- elif compileTest unix/opengles2 "OpenGL ES 2.x"; then
+ elif compileTest unix/opengles2 "OpenGL ES 2.0"; then
CFG_OPENGL=es2
else
if [ "$CFG_OPENGL" = "yes" ]; then
@@ -4808,7 +4847,7 @@ if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
CFG_OPENGL=no
fi
elif [ "$CFG_OPENGL" = "es2" ]; then
- #OpenGL ES 2.x
+ #OpenGL ES 2.0
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --cflags-only-I glesv2 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --libs-only-L glesv2 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
@@ -4819,7 +4858,7 @@ elif [ "$CFG_OPENGL" = "es2" ]; then
QMakeVar set QMAKE_LIBS_OPENGL_ES2 "`shellArgumentListToQMakeList "$QMAKE_LIBS_OPENGL_ES2"`"
fi
- compileTest unix/opengles2 "OpenGL ES 2.x" $QMAKE_LIBS_OPENGL_ES2 $QMAKE_CFLAGS_OPENGL_ES2
+ compileTest unix/opengles2 "OpenGL ES 2.0" $QMAKE_LIBS_OPENGL_ES2 $QMAKE_CFLAGS_OPENGL_ES2
if [ $? != "0" ]; then
echo "The OpenGL ES 2.0 functionality test failed!"
echo " You might need to modify the include and library search paths by editing"
@@ -4839,6 +4878,21 @@ elif [ "$CFG_OPENGL" = "desktop" ]; then
fi
fi
+# If OpenGL ES 2.0 is enabled, check for 3.0 and higher. This is used to allow
+# compile-time differentiation and including the version specific (but backwards
+# compatible) ES headers (for example, GLES3/gl31.h). Other than that, there is
+# no difference in the configuration, even the library is the same.
+if [ "$CFG_OPENGL" = "es2" ]; then
+ if compileTest unix/opengles3 "OpenGL ES 3.0" $QMAKE_LIBS_OPENGL_ES2 $QMAKE_CFLAGS_OPENGL_ES2; then
+ # Add a define for ES3, in addition to ES and ES2.
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_3"
+ fi
+ if compileTest unix/opengles31 "OpenGL ES 3.1" $QMAKE_LIBS_OPENGL_ES2 $QMAKE_CFLAGS_OPENGL_ES2; then
+ # Add a define for ES31.
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_3_1"
+ fi
+fi
+
# auto-detect FontConfig support
if [ "$CFG_FONTCONFIG" != "no" ]; then
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
@@ -5586,6 +5640,7 @@ fi
[ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
[ "$CFG_STRIP" = "no" ] && QMAKE_CONFIG="$QMAKE_CONFIG nostrip"
[ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
+[ "$CFG_USE_GOLD_LINKER" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG use_gold_linker"
if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
QT_CONFIG="$QT_CONFIG separate_debug_info"
fi
@@ -5597,6 +5652,7 @@ fi
[ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
[ "$CFG_AVX2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx2"
[ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
+[ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
if [ "$CFG_ARCH" = "mips" ]; then
[ "$CFG_MIPS_DSP" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dsp"
[ "$CFG_MIPS_DSPR2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dspr2"
@@ -5994,6 +6050,7 @@ fi
if [ "$CFG_QREAL" != double ]; then
echo "#define QT_COORD_TYPE $CFG_QREAL" >>"$outpath/src/corelib/global/qconfig.h.new"
+ echo "#define QT_COORD_TYPE_STRING $CFG_QREAL_STRING" >>"$outpath/src/corelib/global/qconfig.h.new"
fi
if [ "$CFG_FRAMEWORK" = "yes" ]; then
@@ -6027,7 +6084,7 @@ for SUBARCH in SSE2 SSE3 SSSE3 SSE4_1 SSE4_2 AVX AVX2 \
eval "VAL=\$CFG_$SUBARCH"
case "$VAL" in
yes)
- echo "#define QT_COMPILER_SUPPORTS_$SUBARCH" \
+ echo "#define QT_COMPILER_SUPPORTS_$SUBARCH 1" \
>>"$outpath/src/corelib/global/qconfig.h.new"
;;
esac
@@ -6459,6 +6516,7 @@ else
fi
unset build_mode release
echo " Using C++11 ............ $CFG_CXX11"
+echo " Using gold linker....... $CFG_USE_GOLD_LINKER"
echo " Using PCH .............. $CFG_PRECOMPILE"
echo " Target compiler supports:"
if [ "$CFG_ARCH" = "i386" -o "$CFG_ARCH" = "x86_64" ]; then
@@ -6516,7 +6574,7 @@ report_support " OpenSSL .............." "$CFG_OPENSSL" yes "loading librarie
report_support " NIS ...................." "$CFG_NIS"
report_support " OpenGL / OpenVG:"
report_support " EGL .................." "$CFG_EGL"
-report_support " OpenGL ..............." "$CFG_OPENGL" yes "Desktop OpenGL" es2 "OpenGL ES 2.x"
+report_support " OpenGL ..............." "$CFG_OPENGL" yes "Desktop OpenGL" es2 "OpenGL ES 2.0+"
report_support " OpenVG ..............." "$CFG_OPENVG-$CFG_OPENVG_SHIVA" yes-yes "ShivaVG" yes-no "native"
report_support " PCRE ..................." "$CFG_PCRE" yes "system library" qt "bundled copy"
if [ -n "$PKG_CONFIG" ]; then
@@ -6621,7 +6679,6 @@ rm -f "$QMAKE_VARS_FILE" 2>/dev/null
# build makefiles based on the configuration
#-------------------------------------------------------------------------------
-if [ "$CFG_PROCESS" != "no" ]; then
( # fork to make the cd stay local
relpathMangled=$relpath
@@ -6630,16 +6687,9 @@ if [ "$CFG_PROCESS" != "no" ]; then
cd ..
fi
- if [ "$CFG_PROCESS" = "full" ]; then
- echo "Creating makefiles. Please wait..."
- "$outpath/bin/qmake" -r "$relpathMangled"
- echo "Done"
- else
- "$outpath/bin/qmake" "$relpathMangled"
- fi
+ "$outpath/bin/qmake" "$relpathMangled"
-)
-fi
+) || exit
#-------------------------------------------------------------------------------
# check for platforms that we don't yet know about
diff --git a/dist/changes-5.4.0 b/dist/changes-5.4.0
new file mode 100644
index 0000000000..c26e205bc0
--- /dev/null
+++ b/dist/changes-5.4.0
@@ -0,0 +1,26 @@
+Qt 5.4 introduces many new features and improvements as well as bugfixes
+over the 5.3.x series. 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.4
+
+The Qt version 5.4 series is binary compatible with the 5.3.x series.
+Applications compiled for 5.3 will continue to run with 5.4.
+
+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.
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+QtCore
+------
+
+ - Added QEnableSharedFromThis, a class that allows obtaining a
+ QSharedPointer for an object already managed by a shared pointer.
diff --git a/doc/global/config.qdocconf b/doc/global/config.qdocconf
index 670b13a9ea..034c294e95 100644
--- a/doc/global/config.qdocconf
+++ b/doc/global/config.qdocconf
@@ -12,3 +12,5 @@ navigation.homepage = "Qt $QT_VER"
buildversion = "Qt $QT_VERSION Reference Documentation"
sourcedirs += includes
+
+url = http://qt-project.org/doc/qt-$QT_VER
diff --git a/doc/global/html-config.qdocconf b/doc/global/html-config.qdocconf
index 1560db8d98..9b3b05b7d3 100644
--- a/doc/global/html-config.qdocconf
+++ b/doc/global/html-config.qdocconf
@@ -2,6 +2,8 @@
HTML.nonavigationbar = "false"
+HTML.tocdepth = 2
+
HTML.extraimages += template/images/arrow_bc.png \
template/images/home.png \
template/images/ico_out.png \
diff --git a/doc/global/qt-cpp-defines.qdocconf b/doc/global/qt-cpp-defines.qdocconf
index 1039c88e8d..300c4402c1 100644
--- a/doc/global/qt-cpp-defines.qdocconf
+++ b/doc/global/qt-cpp-defines.qdocconf
@@ -28,9 +28,12 @@ Cpp.ignoretokens += \
Q_CORE_EXPORT_INLINE \
Q_DBUS_EXPORT \
Q_DECL_CONSTEXPR \
+ Q_DECL_CONST_FUNCTION \
Q_DECL_DEPRECATED \
Q_DECL_NOEXCEPT \
+ Q_DECL_FINAL \
Q_DECL_NOTHROW \
+ Q_DECL_PURE_FUNCTION \
Q_DECL_UNUSED \
Q_DECLARATIVE_EXPORT \
Q_EXPLICIT \
diff --git a/examples/gui/analogclock/main.cpp b/examples/gui/analogclock/main.cpp
index 1e10fcd07b..d51f440dff 100644
--- a/examples/gui/analogclock/main.cpp
+++ b/examples/gui/analogclock/main.cpp
@@ -49,8 +49,8 @@ public:
AnalogClockWindow();
protected:
- void timerEvent(QTimerEvent *);
- void render(QPainter *p);
+ void timerEvent(QTimerEvent *) Q_DECL_OVERRIDE;
+ void render(QPainter *p) Q_DECL_OVERRIDE;
private:
int m_timerId;
diff --git a/examples/gui/openglwindow/main.cpp b/examples/gui/openglwindow/main.cpp
index aa1c6d7fa1..0b0a0e19f0 100644
--- a/examples/gui/openglwindow/main.cpp
+++ b/examples/gui/openglwindow/main.cpp
@@ -53,8 +53,8 @@ class TriangleWindow : public OpenGLWindow
public:
TriangleWindow();
- void initialize();
- void render();
+ void initialize() Q_DECL_OVERRIDE;
+ void render() Q_DECL_OVERRIDE;
private:
GLuint loadShader(GLenum type, const char *source);
diff --git a/examples/gui/openglwindow/openglwindow.h b/examples/gui/openglwindow/openglwindow.h
index f6b53e3b33..cee888250b 100644
--- a/examples/gui/openglwindow/openglwindow.h
+++ b/examples/gui/openglwindow/openglwindow.h
@@ -67,9 +67,9 @@ public slots:
void renderNow();
protected:
- bool event(QEvent *event);
+ bool event(QEvent *event) Q_DECL_OVERRIDE;
- void exposeEvent(QExposeEvent *event);
+ void exposeEvent(QExposeEvent *event) Q_DECL_OVERRIDE;
private:
bool m_update_pending;
diff --git a/examples/gui/rasterwindow/rasterwindow.h b/examples/gui/rasterwindow/rasterwindow.h
index 8dc3993849..bca73c19e7 100644
--- a/examples/gui/rasterwindow/rasterwindow.h
+++ b/examples/gui/rasterwindow/rasterwindow.h
@@ -57,10 +57,10 @@ public slots:
void renderNow();
protected:
- bool event(QEvent *event);
+ bool event(QEvent *event) Q_DECL_OVERRIDE;
- void resizeEvent(QResizeEvent *event);
- void exposeEvent(QExposeEvent *event);
+ void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
+ void exposeEvent(QExposeEvent *event) Q_DECL_OVERRIDE;
private:
QBackingStore *m_backingStore;
diff --git a/examples/network/bearermonitor/sessionwidget.h b/examples/network/bearermonitor/sessionwidget.h
index 8d262cb693..a42c20495d 100644
--- a/examples/network/bearermonitor/sessionwidget.h
+++ b/examples/network/bearermonitor/sessionwidget.h
@@ -59,7 +59,7 @@ public:
explicit SessionWidget(const QNetworkConfiguration &config, QWidget *parent = 0);
~SessionWidget();
- void timerEvent(QTimerEvent *);
+ void timerEvent(QTimerEvent *) Q_DECL_OVERRIDE;
private:
void updateSessionState(QNetworkSession::State state);
diff --git a/examples/network/blockingfortuneclient/fortunethread.h b/examples/network/blockingfortuneclient/fortunethread.h
index b0c7301b87..1986873dd9 100644
--- a/examples/network/blockingfortuneclient/fortunethread.h
+++ b/examples/network/blockingfortuneclient/fortunethread.h
@@ -55,7 +55,7 @@ public:
~FortuneThread();
void requestNewFortune(const QString &hostName, quint16 port);
- void run();
+ void run() Q_DECL_OVERRIDE;
signals:
void newFortune(const QString &fortune);
diff --git a/examples/network/googlesuggest/googlesuggest.h b/examples/network/googlesuggest/googlesuggest.h
index b86f6929eb..818a0512e2 100644
--- a/examples/network/googlesuggest/googlesuggest.h
+++ b/examples/network/googlesuggest/googlesuggest.h
@@ -60,7 +60,7 @@ class GSuggestCompletion : public QObject
public:
GSuggestCompletion(QLineEdit *parent = 0);
~GSuggestCompletion();
- bool eventFilter(QObject *obj, QEvent *ev);
+ bool eventFilter(QObject *obj, QEvent *ev) Q_DECL_OVERRIDE;
void showCompletion(const QStringList &choices, const QStringList &hits);
public slots:
diff --git a/examples/network/network-chat/connection.h b/examples/network/network-chat/connection.h
index ee61052faf..2a0603a46f 100644
--- a/examples/network/network-chat/connection.h
+++ b/examples/network/network-chat/connection.h
@@ -78,7 +78,7 @@ signals:
void newMessage(const QString &from, const QString &message);
protected:
- void timerEvent(QTimerEvent *timerEvent);
+ void timerEvent(QTimerEvent *timerEvent) Q_DECL_OVERRIDE;
private slots:
void processReadyRead();
diff --git a/examples/network/network-chat/server.h b/examples/network/network-chat/server.h
index ec22981f30..971eafe10c 100644
--- a/examples/network/network-chat/server.h
+++ b/examples/network/network-chat/server.h
@@ -56,7 +56,7 @@ signals:
void newConnection(Connection *connection);
protected:
- void incomingConnection(qintptr socketDescriptor);
+ void incomingConnection(qintptr socketDescriptor) Q_DECL_OVERRIDE;
};
#endif
diff --git a/examples/network/threadedfortuneserver/fortuneserver.h b/examples/network/threadedfortuneserver/fortuneserver.h
index 2efe2d6207..c49b9058f4 100644
--- a/examples/network/threadedfortuneserver/fortuneserver.h
+++ b/examples/network/threadedfortuneserver/fortuneserver.h
@@ -53,7 +53,7 @@ public:
FortuneServer(QObject *parent = 0);
protected:
- void incomingConnection(qintptr socketDescriptor);
+ void incomingConnection(qintptr socketDescriptor) Q_DECL_OVERRIDE;
private:
QStringList fortunes;
diff --git a/examples/network/threadedfortuneserver/fortunethread.h b/examples/network/threadedfortuneserver/fortunethread.h
index c02d8b48f6..569d35aef8 100644
--- a/examples/network/threadedfortuneserver/fortunethread.h
+++ b/examples/network/threadedfortuneserver/fortunethread.h
@@ -52,7 +52,7 @@ class FortuneThread : public QThread
public:
FortuneThread(int socketDescriptor, const QString &fortune, QObject *parent);
- void run();
+ void run() Q_DECL_OVERRIDE;
signals:
void error(QTcpSocket::SocketError socketError);
diff --git a/examples/network/torrent/filemanager.h b/examples/network/torrent/filemanager.h
index 41f1aa9a40..81b0321ae5 100644
--- a/examples/network/torrent/filemanager.h
+++ b/examples/network/torrent/filemanager.h
@@ -90,7 +90,7 @@ signals:
void pieceVerified(int pieceIndex, bool verified);
protected:
- void run();
+ void run() Q_DECL_OVERRIDE;
private slots:
bool verifySinglePiece(int pieceIndex);
diff --git a/examples/network/torrent/mainwindow.cpp b/examples/network/torrent/mainwindow.cpp
index 649dbb0a77..fe7bbdaf3b 100644
--- a/examples/network/torrent/mainwindow.cpp
+++ b/examples/network/torrent/mainwindow.cpp
@@ -57,8 +57,8 @@ signals:
void fileDropped(const QString &fileName);
protected:
- void dragMoveEvent(QDragMoveEvent *event);
- void dropEvent(QDropEvent *event);
+ void dragMoveEvent(QDragMoveEvent *event) Q_DECL_OVERRIDE;
+ void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE;
#endif
};
@@ -69,8 +69,8 @@ class TorrentViewDelegate : public QItemDelegate
public:
inline TorrentViewDelegate(MainWindow *mainWindow) : QItemDelegate(mainWindow) {}
- inline void paint(QPainter *painter, const QStyleOptionViewItem &option,
- const QModelIndex &index ) const
+ void paint(QPainter *painter, const QStyleOptionViewItem &option,
+ const QModelIndex &index ) const Q_DECL_OVERRIDE
{
if (index.column() != 2) {
QItemDelegate::paint(painter, option, index);
@@ -173,6 +173,10 @@ MainWindow::MainWindow(QWidget *parent)
bottomBar->addWidget((uploadLimitLabel = new QLabel(tr("0 KB/s"))));
uploadLimitLabel->setFixedSize(QSize(fm.width(tr("99999 KB/s")), fm.lineSpacing()));
+#ifdef Q_OS_OSX
+ setUnifiedTitleAndToolBarOnMac(true);
+#endif
+
// Set up connections
connect(torrentView, SIGNAL(itemSelectionChanged()),
this, SLOT(setActionsEnabled()));
diff --git a/examples/network/torrent/mainwindow.h b/examples/network/torrent/mainwindow.h
index 6ba42be81f..1862d857ff 100644
--- a/examples/network/torrent/mainwindow.h
+++ b/examples/network/torrent/mainwindow.h
@@ -63,11 +63,11 @@ class MainWindow : public QMainWindow
public:
MainWindow(QWidget *parent = 0);
- QSize sizeHint() const;
+ QSize sizeHint() const Q_DECL_OVERRIDE;
const TorrentClient *clientForRow(int row) const;
protected:
- void closeEvent(QCloseEvent *event);
+ void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE;
private slots:
void loadSettings();
diff --git a/examples/network/torrent/peerwireclient.h b/examples/network/torrent/peerwireclient.h
index 35e4cc6ffb..12ce0696f6 100644
--- a/examples/network/torrent/peerwireclient.h
+++ b/examples/network/torrent/peerwireclient.h
@@ -112,14 +112,14 @@ public:
qint64 uploadSpeed() const;
bool canTransferMore() const;
- qint64 bytesAvailable() const { return incomingBuffer.size() + QTcpSocket::bytesAvailable(); }
+ qint64 bytesAvailable() const Q_DECL_OVERRIDE { return incomingBuffer.size() + QTcpSocket::bytesAvailable(); }
qint64 socketBytesAvailable() const { return socket.bytesAvailable(); }
qint64 socketBytesToWrite() const { return socket.bytesToWrite(); }
- void setReadBufferSize(qint64 size);
+ void setReadBufferSize(qint64 size) Q_DECL_OVERRIDE;
void connectToHost(const QHostAddress &address,
- quint16 port, OpenMode openMode = ReadWrite);
+ quint16 port, OpenMode openMode = ReadWrite) Q_DECL_OVERRIDE;
void diconnectFromHost();
signals:
@@ -138,11 +138,11 @@ signals:
void bytesReceived(qint64 size);
protected:
- void timerEvent(QTimerEvent *event);
+ void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE;
- qint64 readData(char *data, qint64 maxlen);
- qint64 readLineData(char *data, qint64 maxlen);
- qint64 writeData(const char *data, qint64 len);
+ qint64 readData(char *data, qint64 maxlen) Q_DECL_OVERRIDE;
+ qint64 readLineData(char *data, qint64 maxlen) Q_DECL_OVERRIDE;
+ qint64 writeData(const char *data, qint64 len) Q_DECL_OVERRIDE;
private slots:
void sendHandShake();
diff --git a/examples/network/torrent/torrentclient.h b/examples/network/torrent/torrentclient.h
index 7f48d1697c..ef9c99aea1 100644
--- a/examples/network/torrent/torrentclient.h
+++ b/examples/network/torrent/torrentclient.h
@@ -158,7 +158,7 @@ public slots:
void setupIncomingConnection(PeerWireClient *client);
protected slots:
- void timerEvent(QTimerEvent *event);
+ void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE;
private slots:
// File management
diff --git a/examples/network/torrent/torrentserver.h b/examples/network/torrent/torrentserver.h
index 50cc99c7d6..0f1be50c5b 100644
--- a/examples/network/torrent/torrentserver.h
+++ b/examples/network/torrent/torrentserver.h
@@ -58,7 +58,7 @@ public:
void removeClient(TorrentClient *client);
protected:
- void incomingConnection(qintptr socketDescriptor);
+ void incomingConnection(qintptr socketDescriptor) Q_DECL_OVERRIDE;
private slots:
void removeClient();
diff --git a/examples/network/torrent/trackerclient.h b/examples/network/torrent/trackerclient.h
index 6647422e3f..da8b457b0f 100644
--- a/examples/network/torrent/trackerclient.h
+++ b/examples/network/torrent/trackerclient.h
@@ -78,7 +78,7 @@ signals:
void stopped();
protected:
- void timerEvent(QTimerEvent *event);
+ void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE;
private slots:
void fetchPeerList();
diff --git a/examples/opengl/2dpainting/glwidget.h b/examples/opengl/2dpainting/glwidget.h
index 0e6786a308..fec1be12f7 100644
--- a/examples/opengl/2dpainting/glwidget.h
+++ b/examples/opengl/2dpainting/glwidget.h
@@ -57,7 +57,7 @@ public slots:
void animate();
protected:
- void paintEvent(QPaintEvent *event);
+ void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
private:
Helper *helper;
diff --git a/examples/opengl/2dpainting/widget.h b/examples/opengl/2dpainting/widget.h
index 474ce2be3d..9e2602e73c 100644
--- a/examples/opengl/2dpainting/widget.h
+++ b/examples/opengl/2dpainting/widget.h
@@ -57,7 +57,7 @@ public slots:
void animate();
protected:
- void paintEvent(QPaintEvent *event);
+ void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
private:
Helper *helper;
diff --git a/examples/opengl/cube/mainwidget.h b/examples/opengl/cube/mainwidget.h
index 2e6b6bcc77..92b3aabf46 100644
--- a/examples/opengl/cube/mainwidget.h
+++ b/examples/opengl/cube/mainwidget.h
@@ -63,13 +63,13 @@ public:
~MainWidget();
protected:
- void mousePressEvent(QMouseEvent *e);
- void mouseReleaseEvent(QMouseEvent *e);
- void timerEvent(QTimerEvent *e);
+ void mousePressEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
+ void mouseReleaseEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
+ void timerEvent(QTimerEvent *e) Q_DECL_OVERRIDE;
- void initializeGL();
- void resizeGL(int w, int h);
- void paintGL();
+ void initializeGL() Q_DECL_OVERRIDE;
+ void resizeGL(int w, int h) Q_DECL_OVERRIDE;
+ void paintGL() Q_DECL_OVERRIDE;
void initShaders();
void initTextures();
diff --git a/examples/opengl/doc/src/hellogl.qdoc b/examples/opengl/doc/src/hellogl.qdoc
index b4aef0ae02..9740c91408 100644
--- a/examples/opengl/doc/src/hellogl.qdoc
+++ b/examples/opengl/doc/src/hellogl.qdoc
@@ -109,10 +109,24 @@
\snippet hellogl/glwidget.cpp 5
- In the above slot, the \c xRot variable is updated only if the new angle
- is different to the old one, the \c xRotationChanged() signal is emitted to
- allow other components to be updated, and the widget's
- \l{QGLWidget::updateGL()}{updateGL()} handler function is called.
+ In the above slot, the \c xRot variable is updated only if the new angle is
+ different to the old one, the \c xRotationChanged() signal is emitted to
+ allow other components to be updated, and an update is scheduled.
+
+ Note that the widget's \l{QGLWidget::updateGL()}{updateGL()} function is not
+ called directly from here. Triggering rendering and buffer swaps directly
+ from the input event handlers is not desirable. Such events may, depending
+ on the platform, occur at a high frequency, and calling a potentially
+ blocking function like \l{QOpenGLContext::swapBuffers()}{swapBuffers} may
+ lead to unexpected results due to the main thread not being able to process
+ the input events at a proper rate.
+
+ Instead, update() is used. This will eventually lead to a paint event, which
+ will in turn invoke paintGL(). Multiple calls to update() in a row will make
+ no difference while the event is still pending. This way the UI will perform
+ equally well with blocking swaps, that is, a a
+ \l{QGLFormat::swapInterval()}{swap interval} of 1, and non-vsynced
+ configurations.
The \c setYRotation() and \c setZRotation() slots perform the same task for
rotations measured by the \c yRot and \c zRot variables.
diff --git a/examples/opengl/framebufferobject2/glwidget.h b/examples/opengl/framebufferobject2/glwidget.h
index f3f7640d28..2991a4fdf2 100644
--- a/examples/opengl/framebufferobject2/glwidget.h
+++ b/examples/opengl/framebufferobject2/glwidget.h
@@ -45,12 +45,12 @@ class GLWidget : public QGLWidget
public:
GLWidget(QWidget *parent);
~GLWidget();
- void initializeGL();
- void resizeGL(int w, int h);
- void paintGL();
- void timerEvent(QTimerEvent *) { update(); }
- void mousePressEvent(QMouseEvent *) { killTimer(timerId); }
- void mouseReleaseEvent(QMouseEvent *) { timerId = startTimer(20); }
+ void initializeGL() Q_DECL_OVERRIDE;
+ void resizeGL(int w, int h) Q_DECL_OVERRIDE;
+ void paintGL() Q_DECL_OVERRIDE;
+ void timerEvent(QTimerEvent *) Q_DECL_OVERRIDE { update(); }
+ void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE { killTimer(timerId); }
+ void mouseReleaseEvent(QMouseEvent *) Q_DECL_OVERRIDE { timerId = startTimer(20); }
void drawCube(int i, GLfloat z, GLfloat ri, GLfloat jmp, GLfloat amp);
diff --git a/examples/opengl/grabber/glwidget.h b/examples/opengl/grabber/glwidget.h
index 976d22a421..12071be173 100644
--- a/examples/opengl/grabber/glwidget.h
+++ b/examples/opengl/grabber/glwidget.h
@@ -66,11 +66,11 @@ signals:
void zRotationChanged(int angle);
protected:
- void initializeGL();
- void paintGL();
- void resizeGL(int width, int height);
- void mousePressEvent(QMouseEvent *event);
- void mouseMoveEvent(QMouseEvent *event);
+ void initializeGL() Q_DECL_OVERRIDE;
+ void paintGL() Q_DECL_OVERRIDE;
+ void resizeGL(int width, int height) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
private slots:
void advanceGears();
diff --git a/examples/opengl/hellogl/glwidget.cpp b/examples/opengl/hellogl/glwidget.cpp
index 29879fa804..3a9faaca5f 100644
--- a/examples/opengl/hellogl/glwidget.cpp
+++ b/examples/opengl/hellogl/glwidget.cpp
@@ -100,7 +100,7 @@ void GLWidget::setXRotation(int angle)
if (angle != xRot) {
xRot = angle;
emit xRotationChanged(angle);
- updateGL();
+ update();
}
}
//! [5]
@@ -111,7 +111,7 @@ void GLWidget::setYRotation(int angle)
if (angle != yRot) {
yRot = angle;
emit yRotationChanged(angle);
- updateGL();
+ update();
}
}
@@ -121,7 +121,7 @@ void GLWidget::setZRotation(int angle)
if (angle != zRot) {
zRot = angle;
emit zRotationChanged(angle);
- updateGL();
+ update();
}
}
diff --git a/examples/opengl/hellogl/glwidget.h b/examples/opengl/hellogl/glwidget.h
index 3344e931e7..0989be1dc6 100644
--- a/examples/opengl/hellogl/glwidget.h
+++ b/examples/opengl/hellogl/glwidget.h
@@ -54,8 +54,8 @@ public:
GLWidget(QWidget *parent = 0);
~GLWidget();
- QSize minimumSizeHint() const;
- QSize sizeHint() const;
+ QSize minimumSizeHint() const Q_DECL_OVERRIDE;
+ QSize sizeHint() const Q_DECL_OVERRIDE;
//! [0]
//! [1]
@@ -72,11 +72,11 @@ signals:
//! [2]
protected:
- void initializeGL();
- void paintGL();
- void resizeGL(int width, int height);
- void mousePressEvent(QMouseEvent *event);
- void mouseMoveEvent(QMouseEvent *event);
+ void initializeGL() Q_DECL_OVERRIDE;
+ void paintGL() Q_DECL_OVERRIDE;
+ void resizeGL(int width, int height) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
//! [2]
//! [3]
diff --git a/examples/opengl/hellogl/window.h b/examples/opengl/hellogl/window.h
index 68862fbcfe..900e6b13fc 100644
--- a/examples/opengl/hellogl/window.h
+++ b/examples/opengl/hellogl/window.h
@@ -57,7 +57,7 @@ public:
Window();
protected:
- void keyPressEvent(QKeyEvent *event);
+ void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
private:
QSlider *createSlider();
diff --git a/examples/opengl/hellogl_es2/hellogl_es2.pro b/examples/opengl/hellogl_es2/hellogl_es2.pro
deleted file mode 100644
index b15e8d1909..0000000000
--- a/examples/opengl/hellogl_es2/hellogl_es2.pro
+++ /dev/null
@@ -1,23 +0,0 @@
-QT += opengl widgets
-
-SOURCES += main.cpp
-SOURCES += glwidget.cpp
-SOURCES += mainwindow.cpp
-SOURCES += bubble.cpp
-
-HEADERS += glwidget.h
-HEADERS += mainwindow.h
-HEADERS += bubble.h
-
-RESOURCES += texture.qrc
-
-# install
-target.path = $$[QT_INSTALL_EXAMPLES]/opengl/hellogl_es2
-INSTALLS += target
-
-maemo5 {
- # Debian package name may not contain numbers or special characters
- # such as '_', lets change this in Maemo.
- TARGET = helloglestwo
- CONFIG += qt_example
-}
diff --git a/examples/opengl/hellogl_es2/mainwindow.cpp b/examples/opengl/hellogl_es2/mainwindow.cpp
deleted file mode 100644
index eb4ce0ac3e..0000000000
--- a/examples/opengl/hellogl_es2/mainwindow.cpp
+++ /dev/null
@@ -1,107 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 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 "mainwindow.h"
-
-#include <QApplication>
-#include <QMenuBar>
-#include <QGroupBox>
-#include <QGridLayout>
-#include <QSlider>
-#include <QLabel>
-#include <QTimer>
-
-#include "glwidget.h"
-
-MainWindow::MainWindow()
-{
- GLWidget *glwidget = new GLWidget();
- QLabel *label = new QLabel(this);
- QTimer *timer = new QTimer(this);
- QSlider *slider = new QSlider(this);
- slider->setOrientation(Qt::Horizontal);
-
- slider->setRange(0, 100);
- slider->setSliderPosition(50);
- timer->setInterval(10);
- label->setText("A QGlWidget with OpenGl ES");
- label->setAlignment(Qt::AlignHCenter);
-
- QGroupBox * groupBox = new QGroupBox(this);
- setCentralWidget(groupBox);
- groupBox->setTitle("OpenGL ES Example");
-
- QGridLayout *layout = new QGridLayout(groupBox);
-
- layout->addWidget(glwidget,1,0,8,1);
- layout->addWidget(label,9,0,1,1);
- layout->addWidget(slider, 11,0,1,1);
-
- groupBox->setLayout(layout);
-
- QMenu *fileMenu = new QMenu("File");
- QMenu *helpMenu = new QMenu("Help");
- QMenu *showMenu = new QMenu("Show");
- menuBar()->addMenu(fileMenu);
- menuBar()->addMenu(showMenu);
- menuBar()->addMenu(helpMenu);
- QAction *exit = new QAction("Exit", fileMenu);
- QAction *aboutQt = new QAction("AboutQt", helpMenu);
- QAction *showLogo = new QAction("Show 3D Logo", showMenu);
- QAction *showTexture = new QAction("Show 2D Texture", showMenu);
- QAction *showBubbles = new QAction("Show bubbles", showMenu);
- showBubbles->setCheckable(true);
- showBubbles->setChecked(true);
- fileMenu->addAction(exit);
- helpMenu->addAction(aboutQt);
- showMenu->addAction(showLogo);
- showMenu->addAction(showTexture);
- showMenu->addAction(showBubbles);
-
- QObject::connect(timer, SIGNAL(timeout()), glwidget, SLOT(updateGL()));
- QObject::connect(exit, SIGNAL(triggered(bool)), this, SLOT(close()));
- QObject::connect(aboutQt, SIGNAL(triggered(bool)), qApp, SLOT(aboutQt()));
-
- QObject::connect(showLogo, SIGNAL(triggered(bool)), glwidget, SLOT(setLogo()));
- QObject::connect(showTexture, SIGNAL(triggered(bool)), glwidget, SLOT(setTexture()));
- QObject::connect(showBubbles, SIGNAL(triggered(bool)), glwidget, SLOT(showBubbles(bool)));
- QObject::connect(slider, SIGNAL(valueChanged(int)), glwidget, SLOT(setScaling(int)));
- timer->start();
-}
diff --git a/examples/opengl/hellowindow/hellowindow.cpp b/examples/opengl/hellowindow/hellowindow.cpp
index 3b5971c0d3..b4dc4464ba 100644
--- a/examples/opengl/hellowindow/hellowindow.cpp
+++ b/examples/opengl/hellowindow/hellowindow.cpp
@@ -182,7 +182,7 @@ void Renderer::paintQtLogo()
m_program->enableAttributeArray(vertexAttr);
m_program->setAttributeArray(vertexAttr, vertices.constData());
m_program->setAttributeArray(normalAttr, normals.constData());
- glDrawArrays(GL_TRIANGLES, 0, vertices.size());
+ m_context->functions()->glDrawArrays(GL_TRIANGLES, 0, vertices.size());
m_program->disableAttributeArray(normalAttr);
m_program->disableAttributeArray(vertexAttr);
}
diff --git a/examples/opengl/hellowindow/hellowindow.h b/examples/opengl/hellowindow/hellowindow.h
index 6d66f0204a..9fb7d109b9 100644
--- a/examples/opengl/hellowindow/hellowindow.h
+++ b/examples/opengl/hellowindow/hellowindow.h
@@ -98,10 +98,10 @@ public:
QColor color() const;
void updateColor();
- void exposeEvent(QExposeEvent *event);
+ void exposeEvent(QExposeEvent *event) Q_DECL_OVERRIDE;
private:
- void mousePressEvent(QMouseEvent *);
+ void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE;
int m_colorIndex;
QColor m_color;
diff --git a/examples/opengl/opengl.pro b/examples/opengl/opengl.pro
index 7bc96234df..fb5f02c07c 100644
--- a/examples/opengl/opengl.pro
+++ b/examples/opengl/opengl.pro
@@ -2,9 +2,12 @@ requires(qtHaveModule(opengl))
TEMPLATE = subdirs
-contains(QT_CONFIG, opengles2) {
- SUBDIRS = hellogl_es2
-} else {
+contains(QT_CONFIG, dynamicgl) {
+ SUBDIRS = hellowindow \
+ contextinfo \
+ qopenglwidget \
+ threadedqopenglwidget
+} else: !contains(QT_CONFIG, opengles2) {
SUBDIRS = 2dpainting \
grabber \
hellogl \
@@ -14,10 +17,12 @@ contains(QT_CONFIG, opengles2) {
samplebuffers
}
-SUBDIRS += hellowindow \
+!contains(QT_CONFIG, dynamicgl): SUBDIRS += hellowindow \
paintedwindow \
contextinfo \
cube \
- textures
+ textures \
+ qopenglwidget \
+ threadedqopenglwidget
EXAMPLE_FILES = shared
diff --git a/examples/opengl/overpainting/glwidget.h b/examples/opengl/overpainting/glwidget.h
index cd3a125b38..1d1d48458d 100644
--- a/examples/opengl/overpainting/glwidget.h
+++ b/examples/opengl/overpainting/glwidget.h
@@ -57,7 +57,7 @@ public:
~GLWidget();
//! [0]
- QSize sizeHint() const;
+ QSize sizeHint() const Q_DECL_OVERRIDE;
int xRotation() const { return xRot; }
int yRotation() const { return yRot; }
int zRotation() const { return zRot; }
@@ -69,12 +69,12 @@ public slots:
//! [1]
protected:
- void initializeGL();
- void paintEvent(QPaintEvent *event);
- void resizeGL(int width, int height);
- void mousePressEvent(QMouseEvent *event);
- void mouseMoveEvent(QMouseEvent *event);
- void showEvent(QShowEvent *event);
+ void initializeGL() Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
+ void resizeGL(int width, int height) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void showEvent(QShowEvent *event) Q_DECL_OVERRIDE;
private slots:
void animate();
diff --git a/examples/opengl/paintedwindow/paintedwindow.h b/examples/opengl/paintedwindow/paintedwindow.h
index f185cd3733..140af6db4d 100644
--- a/examples/opengl/paintedwindow/paintedwindow.h
+++ b/examples/opengl/paintedwindow/paintedwindow.h
@@ -74,8 +74,8 @@ private slots:
void rotationDone();
private:
- void exposeEvent(QExposeEvent *);
- void mousePressEvent(QMouseEvent *);
+ void exposeEvent(QExposeEvent *) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE;
void paint(QPainter *painter, const QRect &rect);
diff --git a/examples/opengl/pbuffers/glwidget.h b/examples/opengl/pbuffers/glwidget.h
index c4d71c0b76..1d23b7772a 100644
--- a/examples/opengl/pbuffers/glwidget.h
+++ b/examples/opengl/pbuffers/glwidget.h
@@ -57,11 +57,11 @@ public:
~GLWidget();
protected:
- void initializeGL();
- void paintGL();
- void resizeGL(int width, int height);
- void mousePressEvent(QMouseEvent *) { setAnimationPaused(true); }
- void mouseReleaseEvent(QMouseEvent *) { setAnimationPaused(false); }
+ void initializeGL() Q_DECL_OVERRIDE;
+ void paintGL() Q_DECL_OVERRIDE;
+ void resizeGL(int width, int height) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE { setAnimationPaused(true); }
+ void mouseReleaseEvent(QMouseEvent *) Q_DECL_OVERRIDE { setAnimationPaused(false); }
private:
void initializeGeometry();
diff --git a/examples/opengl/hellogl_es2/bubble.cpp b/examples/opengl/qopenglwidget/bubble.cpp
index 3e0f053bc8..bf04c64966 100644
--- a/examples/opengl/hellogl_es2/bubble.cpp
+++ b/examples/opengl/qopenglwidget/bubble.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 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.
diff --git a/examples/opengl/hellogl_es2/bubble.h b/examples/opengl/qopenglwidget/bubble.h
index 60195b4415..ea33466ef7 100644
--- a/examples/opengl/hellogl_es2/bubble.h
+++ b/examples/opengl/qopenglwidget/bubble.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 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.
diff --git a/examples/opengl/hellogl_es2/glwidget.cpp b/examples/opengl/qopenglwidget/glwidget.cpp
index 7267cfd124..e95ca363fc 100644
--- a/examples/opengl/hellogl_es2/glwidget.cpp
+++ b/examples/opengl/qopenglwidget/glwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 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.
@@ -43,19 +43,25 @@
#include <QPaintEngine>
#include <math.h>
+#include "mainwindow.h"
#include "bubble.h"
-
const int bubbleNum = 8;
-GLWidget::GLWidget(QWidget *parent)
- : QGLWidget(parent)
+GLWidget::GLWidget(MainWindow *mw, bool button, const QColor &background)
+ : m_mainWindow(mw),
+ m_transparent(false),
+ m_btn(0),
+ m_hasButton(button),
+ m_background(background)
{
+ QSurfaceFormat format;
+ format.setDepthBufferSize(24);
+ format.setStencilBufferSize(8);
+ setFormat(format);
+
qtLogo = true;
frames = 0;
- setAttribute(Qt::WA_PaintOnScreen);
- setAttribute(Qt::WA_NoSystemBackground);
- setAutoBufferSwap(false);
m_showBubbles = true;
setMinimumSize(300, 250);
}
@@ -66,10 +72,10 @@ GLWidget::~GLWidget()
void GLWidget::setScaling(int scale) {
- if (scale > 50)
- m_fScale = 1 + qreal(scale -50) / 50 * 0.5;
- else if (scale < 50)
- m_fScale = 1- (qreal(50 - scale) / 50 * 1/2);
+ if (scale > 30)
+ m_fScale = 1 + qreal(scale - 30) / 30 * 0.25;
+ else if (scale < 30)
+ m_fScale = 1 - (qreal(30 - scale) / 30 * 0.25);
else
m_fScale = 1;
}
@@ -171,12 +177,16 @@ void GLWidget::paintTexturedCube()
void GLWidget::initializeGL ()
{
- glClearColor(0.1f, 0.1f, 0.2f, 1.0f);
+ initializeOpenGLFunctions();
glGenTextures(1, &m_uiTexture);
- m_uiTexture = bindTexture(QImage(":/qt.png"));
+ QImage img = QImage(":/qt.png").convertToFormat(QImage::Format_RGBA8888);
+ glBindTexture(GL_TEXTURE_2D, m_uiTexture);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, img.width(), img.height(), 0, GL_RGBA, GL_UNSIGNED_BYTE, img.constBits());
- QGLShader *vshader1 = new QGLShader(QGLShader::Vertex, this);
+ QOpenGLShader *vshader1 = new QOpenGLShader(QOpenGLShader::Vertex, this);
const char *vsrc1 =
"attribute highp vec4 vertex;\n"
"attribute mediump vec3 normal;\n"
@@ -193,7 +203,7 @@ void GLWidget::initializeGL ()
"}\n";
vshader1->compileSourceCode(vsrc1);
- QGLShader *fshader1 = new QGLShader(QGLShader::Fragment, this);
+ QOpenGLShader *fshader1 = new QOpenGLShader(QOpenGLShader::Fragment, this);
const char *fsrc1 =
"varying mediump vec4 color;\n"
"void main(void)\n"
@@ -210,7 +220,7 @@ void GLWidget::initializeGL ()
normalAttr1 = program1.attributeLocation("normal");
matrixUniform1 = program1.uniformLocation("matrix");
- QGLShader *vshader2 = new QGLShader(QGLShader::Vertex);
+ QOpenGLShader *vshader2 = new QOpenGLShader(QOpenGLShader::Vertex);
const char *vsrc2 =
"attribute highp vec4 vertex;\n"
"attribute highp vec4 texCoord;\n"
@@ -227,7 +237,7 @@ void GLWidget::initializeGL ()
"}\n";
vshader2->compileSourceCode(vsrc2);
- QGLShader *fshader2 = new QGLShader(QGLShader::Fragment);
+ QOpenGLShader *fshader2 = new QOpenGLShader(QOpenGLShader::Fragment);
const char *fsrc2 =
"varying highp vec4 texc;\n"
"uniform sampler2D tex;\n"
@@ -250,9 +260,6 @@ void GLWidget::initializeGL ()
matrixUniform2 = program2.uniformLocation("matrix");
textureUniform2 = program2.uniformLocation("tex");
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
-
m_fAngle = 0;
m_fScale = 1;
createGeometry();
@@ -268,12 +275,10 @@ void GLWidget::paintGL()
painter.beginNativePainting();
- glClearColor(0.1f, 0.1f, 0.2f, 1.0f);
+ glClearColor(m_background.red() / 255.0f, m_background.green() / 255.0f,
+ m_background.blue() / 255.0f, m_transparent ? 0.0f : 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
-
glFrontFace(GL_CW);
glCullFace(GL_FRONT);
glEnable(GL_CULL_FACE);
@@ -311,14 +316,12 @@ void GLWidget::paintGL()
if (const int elapsed = time.elapsed()) {
QString framesPerSecond;
framesPerSecond.setNum(frames /(elapsed / 1000.0), 'f', 2);
- painter.setPen(Qt::white);
- painter.drawText(20, 40, framesPerSecond + " fps");
+ painter.setPen(m_transparent ? Qt::black : Qt::white);
+ painter.drawText(20, 40, framesPerSecond + " paintGL calls / s");
}
painter.end();
- swapBuffers();
-
QMutableListIterator<Bubble*> iter(bubbles);
while (iter.hasNext()) {
@@ -459,3 +462,28 @@ void GLWidget::extrude(qreal x1, qreal y1, qreal x2, qreal y2)
normals << n;
normals << n;
}
+
+void GLWidget::setTransparent(bool transparent)
+{
+ setAttribute(Qt::WA_AlwaysStackOnTop, transparent);
+ m_transparent = transparent;
+ // Call update() on the top-level window after toggling AlwayStackOnTop to make sure
+ // the entire backingstore is updated accordingly.
+ window()->update();
+}
+
+void GLWidget::resizeGL(int w, int h)
+{
+ if (m_hasButton) {
+ if (!m_btn) {
+ m_btn = new QPushButton("A widget on top.\nPress me!", this);
+ connect(m_btn, &QPushButton::clicked, this, &GLWidget::handleButtonPress);
+ }
+ m_btn->move(w / 2, h / 2);
+ }
+}
+
+void GLWidget::handleButtonPress()
+{
+ m_mainWindow->addNew();
+}
diff --git a/examples/opengl/hellogl_es2/glwidget.h b/examples/opengl/qopenglwidget/glwidget.h
index 8ed86b1e01..6c43ac1576 100644
--- a/examples/opengl/hellogl_es2/glwidget.h
+++ b/examples/opengl/qopenglwidget/glwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 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.
@@ -41,32 +41,45 @@
#ifndef GLWIDGET_H
#define GLWIDGET_H
-#include <QGLWidget>
-#include <QtGui/qvector3d.h>
-#include <QtGui/qmatrix4x4.h>
-#include <QtOpenGL/qglshaderprogram.h>
+#include <QOpenGLWidget>
+#include <QOpenGLFunctions>
+#include <QOpenGLShaderProgram>
+#include <QVector3D>
+#include <QMatrix4x4>
#include <QTime>
#include <QVector>
+#include <QPushButton>
class Bubble;
-class GLWidget : public QGLWidget {
+class MainWindow;
+class GLWidget : public QOpenGLWidget, protected QOpenGLFunctions
+{
Q_OBJECT
public:
- GLWidget(QWidget *parent = 0);
+ GLWidget(MainWindow *mw, bool button, const QColor &background);
~GLWidget();
+
public slots:
void setScaling(int scale);
void setLogo();
void setTexture();
void showBubbles(bool);
+ void setTransparent(bool transparent);
+
+private slots:
+ void handleButtonPress();
+
protected:
- void paintGL ();
- void initializeGL ();
+ void resizeGL(int w, int h) Q_DECL_OVERRIDE;
+ void paintGL() Q_DECL_OVERRIDE;
+ void initializeGL() Q_DECL_OVERRIDE;
+
private:
- GLuint m_uiTexture;
- qreal m_fAngle;
- qreal m_fScale;
+ MainWindow *m_mainWindow;
+ GLuint m_uiTexture;
+ qreal m_fAngle;
+ qreal m_fScale;
bool m_showBubbles;
void paintTexturedCube();
void paintQtLogo();
@@ -80,8 +93,8 @@ private:
QList<Bubble*> bubbles;
int frames;
QTime time;
- QGLShaderProgram program1;
- QGLShaderProgram program2;
+ QOpenGLShaderProgram program1;
+ QOpenGLShaderProgram program2;
int vertexAttr1;
int normalAttr1;
int matrixUniform1;
@@ -90,5 +103,10 @@ private:
int texCoordAttr2;
int matrixUniform2;
int textureUniform2;
+ bool m_transparent;
+ QPushButton *m_btn;
+ bool m_hasButton;
+ QColor m_background;
};
+
#endif
diff --git a/examples/opengl/hellogl_es2/main.cpp b/examples/opengl/qopenglwidget/main.cpp
index 5fb3385989..2156e60155 100644
--- a/examples/opengl/hellogl_es2/main.cpp
+++ b/examples/opengl/qopenglwidget/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 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.
diff --git a/examples/opengl/qopenglwidget/mainwindow.cpp b/examples/opengl/qopenglwidget/mainwindow.cpp
new file mode 100644
index 0000000000..f09acacaf0
--- /dev/null
+++ b/examples/opengl/qopenglwidget/mainwindow.cpp
@@ -0,0 +1,152 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 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 "mainwindow.h"
+
+#include <QApplication>
+#include <QMenuBar>
+#include <QGroupBox>
+#include <QSlider>
+#include <QLabel>
+#include <QCheckBox>
+#include <QSpinBox>
+
+#include "glwidget.h"
+
+MainWindow::MainWindow()
+ : m_nextX(1), m_nextY(1)
+{
+ GLWidget *glwidget = new GLWidget(this, true, qRgb(20, 20, 50));
+ QLabel *label = new QLabel(this);
+ m_timer = new QTimer(this);
+ QSlider *slider = new QSlider(this);
+ slider->setOrientation(Qt::Horizontal);
+
+ QLabel *updateLabel = new QLabel("Update interval");
+ QSpinBox *updateInterval = new QSpinBox(this);
+ updateInterval->setSuffix(" ms");
+ updateInterval->setValue(10);
+ updateInterval->setToolTip("Interval for the timer that calls update().\n"
+ "Note that on most systems the swap will block to wait for vsync\n"
+ "and therefore an interval < 16 ms will likely lead to a 60 FPS update rate.");
+ QGroupBox *updateGroupBox = new QGroupBox(this);
+ QCheckBox *transparent = new QCheckBox("Transparent background", this);
+ transparent->setToolTip("Toggles Qt::WA_AlwaysStackOnTop and transparent clear color for glClear().\n"
+ "Note how the button on top stacks incorrectly when enabling this.");
+ QHBoxLayout *updateLayout = new QHBoxLayout;
+ updateLayout->addWidget(updateLabel);
+ updateLayout->addWidget(updateInterval);
+ updateLayout->addWidget(transparent);
+ updateGroupBox->setLayout(updateLayout);
+
+ slider->setRange(0, 50);
+ slider->setSliderPosition(30);
+ m_timer->setInterval(10);
+ label->setText("A QOpenGLWidget");
+ label->setAlignment(Qt::AlignHCenter);
+
+ QGroupBox * groupBox = new QGroupBox(this);
+ setCentralWidget(groupBox);
+ groupBox->setTitle("QOpenGLWidget Example");
+
+ m_layout = new QGridLayout(groupBox);
+
+ m_layout->addWidget(glwidget,1,0,8,1);
+ m_layout->addWidget(label,9,0,1,1);
+ m_layout->addWidget(updateGroupBox, 10, 0, 1, 1);
+ m_layout->addWidget(slider, 11,0,1,1);
+
+ groupBox->setLayout(m_layout);
+
+ QMenu *fileMenu = new QMenu("&File");
+ QMenu *helpMenu = new QMenu("&Help");
+ QMenu *showMenu = new QMenu("&Show");
+ menuBar()->addMenu(fileMenu);
+ menuBar()->addMenu(showMenu);
+ menuBar()->addMenu(helpMenu);
+ QAction *exit = new QAction("E&xit", fileMenu);
+ QAction *aboutQt = new QAction("About Qt", helpMenu);
+ QAction *showLogo = new QAction("Show 3D Logo", showMenu);
+ QAction *showTexture = new QAction("Show 2D Texture", showMenu);
+ QAction *showBubbles = new QAction("Show bubbles", showMenu);
+ showBubbles->setCheckable(true);
+ showBubbles->setChecked(true);
+ fileMenu->addAction(exit);
+ helpMenu->addAction(aboutQt);
+ showMenu->addAction(showLogo);
+ showMenu->addAction(showTexture);
+ showMenu->addAction(showBubbles);
+
+ connect(exit, SIGNAL(triggered(bool)), this, SLOT(close()));
+ connect(aboutQt, SIGNAL(triggered(bool)), qApp, SLOT(aboutQt()));
+
+ connect(m_timer, SIGNAL(timeout()), glwidget, SLOT(update()));
+
+ connect(showLogo, SIGNAL(triggered(bool)), glwidget, SLOT(setLogo()));
+ connect(showTexture, SIGNAL(triggered(bool)), glwidget, SLOT(setTexture()));
+ connect(showBubbles, SIGNAL(triggered(bool)), glwidget, SLOT(showBubbles(bool)));
+ connect(slider, SIGNAL(valueChanged(int)), glwidget, SLOT(setScaling(int)));
+ connect(transparent, &QCheckBox::toggled, glwidget, &GLWidget::setTransparent);
+
+ connect(updateInterval, SIGNAL(valueChanged(int)), this, SLOT(updateIntervalChanged(int)));
+
+ m_timer->start();
+}
+
+void MainWindow::updateIntervalChanged(int value)
+{
+ m_timer->setInterval(value);
+ m_timer->start();
+}
+
+void MainWindow::addNew()
+{
+ if (m_nextY == 4)
+ return;
+ GLWidget *w = new GLWidget(this, false, qRgb(qrand() % 256, qrand() % 256, qrand() % 256));
+ connect(m_timer, SIGNAL(timeout()), w, SLOT(update()));
+ m_layout->addWidget(w, m_nextY, m_nextX, 1, 1);
+ if (m_nextX == 3) {
+ m_nextX = 1;
+ ++m_nextY;
+ } else {
+ ++m_nextX;
+ }
+}
diff --git a/examples/opengl/qopenglwidget/mainwindow.h b/examples/opengl/qopenglwidget/mainwindow.h
new file mode 100644
index 0000000000..9db3e8cbec
--- /dev/null
+++ b/examples/opengl/qopenglwidget/mainwindow.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 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>
+#include <QTimer>
+#include <QGridLayout>
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+ void addNew();
+
+private slots:
+ void updateIntervalChanged(int value);
+
+private:
+ QTimer *m_timer;
+ QGridLayout *m_layout;
+ int m_nextX;
+ int m_nextY;
+};
+
+#endif
diff --git a/examples/opengl/qopenglwidget/qopenglwidget.pro b/examples/opengl/qopenglwidget/qopenglwidget.pro
new file mode 100644
index 0000000000..0165285c02
--- /dev/null
+++ b/examples/opengl/qopenglwidget/qopenglwidget.pro
@@ -0,0 +1,15 @@
+QT += widgets
+
+SOURCES += main.cpp \
+ glwidget.cpp \
+ mainwindow.cpp \
+ bubble.cpp
+
+HEADERS += glwidget.h \
+ mainwindow.h \
+ bubble.h
+
+RESOURCES += texture.qrc
+
+target.path = $$[QT_INSTALL_EXAMPLES]/opengl/qopenglwidget
+INSTALLS += target
diff --git a/examples/opengl/hellogl_es2/qt.png b/examples/opengl/qopenglwidget/qt.png
index 79e383cf50..79e383cf50 100644
--- a/examples/opengl/hellogl_es2/qt.png
+++ b/examples/opengl/qopenglwidget/qt.png
Binary files differ
diff --git a/examples/opengl/hellogl_es2/texture.qrc b/examples/opengl/qopenglwidget/texture.qrc
index ff1d0e535f..ff1d0e535f 100644
--- a/examples/opengl/hellogl_es2/texture.qrc
+++ b/examples/opengl/qopenglwidget/texture.qrc
diff --git a/examples/opengl/samplebuffers/glwidget.h b/examples/opengl/samplebuffers/glwidget.h
index 0e20b4dd4d..494c5861df 100644
--- a/examples/opengl/samplebuffers/glwidget.h
+++ b/examples/opengl/samplebuffers/glwidget.h
@@ -46,10 +46,10 @@ public:
GLWidget(QWidget *parent);
protected:
- void initializeGL();
- void resizeGL(int w, int h);
- void paintGL();
- void timerEvent(QTimerEvent *);
+ void initializeGL() Q_DECL_OVERRIDE;
+ void resizeGL(int w, int h) Q_DECL_OVERRIDE;
+ void paintGL() Q_DECL_OVERRIDE;
+ void timerEvent(QTimerEvent *) Q_DECL_OVERRIDE;
void makeObject();
void quad(GLenum primitive, GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2,
diff --git a/examples/opengl/textures/glwidget.h b/examples/opengl/textures/glwidget.h
index b210b0fd8f..959dfdd5e7 100644
--- a/examples/opengl/textures/glwidget.h
+++ b/examples/opengl/textures/glwidget.h
@@ -55,8 +55,8 @@ public:
explicit GLWidget(QWidget *parent = 0, QGLWidget *shareWidget = 0);
~GLWidget();
- QSize minimumSizeHint() const;
- QSize sizeHint() const;
+ QSize minimumSizeHint() const Q_DECL_OVERRIDE;
+ QSize sizeHint() const Q_DECL_OVERRIDE;
void rotateBy(int xAngle, int yAngle, int zAngle);
void setClearColor(const QColor &color);
@@ -64,12 +64,12 @@ signals:
void clicked();
protected:
- void initializeGL();
- void paintGL();
- void resizeGL(int width, int height);
- void mousePressEvent(QMouseEvent *event);
- void mouseMoveEvent(QMouseEvent *event);
- void mouseReleaseEvent(QMouseEvent *event);
+ void initializeGL() Q_DECL_OVERRIDE;
+ void paintGL() Q_DECL_OVERRIDE;
+ void resizeGL(int width, int height) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
private:
void makeObject();
diff --git a/examples/opengl/threadedqopenglwidget/glwidget.cpp b/examples/opengl/threadedqopenglwidget/glwidget.cpp
new file mode 100644
index 0000000000..34d97bf1bf
--- /dev/null
+++ b/examples/opengl/threadedqopenglwidget/glwidget.cpp
@@ -0,0 +1,356 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 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 "glwidget.h"
+#include <math.h>
+#include <QGuiApplication>
+
+const int bubbleNum = 8;
+
+GLWidget::GLWidget(QWidget *parent)
+ : QOpenGLWidget(parent)
+{
+ QSurfaceFormat format;
+ format.setDepthBufferSize(16);
+ setFormat(format);
+
+ setMinimumSize(300, 250);
+
+ connect(this, &QOpenGLWidget::aboutToCompose, this, &GLWidget::onAboutToCompose);
+ connect(this, &QOpenGLWidget::frameSwapped, this, &GLWidget::onFrameSwapped);
+ connect(this, &QOpenGLWidget::aboutToResize, this, &GLWidget::onAboutToResize);
+ connect(this, &QOpenGLWidget::resized, this, &GLWidget::onResized);
+
+ m_thread = new QThread;
+ m_renderer = new Renderer(this);
+ m_renderer->moveToThread(m_thread);
+ connect(m_thread, &QThread::finished, m_renderer, &QObject::deleteLater);
+
+ connect(this, &GLWidget::renderRequested, m_renderer, &Renderer::render);
+ connect(m_renderer, &Renderer::contextWanted, this, &GLWidget::grabContext);
+
+ m_thread->start();
+}
+
+GLWidget::~GLWidget()
+{
+ m_renderer->prepareExit();
+ m_thread->quit();
+ m_thread->wait();
+ delete m_thread;
+}
+
+void GLWidget::onAboutToCompose()
+{
+ // We are on the gui thread here. Composition is about to
+ // begin. Wait until the render thread finishes.
+ m_renderer->lockRenderer();
+}
+
+void GLWidget::onFrameSwapped()
+{
+ m_renderer->unlockRenderer();
+ // Assuming a blocking swap, our animation is driven purely by the
+ // vsync in this example.
+ emit renderRequested();
+}
+
+void GLWidget::onAboutToResize()
+{
+ m_renderer->lockRenderer();
+}
+
+void GLWidget::onResized()
+{
+ m_renderer->unlockRenderer();
+}
+
+void GLWidget::grabContext()
+{
+ m_renderer->lockRenderer();
+ QMutexLocker lock(m_renderer->grabMutex());
+ context()->moveToThread(m_thread);
+ m_renderer->grabCond()->wakeAll();
+ m_renderer->unlockRenderer();
+}
+
+Renderer::Renderer(GLWidget *w)
+ : m_inited(false),
+ m_glwidget(w),
+ m_exiting(false)
+{
+}
+
+void Renderer::paintQtLogo()
+{
+ program.enableAttributeArray(normalAttr);
+ program.enableAttributeArray(vertexAttr);
+ program.setAttributeArray(vertexAttr, vertices.constData());
+ program.setAttributeArray(normalAttr, normals.constData());
+ glDrawArrays(GL_TRIANGLES, 0, vertices.size());
+ program.disableAttributeArray(normalAttr);
+ program.disableAttributeArray(vertexAttr);
+}
+
+// Some OpenGL implementations have serious issues with compiling and linking
+// shaders on multiple threads concurrently. Avoid this.
+Q_GLOBAL_STATIC(QMutex, initMutex)
+
+void Renderer::render()
+{
+ if (m_exiting)
+ return;
+
+ QOpenGLContext *ctx = m_glwidget->context();
+ if (!ctx) // QOpenGLWidget not yet initialized
+ return;
+
+ // Grab the context.
+ m_grabMutex.lock();
+ emit contextWanted();
+ m_grabCond.wait(&m_grabMutex);
+ QMutexLocker lock(&m_renderMutex);
+ m_grabMutex.unlock();
+
+ if (m_exiting)
+ return;
+
+ Q_ASSERT(ctx->thread() == QThread::currentThread());
+
+ // Make the context (and an offscreen surface) current for this thread. The
+ // QOpenGLWidget's fbo is bound in the context.
+ m_glwidget->makeCurrent();
+
+ if (!m_inited) {
+ m_inited = true;
+ initializeOpenGLFunctions();
+
+ QMutexLocker initLock(initMutex());
+ 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"
+ "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 = vec3(0.40, 1.0, 0.0);\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);
+
+ 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);
+
+ program.addShader(vshader);
+ program.addShader(fshader);
+ program.link();
+
+ vertexAttr = program.attributeLocation("vertex");
+ normalAttr = program.attributeLocation("normal");
+ matrixUniform = program.uniformLocation("matrix");
+
+ m_fAngle = 0;
+ m_fScale = 1;
+ createGeometry();
+
+ m_elapsed.start();
+ }
+
+ //qDebug("%p elapsed %lld", QThread::currentThread(), m_elapsed.restart());
+
+ glClearColor(0.1f, 0.2f, 0.2f, 1.0f);
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+ glFrontFace(GL_CW);
+ glCullFace(GL_FRONT);
+ glEnable(GL_CULL_FACE);
+ glEnable(GL_DEPTH_TEST);
+
+ QMatrix4x4 modelview;
+ modelview.rotate(m_fAngle, 0.0f, 1.0f, 0.0f);
+ modelview.rotate(m_fAngle, 1.0f, 0.0f, 0.0f);
+ modelview.rotate(m_fAngle, 0.0f, 0.0f, 1.0f);
+ modelview.scale(m_fScale);
+ modelview.translate(0.0f, -0.2f, 0.0f);
+
+ program.bind();
+ program.setUniformValue(matrixUniform, modelview);
+ paintQtLogo();
+ program.release();
+
+ glDisable(GL_DEPTH_TEST);
+ glDisable(GL_CULL_FACE);
+
+ m_fAngle += 1.0f;
+
+ // Make no context current on this thread and move the QOpenGLWidget's
+ // context back to the gui thread.
+ m_glwidget->doneCurrent();
+ ctx->moveToThread(qGuiApp->thread());
+
+ // Schedule composition. Note that this will use QueuedConnection, meaning
+ // that update() will be invoked on the gui thread.
+ QMetaObject::invokeMethod(m_glwidget, "update");
+}
+
+void Renderer::createGeometry()
+{
+ vertices.clear();
+ normals.clear();
+
+ qreal x1 = +0.06f;
+ qreal y1 = -0.14f;
+ qreal x2 = +0.14f;
+ qreal y2 = -0.06f;
+ qreal x3 = +0.08f;
+ qreal y3 = +0.00f;
+ qreal x4 = +0.30f;
+ qreal y4 = +0.22f;
+
+ quad(x1, y1, x2, y2, y2, x2, y1, x1);
+ quad(x3, y3, x4, y4, y4, x4, y3, x3);
+
+ extrude(x1, y1, x2, y2);
+ extrude(x2, y2, y2, x2);
+ extrude(y2, x2, y1, x1);
+ extrude(y1, x1, x1, y1);
+ extrude(x3, y3, x4, y4);
+ extrude(x4, y4, y4, x4);
+ extrude(y4, x4, y3, x3);
+
+ const qreal Pi = 3.14159f;
+ const int NumSectors = 100;
+
+ for (int i = 0; i < NumSectors; ++i) {
+ qreal angle1 = (i * 2 * Pi) / NumSectors;
+ qreal x5 = 0.30 * sin(angle1);
+ qreal y5 = 0.30 * cos(angle1);
+ qreal x6 = 0.20 * sin(angle1);
+ qreal y6 = 0.20 * cos(angle1);
+
+ qreal angle2 = ((i + 1) * 2 * Pi) / NumSectors;
+ qreal x7 = 0.20 * sin(angle2);
+ qreal y7 = 0.20 * cos(angle2);
+ qreal x8 = 0.30 * sin(angle2);
+ qreal y8 = 0.30 * cos(angle2);
+
+ quad(x5, y5, x6, y6, x7, y7, x8, y8);
+
+ extrude(x6, y6, x7, y7);
+ extrude(x8, y8, x5, y5);
+ }
+
+ for (int i = 0;i < vertices.size();i++)
+ vertices[i] *= 2.0f;
+}
+
+void Renderer::quad(qreal x1, qreal y1, qreal x2, qreal y2, qreal x3, qreal y3, qreal x4, qreal y4)
+{
+ vertices << QVector3D(x1, y1, -0.05f);
+ vertices << QVector3D(x2, y2, -0.05f);
+ vertices << QVector3D(x4, y4, -0.05f);
+
+ vertices << QVector3D(x3, y3, -0.05f);
+ vertices << QVector3D(x4, y4, -0.05f);
+ vertices << QVector3D(x2, y2, -0.05f);
+
+ QVector3D n = QVector3D::normal
+ (QVector3D(x2 - x1, y2 - y1, 0.0f), QVector3D(x4 - x1, y4 - y1, 0.0f));
+
+ normals << n;
+ normals << n;
+ normals << n;
+
+ normals << n;
+ normals << n;
+ normals << n;
+
+ vertices << QVector3D(x4, y4, 0.05f);
+ vertices << QVector3D(x2, y2, 0.05f);
+ vertices << QVector3D(x1, y1, 0.05f);
+
+ vertices << QVector3D(x2, y2, 0.05f);
+ vertices << QVector3D(x4, y4, 0.05f);
+ vertices << QVector3D(x3, y3, 0.05f);
+
+ n = QVector3D::normal
+ (QVector3D(x2 - x4, y2 - y4, 0.0f), QVector3D(x1 - x4, y1 - y4, 0.0f));
+
+ normals << n;
+ normals << n;
+ normals << n;
+
+ normals << n;
+ normals << n;
+ normals << n;
+}
+
+void Renderer::extrude(qreal x1, qreal y1, qreal x2, qreal y2)
+{
+ vertices << QVector3D(x1, y1, +0.05f);
+ vertices << QVector3D(x2, y2, +0.05f);
+ vertices << QVector3D(x1, y1, -0.05f);
+
+ vertices << QVector3D(x2, y2, -0.05f);
+ vertices << QVector3D(x1, y1, -0.05f);
+ vertices << QVector3D(x2, y2, +0.05f);
+
+ QVector3D n = QVector3D::normal
+ (QVector3D(x2 - x1, y2 - y1, 0.0f), QVector3D(0.0f, 0.0f, -0.1f));
+
+ normals << n;
+ normals << n;
+ normals << n;
+
+ normals << n;
+ normals << n;
+ normals << n;
+}
diff --git a/examples/opengl/threadedqopenglwidget/glwidget.h b/examples/opengl/threadedqopenglwidget/glwidget.h
new file mode 100644
index 0000000000..9d746e681b
--- /dev/null
+++ b/examples/opengl/threadedqopenglwidget/glwidget.h
@@ -0,0 +1,124 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 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 GLWIDGET_H
+#define GLWIDGET_H
+
+#include <QOpenGLWidget>
+#include <QOpenGLFunctions>
+#include <QOpenGLShaderProgram>
+#include <QVector3D>
+#include <QMatrix4x4>
+#include <QThread>
+#include <QMutex>
+#include <QWaitCondition>
+#include <QElapsedTimer>
+
+class GLWidget;
+
+class Renderer : public QObject, protected QOpenGLFunctions
+{
+ Q_OBJECT
+
+public:
+ Renderer(GLWidget *w);
+ void lockRenderer() { m_renderMutex.lock(); }
+ void unlockRenderer() { m_renderMutex.unlock(); }
+ QMutex *grabMutex() { return &m_grabMutex; }
+ QWaitCondition *grabCond() { return &m_grabCond; }
+ void prepareExit() { m_exiting = true; m_grabCond.wakeAll(); }
+
+signals:
+ void contextWanted();
+
+public slots:
+ void render();
+
+private:
+ void paintQtLogo();
+ void createGeometry();
+ void quad(qreal x1, qreal y1, qreal x2, qreal y2, qreal x3, qreal y3, qreal x4, qreal y4);
+ void extrude(qreal x1, qreal y1, qreal x2, qreal y2);
+
+ bool m_inited;
+ qreal m_fAngle;
+ qreal m_fScale;
+ QVector<QVector3D> vertices;
+ QVector<QVector3D> normals;
+ QOpenGLShaderProgram program;
+ int vertexAttr;
+ int normalAttr;
+ int matrixUniform;
+ GLWidget *m_glwidget;
+ QMutex m_renderMutex;
+ QElapsedTimer m_elapsed;
+ QMutex m_grabMutex;
+ QWaitCondition m_grabCond;
+ bool m_exiting;
+};
+
+class GLWidget : public QOpenGLWidget
+{
+ Q_OBJECT
+public:
+ GLWidget(QWidget *parent);
+ ~GLWidget();
+
+protected:
+ void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE { }
+
+signals:
+ void renderRequested();
+
+public slots:
+ void grabContext();
+
+private slots:
+ void onAboutToCompose();
+ void onFrameSwapped();
+ void onAboutToResize();
+ void onResized();
+
+private:
+ QThread *m_thread;
+ Renderer *m_renderer;
+};
+
+#endif
diff --git a/examples/opengl/threadedqopenglwidget/main.cpp b/examples/opengl/threadedqopenglwidget/main.cpp
new file mode 100644
index 0000000000..046a24d576
--- /dev/null
+++ b/examples/opengl/threadedqopenglwidget/main.cpp
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 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 <QMainWindow>
+#include "mainwindow.h"
+#include "glwidget.h"
+
+int main( int argc, char ** argv )
+{
+ QApplication a( argc, argv );
+
+ // Two top-level windows with two QOpenGLWidget children in each.
+ // The rendering for the four QOpenGLWidgets happens on four separate threads.
+ MainWindow mw1;
+ mw1.setMinimumSize(800, 400);
+ mw1.show();
+
+ QScopedPointer<MainWindow> mw2;
+ if (!QApplication::arguments().contains(QStringLiteral("--single"))) {
+ mw2.reset(new MainWindow);
+ mw2->setMinimumSize(800, 400);
+ mw2->show();
+
+ // And a top-level.
+ GLWidget *bonus = new GLWidget(0);
+ bonus->resize(200, 200);
+ bonus->show();
+ }
+
+ return a.exec();
+}
diff --git a/examples/opengl/threadedqopenglwidget/mainwindow.cpp b/examples/opengl/threadedqopenglwidget/mainwindow.cpp
new file mode 100644
index 0000000000..29c59573cf
--- /dev/null
+++ b/examples/opengl/threadedqopenglwidget/mainwindow.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 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 "mainwindow.h"
+#include "glwidget.h"
+
+MainWindow::MainWindow()
+{
+ GLWidget *glwidget1 = new GLWidget(this);
+ glwidget1->resize(400, 400);
+
+ GLWidget *glwidget2 = new GLWidget(this);
+ glwidget2->resize(400, 400);
+ glwidget2->move(400, 0);
+}
diff --git a/examples/opengl/hellogl_es2/mainwindow.h b/examples/opengl/threadedqopenglwidget/mainwindow.h
index 3f05fd4a78..91f7580717 100644
--- a/examples/opengl/hellogl_es2/mainwindow.h
+++ b/examples/opengl/threadedqopenglwidget/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 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.
@@ -41,16 +41,14 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
-#include <QMainWindow>
+#include <QWidget>
-class MainWindow : public QMainWindow
+class MainWindow : public QWidget
{
Q_OBJECT
public:
MainWindow();
-
-private:
};
#endif
diff --git a/examples/opengl/threadedqopenglwidget/threadedqopenglwidget.pro b/examples/opengl/threadedqopenglwidget/threadedqopenglwidget.pro
new file mode 100644
index 0000000000..4e941b28c4
--- /dev/null
+++ b/examples/opengl/threadedqopenglwidget/threadedqopenglwidget.pro
@@ -0,0 +1,11 @@
+QT += widgets
+
+SOURCES += main.cpp \
+ glwidget.cpp \
+ mainwindow.cpp
+
+HEADERS += glwidget.h \
+ mainwindow.h
+
+target.path = $$[QT_INSTALL_EXAMPLES]/opengl/threadedqopenglwidget
+INSTALLS += target
diff --git a/examples/qpa/windows/window.h b/examples/qpa/windows/window.h
index 88cf6db431..f9abfc0821 100644
--- a/examples/qpa/windows/window.h
+++ b/examples/qpa/windows/window.h
@@ -48,16 +48,16 @@ public:
Window(QScreen *screen);
protected:
- void mousePressEvent(QMouseEvent *);
- void mouseMoveEvent(QMouseEvent *);
- void mouseReleaseEvent(QMouseEvent *);
+ void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE;
+ void mouseMoveEvent(QMouseEvent *) Q_DECL_OVERRIDE;
+ void mouseReleaseEvent(QMouseEvent *) Q_DECL_OVERRIDE;
- void keyPressEvent(QKeyEvent *);
+ void keyPressEvent(QKeyEvent *) Q_DECL_OVERRIDE;
- void exposeEvent(QExposeEvent *);
- void resizeEvent(QResizeEvent *);
+ void exposeEvent(QExposeEvent *) Q_DECL_OVERRIDE;
+ void resizeEvent(QResizeEvent *) Q_DECL_OVERRIDE;
- void timerEvent(QTimerEvent *);
+ void timerEvent(QTimerEvent *) Q_DECL_OVERRIDE;
private:
void render();
diff --git a/examples/sql/books/bookdelegate.h b/examples/sql/books/bookdelegate.h
index 732e418ca4..b1de0546cb 100644
--- a/examples/sql/books/bookdelegate.h
+++ b/examples/sql/books/bookdelegate.h
@@ -55,16 +55,16 @@ public:
BookDelegate(QObject *parent);
void paint(QPainter *painter, const QStyleOptionViewItem &option,
- const QModelIndex &index) const;
+ const QModelIndex &index) const Q_DECL_OVERRIDE;
- QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
+ QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE;
bool editorEvent(QEvent *event, QAbstractItemModel *model,
const QStyleOptionViewItem &option,
- const QModelIndex &index);
+ const QModelIndex &index) Q_DECL_OVERRIDE;
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
- const QModelIndex &index) const;
+ const QModelIndex &index) const Q_DECL_OVERRIDE;
private:
QPixmap star;
diff --git a/examples/sql/drilldown/imageitem.h b/examples/sql/drilldown/imageitem.h
index 59f468e3a6..3935c157a7 100644
--- a/examples/sql/drilldown/imageitem.h
+++ b/examples/sql/drilldown/imageitem.h
@@ -56,8 +56,8 @@ public:
int id();
protected:
- void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
- void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
+ void hoverEnterEvent(QGraphicsSceneHoverEvent *event) Q_DECL_OVERRIDE;
+ void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) Q_DECL_OVERRIDE;
private slots:
void setFrame(int frame);
diff --git a/examples/sql/drilldown/view.h b/examples/sql/drilldown/view.h
index c9fc040bb1..b7fb72fe74 100644
--- a/examples/sql/drilldown/view.h
+++ b/examples/sql/drilldown/view.h
@@ -56,7 +56,7 @@ public:
View(const QString &items, const QString &images, QWidget *parent = 0);
protected:
- void mouseReleaseEvent(QMouseEvent *event);
+ void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
//! [0]
//! [1]
diff --git a/examples/sql/querymodel/customsqlmodel.h b/examples/sql/querymodel/customsqlmodel.h
index 63ab38f57f..ec673305a8 100644
--- a/examples/sql/querymodel/customsqlmodel.h
+++ b/examples/sql/querymodel/customsqlmodel.h
@@ -51,7 +51,7 @@ class CustomSqlModel : public QSqlQueryModel
public:
CustomSqlModel(QObject *parent = 0);
- QVariant data(const QModelIndex &item, int role) const;
+ QVariant data(const QModelIndex &item, int role) const Q_DECL_OVERRIDE;
};
//! [0]
diff --git a/examples/sql/querymodel/editablesqlmodel.h b/examples/sql/querymodel/editablesqlmodel.h
index 53bb7ac908..a1f3f1a302 100644
--- a/examples/sql/querymodel/editablesqlmodel.h
+++ b/examples/sql/querymodel/editablesqlmodel.h
@@ -50,8 +50,8 @@ class EditableSqlModel : public QSqlQueryModel
public:
EditableSqlModel(QObject *parent = 0);
- Qt::ItemFlags flags(const QModelIndex &index) const;
- bool setData(const QModelIndex &index, const QVariant &value, int role);
+ Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE;
+ bool setData(const QModelIndex &index, const QVariant &value, int role) Q_DECL_OVERRIDE;
private:
bool setFirstName(int personId, const QString &firstName);
diff --git a/examples/sql/sqlbrowser/browser.h b/examples/sql/sqlbrowser/browser.h
index db57404ec3..1819b90ce7 100644
--- a/examples/sql/sqlbrowser/browser.h
+++ b/examples/sql/sqlbrowser/browser.h
@@ -108,7 +108,7 @@ class CustomModel: public QSqlTableModel
Q_OBJECT
public:
explicit CustomModel(QObject *parent = 0, QSqlDatabase db = QSqlDatabase()):QSqlTableModel(parent, db) {}
- QVariant data(const QModelIndex &idx, int role) const
+ QVariant data(const QModelIndex &idx, int role) const Q_DECL_OVERRIDE
{
if (role == Qt::BackgroundRole && isDirty(idx))
return QBrush(QColor(Qt::yellow));
diff --git a/examples/threads/mandelbrot/mandelbrotwidget.h b/examples/threads/mandelbrot/mandelbrotwidget.h
index 0867270305..183edf2e26 100644
--- a/examples/threads/mandelbrot/mandelbrotwidget.h
+++ b/examples/threads/mandelbrot/mandelbrotwidget.h
@@ -55,15 +55,15 @@ public:
MandelbrotWidget(QWidget *parent = 0);
protected:
- void paintEvent(QPaintEvent *event);
- void resizeEvent(QResizeEvent *event);
- void keyPressEvent(QKeyEvent *event);
+ void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
+ void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
+ void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
#ifndef QT_NO_WHEELEVENT
- void wheelEvent(QWheelEvent *event);
+ void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE;
#endif
- void mousePressEvent(QMouseEvent *event);
- void mouseMoveEvent(QMouseEvent *event);
- void mouseReleaseEvent(QMouseEvent *event);
+ void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
private slots:
void updatePixmap(const QImage &image, double scaleFactor);
diff --git a/examples/threads/mandelbrot/renderthread.h b/examples/threads/mandelbrot/renderthread.h
index 9c1ab1828d..881870665f 100644
--- a/examples/threads/mandelbrot/renderthread.h
+++ b/examples/threads/mandelbrot/renderthread.h
@@ -65,7 +65,7 @@ signals:
void renderedImage(const QImage &image, double scaleFactor);
protected:
- void run();
+ void run() Q_DECL_OVERRIDE;
private:
uint rgbFromWaveLength(double wave);
diff --git a/examples/threads/semaphores/semaphores.cpp b/examples/threads/semaphores/semaphores.cpp
index fb7f1f2376..f519e5f323 100644
--- a/examples/threads/semaphores/semaphores.cpp
+++ b/examples/threads/semaphores/semaphores.cpp
@@ -58,7 +58,7 @@ class Producer : public QThread
//! [1] //! [2]
{
public:
- void run()
+ void run() Q_DECL_OVERRIDE
{
qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
for (int i = 0; i < DataSize; ++i) {
@@ -76,7 +76,7 @@ class Consumer : public QThread
{
Q_OBJECT
public:
- void run()
+ void run() Q_DECL_OVERRIDE
{
for (int i = 0; i < DataSize; ++i) {
usedBytes.acquire();
diff --git a/examples/threads/waitconditions/waitconditions.cpp b/examples/threads/waitconditions/waitconditions.cpp
index 6f5f56e737..b0336f4c2b 100644
--- a/examples/threads/waitconditions/waitconditions.cpp
+++ b/examples/threads/waitconditions/waitconditions.cpp
@@ -64,7 +64,7 @@ public:
{
}
- void run()
+ void run() Q_DECL_OVERRIDE
{
qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
@@ -95,7 +95,7 @@ public:
{
}
- void run()
+ void run() Q_DECL_OVERRIDE
{
for (int i = 0; i < DataSize; ++i) {
mutex.lock();
diff --git a/examples/tools/contiguouscache/randomlistmodel.h b/examples/tools/contiguouscache/randomlistmodel.h
index 490cabddd7..3acafc23ff 100644
--- a/examples/tools/contiguouscache/randomlistmodel.h
+++ b/examples/tools/contiguouscache/randomlistmodel.h
@@ -52,8 +52,8 @@ public:
RandomListModel(QObject *parent = 0);
~RandomListModel();
- int rowCount(const QModelIndex & = QModelIndex()) const;
- QVariant data(const QModelIndex &, int) const;
+ int rowCount(const QModelIndex & = QModelIndex()) const Q_DECL_OVERRIDE;
+ QVariant data(const QModelIndex &, int) const Q_DECL_OVERRIDE;
private:
void cacheRows(int, int) const;
diff --git a/examples/touch/fingerpaint/mainwindow.h b/examples/touch/fingerpaint/mainwindow.h
index 4d97f7e13f..997ea064f2 100644
--- a/examples/touch/fingerpaint/mainwindow.h
+++ b/examples/touch/fingerpaint/mainwindow.h
@@ -55,7 +55,7 @@ public:
MainWindow();
protected:
- void closeEvent(QCloseEvent *event);
+ void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE;
private slots:
void open();
diff --git a/examples/touch/fingerpaint/scribblearea.h b/examples/touch/fingerpaint/scribblearea.h
index e6c8e8d155..2019bfc58f 100644
--- a/examples/touch/fingerpaint/scribblearea.h
+++ b/examples/touch/fingerpaint/scribblearea.h
@@ -64,9 +64,9 @@ public slots:
void print();
protected:
- void paintEvent(QPaintEvent *event);
- void resizeEvent(QResizeEvent *event);
- bool event(QEvent *event);
+ void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
+ void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
+ bool event(QEvent *event) Q_DECL_OVERRIDE;
private:
void resizeImage(QImage *image, const QSize &newSize);
diff --git a/examples/touch/knobs/knob.h b/examples/touch/knobs/knob.h
index 645e2174a8..a3315a9b1d 100644
--- a/examples/touch/knobs/knob.h
+++ b/examples/touch/knobs/knob.h
@@ -48,7 +48,7 @@ class Knob : public QGraphicsEllipseItem
public:
Knob();
- bool sceneEvent(QEvent *event);
+ bool sceneEvent(QEvent *event) Q_DECL_OVERRIDE;
};
#endif // KNOB_H
diff --git a/examples/touch/pinchzoom/graphicsview.h b/examples/touch/pinchzoom/graphicsview.h
index 5553f4b6d6..63728acaf6 100644
--- a/examples/touch/pinchzoom/graphicsview.h
+++ b/examples/touch/pinchzoom/graphicsview.h
@@ -48,7 +48,7 @@ class GraphicsView : public QGraphicsView
public:
GraphicsView(QGraphicsScene *scene = 0, QWidget *parent = 0);
- bool viewportEvent(QEvent *event);
+ bool viewportEvent(QEvent *event) Q_DECL_OVERRIDE;
private:
qreal totalScaleFactor;
diff --git a/examples/touch/pinchzoom/mouse.h b/examples/touch/pinchzoom/mouse.h
index 22b571b692..9a705e5062 100644
--- a/examples/touch/pinchzoom/mouse.h
+++ b/examples/touch/pinchzoom/mouse.h
@@ -51,13 +51,13 @@ class Mouse : public QGraphicsObject
public:
Mouse();
- QRectF boundingRect() const;
- QPainterPath shape() const;
+ QRectF boundingRect() const Q_DECL_OVERRIDE;
+ QPainterPath shape() const Q_DECL_OVERRIDE;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
- QWidget *widget);
+ QWidget *widget) Q_DECL_OVERRIDE;
protected:
- void timerEvent(QTimerEvent *event);
+ void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE;
private:
qreal angle;
diff --git a/examples/widgets/animation/animatedtiles/main.cpp b/examples/widgets/animation/animatedtiles/main.cpp
index 6eab018929..09e9790646 100644
--- a/examples/widgets/animation/animatedtiles/main.cpp
+++ b/examples/widgets/animation/animatedtiles/main.cpp
@@ -64,19 +64,19 @@ public:
setCacheMode(DeviceCoordinateCache);
}
- QRectF boundingRect() const
+ QRectF boundingRect() const Q_DECL_OVERRIDE
{
return QRectF(-65, -65, 130, 130);
}
- QPainterPath shape() const
+ QPainterPath shape() const Q_DECL_OVERRIDE
{
QPainterPath path;
path.addEllipse(boundingRect());
return path;
}
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *)
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *) Q_DECL_OVERRIDE
{
bool down = option->state & QStyle::State_Sunken;
QRectF r = boundingRect();
@@ -101,13 +101,13 @@ signals:
void pressed();
protected:
- void mousePressEvent(QGraphicsSceneMouseEvent *)
+ void mousePressEvent(QGraphicsSceneMouseEvent *) Q_DECL_OVERRIDE
{
emit pressed();
update();
}
- void mouseReleaseEvent(QGraphicsSceneMouseEvent *)
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *) Q_DECL_OVERRIDE
{
update();
}
@@ -122,7 +122,7 @@ public:
View(QGraphicsScene *scene) : QGraphicsView(scene) { }
protected:
- void resizeEvent(QResizeEvent *event)
+ void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE
{
QGraphicsView::resizeEvent(event);
fitInView(sceneRect(), Qt::KeepAspectRatio);
diff --git a/examples/widgets/animation/appchooser/main.cpp b/examples/widgets/animation/appchooser/main.cpp
index a65e998b32..652e458411 100644
--- a/examples/widgets/animation/appchooser/main.cpp
+++ b/examples/widgets/animation/appchooser/main.cpp
@@ -52,17 +52,17 @@ public:
{
}
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) Q_DECL_OVERRIDE
{
painter->drawPixmap(QPointF(), p);
}
- virtual void mousePressEvent(QGraphicsSceneMouseEvent * )
+ virtual void mousePressEvent(QGraphicsSceneMouseEvent * ) Q_DECL_OVERRIDE
{
emit clicked();
}
- virtual void setGeometry(const QRectF &rect)
+ virtual void setGeometry(const QRectF &rect) Q_DECL_OVERRIDE
{
QGraphicsWidget::setGeometry(rect);
@@ -88,7 +88,7 @@ public:
{
}
- virtual void resizeEvent(QResizeEvent *)
+ virtual void resizeEvent(QResizeEvent *) Q_DECL_OVERRIDE
{
fitInView(sceneRect(), Qt::KeepAspectRatio);
}
diff --git a/examples/widgets/animation/easing/animation.h b/examples/widgets/animation/easing/animation.h
index d12a219abd..296f4c9da1 100644
--- a/examples/widgets/animation/easing/animation.h
+++ b/examples/widgets/animation/easing/animation.h
@@ -67,7 +67,7 @@ public:
m_path = QPainterPath();
}
- void updateCurrentTime(int currentTime)
+ void updateCurrentTime(int currentTime) Q_DECL_OVERRIDE
{
if (m_pathType == CirclePath) {
if (m_path.isEmpty()) {
diff --git a/examples/widgets/animation/moveblocks/main.cpp b/examples/widgets/animation/moveblocks/main.cpp
index 6d08381a53..57f13ceebe 100644
--- a/examples/widgets/animation/moveblocks/main.cpp
+++ b/examples/widgets/animation/moveblocks/main.cpp
@@ -70,7 +70,7 @@ class QGraphicsRectWidget : public QGraphicsWidget
{
public:
void paint(QPainter *painter, const QStyleOptionGraphicsItem *,
- QWidget *)
+ QWidget *) Q_DECL_OVERRIDE
{
painter->fillRect(rect(), Qt::blue);
}
@@ -88,14 +88,14 @@ public:
protected:
//![14]
- virtual bool eventTest(QEvent *event)
+ virtual bool eventTest(QEvent *event) Q_DECL_OVERRIDE
{
return (event->type() == QEvent::Type(StateSwitchEvent::StateSwitchType))
&& (static_cast<StateSwitchEvent *>(event)->rand() == m_rand);
}
//![14]
- virtual void onTransition(QEvent *) {}
+ virtual void onTransition(QEvent *) Q_DECL_OVERRIDE {}
private:
int m_rand;
@@ -112,7 +112,7 @@ public:
//![10]
//![11]
- virtual void onEntry(QEvent *)
+ virtual void onEntry(QEvent *) Q_DECL_OVERRIDE
{
int n;
while ((n = (qrand() % m_stateCount + 1)) == m_lastIndex)
@@ -120,7 +120,7 @@ public:
m_lastIndex = n;
machine()->postEvent(new StateSwitchEvent(n));
}
- virtual void onExit(QEvent *) {}
+ virtual void onExit(QEvent *) Q_DECL_OVERRIDE {}
//![11]
//![12]
@@ -164,7 +164,7 @@ public:
}
protected:
- virtual void resizeEvent(QResizeEvent *event)
+ virtual void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE
{
fitInView(scene()->sceneRect());
QGraphicsView::resizeEvent(event);
diff --git a/examples/widgets/animation/states/main.cpp b/examples/widgets/animation/states/main.cpp
index fc633bd972..8bc8535ece 100644
--- a/examples/widgets/animation/states/main.cpp
+++ b/examples/widgets/animation/states/main.cpp
@@ -48,12 +48,12 @@ public:
{
}
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) Q_DECL_OVERRIDE
{
painter->drawPixmap(QPointF(), p);
}
- QRectF boundingRect() const
+ QRectF boundingRect() const Q_DECL_OVERRIDE
{
return QRectF( QPointF(0, 0), p.size());
}
@@ -69,7 +69,7 @@ public:
{
}
- virtual void resizeEvent(QResizeEvent *)
+ virtual void resizeEvent(QResizeEvent *) Q_DECL_OVERRIDE
{
fitInView(sceneRect(), Qt::KeepAspectRatio);
}
diff --git a/examples/widgets/animation/stickman/graphicsview.h b/examples/widgets/animation/stickman/graphicsview.h
index 60abb6448f..cdccbbfbd3 100644
--- a/examples/widgets/animation/stickman/graphicsview.h
+++ b/examples/widgets/animation/stickman/graphicsview.h
@@ -51,8 +51,8 @@ public:
GraphicsView(QWidget *parent = 0);
protected:
- virtual void resizeEvent(QResizeEvent *event);
- void keyPressEvent(QKeyEvent *);
+ virtual void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
+ void keyPressEvent(QKeyEvent *) Q_DECL_OVERRIDE;
signals:
void keyPressed(int key);
diff --git a/examples/widgets/animation/stickman/lifecycle.cpp b/examples/widgets/animation/stickman/lifecycle.cpp
index 09ca45e55b..7b089b5459 100644
--- a/examples/widgets/animation/stickman/lifecycle.cpp
+++ b/examples/widgets/animation/stickman/lifecycle.cpp
@@ -60,7 +60,7 @@ public:
setTargetState(target);
}
- virtual bool eventTest(QEvent *e)
+ virtual bool eventTest(QEvent *e) Q_DECL_OVERRIDE
{
if (QSignalTransition::eventTest(e)) {
QVariant key = static_cast<QStateMachine::SignalEvent*>(e)->arguments().at(0);
@@ -85,7 +85,7 @@ public:
startTimer(1000);
}
- virtual bool eventTest(QEvent *e)
+ virtual bool eventTest(QEvent *e) Q_DECL_OVERRIDE
{
return QEventTransition::eventTest(e) && ((qrand() % 50) == 0);
}
diff --git a/examples/widgets/animation/stickman/node.h b/examples/widgets/animation/stickman/node.h
index 9c7cc8d75a..6da83d5474 100644
--- a/examples/widgets/animation/stickman/node.h
+++ b/examples/widgets/animation/stickman/node.h
@@ -50,18 +50,18 @@ public:
explicit Node(const QPointF &pos, QGraphicsItem *parent = 0);
~Node();
- QRectF boundingRect() const;
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+ QRectF boundingRect() const Q_DECL_OVERRIDE;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE;
signals:
void positionChanged();
protected:
- QVariant itemChange(GraphicsItemChange change, const QVariant &value);
+ QVariant itemChange(GraphicsItemChange change, const QVariant &value) Q_DECL_OVERRIDE;
- void mousePressEvent(QGraphicsSceneMouseEvent *);
- void mouseMoveEvent(QGraphicsSceneMouseEvent *);
- void mouseReleaseEvent(QGraphicsSceneMouseEvent *);
+ void mousePressEvent(QGraphicsSceneMouseEvent *) Q_DECL_OVERRIDE;
+ void mouseMoveEvent(QGraphicsSceneMouseEvent *) Q_DECL_OVERRIDE;
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *) Q_DECL_OVERRIDE;
private:
bool m_dragging;
diff --git a/examples/widgets/animation/stickman/rectbutton.h b/examples/widgets/animation/stickman/rectbutton.h
index 16c70fddd4..1cc9be2f97 100644
--- a/examples/widgets/animation/stickman/rectbutton.h
+++ b/examples/widgets/animation/stickman/rectbutton.h
@@ -50,13 +50,13 @@ public:
RectButton(QString buttonText);
~RectButton();
- virtual QRectF boundingRect() const;
- virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+ virtual QRectF boundingRect() const Q_DECL_OVERRIDE;
+ virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE;
protected:
QString m_ButtonText;
- virtual void mousePressEvent (QGraphicsSceneMouseEvent *event);
+ virtual void mousePressEvent (QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
signals:
void clicked();
diff --git a/examples/widgets/animation/stickman/stickman.h b/examples/widgets/animation/stickman/stickman.h
index 08928a48a6..d8538efc52 100644
--- a/examples/widgets/animation/stickman/stickman.h
+++ b/examples/widgets/animation/stickman/stickman.h
@@ -59,8 +59,8 @@ public:
StickMan();
~StickMan();
- virtual QRectF boundingRect() const;
- virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+ virtual QRectF boundingRect() const Q_DECL_OVERRIDE;
+ virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE;
int nodeCount() const;
Node *node(int idx) const;
@@ -82,7 +82,7 @@ public slots:
void childPositionChanged();
protected:
- void timerEvent(QTimerEvent *e);
+ void timerEvent(QTimerEvent *e) Q_DECL_OVERRIDE;
private:
diff --git a/examples/widgets/animation/sub-attaq/boat.h b/examples/widgets/animation/sub-attaq/boat.h
index 82f43572e8..561ba49d27 100644
--- a/examples/widgets/animation/sub-attaq/boat.h
+++ b/examples/widgets/animation/sub-attaq/boat.h
@@ -77,7 +77,7 @@ public:
void updateBoatMovement();
- virtual int type() const;
+ virtual int type() const Q_DECL_OVERRIDE;
signals:
void boatDestroyed();
diff --git a/examples/widgets/animation/sub-attaq/boat_p.h b/examples/widgets/animation/sub-attaq/boat_p.h
index fc3ba81d63..19c5dad9ba 100644
--- a/examples/widgets/animation/sub-attaq/boat_p.h
+++ b/examples/widgets/animation/sub-attaq/boat_p.h
@@ -72,7 +72,7 @@ public:
{
}
protected:
- virtual bool eventTest(QEvent *event)
+ virtual bool eventTest(QEvent *event) Q_DECL_OVERRIDE
{
if (!QKeyEventTransition::eventTest(event))
return false;
@@ -91,13 +91,13 @@ public:
{
}
protected:
- virtual bool eventTest(QEvent *event)
+ virtual bool eventTest(QEvent *event) Q_DECL_OVERRIDE
{
if (!QKeyEventTransition::eventTest(event))
return false;
return (boat->currentSpeed() >= 0);
}
- void onTransition(QEvent *)
+ void onTransition(QEvent *) Q_DECL_OVERRIDE
{
//We decrease the speed if needed
if (key == Qt::Key_Left && boat->currentDirection() == Boat::Right)
@@ -122,7 +122,7 @@ public:
{
}
protected:
- virtual bool eventTest(QEvent *event)
+ virtual bool eventTest(QEvent *event) Q_DECL_OVERRIDE
{
if (!QKeyEventTransition::eventTest(event))
return false;
@@ -141,7 +141,7 @@ public:
{
}
protected:
- void onEntry(QEvent *)
+ void onEntry(QEvent *) Q_DECL_OVERRIDE
{
boat->setCurrentDirection(Boat::Right);
boat->updateBoatMovement();
@@ -158,7 +158,7 @@ public:
{
}
protected:
- void onEntry(QEvent *)
+ void onEntry(QEvent *) Q_DECL_OVERRIDE
{
boat->setCurrentDirection(Boat::Left);
boat->updateBoatMovement();
@@ -175,7 +175,7 @@ public:
{
}
protected:
- void onEntry(QEvent *)
+ void onEntry(QEvent *) Q_DECL_OVERRIDE
{
boat->setCurrentSpeed(0);
boat->setCurrentDirection(Boat::None);
@@ -193,7 +193,7 @@ public:
{
}
protected:
- void onEntry(QEvent *)
+ void onEntry(QEvent *) Q_DECL_OVERRIDE
{
Bomb *b = new Bomb();
b->setPos(boat->x()+boat->size().width(),boat->y());
@@ -214,7 +214,7 @@ public:
{
}
protected:
- void onEntry(QEvent *)
+ void onEntry(QEvent *) Q_DECL_OVERRIDE
{
Bomb *b = new Bomb();
b->setPos(boat->x() - b->size().width(), boat->y());
diff --git a/examples/widgets/animation/sub-attaq/pixmapitem.h b/examples/widgets/animation/sub-attaq/pixmapitem.h
index e093fbd5b5..baca0c1cba 100644
--- a/examples/widgets/animation/sub-attaq/pixmapitem.h
+++ b/examples/widgets/animation/sub-attaq/pixmapitem.h
@@ -54,8 +54,8 @@ public:
PixmapItem(const QString &fileName, GraphicsScene::Mode mode, QGraphicsItem * parent = 0);
PixmapItem(const QString &fileName, QGraphicsScene *scene);
QSizeF size() const;
- QRectF boundingRect() const;
- void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
+ QRectF boundingRect() const Q_DECL_OVERRIDE;
+ void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) Q_DECL_OVERRIDE;
private:
QPixmap pix;
};
diff --git a/examples/widgets/animation/sub-attaq/qanimationstate.h b/examples/widgets/animation/sub-attaq/qanimationstate.h
index 68eac43e13..c2b7e12211 100644
--- a/examples/widgets/animation/sub-attaq/qanimationstate.h
+++ b/examples/widgets/animation/sub-attaq/qanimationstate.h
@@ -71,9 +71,9 @@ signals:
void animationFinished();
protected:
- void onEntry(QEvent *);
- void onExit(QEvent *);
- bool event(QEvent *e);
+ void onEntry(QEvent *) Q_DECL_OVERRIDE;
+ void onExit(QEvent *) Q_DECL_OVERRIDE;
+ bool event(QEvent *e) Q_DECL_OVERRIDE;
private:
Q_DISABLE_COPY(QAnimationState)
diff --git a/examples/widgets/animation/sub-attaq/states.h b/examples/widgets/animation/sub-attaq/states.h
index 3cd27be9a4..19016cb76e 100644
--- a/examples/widgets/animation/sub-attaq/states.h
+++ b/examples/widgets/animation/sub-attaq/states.h
@@ -63,7 +63,7 @@ public:
~PlayState();
protected:
- void onEntry(QEvent *);
+ void onEntry(QEvent *) Q_DECL_OVERRIDE;
private :
GraphicsScene *scene;
@@ -85,7 +85,7 @@ class LevelState : public QState
public:
LevelState(GraphicsScene *scene, PlayState *game, QState *parent = 0);
protected:
- void onEntry(QEvent *);
+ void onEntry(QEvent *) Q_DECL_OVERRIDE;
private :
void initializeLevel();
GraphicsScene *scene;
@@ -98,8 +98,8 @@ public:
explicit PauseState(GraphicsScene *scene, QState *parent = 0);
protected:
- void onEntry(QEvent *);
- void onExit(QEvent *);
+ void onEntry(QEvent *) Q_DECL_OVERRIDE;
+ void onExit(QEvent *) Q_DECL_OVERRIDE;
private :
GraphicsScene *scene;
};
@@ -110,8 +110,8 @@ public:
LostState(GraphicsScene *scene, PlayState *game, QState *parent = 0);
protected:
- void onEntry(QEvent *);
- void onExit(QEvent *);
+ void onEntry(QEvent *) Q_DECL_OVERRIDE;
+ void onExit(QEvent *) Q_DECL_OVERRIDE;
private :
GraphicsScene *scene;
PlayState *game;
@@ -123,8 +123,8 @@ public:
WinState(GraphicsScene *scene, PlayState *game, QState *parent = 0);
protected:
- void onEntry(QEvent *);
- void onExit(QEvent *);
+ void onEntry(QEvent *) Q_DECL_OVERRIDE;
+ void onExit(QEvent *) Q_DECL_OVERRIDE;
private :
GraphicsScene *scene;
PlayState *game;
@@ -143,7 +143,7 @@ class UpdateScoreTransition : public QSignalTransition
public:
UpdateScoreTransition(GraphicsScene *scene, PlayState *game, QAbstractState *target);
protected:
- virtual bool eventTest(QEvent *event);
+ virtual bool eventTest(QEvent *event) Q_DECL_OVERRIDE;
private:
PlayState * game;
GraphicsScene *scene;
@@ -155,7 +155,7 @@ class WinTransition : public QSignalTransition
public:
WinTransition(GraphicsScene *scene, PlayState *game, QAbstractState *target);
protected:
- virtual bool eventTest(QEvent *event);
+ virtual bool eventTest(QEvent *event) Q_DECL_OVERRIDE;
private:
PlayState * game;
GraphicsScene *scene;
@@ -167,7 +167,7 @@ private:
public:
CustomSpaceTransition(QWidget *widget, PlayState *game, QEvent::Type type, int key);
protected:
- virtual bool eventTest(QEvent *event);
+ virtual bool eventTest(QEvent *event) Q_DECL_OVERRIDE;
private:
PlayState *game;
};
diff --git a/examples/widgets/animation/sub-attaq/submarine.h b/examples/widgets/animation/sub-attaq/submarine.h
index 802bf6f81c..b087d0178d 100644
--- a/examples/widgets/animation/sub-attaq/submarine.h
+++ b/examples/widgets/animation/sub-attaq/submarine.h
@@ -72,7 +72,7 @@ public:
void launchTorpedo(int speed);
void destroy();
- virtual int type() const;
+ virtual int type() const Q_DECL_OVERRIDE;
QGraphicsRotation *rotation() const { return graphicsRotation; }
diff --git a/examples/widgets/animation/sub-attaq/submarine_p.h b/examples/widgets/animation/sub-attaq/submarine_p.h
index e1755505df..f117be7b8c 100644
--- a/examples/widgets/animation/sub-attaq/submarine_p.h
+++ b/examples/widgets/animation/sub-attaq/submarine_p.h
@@ -84,7 +84,7 @@ protected slots:
}
protected:
- void onEntry(QEvent *e)
+ void onEntry(QEvent *e) Q_DECL_OVERRIDE
{
if (submarine->currentDirection() == SubMarine::Left) {
movementAnimation->setEndValue(QPointF(0,submarine->y()));
@@ -116,14 +116,14 @@ public:
}
protected:
- void onEntry(QEvent *e)
+ void onEntry(QEvent *e) Q_DECL_OVERRIDE
{
returnAnimation->stop();
returnAnimation->setEndValue(submarine->currentDirection() == SubMarine::Right ? 360. : 180.);
QAnimationState::onEntry(e);
}
- void onExit(QEvent *e)
+ void onExit(QEvent *e) Q_DECL_OVERRIDE
{
submarine->currentDirection() == SubMarine::Right ? submarine->setCurrentDirection(SubMarine::Left) : submarine->setCurrentDirection(SubMarine::Right);
QAnimationState::onExit(e);
diff --git a/examples/widgets/desktop/screenshot/screenshot.h b/examples/widgets/desktop/screenshot/screenshot.h
index 2331feeaec..6ad4281335 100644
--- a/examples/widgets/desktop/screenshot/screenshot.h
+++ b/examples/widgets/desktop/screenshot/screenshot.h
@@ -64,7 +64,7 @@ public:
Screenshot();
protected:
- void resizeEvent(QResizeEvent *event);
+ void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
private slots:
void newScreenshot();
diff --git a/examples/widgets/desktop/systray/window.h b/examples/widgets/desktop/systray/window.h
index c93228754b..24d0d3ae18 100644
--- a/examples/widgets/desktop/systray/window.h
+++ b/examples/widgets/desktop/systray/window.h
@@ -68,10 +68,10 @@ class Window : public QDialog
public:
Window();
- void setVisible(bool visible);
+ void setVisible(bool visible) Q_DECL_OVERRIDE;
protected:
- void closeEvent(QCloseEvent *event);
+ void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE;
private slots:
void setIcon(int index);
diff --git a/examples/widgets/dialogs/classwizard/classwizard.h b/examples/widgets/dialogs/classwizard/classwizard.h
index 34a35a2ce9..a709fd3405 100644
--- a/examples/widgets/dialogs/classwizard/classwizard.h
+++ b/examples/widgets/dialogs/classwizard/classwizard.h
@@ -59,7 +59,7 @@ class ClassWizard : public QWizard
public:
ClassWizard(QWidget *parent = 0);
- void accept();
+ void accept() Q_DECL_OVERRIDE;
};
//! [0]
@@ -107,7 +107,7 @@ public:
CodeStylePage(QWidget *parent = 0);
protected:
- void initializePage();
+ void initializePage() Q_DECL_OVERRIDE;
private:
QCheckBox *commentCheckBox;
@@ -128,7 +128,7 @@ public:
OutputFilesPage(QWidget *parent = 0);
protected:
- void initializePage();
+ void initializePage() Q_DECL_OVERRIDE;
private:
QLabel *outputDirLabel;
@@ -147,7 +147,7 @@ public:
ConclusionPage(QWidget *parent = 0);
protected:
- void initializePage();
+ void initializePage() Q_DECL_OVERRIDE;
private:
QLabel *label;
diff --git a/examples/widgets/dialogs/licensewizard/licensewizard.h b/examples/widgets/dialogs/licensewizard/licensewizard.h
index a6dc0aec53..afdb984700 100644
--- a/examples/widgets/dialogs/licensewizard/licensewizard.h
+++ b/examples/widgets/dialogs/licensewizard/licensewizard.h
@@ -78,7 +78,7 @@ class IntroPage : public QWizardPage
public:
IntroPage(QWidget *parent = 0);
- int nextId() const;
+ int nextId() const Q_DECL_OVERRIDE;
private:
QLabel *topLabel;
@@ -95,7 +95,7 @@ class EvaluatePage : public QWizardPage
public:
EvaluatePage(QWidget *parent = 0);
- int nextId() const;
+ int nextId() const Q_DECL_OVERRIDE;
private:
QLabel *nameLabel;
@@ -112,7 +112,7 @@ class RegisterPage : public QWizardPage
public:
RegisterPage(QWidget *parent = 0);
- int nextId() const;
+ int nextId() const Q_DECL_OVERRIDE;
private:
QLabel *nameLabel;
@@ -128,7 +128,7 @@ class DetailsPage : public QWizardPage
public:
DetailsPage(QWidget *parent = 0);
- int nextId() const;
+ int nextId() const Q_DECL_OVERRIDE;
private:
QLabel *companyLabel;
@@ -147,9 +147,9 @@ class ConclusionPage : public QWizardPage
public:
ConclusionPage(QWidget *parent = 0);
- void initializePage();
- int nextId() const;
- void setVisible(bool visible);
+ void initializePage() Q_DECL_OVERRIDE;
+ int nextId() const Q_DECL_OVERRIDE;
+ void setVisible(bool visible) Q_DECL_OVERRIDE;
private slots:
void printButtonClicked();
diff --git a/examples/widgets/draganddrop/draggableicons/dragwidget.h b/examples/widgets/draganddrop/draggableicons/dragwidget.h
index e9d3bb88c7..a1b570a876 100644
--- a/examples/widgets/draganddrop/draggableicons/dragwidget.h
+++ b/examples/widgets/draganddrop/draggableicons/dragwidget.h
@@ -55,10 +55,10 @@ public:
DragWidget(QWidget *parent = 0);
protected:
- void dragEnterEvent(QDragEnterEvent *event);
- void dragMoveEvent(QDragMoveEvent *event);
- void dropEvent(QDropEvent *event);
- void mousePressEvent(QMouseEvent *event);
+ void dragEnterEvent(QDragEnterEvent *event) Q_DECL_OVERRIDE;
+ void dragMoveEvent(QDragMoveEvent *event) Q_DECL_OVERRIDE;
+ void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
};
//! [0]
diff --git a/examples/widgets/draganddrop/draggabletext/dragwidget.h b/examples/widgets/draganddrop/draggabletext/dragwidget.h
index 4198e00091..a214ca0d66 100644
--- a/examples/widgets/draganddrop/draggabletext/dragwidget.h
+++ b/examples/widgets/draganddrop/draggabletext/dragwidget.h
@@ -54,9 +54,9 @@ public:
DragWidget(QWidget *parent = 0);
protected:
- void dragEnterEvent(QDragEnterEvent *event);
- void dropEvent(QDropEvent *event);
- void mousePressEvent(QMouseEvent *event);
+ void dragEnterEvent(QDragEnterEvent *event) Q_DECL_OVERRIDE;
+ void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
};
#endif // DRAGWIDGET_H
diff --git a/examples/widgets/draganddrop/dropsite/droparea.h b/examples/widgets/draganddrop/dropsite/droparea.h
index 6b4b3c49aa..6d4be00252 100644
--- a/examples/widgets/draganddrop/dropsite/droparea.h
+++ b/examples/widgets/draganddrop/dropsite/droparea.h
@@ -64,10 +64,10 @@ signals:
//! [DropArea header part2]
protected:
- void dragEnterEvent(QDragEnterEvent *event);
- void dragMoveEvent(QDragMoveEvent *event);
- void dragLeaveEvent(QDragLeaveEvent *event);
- void dropEvent(QDropEvent *event);
+ void dragEnterEvent(QDragEnterEvent *event) Q_DECL_OVERRIDE;
+ void dragMoveEvent(QDragMoveEvent *event) Q_DECL_OVERRIDE;
+ void dragLeaveEvent(QDragLeaveEvent *event) Q_DECL_OVERRIDE;
+ void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE;
private:
QLabel *label;
diff --git a/examples/widgets/draganddrop/fridgemagnets/dragwidget.h b/examples/widgets/draganddrop/fridgemagnets/dragwidget.h
index 6d231b73ff..6c45e19da8 100644
--- a/examples/widgets/draganddrop/fridgemagnets/dragwidget.h
+++ b/examples/widgets/draganddrop/fridgemagnets/dragwidget.h
@@ -55,10 +55,10 @@ public:
DragWidget(QWidget *parent = 0);
protected:
- void dragEnterEvent(QDragEnterEvent *event);
- void dragMoveEvent(QDragMoveEvent *event);
- void dropEvent(QDropEvent *event);
- void mousePressEvent(QMouseEvent *event);
+ void dragEnterEvent(QDragEnterEvent *event) Q_DECL_OVERRIDE;
+ void dragMoveEvent(QDragMoveEvent *event) Q_DECL_OVERRIDE;
+ void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
};
//! [0]
diff --git a/examples/widgets/draganddrop/puzzle/pieceslist.h b/examples/widgets/draganddrop/puzzle/pieceslist.h
index c032a67364..8baed434db 100644
--- a/examples/widgets/draganddrop/puzzle/pieceslist.h
+++ b/examples/widgets/draganddrop/puzzle/pieceslist.h
@@ -52,10 +52,10 @@ public:
void addPiece(QPixmap pixmap, QPoint location);
protected:
- void dragEnterEvent(QDragEnterEvent *event);
- void dragMoveEvent(QDragMoveEvent *event);
- void dropEvent(QDropEvent *event);
- void startDrag(Qt::DropActions supportedActions);
+ void dragEnterEvent(QDragEnterEvent *event) Q_DECL_OVERRIDE;
+ void dragMoveEvent(QDragMoveEvent *event) Q_DECL_OVERRIDE;
+ void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE;
+ void startDrag(Qt::DropActions supportedActions) Q_DECL_OVERRIDE;
int m_PieceSize;
};
diff --git a/examples/widgets/draganddrop/puzzle/puzzlewidget.h b/examples/widgets/draganddrop/puzzle/puzzlewidget.h
index d437993b64..2793f2aa77 100644
--- a/examples/widgets/draganddrop/puzzle/puzzlewidget.h
+++ b/examples/widgets/draganddrop/puzzle/puzzlewidget.h
@@ -67,12 +67,12 @@ signals:
void puzzleCompleted();
protected:
- void dragEnterEvent(QDragEnterEvent *event);
- void dragLeaveEvent(QDragLeaveEvent *event);
- void dragMoveEvent(QDragMoveEvent *event);
- void dropEvent(QDropEvent *event);
- void mousePressEvent(QMouseEvent *event);
- void paintEvent(QPaintEvent *event);
+ void dragEnterEvent(QDragEnterEvent *event) Q_DECL_OVERRIDE;
+ void dragLeaveEvent(QDragLeaveEvent *event) Q_DECL_OVERRIDE;
+ void dragMoveEvent(QDragMoveEvent *event) Q_DECL_OVERRIDE;
+ void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
private:
int findPiece(const QRect &pieceRect) const;
diff --git a/examples/widgets/effects/blurpicker/blureffect.h b/examples/widgets/effects/blurpicker/blureffect.h
index 97459ac707..3c0399e24f 100644
--- a/examples/widgets/effects/blurpicker/blureffect.h
+++ b/examples/widgets/effects/blurpicker/blureffect.h
@@ -53,7 +53,7 @@ public:
QRectF boundingRect() const;
- void draw(QPainter *painter);
+ void draw(QPainter *painter) Q_DECL_OVERRIDE;
private:
void adjustForItem();
diff --git a/examples/widgets/effects/blurpicker/blurpicker.h b/examples/widgets/effects/blurpicker/blurpicker.h
index 4c3d463fa8..0d06f6c28f 100644
--- a/examples/widgets/effects/blurpicker/blurpicker.h
+++ b/examples/widgets/effects/blurpicker/blurpicker.h
@@ -59,9 +59,9 @@ public:
void setIndex(qreal);
protected:
- void keyPressEvent(QKeyEvent *event);
- void resizeEvent(QResizeEvent *event);
- void mousePressEvent(QMouseEvent *event);
+ void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
+ void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
private:
void setupScene();
diff --git a/examples/widgets/effects/lighting/lighting.h b/examples/widgets/effects/lighting/lighting.h
index c33bb7ad16..29c6616c0c 100644
--- a/examples/widgets/effects/lighting/lighting.h
+++ b/examples/widgets/effects/lighting/lighting.h
@@ -58,7 +58,7 @@ private:
void setupScene();
protected:
- void resizeEvent(QResizeEvent *event);
+ void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
private:
qreal angle;
diff --git a/examples/widgets/gestures/imagegestures/imagewidget.h b/examples/widgets/gestures/imagegestures/imagewidget.h
index d061935fe0..fc1faf9379 100644
--- a/examples/widgets/gestures/imagegestures/imagewidget.h
+++ b/examples/widgets/gestures/imagegestures/imagewidget.h
@@ -65,10 +65,10 @@ public:
void grabGestures(const QList<Qt::GestureType> &gestures);
protected:
- bool event(QEvent *event);
- void paintEvent(QPaintEvent *event);
- void resizeEvent(QResizeEvent *event);
- void mouseDoubleClickEvent(QMouseEvent *event);
+ bool event(QEvent *event) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
+ void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
+ void mouseDoubleClickEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
private:
bool gestureEvent(QGestureEvent *event);
diff --git a/examples/widgets/graphicsview/basicgraphicslayouts/layoutitem.h b/examples/widgets/graphicsview/basicgraphicslayouts/layoutitem.h
index 143aefe211..7b12aa805b 100644
--- a/examples/widgets/graphicsview/basicgraphicslayouts/layoutitem.h
+++ b/examples/widgets/graphicsview/basicgraphicslayouts/layoutitem.h
@@ -51,12 +51,12 @@ public:
LayoutItem(QGraphicsItem *parent = 0);
~LayoutItem();
// Inherited from QGraphicsLayoutItem
- void setGeometry(const QRectF &geom);
- QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const;
+ void setGeometry(const QRectF &geom) Q_DECL_OVERRIDE;
+ QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const Q_DECL_OVERRIDE;
// Inherited from QGraphicsItem
- QRectF boundingRect() const;
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
+ QRectF boundingRect() const Q_DECL_OVERRIDE;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) Q_DECL_OVERRIDE;
private:
QPixmap *m_pix;
diff --git a/examples/widgets/graphicsview/boxes/glbuffers.h b/examples/widgets/graphicsview/boxes/glbuffers.h
index 304b3da87a..6c6c80eed2 100644
--- a/examples/widgets/graphicsview/boxes/glbuffers.h
+++ b/examples/widgets/graphicsview/boxes/glbuffers.h
@@ -101,8 +101,8 @@ public:
GLTexture2D(int width, int height);
explicit GLTexture2D(const QString& fileName, int width = 0, int height = 0);
void load(int width, int height, QRgb *data);
- virtual void bind();
- virtual void unbind();
+ virtual void bind() Q_DECL_OVERRIDE;
+ virtual void unbind() Q_DECL_OVERRIDE;
};
class GLTexture3D : public GLTexture
@@ -112,8 +112,8 @@ public:
// TODO: Implement function below
//GLTexture3D(const QString& fileName, int width = 0, int height = 0);
void load(int width, int height, int depth, QRgb *data);
- virtual void bind();
- virtual void unbind();
+ virtual void bind() Q_DECL_OVERRIDE;
+ virtual void unbind() Q_DECL_OVERRIDE;
};
class GLTextureCube : public GLTexture
@@ -122,8 +122,8 @@ public:
GLTextureCube(int size);
explicit GLTextureCube(const QStringList& fileNames, int size = 0);
void load(int size, int face, QRgb *data);
- virtual void bind();
- virtual void unbind();
+ virtual void bind() Q_DECL_OVERRIDE;
+ virtual void unbind() Q_DECL_OVERRIDE;
};
// TODO: Define and implement class below
@@ -137,7 +137,7 @@ public:
void begin(int face);
// end rendering
void end();
- virtual bool failed() const {return m_failed || m_fbo.failed();}
+ virtual bool failed() const Q_DECL_OVERRIDE {return m_failed || m_fbo.failed();}
static void getViewMatrix(QMatrix4x4& mat, int face);
static void getProjectionMatrix(QMatrix4x4& mat, float nearZ, float farZ);
diff --git a/examples/widgets/graphicsview/boxes/main.cpp b/examples/widgets/graphicsview/boxes/main.cpp
index dcbf72e992..d138a268d9 100644
--- a/examples/widgets/graphicsview/boxes/main.cpp
+++ b/examples/widgets/graphicsview/boxes/main.cpp
@@ -58,7 +58,7 @@ public:
}
protected:
- void resizeEvent(QResizeEvent *event) {
+ void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE {
if (scene())
scene()->setSceneRect(QRect(QPoint(0, 0), event->size()));
QGraphicsView::resizeEvent(event);
diff --git a/examples/widgets/graphicsview/boxes/qtbox.h b/examples/widgets/graphicsview/boxes/qtbox.h
index f71d66d3af..7b6975d80e 100644
--- a/examples/widgets/graphicsview/boxes/qtbox.h
+++ b/examples/widgets/graphicsview/boxes/qtbox.h
@@ -54,18 +54,18 @@ public:
ItemBase(int size, int x, int y);
virtual ~ItemBase();
- virtual QRectF boundingRect() const;
- virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+ virtual QRectF boundingRect() const Q_DECL_OVERRIDE;
+ virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE;
protected:
virtual ItemBase *createNew(int size, int x, int y) = 0;
- virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
- virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
- virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *event);
- virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
- virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
- virtual void keyPressEvent(QKeyEvent *event);
- virtual void wheelEvent(QGraphicsSceneWheelEvent *event);
- virtual int type() const;
+ virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event) Q_DECL_OVERRIDE;
+ virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
+ virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *event) Q_DECL_OVERRIDE;
+ virtual void mousePressEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
+ virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;
+ virtual void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
+ virtual void wheelEvent(QGraphicsSceneWheelEvent *event) Q_DECL_OVERRIDE;
+ virtual int type() const Q_DECL_OVERRIDE;
bool isInResizeArea(const QPointF &pos);
static void duplicateSelectedItems(QGraphicsScene *scene);
@@ -83,9 +83,9 @@ class QtBox : public ItemBase
public:
QtBox(int size, int x, int y);
virtual ~QtBox();
- virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+ virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE;
protected:
- virtual ItemBase *createNew(int size, int x, int y);
+ virtual ItemBase *createNew(int size, int x, int y) Q_DECL_OVERRIDE;
private:
QVector3D m_vertices[8];
QVector3D m_texCoords[4];
@@ -97,9 +97,9 @@ class CircleItem : public ItemBase
{
public:
CircleItem(int size, int x, int y);
- virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+ virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE;
protected:
- virtual ItemBase *createNew(int size, int x, int y);
+ virtual ItemBase *createNew(int size, int x, int y) Q_DECL_OVERRIDE;
QColor m_color;
};
@@ -108,9 +108,9 @@ class SquareItem : public ItemBase
{
public:
SquareItem(int size, int x, int y);
- virtual void paint(QPainter *painter, const QStyl